IP Library Granted Patent US 10,509,919
Granted Patent B1
US 10,509,919 · App. 16/424,683 · Granted Dec 17, 2019

Blockchain-based transaction processing method and apparatus

Inventors: Jiyuan Wang (Hangzhou, CN); Huabing Du (Hangzhou, CN); Xuebing Yan (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F21/6227G06Q20/389G06Q20/0658
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 10,509,919
App. No.
16/424,683
Granted
Dec 17, 2019
Kind
B1
Abstract

A target transaction initiated by a member node device in a blockchain is received, where the target transaction include a reference time parameter, and where the reference time parameter is used to determine whether the target transaction is a valid transaction within a transaction validity period. Based on the reference time parameter, a determination is performed as to whether the target transaction is a valid transaction within a transaction validity period. In response to determining that the target transaction is a valid transaction within the transaction validity period, the target transaction is recorded to a generated candidate block.

Claims (55)

1. A computer-implemented method for processing blockchain-based transactions, comprising:

receiving a target transaction initiated by a member node device in a blockchain, wherein the target transaction comprises a reference time parameter, wherein the reference time parameter is a reference time stamp generated when the target transaction is created, wherein a transaction validity period corresponds to a numerical interval between a first value and a second value, wherein the first value is a difference between a creation time stamp of a candidate block and a first threshold, and wherein the second value is a sum of the creation time stamp of the candidate block and a second threshold, and wherein the reference time parameter is used to determine whether the target transaction is a valid transaction within the transaction validity period;

determining, based on the reference time parameter, whether the target transaction is a valid transaction within the transaction validity period, wherein determining whether the target transaction is the valid transaction period comprises:

comparing the reference time stamp with each of the first value and the second value to determine whether the reference time stamp is greater than the first value and less than the second value, and

in response to determining that the reference time stamp is greater than the first value and less than the second value, determining that the target transaction is a valid transaction within the transaction validity period; and

in response to determining that the target transaction is a valid transaction within the transaction validity period, recording the target transaction to a generated candidate block.

2. The computer-implemented method of claim 1 , wherein the reference time parameter is a reference block height value generated when the target transaction is created, wherein the transaction validity period corresponds to a numerical interval between a third value and a block height value of the candidate block in the blockchain, wherein the third value is a difference between the block height value of the candidate block in the blockchain and a third threshold, and wherein determining, based on the reference time parameter, whether the target transaction is the valid transaction within the transaction validity period comprises:

comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value to determine whether the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain; and

in response to determining that the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain, determining that the target transaction is a valid transaction within the transaction validity period.

3. The computer-implemented method of claim 2 , wherein before comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value, the method further comprises:

determining whether a block number of the candidate block is greater than a block number of a latest block in the blockchain; and

in response to determining that the block number of the candidate block is greater than the block number of a latest block in the blockchain, comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value.

4. The computer-implemented method of claim 3 , wherein the target transaction further comprises a unique identifier of the target transaction, wherein recording the target transaction to the candidate block in response to determining that the target transaction is the valid transaction within the transaction validity period comprises:

in response to determining that the target transaction is a valid transaction within the transaction validity period, querying whether a transaction idempotent record corresponding to the unique identifier of the target transaction is stored in a predetermined transaction idempotent table, wherein the predetermined transaction idempotent table is used to store a transaction idempotent record corresponding to a valid transaction within the transaction validity period; and

in response to determining that the transaction idempotent record corresponding to the unique identifier of the target transaction is not stored in the predetermined transaction idempotent table, recording the target transaction to the candidate block.

5. The computer-implemented method of claim 4 , wherein the transaction idempotent record indicates that a transaction corresponding to the transaction idempotent record has been successfully recorded to a distributed database of the blockchain; and

wherein the method further comprises:

in response to determining that the target transaction is recorded to the candidate block, and that a consensus on the candidate block has been reached and the candidate block is successfully stored to the distributed database of the blockchain, generating the transaction idempotent record corresponding to the unique identifier of the target transaction; and

inserting the transaction idempotent record into the predetermined transaction idempotent table.

6. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:

receiving a target transaction initiated by a member node device in a blockchain, wherein the target transaction comprises a reference time parameter, wherein the reference time parameter is a reference time stamp generated when the target transaction is created, wherein a transaction validity period corresponds to a numerical interval between a first value and a second value, wherein the first value is a difference between a creation time stamp of a candidate block and a first threshold, and wherein the second value is a sum of the creation time stamp of a candidate block and a second threshold, and wherein the reference time parameter is used to determine whether the target transaction is a valid transaction within the transaction validity period;

determining, based on the reference time parameter, whether the target transaction is a valid transaction within the transaction validity period, wherein determining whether the target transaction is the valid transaction comprises:

comparing the reference time stamp with each of the first value and the second value to determine whether the reference time stamp is greater than the first value and less than the second value, and

in response to determining that the reference time stamp is greater than the first value and less than the second value, determining that the target transaction is a valid transaction within the transaction validity period; and

in response to determining that the target transaction is a valid transaction within the transaction validity period, recording the target transaction to a generated candidate block.

7. The non-transitory, computer-readable medium of claim 6 , wherein the reference time parameter is a reference block height value generated when the target transaction is created, wherein the transaction validity period corresponds to a numerical interval between a third value and a block height value of the candidate block in the blockchain, wherein the third value is a difference between the block height value of the candidate block in the blockchain and a third threshold, and wherein determining, based on the reference time parameter, whether the target transaction is the valid transaction within the transaction validity period comprises:

comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value to determine whether the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain; and

in response to determining that the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain, determining that the target transaction is a valid transaction within the transaction validity period.

8. The non-transitory, computer-readable medium of claim 7 , wherein before comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value, the operations further comprise:

determining whether a block number of the candidate block is greater than a block number of a latest block in the blockchain; and

in response to determining that the block number of the candidate block is greater than the block number of a latest block in the blockchain, comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value.

9. The non-transitory, computer-readable medium of claim 8 , wherein the target transaction further comprises a unique identifier of the target transaction, wherein recording the target transaction to the candidate block in response to determining that the target transaction is the valid transaction within the transaction validity period comprises:

in response to determining that the target transaction is a valid transaction within the transaction validity period, querying whether a transaction idempotent record corresponding to the unique identifier of the target transaction is stored in a predetermined transaction idempotent table, wherein the predetermined transaction idempotent table is used to store a transaction idempotent record corresponding to a valid transaction within the transaction validity period; and

in response to determining that the transaction idempotent record corresponding to the unique identifier of the target transaction is not stored in the predetermined transaction idempotent table, recording the target transaction to the candidate block.

10. The non-transitory, computer-readable medium of claim 9 , wherein the transaction idempotent record indicates that a transaction corresponding to the transaction idempotent record has been successfully recorded to a distributed database of the blockchain; and

wherein the operations further comprise:

in response to determining that the target transaction is recorded to the candidate block, and that a consensus on the candidate block has been reached and the candidate block is successfully stored to the distributed database of the blockchain, generating the transaction idempotent record corresponding to the unique identifier of the target transaction; and

inserting the transaction idempotent record into the predetermined transaction idempotent table.

11. A computer-implemented system, comprising:

one or more computers; and

one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:

receiving a target transaction initiated by a member node device in a blockchain, wherein the target transaction comprises a reference time parameter, wherein the reference time parameter is a reference time stamp generated when the target transaction is created, wherein a transaction validity period corresponds to a numerical interval between a first value and a second value, wherein the first value is a difference between a creation time stamp of a candidate block and a first threshold, and wherein the second value is a sum of the creation time stamp of the candidate block and a second threshold, and wherein the reference time parameter is used to determine whether the target transaction is a valid transaction within the transaction validity period;

determining, based on the reference time parameter, whether the target transaction is a valid transaction within the transaction validity period, wherein determining, whether the target transaction is the valid transaction comprises:

comparing the reference time stamp with each of the first value and the second value to determine whether the reference time stamp is greater than the first value and less than the second value, and

in response to determining that the reference time stamp is greater than the first value and less than the second value, determining that the target transaction is a valid transaction within the transaction validity period; and

in response to determining that the target transaction is a valid transaction within the transaction validity period, recording the target transaction to a generated candidate block.

12. The computer-implemented system of claim 11 , wherein the reference time parameter is a reference block height value generated when the target transaction is created, wherein the transaction validity period corresponds to a numerical interval between a third value and a block height value of the candidate block in the blockchain, wherein the third value is a difference between the block height value of the candidate block in the blockchain and a third threshold, and wherein determining, based on the reference time parameter, whether the target transaction is the valid transaction within the transaction validity period comprises:

comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value to determine whether the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain; and

in response to determining that the reference block height value is greater than the third value and less than the block height value of the candidate block in the blockchain, determining that the target transaction is a valid transaction within the transaction validity period.

13. The computer-implemented system of claim 12 , wherein before comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value, the operations further comprise:

determining whether a block number of the candidate block is greater than a block number of a latest block in the blockchain; and

in response to determining that the block number of the candidate block is greater than the block number of a latest block in the blockchain, comparing the reference block height value with each of the block height value of the candidate block in the blockchain and the third value.

14. The computer-implemented system of claim 13 , wherein the target transaction further comprises a unique identifier of the target transaction, wherein recording the target transaction to the candidate block in response to determining that the target transaction is the valid transaction within the transaction validity period comprises:

in response to determining that the target transaction is a valid transaction within the transaction validity period, querying whether a transaction idempotent record corresponding to the unique identifier of the target transaction is stored in a predetermined transaction idempotent table, wherein the predetermined transaction idempotent table is used to store a transaction idempotent record corresponding to a valid transaction within the transaction validity period; and

in response to determining that the transaction idempotent record corresponding to the unique identifier of the target transaction is not stored in the predetermined transaction idempotent table, recording the target transaction to the candidate block.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 10, 2019
From: WANG, JIYUAN; DU, HUABING; YAN, XUEBING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 050674/0018 →
Cited By (1)
US 12,517,893