IP Library Granted Patent US 10,782,998
Granted Patent B2
US 10,782,998 · App. 16/779,641 · Granted Sep 22, 2020

Blockchain-based transaction processing method and apparatus

Inventor: Honglin Qiu (Hangzhou, CN)
Assignee: ALIBABA GROUP HOLDING LIMITED
G06F9/466G06F8/61G06Q20/3821G06Q40/12G06Q20/389
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,782,998
App. No.
16/779,641
Granted
Sep 22, 2020
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for transaction processing are provided. One of the methods includes: receiving a transaction request for a target transaction; loading a transaction template matching a transaction type of the target transaction; processing the target transaction according to the transaction template to obtain transaction information; and writing the transaction information into a blockchain.

Claims (68)

1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a method comprising:

receiving a transaction request for a target transaction having a smart contract transaction type;

loading a transaction template matching the smart contract transaction type of the target transaction by:

determining whether there is a transaction template matching the smart contract transaction type in a plurality of configured transaction templates;

in response to determining that there is no transaction template matching the smart contract transaction type in the plurality of configured transaction templates, generating a smart contract transaction template as the transaction template; and

determining a smart contract transaction processing rule corresponding to the smart contract transaction type from the smart contract transaction template, the smart contract transaction template corresponding to the smart contract transaction type;

processing the target transaction according to the transaction template to obtain transaction information by:

analyzing the transaction request to obtain a smart contract's address and transaction parameters based on the smart contract transaction processing rule; and

passing the transaction parameters to the smart contract according to the smart contract's address for the smart contract to execute the transaction parameters and return a transaction result; and

writing the transaction result into a blockchain.

2. The non-transitory computer-readable storage medium of claim 1 , wherein loading the transaction template comprises:

determining a transaction identifier of the target transaction; and

determining the smart contract transaction type of the target transaction according to the transaction identifier.

3. The non-transitory computer-readable storage medium of claim 1 , wherein processing the target transaction according to the transaction template comprises:

determining a check rule in the transaction template;

checking whether the transaction request satisfies a preset condition according to the check rule;

in response to determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to a transaction processing rule; and

in response to determining that the transaction request does not satisfy the preset condition according to the check rule, returning a prompt that processing of the target transaction has failed.

4. The non-transitory computer-readable storage medium of claim 1 , wherein writing the transaction result into the blockchain comprises: writing first transaction information of the transaction result into a target block to be saved in the blockchain; and wherein the method further comprises:

when writing the first transaction information into the target block, determining and storing a state change value of the target block, the state change value being used to check whether the first transaction information recorded in the target block is consistent with other transaction information recorded in other blocks in the blockchain.

5. The non-transitory computer-readable storage medium of claim 4 , wherein determining and storing the state change value comprises:

after writing the first transaction information into the target block, computing a check value of the target block; and

assigning the check value to the state change value of the target block.

6. A method comprising:

receiving a transaction request for a target transaction having a smart contract transaction type;

loading a transaction template matching the smart contract transaction type of the target transaction by:

determining whether there is a transaction template matching the smart contract transaction type in a plurality of configured transaction templates;

in response to determining that there is no transaction template matching the smart contract transaction type in the plurality of configured transaction templates, generating a smart contract transaction template as the transaction template; and

determining a smart contract transaction processing rule corresponding to the smart contract transaction type from the smart contract transaction template, the smart contract transaction template corresponding to the smart contract transaction type;

processing the target transaction according to the transaction template to obtain transaction information by:

analyzing the transaction request to obtain a smart contract's address and transaction parameters based on the smart contract transaction processing rule; and

passing the transaction parameters to the smart contract according to the smart contract's address for the smart contract to execute the transaction parameters and return a transaction result; and

writing the transaction result into a blockchain.

7. The method of claim 6 , wherein loading the transaction template comprises:

determining a transaction identifier of the target transaction; and

determining the smart contract transaction type of the target transaction according to the transaction identifier.

8. The method of claim 6 , wherein processing the target transaction according to the transaction template comprises:

determining a check rule in the transaction template;

checking whether the transaction request satisfies a preset condition according to the check rule;

in response to determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to a transaction processing rule; and

in response to determining that the transaction request does not satisfy the preset condition according to the check rule, returning a prompt that processing of the target transaction has failed.

9. The method of claim 6 , wherein writing the transaction result into the blockchain comprises: writing first transaction information of the transaction result into a target block to be saved in the blockchain; and wherein the method further comprises:

when writing the first transaction information into the target block, determining and storing a state change value of the target block, the state change value being used to check whether the first transaction information recorded in the target block is consistent with other transaction information recorded in other blocks in the blockchain.

10. The method of claim 9 , wherein determining and storing the state change value comprises:

after writing the first transaction information into the target block, computing a check value of the target block; and

assigning the check value to the state change value of the target block.

11. A system, comprising:

a processor; and

a non-transitory computer-readable storage medium storing instructions that, when executed by the processor, cause the processor to perform a method comprising:

receiving a transaction request for a target transaction having a smart contract transaction type;

loading a transaction template matching the smart contract transaction type of the target transaction by:

determining whether there is a transaction template matching the smart contract transaction type in a plurality of configured transaction templates;

in response to determining that there is no transaction template matching the smart contract transaction type in the plurality of configured transaction templates, generating a smart contract transaction template as the transaction template; and

determining a smart contract transaction processing rule corresponding to the smart contract transaction type from the smart contract transaction template, the smart contract transaction template corresponding to the smart contract transaction type;

processing the target transaction according to the transaction template to obtain transaction information by:

analyzing the transaction request to obtain a smart contract's address and transaction parameters based on the smart contract transaction processing rule; and

passing the transaction parameters to the smart contract according to the smart contract's address for the smart contract to execute the transaction parameters and return a transaction result; and

writing the transaction result into a blockchain.

12. The system of claim 11 , wherein loading the transaction template comprises:

determining a transaction identifier of the target transaction; and

determining the smart contract transaction type of the target transaction according to the transaction identifier.

13. The system of claim 11 , wherein processing the target transaction according to the transaction template comprises:

determining a check rule in the transaction template;

checking whether the transaction request satisfies a preset condition according to the check rule;

in response to determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to a transaction processing rule; and

in response to determining that the transaction request does not satisfy the preset condition according to the check rule, returning a prompt that processing of the target transaction has failed.

14. The system of claim 11 , wherein writing the transaction result into the blockchain comprises: writing first transaction information of the transaction result into a target block to be saved in the blockchain; and wherein the method further comprises:

when writing the first transaction information into the target block, determining and storing a state change value of the target block, the state change value being used to check whether the first transaction information recorded in the target block is consistent with other transaction information recorded in other blocks in the blockchain.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 2, 2020
From: QIU, HONGLIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051694/0979 →