IP Library Granted Patent US 10,790,981
Granted Patent B2
US 10,790,981 · App. 16/660,412 · Granted Sep 29, 2020

Method and apparatus for verifying block data in a blockchain

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,790,981
App. No.
16/660,412
Granted
Sep 29, 2020
Kind
B2
Abstract

The present solution discloses example methods and systems for verifying block data. One example method includes identifying newly added data to be stored in a blockchain, and selecting a data node in a block to store the newly added data. A string is generated based on the newly added data, and then a verification value for the newly added data is developed from the string using a predetermined algorithm. A new verification value for the block is calculated based on the verification value of the newly added data and the original verification values of the unchanged data nodes in the block. The new verification value for the block can then be used to verify the data stored in the block is consistent with data stored in the rest of the blockchain.

Claims (80)

1. A computer-implemented method for verifying block data, the computer-implemented method comprising:

selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;

determining a first verification value of the newly added data;

determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;

calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node; and

determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.

2. The computer-implemented method of claim 1 , wherein selecting the data node comprises:

in response to receiving the newly added data, determining a block identifier and a data node identifier, wherein the block identifier and the data node identifier are used to store the newly added data;

searching, based on the block identifier, the blockchain for a block corresponding to the block identifier, wherein results of the search comprise a found block;

determining, from the found block and the data node identifier, a found data node corresponding to the data node identifier; and

selecting the found data node as the data node configured to store the newly added data.

3. The computer-implemented method of claim 2 , wherein determining the block identifier and data node identifier comprises:

calculating data content corresponding to the newly added data to obtain the block identifier and data node identifier.

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

determining the first verification value of the newly added data comprises executing an encryption algorithm; and

the first verification value comprises an encrypted value of the newly added data.

5. The computer-implemented method of claim 4 , wherein the encryption algorithm comprises a hash algorithm and the encrypted value comprises a hash value of the newly added data.

6. The computer-implemented method of claim 1 , wherein determining the first verification value of the newly added data further comprises:

determining that the selected data node comprises data associated with the newly added data; and

in response:

separately generating a second character string corresponding to the newly added data and a third character string corresponding to the data associated with the newly added data;

obtaining a sorted character string by sorting the second character string and the third character string using a predetermined method; and

determining a first verification value of the newly added data for the data node by executing a predetermined algorithm on the sorted character string.

7. The computer-implemented method of claim 6 , wherein the sorted character string comprises a character string group included in the first verification value of the newly added data.

8. The computer-implemented method of claim 1 , wherein determining the third verification value comprises:

determining a tree structure corresponding to the plurality of data nodes comprised in the block;

determining the original second verification values of the other data nodes comprised in the block;

traversing the tree structure based on the updated second verification value of the selected data node and the original second verification values of the other data nodes comprised in the block, to obtain a third verification value of a root node of the tree structure; and

using the third verification value of the root node as the third verification value of the block.

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

selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;

determining a first verification value of the newly added data;

determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;

calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node; and

determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.

10. The computer-readable medium of claim 9 , wherein selecting the data node comprises:

in response to receiving the newly added data, determining a block identifier and a data node identifier, wherein the block identifier and the data node identifier are used to store the newly added data;

searching, based on the block identifier, the blockchain for a block corresponding to the block identifier, wherein results of the search comprise a found block;

determining, from the found block and the data node identifier, a found data node corresponding to the data node identifier; and

selecting the found data node as the data node configured to store the newly added data.

11. The computer-readable medium of claim 10 , wherein determining the block identifier and data node identifier comprises:

calculating data content corresponding to the newly added data to obtain the block identifier and data node identifier.

12. The computer-readable medium of claim 9 wherein:

determining the first verification value of the newly added data comprises executing an encryption algorithm; and

the first verification value comprises an encrypted value of the newly added data.

13. The computer-readable medium of claim 12 , wherein the encryption algorithm comprises a hash algorithm and the encrypted value comprises a hash value of the newly added data.

14. The computer-readable medium of claim 9 , wherein determining the first verification value of the newly added data further comprises:

determining that the selected data node comprises data associated with the newly added data; and

in response:

separately generating a second character string corresponding to the newly added data and a third character string corresponding to the data associated with the newly added data;

obtaining a sorted character string by sorting the second character string and the third character string using a predetermined method; and

determining a first verification value of the newly added data for the data node by executing a predetermined algorithm on the sorted character string.

15. The computer-readable medium claim 14 , wherein the sorted character string comprises a character string group included in the first verification value of the newly added data.

16. The computer-readable medium of claim 9 , wherein determining the third verification value comprises:

determining a tree structure corresponding to the plurality of data nodes comprised in the block;

determining the original second verification values of the other data nodes comprised in the block;

traversing the tree structure based on the updated second verification value of the selected data node and the original second verification values of the other data nodes comprised in the block, to obtain a third verification value of a root node of the tree structure; and

using the third verification value of the root node as the third verification value of the block.

17. 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:

selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;

determining a first verification value of the newly added data;

determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;

calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node; and

determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.

18. The computer-implemented system of claim 17 , wherein selecting the data node comprises:

in response to receiving the newly added data, determining a block identifier and a data node identifier, wherein the block identifier and the data node identifier are used to store the newly added data;

searching, based on the block identifier, the blockchain for a block corresponding to the block identifier, wherein results of the search comprise a found block;

determining, from the found block and the data node identifier, a found data node corresponding to the data node identifier; and

selecting the found data node as the data node configured to store the newly added data.

19. The computer-implemented system of claim 17 , wherein:

determining the first verification value of the newly added data comprises executing an encryption algorithm; and

the first verification value comprises an encrypted value of the newly added data.

20. The computer-implemented system of claim 17 , wherein determining the first verification value of the newly added data further comprises:

determining that the selected data node comprises data associated with the newly added data; and

in response:

separately generating a second character string corresponding to the newly added data and a third character string corresponding to the data associated with the newly added data;

obtaining a sorted character string by sorting the second character string and the third character string using a predetermined method; and

determining a first verification value of the newly added data for the data node by executing a predetermined algorithm on the sorted character string.

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 5, 2019
From: QIU, HONGLIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051189/0216 →