IP Library Granted Patent US 12,282,921
Granted Patent B2
US 12,282,921 · App. 18/137,336 · Granted Apr 22, 2025

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

Inventor: Yifang Shi (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06Q20/401H04L9/50G06Q20/3825
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,282,921
App. No.
18/137,336
Granted
Apr 22, 2025
Kind
B2
Abstract

Provided is a blockchain-based data processing method performed by a computer device. The method includes: determining a plurality of transactions having a same group identifier in a transaction pool as group transaction data; packetizing each of the group transaction data into a proposal block, and executing each of the group transaction data in the proposal block to obtain a corresponding transaction execution result; when at least one transaction execution result comprises a transaction execution failure result, setting the transaction execution result to each of the group transaction data, and updating the proposal block according to the transaction execution failure result to obtain a target proposal block; and when the target proposal block is passed by consensus, performing accounting on the target proposal block and the transaction execution failure result corresponding to each of the group transaction data.

Claims (79)

1. A method for processing blockchain-based transactions performed by a computer device acting as a consensus node of a blockchain network, the method comprising:

determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data, wherein the plurality of transactions are submitted to the transaction pool by a plurality of terminals within a predefined time period, each transaction having a unique execution sequence identifier;

packetizing each of the group transaction data into a proposal block, and executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result;

when at least one transaction execution result comprises a transaction execution failure result, resetting each of the group transaction data with the transaction execution failure result, and updating the proposal block according to the transaction execution failure result corresponding to each of the group transaction data to obtain a target proposal block, further including:

generating a result Merkle tree according to the transaction execution failure result corresponding to each of the group transaction data, the result Merkle tree comprising a root hash value; and

adding the root hash value to a block header of the proposal block to obtain the target proposal block; and

when the target proposal block is passed by consensus, performing accounting on the target proposal block and the transaction execution failure result corresponding to each of the group transaction data; and

notifying each of the plurality of terminals of a transaction execution failure result associated with a transaction submitted by the terminal.

2. The method according to claim 1 , wherein the determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data comprises:

acquiring, by the consensus node, transaction data corresponding to the plurality of transactions from the transaction pool, the transaction data comprising a group identifier and a group transaction quantity;

adding the transaction data to a group cache queue corresponding to the group identifier to obtain an updated group cache queue within the predefined time period until when a quantity of transactions in the updated group cache queue is equal to the group transaction quantity; and

determining the transaction data in the updated group cache queue as the group transaction data.

3. The method according to claim 1 , wherein

the packetizing each of the group transaction data into a proposal block comprises:

sorting the plurality of transactions in the group transaction according to their corresponding execution sequence identifiers to obtain a sorted group transaction data; and

packetizing the sorted group transaction data into the proposal block.

4. The method according to claim 1 , wherein

a quantity of the group transaction data is S, and S is a positive integer greater than 1; and

the executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result comprises:

acquiring k-th group transaction data in the proposal block, and executing the k-th group transaction data to obtain a transaction execution result corresponding to the k-th group transaction data, k being a positive integer less than S;

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution success result, executing (k+1)-th group transaction data in the proposal block; and

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution failure result, resetting each of the (k+1)-th group transaction data to the S-th group transaction data in the proposal block with the transaction execution failure result.

5. The method according to claim 1 , further comprising:

broadcasting the proposal block to a communicable consensus node of the blockchain network, the communicable consensus node being configured to execute each of the group transaction data in the proposal block and update the proposal block according to the corresponding transaction execution result to obtain a communicable target proposal block;

receiving a block hash value of the communicable target proposal block transmitted by the communicable consensus node, and determining the block hash value of the communicable target proposal block as a to-be-matched block hash value; and

when a quantity of the to-be-matched block hash values that are the same as a block hash value of the target proposal block is greater than a consensus quantity threshold, determining that the target proposal block is passed by consensus.

6. A computer device acting as a consensus node of a blockchain network, the computer device comprising: a processor, a memory and a network interface;

the processor being connected to the memory and the network interface, the network interface being configured to provide a data communication function, the memory being configured to store a computer program that, when executed by the processor, causes the computer device to perform a method for processing blockchain-based transactions, the method including:

determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data, wherein the plurality of transactions are submitted to the transaction pool by a plurality of terminals within a predefined time period, each transaction having a unique execution sequence identifier;

packetizing each of the group transaction data into a proposal block, and executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result;

when at least one transaction execution result comprises a transaction execution failure result, resetting each of the group transaction data with the transaction execution failure result, and updating the proposal block according to the transaction execution failure result corresponding to each of the group transaction data to obtain a target proposal block, further including:

generating a result Merkle tree according to the transaction execution failure result corresponding to each of the group transaction data, the result Merkle tree comprising a root hash value; and

adding the root hash value to a block header of the proposal block to obtain the target proposal block; and

when the target proposal block is passed by consensus, performing accounting on the target proposal block and the transaction execution failure result corresponding to each of the group transaction data; and

notifying each of the plurality of terminals of a transaction execution failure result associated with a transaction submitted by the terminal.

7. The computer device according to claim 6 , wherein the determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data comprises:

acquiring, by the consensus node, transaction data corresponding to the plurality of transactions from the transaction pool, the transaction data comprising a group identifier and a group transaction quantity;

adding the transaction data to a group cache queue corresponding to the group identifier to obtain an updated group cache queue within the predefined time period until when a quantity of transactions in the updated group cache queue is equal to the group transaction quantity; and

determining the transaction data in the updated group cache queue as the group transaction data.

8. The computer device according to claim 6 , wherein

the packetizing each of the group transaction data into a proposal block comprises:

sorting the plurality of transactions in the group transaction according to their corresponding execution sequence identifiers to obtain a sorted group transaction data; and

packetizing the sorted group transaction data into the proposal block.

9. The computer device according to claim 6 , wherein

a quantity of the group transaction data is S, and S is a positive integer greater than 1; and

the executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result comprises:

acquiring k-th group transaction data in the proposal block, and executing the k-th group transaction data to obtain a transaction execution result corresponding to the k-th group transaction data, k being a positive integer less than S;

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution success result, executing (k+1)-th group transaction data in the proposal block; and

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution failure result, resetting each of the (k+1)-th group transaction data to the S-th group transaction data in the proposal block with the transaction execution failure result.

10. The computer device according to claim 6 , wherein the method further comprises:

broadcasting the proposal block to a communicable consensus node of the blockchain network, the communicable consensus node being configured to execute each of the group transaction data in the proposal block and update the proposal block according to the corresponding transaction execution result to obtain a communicable target proposal block;

receiving a block hash value of the communicable target proposal block transmitted by the communicable consensus node, and determining the block hash value of the communicable target proposal block as a to-be-matched block hash value; and

when a quantity of the to-be-matched block hash values that are the same as a block hash value of the target proposal blocks is greater than a consensus quantity threshold, determining that the target proposal block is passed by consensus.

11. A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor of a computer device acting as a consensus node of a blockchain network, causes the computer device to perform a method for processing blockchain-based transactions, the method including:

determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data, wherein the plurality of transactions are submitted to the transaction pool by a plurality of terminals within a predefined time period, each transaction having a unique execution sequence identifier;

packetizing each of the group transaction data into a proposal block, and executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result;

when at least one transaction execution result comprises a transaction execution failure result, resetting each of the group transaction data with the transaction execution failure result, and updating the proposal block according to the transaction execution failure result corresponding to each of the group transaction data to obtain a target proposal block, further including:

generating a result Merkle tree according to the transaction execution failure result corresponding to each of the group transaction data, the result Merkle tree comprising a root hash value; and

adding the root hash value to a block header of the proposal block to obtain the target proposal block; and

when the target proposal block is passed by consensus, performing accounting on the target proposal block and the transaction execution failure result corresponding to each of the group transaction data; and

notifying each of the plurality of terminals of a transaction execution failure result associated with a transaction submitted by the terminal.

12. The non-transitory computer-readable storage medium according to claim 11 , wherein the determining, by the consensus node, a plurality of transactions having a same group identifier in a transaction pool as group transaction data comprises:

acquiring, by the consensus node, transaction data corresponding to the plurality of transactions from the transaction pool, the transaction data comprising a group identifier and a group transaction quantity;

adding the transaction data to a group cache queue corresponding to the group identifier to obtain an updated group cache queue within the predefined time period until when a quantity of transactions in the updated group cache queue is equal to the group transaction quantity; and

determining the transaction data in the updated group cache queue as the group transaction data.

13. The non-transitory computer-readable storage medium according to claim 11 , wherein

the packetizing each of the group transaction data into a proposal block comprises:

sorting the plurality of transactions in the group transaction according to their corresponding execution sequence identifiers to obtain a sorted group transaction dat; and

packetizing the sorted group transaction data into the proposal block.

14. The non-transitory computer-readable storage medium according to claim 11 , wherein

a quantity of the group transaction data is S, and S is a positive integer greater than 1; and

the executing each of the group transaction data in the proposal block according to its corresponding execution sequence identifier to obtain a corresponding transaction execution result comprises:

acquiring k-th group transaction data in the proposal block, and executing the k-th group transaction data to obtain a transaction execution result corresponding to the k-th group transaction data, k being a positive integer less than S;

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution success result, executing (k+1)-th group transaction data in the proposal block; and

when the transaction execution result corresponding to the k-th group transaction data is a transaction execution failure result, resetting each of the (k+1)-th group transaction data to the S-th group transaction data in the proposal block with the transaction execution failure result.

15. The non-transitory computer-readable storage medium according to claim 11 , wherein the method further comprises:

broadcasting the proposal block to a communicable consensus node of the blockchain network, the communicable consensus node being configured to execute each of the group transaction data in the proposal block and update the proposal block according to the corresponding transaction execution result to obtain a communicable target proposal block;

receiving a block hash value of the communicable target proposal block transmitted by the communicable consensus node, and determining the block hash value of the communicable target proposal block as a to-be-matched block hash value; and

when a quantity of the to-be-matched block hash values that are the same as a block hash value of the target proposal blocks is greater than a consensus quantity threshold, determining that the target proposal block is passed by consensus.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 2, 2023
From: SHI, YIFANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 063508/0228 →
Priority Claims (1)
CN 202110901263.X · Aug 6, 2021 · national
Continuity (2)
Continuation PCTCN2022099549 · Jun 17, 2022
Related Publication 20230259938A1 · Aug 17, 2023
References Cited (23)
US 20140351142A1 · Royyuru · 2014 [cited by applicant]
US 20170163733A1 · Grefen · 2017 [cited by examiner]
US 20200344070A1 · Li · 2020 [cited by examiner]
US 20210165810A1 · Yang et al. · 2021 [cited by applicant]
US 20210226773A1 · Snow · 2021 [cited by examiner]
US 20230247094A1 · Wang · 2023 [cited by examiner]
CN 104680363A · 2015 [cited by applicant]
CN 108769173A · 2018 [cited by applicant]
CN 109995850A · 2019 [cited by applicant]
CN 110415117A · 2019 [cited by applicant]
CN 111967862A · 2020 [cited by applicant]
CN 112685796A · 2021 [cited by applicant]
CN 113312362 · 2021 [cited by examiner]
CN 113342838A · 2021 [cited by applicant]
JP 2021511561A · 2021 [cited by applicant]
JP 2021515311A · 2021 [cited by applicant]
JP 2022515949A · 2022 [cited by applicant]
WO WO2019142884A1 · 2019 [cited by applicant]
Pandey, et al. in “Transaction Scheduling Protocols for Controlling Priority Inversion: A Review,” from Computer Science Review, 2020 (Year: 2020). [cited by examiner]
Tencent Technology, Japanese Office Action, JP Patent Application No. 2023-558388, Nov. 22, 2024, 25 pgs. [cited by applicant]
Tencent Technology, WO, PCT/CN2022/099549, Sep. 14, 2022, 5 pgs. [cited by applicant]
Tencent Technology, IPRP, PCT/CN2022/099549, Feb. 6, 2024, 6 pgs. [cited by applicant]
Tencent Technology, ISR, PCT/CN2022/099549, Sep. 14, 2022, 3 pgs. [cited by applicant]