IP Library Granted Patent US 10,678,782
Granted Patent B2
US 10,678,782 · App. 16/585,472 · Granted Jun 9, 2020

Blockchain-based data storage and query method and device

Inventor: Honglin Qiu (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F16/24G06F16/1834G06F16/1865G06F16/27G06Q20/0658H04L9/006H04L9/0637
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,678,782
App. No.
16/585,472
Granted
Jun 9, 2020
Kind
B2
Abstract

A blockchain node receives a service request, where the service request comprises one or more data types and respective service data corresponding to the one or more data types that are stored in a blockchain. At least one of a service type or identification information is determined corresponding to the service request. The service request is parsed to obtain each data type of the service request and service data corresponding to each data type. Based on a mapping relationship between a data type and service data, the service data that is obtained through parsing in a relational database corresponding to the blockchain node is stored.

Claims (56)

1. A computer-implemented method, comprising:

receiving, by a blockchain node, a service request, the service request comprising one or more data types and respective service data corresponding to the one or more data types that are stored in a blockchain;

determining a service type and identification information corresponding to the service request;

parsing the service request to obtain each data type of the service request and service data corresponding to each data type;

determining that no relational database has been created to correspond to the service type;

in response to determining that no relational database has been created to correspond to the service type, creating a relational database to correspond to the service type; and

storing, based on a mapping relationship between a data type and service data, the service data that is obtained through parsing in the relational database corresponding to the blockchain node.

2. The computer-implemented method of claim 1 , wherein parsing the service request to obtain each data type of the service request and service data corresponding to each data type comprises parsing the service request according to a data storage format specified by a smart contract of the blockchain.

3. The computer-implemented method of claim 2 , further comprising:

processing the smart contract to determine the service type and the one or more data types defined by the smart contract; and

creating, in the relational database, a database table corresponding to the service type having one or more columns corresponding respectively to the one or more data types defined in the smart contract.

4. The computer-implemented method of claim 2 , further comprising:

processing the smart contract to determine identification information corresponding to the service request; and

creating, in the relational database, a database table corresponding to the identification information corresponding to the service request.

5. The computer-implemented method of claim 1 , further comprising:

receiving a request for information about service data having a data type stored in the blockchain;

querying the relational database to obtain service data matching the data type; and

providing the service data matching the data type in response to the request.

6. The computer-implemented method of claim 5 , wherein the request for information about service data is a request to execute a smart contract on a consensus network.

7. The computer-implemented method of claim 1 , further comprising:

converting, based on a predetermined data format, each data type that comprised in the service request and the service data corresponding to each data type, to obtain a data sequence;

performing consensus procedure on the service request by using a consensus network; and

storing the data sequence in the blockchain corresponding to the blockchain node after a consensus is achieved on the service request.

8. The computer-implemented method of claim 1 , further comprising converting, based on a predetermined statement format, at least one of each data type, the service data corresponding to each data type, the service type, or the identification information obtained through parsing, to obtain a data storage statement for the relational database, and

wherein storing the service data in the relational database comprises executing the data storage statement.

9. The computer-implemented method of claim 8 , wherein the predetermined statement format comprises an identification information field and a service type field.

10. The computer-implemented method of claim 1 , wherein the service request comprises a service data query request.

11. The computer-implemented method of claim 1 , wherein the identification information comprises a user public key or a user identity.

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

receiving, by a blockchain node, a service request, the service request comprising one or more data types and respective service data corresponding to the one or more data types that are stored in a blockchain;

determining a service type and identification information corresponding to the service request;

parsing the service request to obtain each data type of the service request and service data corresponding to each data type;

determining that no relational database has been created to correspond to the service type;

in response to determining that no relational database has been created to correspond to the service type, creating a relational database to correspond to the service type; and

storing, based on a mapping relationship between a data type and service data, the service data that is obtained through parsing in the relational database corresponding to the blockchain node.

13. 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, by a blockchain node, a service request, the service request comprising one or more data types and respective service data corresponding to the one or more data types that are stored in a blockchain;

determining a service type and identification information corresponding to the service request;

parsing the service request to obtain each data type of the service request and service data corresponding to each data type;

determining that no relational database has been created to correspond to the service type;

in response to determining that no relational database has been created to correspond to the service type, creating a relational database to correspond to the service type; and

storing, based on a mapping relationship between a data type and service data, the service data that is obtained through parsing in the relational database corresponding to the blockchain node.

14. The computer-implemented system of claim 13 , wherein parsing the service request to obtain each data type of the service request and service data corresponding to each data type comprises parsing the service request according to a data storage format specified by a smart contract of the blockchain.

15. The computer-implemented system of claim 14 , further comprising:

processing the smart contract to determine the service type and the one or more data types defined by the smart contract; and

creating, in the relational database, a database table corresponding to the service type having one or more columns corresponding respectively to the one or more data types defined in the smart contract.

16. The computer-implemented system of claim 14 , further comprising:

processing the smart contract to determine identification information corresponding to the service request; and

creating, in the relational database, a database table corresponding to the identification information corresponding to the service request.

17. The computer-implemented system of claim 13 , further comprising:

receiving a request for information about service data having a data type stored in the blockchain;

querying the relational database to obtain service data matching the data type; and

providing the service data matching the data type in response to the request.

18. The computer-implemented system of claim 17 , wherein the request for information about service data is a request to execute a smart contract on a consensus network.

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 Dec 24, 2019
From: QIU, HONGLIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051361/0656 →