IP Library Granted Patent US 11,294,875
Granted Patent B2
US 11,294,875 · App. 16/776,685 · Granted Apr 5, 2022

Data storage on tree nodes

Inventor: Haizhen Zhuo (Hangzhou, CN)
Assignee: Advanced New Technologies Co., Ltd.
G06F16/2246G06F16/2365G06F16/9027
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 11,294,875
App. No.
16/776,685
Granted
Apr 5, 2022
Kind
B2
Abstract

A computer-implemented method for storing blockchain data includes: obtaining, by a blockchain node, a first key-value pair corresponding to data to be stored, in which the first key-value pair includes a value of the data to be stored and a first key of the data to be stored; identifying, based on the first key, a corresponding leaf node in a tree data organization structure; and modifying, by the blockchain node, the first key, to update the first key-value pair to obtain an updated key-value pair including the value of the data to be stored and the modified first key, and storing the updated key-value pair into a conflict data storage structure corresponding to the identified leaf node.

Claims (68)

1. A computer-implemented method for storing blockchain data, comprising:

obtaining, by a blockchain node, a first key-value pair, wherein the first key-value pair comprises a first value and a first key;

identifying, based on the first key, by the blockchain node, a pre-existing corresponding leaf node in a tree data organization structure, wherein the corresponding leaf node stores an existing value in association with an existing key that matches the first key; and

in response to identifying the corresponding leaf node,

modifying, by the blockchain node, the first key, to update the first key-value pair to obtain an updated key-value pair comprising the first value and the modified first key, wherein the modified first key is different from the first key and different from the existing key,

calculating, by the blockchain node, a new value stored at the corresponding leaf node by hashing the first value and the existing value in a predetermined order,

storing, by the blockchain node, the updated key-value pair into a conflict data storage structure, the conflict data storage structure also storing the existing value, wherein the predetermined order comprises an order of sizes of the first value and the existing value, an order in which the first value and the existing value were generated, or an order in which the first value and the existing value are positioned in the conflict data storage structure, and

associating, by the blockchain node, the conflict data storage structure with the corresponding leaf node in particular, such that the updated key-value pair and the existing value, by virtue of being stored in the conflict data storage structure, are directly associated with the corresponding leaf node in particular, and

wherein the conflict data storage structure and the tree data organization structure having the new value stored at the corresponding leaf node are stored on a plurality of blockchain nodes of a blockchain network, including the blockchain node.

2. The computer-implemented method of claim 1 , wherein obtaining, by the blockchain node, the first key-value pair comprises:

obtaining, by the blockchain node, an initial key-value pair corresponding to the first value, wherein the initial key-value pair comprises the first value and an initial key; and

truncating the initial key to form the first key, wherein a length of the first key is less than a length of the initial key.

3. The computer-implemented method of claim 2 , wherein modifying the first key comprises setting the modified first key to be the initial key.

4. The computer-implemented method of claim 1 , wherein the corresponding leaf node is a child node of a parent node, wherein a second leaf node is a child node of the parent node, and wherein a value stored at the parent node comprises a hash of a combination of the new value stored at the corresponding leaf node and a value stored at the second leaf node.

5. The computer-implemented method of claim 1 , wherein, prior to obtaining the first key-value pair, the existing value and the existing key are stored as an existing key-value pair in the conflict data storage structure, and wherein storing the updated key-value pair into the conflict data storage structure comprises

adding a new entry, the new entry comprising the updated key-value pair, to the conflict data storage structure, and

increasing, by one, a stored indicator of a number of key-value pairs stored in the conflict data storage structure.

6. The computer-implemented method of claim 5 , wherein the conflict data storage structure comprises a table, and wherein the stored indicator is a primary key of the table.

7. The computer-implemented method of claim 1 , wherein, prior to obtaining the first key-value pair, no conflict data storage structure is associated with the corresponding leaf node, and wherein storing the updated key-value pair into the conflict data storage structure comprises:

creating the conflict data storage structure;

deleting, by the blockchain node, the existing value; and

storing, in the conflict data storage structure, a second key-value pair, wherein the second key-value pair comprises the existing value and the existing key.

8. A non-transitory, computer-readable medium storing one or more instructions that, when executed by a computer system, cause the computer system to perform operations for storing blockchain data, the operations comprising:

obtaining, by a blockchain node, a first key-value pair, wherein the first key-value pair comprises a first value and a first key;

identifying, based on the first key, by the blockchain node, a pre-existing corresponding leaf node in a tree data organization structure, wherein the corresponding leaf node stores an existing value in association with an existing key that matches the first key; and

in response to identifying the corresponding leaf node,

modifying, by the blockchain node, the first key, to update the first key-value pair to obtain an updated key-value pair comprising the first value and the modified first key, wherein the modified first key is different from the first key and different from the existing key,

calculating, by the blockchain node, a new value stored at the corresponding leaf node by hashing the first value and the existing value in a predetermined order,

storing, by the blockchain node, the updated key-value pair into a conflict data storage structure, the conflict data storage structure also storing the existing value, wherein the predetermined order comprises an order of sizes of the first value and the existing value, an order in which the first value and the existing value were generated, or an order in which the first value and the existing value are positioned in the conflict data storage structure, and

associating, by the blockchain node, the conflict data storage structure with the corresponding leaf node in particular, such that the updated key-value pair and the existing value, by virtue of being stored in the conflict data storage structure, are directly associated with the corresponding leaf node in particular, and

wherein the conflict data storage structure and the tree data organization structure having the new value stored at the corresponding leaf node are stored on a plurality of blockchain nodes of a blockchain network, including the blockchain node.

9. The non-transitory, computer-readable medium of claim 8 , wherein obtaining, by the blockchain node, the first key-value pair comprises:

obtaining, by the blockchain node, an initial key-value pair corresponding to the first value, wherein the initial key-value pair comprises the first value and an initial key; and

truncating the initial key to form the first key, wherein a length of the first key is less than a length of the initial key.

10. The non-transitory, computer-readable medium of claim 9 , wherein modifying the first key comprises setting the modified first key to be the initial key.

11. The non-transitory, computer-readable medium of claim 8 , wherein the corresponding leaf node is a child node of a parent node, wherein a second leaf node is a child node of the parent node, and wherein a value stored at the parent node comprises a hash of a combination of the new value stored at the corresponding leaf node and a value stored at the second leaf node.

12. The non-transitory, computer-readable medium of claim 8 , wherein, prior to obtaining the first key-value pair, the existing value and the existing key are stored as an existing key-value pair in the conflict data storage structure, and wherein storing the updated key-value pair into the conflict data storage structure comprises

adding a new entry, the new entry comprising the updated key-value pair, to the conflict data storage structure, and

increasing, by one, a stored indicator of a number of key-value pairs stored in the conflict data storage structure.

13. The non-transitory, computer-readable medium of claim 12 , wherein the conflict data storage structure comprises a table, and wherein the stored indicator is a primary key of the table.

14. The non-transitory, computer-readable medium of claim 8 , wherein, prior to obtaining the first key-value pair, no conflict data storage structure is associated with the corresponding leaf node, and wherein storing the updated key-value pair into the conflict data storage structure comprises:

creating the conflict data storage structure;

deleting, by the blockchain node, the existing value; and

storing, in the conflict data storage structure, a second key-value pair, wherein the second key-value pair comprises the existing value and the existing key.

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 that, when executed by the one or more computers, cause the one or more computers to perform one or more operations for storing blockchain data, the operations comprising:

obtaining, by a blockchain node, a first key-value pair, wherein the first key-value pair comprises a first value and a first key;

identifying, based on the first key, by the blockchain node, a pre-existing corresponding leaf node in a tree data organization structure, wherein the corresponding leaf node stores an existing value in association with an existing key that matches the first key; and

in response to identifying the corresponding leaf node,

modifying, by the blockchain node, the first key, to update the first key-value pair to obtain an updated key-value pair comprising the first value and the modified first key, wherein the modified first key is different from the first key and different from the existing key,

calculating, by the blockchain node, a new value stored at the corresponding leaf node by hashing the first value and the existing value in a predetermined order,

storing, by the blockchain node, the updated key-value pair into a conflict data storage structure, the conflict data storage structure also storing the existing value, wherein the predetermined order comprises an order of sizes of the first value and the existing value, an order in which the first value and the existing value were generated, or an order in which the first value and the existing value are positioned in the conflict data storage structure, and

associating, by the blockchain node, the conflict data storage structure with the corresponding leaf node in particular, such that the updated key-value pair and the existing value, by virtue of being stored in the conflict data storage structure, are directly associated with the corresponding leaf node in particular, and

wherein the conflict data storage structure and the tree data organization structure having the new value stored at the corresponding leaf node are stored on a plurality of blockchain nodes of a blockchain network, including the blockchain node.

16. The computer-implemented system of claim 15 , wherein obtaining, by the blockchain node, the first key-value pair comprises:

obtaining, by the blockchain node, an initial key-value pair corresponding to the first value, wherein the initial key-value pair comprises the first value and an initial key; and

truncating the initial key to form the first key, wherein a length of the first key is less than a length of the initial key.

17. The computer-implemented system of claim 16 , wherein modifying the first key comprises setting the modified first key to be the initial key.

18. The computer-implemented system of claim 15 , wherein the corresponding leaf node is a child node of a parent node, wherein a second leaf node is a child node of the parent node, and wherein a value stored at the parent node comprises a hash of a combination of the new value stored at the corresponding leaf node and a value stored at the second leaf node.

19. The computer-implemented system of claim 15 , wherein, prior to obtaining the first key-value pair, the existing value and the existing key are stored as an existing key-value pair in the conflict data storage structure, and wherein storing the updated key-value pair into the conflict data storage structure comprises

adding a new entry, the new entry comprising the updated key-value pair, to the conflict data storage structure, and

increasing, by one, a stored indicator of a number of key-value pairs stored in the conflict data storage structure.

20. The computer-implemented system of claim 19 , wherein the conflict data storage structure comprises a table, and wherein the stored indicator is a primary key of the table.

21. The computer-implemented system of claim 15 , wherein, prior to obtaining the first key-value pair, no conflict data storage structure is associated with the corresponding leaf node, and wherein storing the updated key-value pair into the conflict data storage structure comprises:

creating the conflict data storage structure;

deleting, by the blockchain node, the existing value; and

storing, in the conflict data storage structure, a second key-value pair, wherein the second key-value pair comprises the existing value and the existing key.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 28, 2020
From: ZHUO, HAIZHEN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 054754/0440 →
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 →