IP Library Granted Patent US 10,817,330
Granted Patent B2
US 10,817,330 · App. 16/884,861 · Granted Oct 27, 2020

Service processing method and apparatus

Inventor: Honglin Qiu (Hangzhou, CN)
Assignee: ADVANCED TECHNOLOGIES CO., LTD.
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,817,330
App. No.
16/884,861
Granted
Oct 27, 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 (72)

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

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

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

in response to determining that there is a transaction template matching the smart contract transaction type in the plurality of configured transaction templates, loading the transaction template matching the smart contract transaction type of the target transaction;

determining a smart contract transaction processing rule matching the smart contract transaction type from the transaction template;

processing the target transaction according to the transaction template by:

analyzing, the transaction request based on the smart contract transaction processing rule to obtain a smart contract's address and one or more transaction parameters included in the transaction request, wherein the smart contract is stored on the blockchain; and

invoking, according to the smart contract's address, the smart contract to execute the one or more transaction parameters and output a transaction result; and

writing the transaction result into the blockchain.

2. The non-transitory computer-readable storage medium of claim 1 , wherein the operations further comprise:

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 for loading.

3. 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.

4. 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;

if determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to the smart contract transaction processing rule; and

if 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.

5. 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 added to the blockchain; and

the operations further comprise, 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.

6. The non-transitory computer-readable storage medium of claim 5 , 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

using the check value as the state change value of the target block.

7. A system, comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors, the one or more non-transitory computer-readable memories storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:

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

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

in response to determining that there is a transaction template matching the smart contract transaction type in the plurality of configured transaction templates, loading the transaction template matching the smart contract transaction type of the target transaction;

determining a smart contract transaction processing rule matching the smart contract transaction type from the transaction template;

processing the target transaction according to the transaction template by:

analyzing, the transaction request based on the smart contract transaction processing rule to obtain a smart contract's address and one or more transaction parameters included in the transaction request, wherein the smart contract is stored on the blockchain; and

invoking, according to the smart contract's address, the smart contract to execute the one or more transaction parameters and output a transaction result; and

writing the transaction result into the blockchain.

8. The system of claim 7 , wherein the operations further comprise:

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 for loading.

9. The system of claim 7 , 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.

10. The system of claim 7 , 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;

if determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to the smart contract transaction processing rule; and

if 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.

11. The system of claim 7 , wherein:

writing the transaction result into the blockchain comprises writing first transaction information of the transaction result into a target block to be added to the blockchain; and

the operations further comprise, 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.

12. The system of claim 11 , 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

using the check value as the state change value of the target block.

13. A method, comprising:

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

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

in response to determining that there is a transaction template matching the smart contract transaction type in the plurality of configured transaction templates, loading the transaction template matching the smart contract transaction type of the target transaction;

determining a smart contract transaction processing rule matching the smart contract transaction type from the transaction template;

processing the target transaction according to the transaction template by:

analyzing, the transaction request based on the smart contract transaction processing rule to obtain a smart contract's address and one or more transaction parameters included in the transaction request, wherein the smart contract is stored on the blockchain; and

invoking, according to the smart contract's address, the smart contract to execute the one or more transaction parameters and output a transaction result; and

writing the transaction result into the blockchain.

14. The method of claim 13 , further comprising:

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 for loading.

15. The method of claim 13 , 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.

16. The method of claim 13 , 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;

if determining that the transaction request satisfies the preset condition according to the check rule, processing the target transaction according to the smart contract transaction processing rule; and

if 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.

17. The method of claim 13 , wherein:

writing the transaction result into the blockchain comprises writing first transaction information of the transaction result into a target block to be added to the blockchain; and

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 May 27, 2020
From: QIU, HONGLIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052764/0872 →
Priority Claims (1)
CN 2017 1 0057243 · Jan 26, 2017 · national
Continuity (4)
Continuation 16779641 · Feb 2, 2020
Continuation 16450976 · Jun 24, 2019
Continuation PCTCN2018073395 · Jan 19, 2018
Related Publication 20200285507A1 · Sep 10, 2020