IP Library Granted Patent US 10,789,243
Granted Patent B2
US 10,789,243 · App. 16/665,200 · Granted Sep 29, 2020

Database state determining method and device, and consistency verifying method and device

Inventor: Boran Zhao (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F16/2365G06F16/2379G06F16/27
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,789,243
App. No.
16/665,200
Granted
Sep 29, 2020
Kind
B2
Abstract

A state transition operation performed on a target database is determined. Based on the state transition operation and a state value of the target database that exists before the state transition operation is performed, a state value of the target database that exists after the state transition operation is performed is determined, where the state value is used to represent a state of the target database.

Claims (65)

1. A computer-implemented method for database state determination, comprising:

determining, by at least one processor, a state transition operation performed on a first target database and determining one or more data operation objects used to perform the state transition operation on the first target database;

serializing each of the one or more data operation objects into corresponding serialized data in binary format;

obtaining spliced serialized data by splicing the serialized data corresponding to the one or more data operation objects;

obtaining spliced data based on the spliced serialized data and a first state value of the first target database before the state transition operation;

determining, based on the spliced data, a first state value of the first target database after the state transition operation, wherein the first state value is used to represent a first state of the first target database and is used to uniquely represent a characteristic of data stored in the first target database; and

in response to determining that the first state value of the first target database matches a second state value of a second target database, determining that the first target database is consistent with the second target database.

2. The computer-implemented method of claim 1 , wherein:

the first target database is a blockchain database; and

the determining the first state value of the first target database after the state transition operation comprises:

determining a hash value of the one or more data operation objects; and

determining, based on the hash value of the one or more data operation objects and the first state value of the first target database before the state transition operation, the first state value of the first target database after the state transition operation.

3. The computer-implemented method of claim 2 , wherein the determining the hash value of the one or more data operation objects comprises:

serializing the one or more data operation objects to obtain serialized data;

determining a hash value of the serialized data; and

using the hash value of the serialized data as the hash value of the one or more data operation objects.

4. The computer-implemented method of claim 3 , wherein serializing the one or more data operation objects to obtain the serialized data comprises:

in response to determining that there is more than one data operation object used to perform the state transition operation on the first target database:

in response to determining that a sequence of performing the state transition operation by all data operation objects is fixed, splicing, based on the sequence of performing the state transition operation, serialized data corresponding to all data operation objects, to obtain spliced serialized data; or

in response to determining that a sequence of performing the state transition operation by all data operation objects is not fixed, splicing, based on a first predetermined sequence, serialized data corresponding to all data operation objects, to obtain spliced serialized data.

5. The computer-implemented method of claim 4 , wherein splicing the serialized data corresponding to all data operation objects comprises:

placing a predetermined separator between at least two pieces of serialized data; and

obtaining the spliced serialized data by splicing all pieces of serialized data obtained after the predetermined separator is placed.

6. The computer-implemented method of claim 2 , wherein the determining the first state value of the first target database after the state transition operation comprises:

obtaining spliced data by splicing, based on a second predetermined sequence, the hash value of the one or more data operation objects and the first state value of the first target database before the state transition operation;

determining a hash value of the spliced data; and

using the hash value of the spliced data as the first state value of the first target database after the state transition operation.

7. The computer-implemented method of claim 1 , wherein the first target database is a database corresponding to any node in a blockchain.

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

determining a state transition operation performed on a first target database and determining one or more data operation objects used to perform the state transition operation on the first target database;

serializing each of the one or more data operation objects into corresponding serialized data in binary format;

obtaining spliced serialized data by splicing the serialized data corresponding to the one or more data operation objects;

obtaining spliced data based on the spliced serialized data and a first state value of the first target database before the state transition operation;

determining, based on the spliced data, a first state value of the first target database after the state transition operation, wherein the first state value is used to represent a first state of the first target database and is used to uniquely represent a characteristic of data stored in the first target database; and

in response to determining that the first state value of the first target database matches a second state value of a second target database, determining that the first target database is consistent with the second target database.

9. The non-transitory, computer-readable medium of claim 8 , wherein:

the first target database is a blockchain database; and

the determining the first state value of the first target database after the state transition operation comprises:

determining a hash value of the one or more data operation objects; and

determining, based on the hash value of the one or more data operation objects and the first state value of the first target database before the state transition operation, the first state value of the first target database after the state transition operation.

10. The non-transitory, computer-readable medium of claim 9 , wherein the determining the hash value of the one or more data operation objects comprises:

serializing the one or more data operation objects to obtain serialized data;

determining a hash value of the serialized data; and

using the hash value of the serialized data as the hash value of the one or more data operation objects.

11. The non-transitory, computer-readable medium of claim 10 , wherein serializing the one or more data operation objects to obtain the serialized data comprises:

in response to determining that there is more than one data operation object used to perform the state transition operation on the first target database:

in response to determining that a sequence of performing the state transition operation by all data operation objects is fixed, splicing, based on the sequence of performing the state transition operation, serialized data corresponding to all data operation objects, to obtain spliced serialized data; or

in response to determining that a sequence of performing the state transition operation by all data operation objects is not fixed, splicing, based on a first predetermined sequence, serialized data corresponding to all data operation objects, to obtain spliced serialized data.

12. The non-transitory, computer-readable medium of claim 11 , wherein splicing the serialized data corresponding to all data operation objects comprises:

placing a predetermined separator between at least two pieces of serialized data; and

obtaining the spliced serialized data by splicing all pieces of serialized data obtained after the predetermined separator is placed.

13. The non-transitory, computer-readable medium of claim 9 , wherein the determining the first state value of the first target database after the state transition operation comprises:

obtaining spliced data by splicing, based on a second predetermined sequence, the hash value of the one or more data operation objects and the first state value of the first target database before the state transition operation;

determining a hash value of the spliced data; and

using the hash value of the spliced data as the first state value of the first target database after the state transition operation.

14. The non-transitory, computer-readable medium of claim 8 , wherein the first target database is a database corresponding to any node in a blockchain.

15. 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, wherein when the one or more instructions are executed by the one or more computers, the one or more computers perform one or more operations comprising:

determining a state transition operation performed on a first target database and determining one or more data operation objects used to perform the state transition operation on the first target database;

serializing each of the one or more data operation objects into corresponding serialized data in binary format;

obtaining spliced serialized data by splicing the serialized data corresponding to the one or more data operation objects;

obtaining spliced data based on the spliced serialized data and a first state value of the first target database before the state transition operation;

determining, based on the spliced data, a first state value of the first target database after the state transition operation, wherein the first state value is used to represent a first state of the first target database and is used to uniquely represent a characteristic of data stored in the first target database; and

in response to determining that the first state value of the first target database matches a second state value of a second target database, determining that the first target database is consistent with the second target database.

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: ZHAO, BORAN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051361/0844 →