IP Library Granted Patent US 12,355,902
Granted Patent B2
US 12,355,902 · App. 17/741,131 · Granted Jul 8, 2025

Blockchain-based data processing method, apparatus, device, and readable storage medium

Inventor: Pan Liu (Shenzhen, CN)
Assignee: Tencent Technology (Shenzhen) Company Limited
H04L9/50H04L9/3236
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,355,902
App. No.
17/741,131
Granted
Jul 8, 2025
Kind
B2
Abstract

A blockchain-based data processing method, apparatus, device, and readable storage medium may avoid repeated transmission or storage of the transaction data, which avoids a waste of storage resources. Target transaction data is obtained from a transaction pool, and a to-be-checked hash value of the target transaction data is generated. A block list of historical blocks that have been uploaded to a blockchain is obtained, and an upload status of the target transaction data is determined according to the block list and the to-be-checked hash value. Based on this determination, the target transaction data may be deleted when the upload status of the target transaction data is in an uploaded state, or a target block is generated and uploaded according to the target transaction data when the upload status of the target transaction data is in an un-uploaded state.

Claims (68)

1. A computer implemented method implemented using at least one hardware processor, the method comprising:

obtaining, by a first node of a blockchain, target transaction data from a transaction pool;

generating, by the first node of the blockchain, a to-be-checked hash value of the target transaction data;

obtaining, by the first node of the blockchain, a block list, the block list comprising a list of historical blocks that have been stored by the first node of the blockchain and corresponding historical hash values of transaction data in the historical blocks; and

determining, by the first node of the blockchain, whether there is a match between any of the historical hash values and the to-be-checked hash value; wherein:

based on a determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, deleting the target transaction data from the transaction pool when the upload status of the target transaction data is in an uploaded state;

based on a determination that there is not a match between any of the historical hash values of the block list and the to-be-checked hash value:

generating a target block according to the target transaction data; and broadcasting, by the first node and to one or more additional nodes of the blockchain, the target block; and wherein based on the determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, determine whether a second target block associated with the to-be-checked hash value fails consensus verification.

2. The computer implemented method according to claim 1 , further comprising:

based on a determination that there is no match between any of the historical hash values of the block list and the to-be-checked hash value, determine whether the target block fails consensus verification.

3. The computer implemented method according to claim 1 , wherein after the obtaining the target transaction data, the method further comprises:

adding the target transaction data to a to-be-stored transaction sequence that is used for generating the target block, wherein the deleting further comprises: deleting the target transaction data from the to-be-stored transaction sequence.

4. The computer implemented method according to claim 1 , wherein the generating the target block further comprises:

adding the target transaction data to a to-be-stored transaction sequence; and

generating the target block according to the to-be-stored transaction sequence.

5. The computer implemented method according to claim 4 , wherein the generating the target block according to the to-be-stored transaction sequence further comprises:

determining a quantity of transaction data in the to-be-stored transaction sequence as a transaction data quantity;

using a quantity difference between a sequence quantity threshold and the transaction data quantity as a supplementary quantity, when the transaction data quantity is less than a sequence quantity threshold;

obtaining supplementary transaction data from the transaction pool, wherein a quantity of the supplementary transaction data is equal to the supplementary quantity; and

generating the target block according to the supplementary transaction data and the to-be-stored transaction sequence.

6. The computer implemented method according to claim 5 , wherein the generating the target block according to the supplementary transaction data and the to-be-stored transaction sequence further comprises:

generating the target block according to the supplementary transaction data and the to-be-stored transaction sequence.

7. The computer implemented method according to claim 1 , wherein the method further comprises:

determining target block information of the target block when storing of the target block is complete, wherein the target block information comprises a hash value of transaction data in the target block;

updating the block list according to the target block information; and

deleting the transaction data in the target block from the transaction pool.

8. The computer implemented method according to claim 7 , wherein the updating the block list further comprises:

determining a quantity of historical block information in the block list as a block information quantity; and

adding, when the block information quantity is less than a list quantity threshold, the target block information to the block list.

9. The computer implemented method according to claim 1 , wherein the method further comprises:

determining, when a first system time reaches a first heartbeat update cycle, a node quantity for nodes in a blockchain network;

updating a list quantity threshold of the block list according to the node quantity; and

obtaining an updated list quantity threshold based on the updated list quantity threshold, wherein the node quantity and the updated list quantity threshold have a proportional relationship.

10. The computer implemented method according to claim 9 , wherein the method further comprises:

determining, when a second system time reaches a second heartbeat update cycle, at least two historical hash values in the block list;

generating a to-be-filtered hash value of transaction data in the transaction pool;

matching the historical hash values against the to-be-filtered hash value; and

performing filtering processing on the transaction data in the transaction pool according to the matching.

11. The computer implemented method according to claim 10 , wherein the performing filtering processing further comprises:

determining, when there is a match between one of the historical hash values and the to-be-filtered hash value, the transaction data corresponding to the to-be-filtered hash value as duplicate transaction data; and

deleting the duplicate transaction data from the transaction pool.

12. The computer implemented method according to claim 1 , wherein the determining whether there is a match comprises:

determining a quantity of the target transaction data obtained from the transaction pool as a transaction data quantity; and

determining, when the transaction data quantity reaches a quantity threshold, whether there is a match between any of the historical hash values and the to-be-checked hash value.

13. The computer implemented method according to claim 1 , wherein the obtaining the target transaction data from the transaction pool further comprises:

obtaining one target transaction data from the transaction pool at a time;

obtaining a quantity of target transaction data from the transaction pool according to a sequence quantity threshold of a to-be-stored transaction sequence at a time, wherein the quantity of target transaction data is equal to the sequence quantity threshold, and the to-be-stored transaction sequence is used for generating the target block; or

obtaining at least two target transaction data from the transaction pool at a time, wherein a quantity of the at least two target transaction data is less than the sequence quantity threshold.

14. A non-transitory computer-readable storage medium, storing instructions that, when executed by a processor, causing the processor to:

obtain, by a first node of a blockchain, target transaction data from a transaction pool;

generate, by the first node of the blockchain, a to-be-checked hash value of the target transaction data;

obtain, by the first node of the blockchain, a block list, the block list comprising a list of historical blocks that have been stored by the first node of the blockchain and corresponding historical hash values of transaction data in the historical blocks; and

determine, by the first node of the blockchain, whether there is a match between any of the historical hash values and the to-be-checked hash value, wherein:

based on a determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, delete the target transaction data from the transaction pool;

based on a determination that there is not a match between any of the historical hash values of the block list and the to-be-checked hash value:

generate a target block according to the target transaction data; and broadcast, by the first node and to one or more additional nodes of the blockchain, the target block; and based on the determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, determine whether a second target block associated with the to-be-checked hash value fails consensus verification.

15. A blockchain-based data processing apparatus, comprising:

one or more processors; and

memory storing computer-readable instructions that when executed by the one or more processors, cause the blockchain-based data processing apparatus configure to:

obtain, by a first node of a blockchain, target transaction data from a transaction pool;

generate, by the first node of the blockchain, a to-be-checked hash value of the target transaction data; obtain, by the first node of the blockchain, a block list, the block list comprising a list of historical blocks that have been stored by the first node of the-a blockchain and corresponding historical hash values of transaction data in the historical blocks; and

determine, by the first node of the blockchain, whether there is a match between any of the historical hash values and the to-be-checked hash value; wherein:

based on a determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, delete the target transaction data from the transaction pool;

based on a determination that there is not a match between any of the historical hash values of the block list and the to-be-checked hash value: generate a target block according to the target transaction data; and broadcast, by the first node and to one or more additional nodes of the blockchain; and wherein based on the determination that there is a match between one of the historical hash values of the block list and the to-be-checked hash value, determine whether a second target block associated with the to-be-checked hash value fails consensus verification.

16. The non-transitory computer readable storage medium according to claim 14 , further storing instructions that, when executed by the processor, cause the processor to:

based on a determination that there is no match between any of the historical hash values of the block list and the to-be-checked hash value, determine whether the target block fails consensus verification.

17. The blockchain-based data processing according to claim 15 , the memory further storing instructions that, when executed by the one or more processors, cause the blockchain-based data processing apparatus to:

based on a determination that there is no match between any of the historical hash values of the block list and the to-be-checked hash value, whether the target block fails consensus verification.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 10, 2022
From: LIU, PAN
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 059885/0219 →
Priority Claims (1)
CN 202010430099.4 · May 20, 2020 · national
Continuity (2)
Continuation PCTCN2021088633 · Apr 21, 2021
Related Publication 20220271960A1 · Aug 25, 2022
References Cited (25)
US 8229961B2 · Whitehouse · 2012 [cited by examiner]
US 10602409B1 · Oroskar · 2020 [cited by examiner]
US 10867299B2 · Cheng · 2020 [cited by examiner]
US 11341493B2 · Cheng · 2022 [cited by examiner]
US 20150058583A1 · Baldwin et al. · 2015 [cited by applicant]
US 20190050831A1 · Kikinis · 2019 [cited by examiner]
US 20190088099A1 · Garg · 2019 [cited by examiner]
US 20190251557A1 · Jin · 2019 [cited by examiner]
US 20200286082A1 · Cheng · 2020 [cited by examiner]
US 20200394648A1 · Blackshear · 2020 [cited by examiner]
US 20210065169A1 · Cheng · 2021 [cited by examiner]
US 20220012233A1 · Thurau · 2022 [cited by examiner]
US 20220391893A1 · Brezo Fernández · 2022 [cited by examiner]
US 20220391900A1 · Wuest · 2022 [cited by examiner]
US 20240184886A1 · Kutner · 2024 [cited by examiner]
CN 103731423A · 2014 [cited by applicant]
CN 109064291A · 2018 [cited by applicant]
CN 109711839A · 2019 [cited by applicant]
CN 110636009A · 2019 [cited by examiner]
CN 110738497A · 2020 [cited by applicant]
CN 111130801A · 2020 [cited by applicant]
CN 111600720A · 2020 [cited by applicant]
CN 111932227A · 2020 [cited by examiner]
WO WO2018158936A1 · 2018 [cited by applicant]
International Search Report and Written Opinion received for Application No. PCT/CN2021/088633 mailed Jul. 21, 2021 (English and Chinese languages) (11 pages). [cited by applicant]