US2021326328A1PendingUtilityA1

Integrity verification method, apparatus, and system and device for data in a blockchain-type ledger

Assignee: ADVANCED NEW TECHNOLOGIES CO LTDPriority: Apr 4, 2019Filed: Jul 1, 2021Published: Oct 21, 2021
Est. expiryApr 4, 2039(~12.7 yrs left)· nominal 20-yr term from priority
Inventors:Xinying Yang
H04L 9/50H04L 9/0637G06F 16/28H04L 9/3297G06F 16/2365H04L 9/3265H04L 9/3239H04L 2209/38
59
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Computer-implemented methods, non-transitory, computer-readable media, and computer-implemented systems for data verification are provided. When a blockchain-type ledger needs to be verified, integrity verification can be first performed on block headers in a coordinator node only. After the verification succeeds, a second verification instruction can be further distributed to data nodes, so that the data nodes perform data block internal verification in parallel.

Claims

exact text as granted — not AI-modified
1 .- 20 . (canceled) 
     
     
         21 . A computer-implemented method for data verification, comprising:
 receiving, by a coordinator node in a database system that stores data in blockchain-type ledgers in a centralized manner, a first verification instruction, wherein the database system comprises the coordinator node and one or more data nodes;   determining, by the coordinator node and based on the first verification instruction, a target ledger that is to be verified, wherein the target ledger comprises a blockchain-type ledger that stores a plurality of data blocks, wherein in the blockchain-type ledger, each data block of the plurality of data blocks comprises a corresponding block header used to store corresponding metadata and a corresponding block body used to store corresponding data records, and wherein except an initial data block, each data block of the plurality of data blocks comprises at least one data record and a corresponding hash value that is determined by both the at least one data record and a hash value of a previous data block;   performing, by the coordinator node and based on block header information stored in the coordinator node, block header integrity verification on block headers of the plurality of data blocks in the target ledger, wherein the block header information comprises information of the corresponding block header of each data block of the plurality of data blocks in the target ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger comprises comparing a hash value of a data block of the plurality of data blocks in the block header information with a hash value generated using data records associated with the data block of the plurality of data blocks;   determining, by the coordinator node, that the block header integrity verification fails; and   in response to determining that the block header integrity verification fails:   refraining, by the coordinator node, from further integrity verification of the target ledger; and   generating, by the coordinator node, an indicator indicating that integrity of the target ledger has been compromised.   
     
     
         22 . The computer-implemented method according to  claim 21 , further comprising:
 determining, by the coordinator node and based on the first verification instruction, a second target ledger that is to be verified, wherein the second target ledger comprises a second blockchain-type ledger that stores a second plurality of data blocks, wherein in the second blockchain-type ledger, each data block of the second plurality of data blocks comprises a respective block header used to store respective metadata and a respective block body used to store respective data records; and wherein except an initial data block of the second plurality of data blocks, each data block of the second plurality of data blocks comprises at least one respective data record and a respective hash value that is determined by both the at least one respective data record comprised in each data block of the second plurality of data blocks and a hash value of a previous data block of the second plurality of data blocks;   performing, by the coordinator node and based on second block header information stored in the coordinator node, second block header integrity verification on block headers of the second plurality of data blocks in the second target ledger, wherein the second block header information comprises information of the respective block header of each data block of the second plurality of data blocks in the second target ledger, and wherein performing the second block header integrity verification on the block headers of the second plurality of data blocks in the second target ledger comprises comparing a hash value of a data block of the second plurality of data blocks in the second block header information with a hash value generated using data records associated with the data block of the second plurality of data blocks;   determining, by the coordinator node, that the second block header integrity verification succeeds; and   in response to determining that the second block header integrity verification succeeds:
 determining, by the coordinator node and for each data block of the second plurality of data blocks in the second target ledger, a corresponding target data node in the database system based on routing information stored in the coordinator node, wherein the routing information comprises mapping relationship between each data block of the second plurality of data blocks in the second target ledger and a corresponding data node in the database system; 
 sending, by the coordinator node and to each target data node in the database system, a corresponding second verification instruction, wherein each target data node stores a corresponding data block of the second plurality of data blocks in the second target ledger, and wherein the corresponding second verification instruction comprises a corresponding data block identifier associated with the corresponding data block of the second plurality of data blocks in the second target ledger; 
 receiving, by the coordinator node and from each target data node, a corresponding verification result, wherein each target data node is associated with the corresponding second verification instruction, wherein the corresponding verification result is of block body integrity verification on a data block corresponding to a data block identifier comprised in the corresponding second verification instruction; and 
 determining, by the coordinator node, the integrity of the target ledger based on the corresponding verification result received from each target data node. 
   
     
     
         23 . The computer-implemented method according to  claim 21 , wherein each data block of the plurality of data blocks in the target ledger is stored in advance in the database system by:
 obtaining, by the coordinator node, each data block of the plurality of data blocks in the target ledger;   determining, by the coordinator node, a corresponding data node in the database system corresponding to each data block based on the corresponding hash value of each data block;   allocating, by the coordinator node, each data block to the corresponding data node;   creating, by the coordinator node, corresponding routing information between each data block and the corresponding data node;   saving, by the coordinator node, the corresponding routing information between each data block and the corresponding data node and block header information of each data block; and   sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node.   
     
     
         24 . The computer-implemented method according to  claim 23 , wherein allocating, by the coordinator node, each data block to the corresponding data node comprises:
 obtaining, by the coordinator node, the corresponding block header and the corresponding block body in each data block; and   allocating, by the coordinator node, the corresponding block body to the corresponding data node, wherein creating, by the coordinator node, the corresponding routing information between each data block and the corresponding data node comprises creating, by the coordinator node, the corresponding routing information between the corresponding block body and the corresponding data node, and wherein sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node comprises sending, by the coordinator node and to the corresponding data node, the corresponding block body to be stored by the corresponding data node.   
     
     
         25 . The computer-implemented method according to  claim 23 , wherein each data block is generated in advance in the database system by:
 receiving data records to be written in an Nth data block;   determining a hash value of the data records; and   if a predetermined block generation condition is reached,
 determining the data records; and 
 generating the Nth data block that comprises the data records and the hash value of the data records, wherein generating the Nth data block that comprises the data records and the hash value of the data records comprises:
 if N=1, setting a hash value and a block height of the initial data block based on a predetermined methodology; and 
 if N>1,
 determining a hash value of the Nth data block based on the data records to be written into the Nth data block and a hash value of a (N−1)th data block; and 
 
 
   generating the Nth data block that comprises the hash value of the Nth data block, the data records to be written into the Nth data block, and a block generation time of the Nth data block.   
     
     
         26 . The computer-implemented method according to  claim 21 , wherein receiving the first verification instruction, and determining the target ledger comprises:
 receiving a time point comprised in the first verification instruction;   obtaining a time service certificate corresponding to the time point; and   determining a partial ledger corresponding to the time service certificate as the target ledger, wherein the time service certificate comprises a start data block height, an end data block height, a trusted timestamp, and a root hash of the partial ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger based on the block header information stored in the coordinator node comprises performing the block header integrity verification on the partial ledger based on the time service certificate and the block header information.   
     
     
         27 . The computer-implemented method according to  claim 22 , wherein before receiving the corresponding verification result from each target data node, the computer-implemented method further comprises:
 generating, by the coordinator node, an integrity array comprising verification results of the second plurality of data blocks in the second target ledger, wherein each element in the integrity array corresponds to a respective data block of the second plurality of data blocks in the second target ledger, wherein the corresponding verification result from each target data node comprises a corresponding feature value that comprises one of a verification failure and a verification success, and wherein the determining, by the coordinator node, the integrity of the second target ledger based on the corresponding verification result received from each target data node comprises determining, by the coordinator node, that the second target ledger is incomplete if a value of an element in the integrity array comprises a feature value that comprises a verification failure.   
     
     
         28 . A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
 receiving, by a coordinator node in a database system that stores data in blockchain-type ledgers in a centralized manner, a first verification instruction, wherein the database system comprises the coordinator node and one or more data nodes;   determining, by the coordinator node and based on the first verification instruction, a target ledger that is to be verified, wherein the target ledger comprises a blockchain-type ledger that stores a plurality of data blocks, wherein in the blockchain-type ledger, each data block of the plurality of data blocks comprises a corresponding block header used to store corresponding metadata and a corresponding block body used to store corresponding data records, and wherein except an initial data block, each data block of the plurality of data blocks comprises at least one data record and a corresponding hash value that is determined by both the at least one data record and a hash value of a previous data block;   performing, by the coordinator node and based on block header information stored in the coordinator node, block header integrity verification on block headers of the plurality of data blocks in the target ledger, wherein the block header information comprises information of the corresponding block header of each data block of the plurality of data blocks in the target ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger comprises comparing a hash value of a data block of the plurality of data blocks in the block header information with a hash value generated using data records associated with the data block of the plurality of data blocks;   determining, by the coordinator node, that the block header integrity verification fails; and   in response to determining that the block header integrity verification fails:
 refraining, by the coordinator node, from further integrity verification of the target ledger; and 
 generating, by the coordinator node, an indicator indicating that integrity of the target ledger has been compromised. 
   
     
     
         29 . The non-transitory, computer-readable medium according to  claim 28 , wherein the operations further comprise:
 determining, by the coordinator node and based on the first verification instruction, a second target ledger that is to be verified, wherein the second target ledger comprises a second blockchain-type ledger that stores a second plurality of data blocks, wherein in the second blockchain-type ledger, each data block of the second plurality of data blocks comprises a respective block header used to store respective metadata and a respective block body used to store respective data records; and wherein except an initial data block of the second plurality of data blocks, each data block of the second plurality of data blocks comprises at least one respective data record and a respective hash value that is determined by both the at least one respective data record comprised in each data block of the second plurality of data blocks and a hash value of a previous data block of the second plurality of data blocks;   performing, by the coordinator node and based on second block header information stored in the coordinator node, second block header integrity verification on block headers of the second plurality of data blocks in the second target ledger, wherein the second block header information comprises information of the respective block header of each data block of the second plurality of data blocks in the second target ledger, and wherein performing the second block header integrity verification on the block headers of the second plurality of data blocks in the second target ledger comprises comparing a hash value of a data block of the second plurality of data blocks in the second block header information with a hash value generated using data records associated with the data block of the second plurality of data blocks;   determining, by the coordinator node, that the second block header integrity verification succeeds; and   in response to determining that the second block header integrity verification succeeds:
 determining, by the coordinator node and for each data block of the second plurality of data blocks in the second target ledger, a corresponding target data node in the database system based on routing information stored in the coordinator node, wherein the routing information comprises mapping relationship between each data block of the second plurality of data blocks in the second target ledger and a corresponding data node in the database system; 
 sending, by the coordinator node and to each target data node in the database system, a corresponding second verification instruction, wherein each target data node stores a corresponding data block of the second plurality of data blocks in the second target ledger, and wherein the corresponding second verification instruction comprises a corresponding data block identifier associated with the corresponding data block of the second plurality of data blocks in the second target ledger; 
 receiving, by the coordinator node and from each target data node, a corresponding verification result, wherein each target data node is associated with the corresponding second verification instruction, wherein the corresponding verification result is of block body integrity verification on a data block corresponding to a data block identifier comprised in the corresponding second verification instruction; and 
 determining, by the coordinator node, the integrity of the target ledger based on the corresponding verification result received from each target data node. 
   
     
     
         30 . The non-transitory, computer-readable medium according to  claim 28 , wherein each data block of the plurality of data blocks in the target ledger is stored in advance in the database system by:
 obtaining, by the coordinator node, each data block of the plurality of data blocks in the target ledger;   determining, by the coordinator node, a corresponding data node in the database system corresponding to each data block based on the corresponding hash value of each data block;   allocating, by the coordinator node, each data block to the corresponding data node;   creating, by the coordinator node, corresponding routing information between each data block and the corresponding data node;   saving, by the coordinator node, the corresponding routing information between each data block and the corresponding data node and block header information of each data block; and   sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node.   
     
     
         31 . The non-transitory, computer-readable medium according to  claim 30 , wherein allocating, by the coordinator node, each data block to the corresponding data node comprises:
 obtaining, by the coordinator node, the corresponding block header and the corresponding block body in each data block; and   allocating, by the coordinator node, the corresponding block body to the corresponding data node, wherein creating, by the coordinator node, the corresponding routing information between each data block and the corresponding data node comprises creating, by the coordinator node, the corresponding routing information between the corresponding block body and the corresponding data node, and wherein sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node comprises sending, by the coordinator node and to the corresponding data node, the corresponding block body to be stored by the corresponding data node.   
     
     
         32 . The non-transitory, computer-readable medium according to  claim 30 , wherein each data block is generated in advance in the database system by:
 receiving data records to be written in an Nth data block;   determining a hash value of the data records; and   if a predetermined block generation condition is reached,
 determining the data records; and 
 generating the Nth data block that comprises the data records and the hash value of the data records, wherein generating the Nth data block that comprises the data records and the hash value of the data records comprises:
 if N=1, setting a hash value and a block height of the initial data block based on a predetermined methodology; and 
 if N>1,
 determining a hash value of the Nth data block based on the data records to be written into the Nth data block and a hash value of a (N−1)th data block; and 
 
 
   generating the Nth data block that comprises the hash value of the Nth data block, the data records to be written into the Nth data block, and a block generation time of the Nth data block.   
     
     
         33 . The non-transitory, computer-readable medium according to  claim 28 , wherein receiving the first verification instruction, and determining the target ledger comprises:
 receiving a time point comprised in the first verification instruction;   obtaining a time service certificate corresponding to the time point; and   determining a partial ledger corresponding to the time service certificate as the target ledger, wherein the time service certificate comprises a start data block height, an end data block height, a trusted timestamp, and a root hash of the partial ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger based on the block header information stored in the coordinator node comprises performing the block header integrity verification on the partial ledger based on the time service certificate and the block header information.   
     
     
         34 . The non-transitory, computer-readable medium according to  claim 29 , wherein before receiving the corresponding verification result from each target data node, the operations further comprises:
 generating, by the coordinator node, an integrity array comprising verification results of the second plurality of data blocks in the second target ledger, wherein each element in the integrity array corresponds to a respective data block of the second plurality of data blocks in the second target ledger, wherein the corresponding verification result from each target data node comprises a corresponding feature value that comprises one of a verification failure and a verification success, and wherein the determining, by the coordinator node, the integrity of the second target ledger based on the corresponding verification result received from each target data node comprises determining, by the coordinator node, that the second target ledger is incomplete if a value of an element in the integrity array comprises a feature value that comprises a verification failure.   
     
     
         35 . 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 coordinator node in a database system that stores data in blockchain-type ledgers in a centralized manner, a first verification instruction, wherein the database system comprises the coordinator node and one or more data nodes; 
 determining, by the coordinator node and based on the first verification instruction, a target ledger that is to be verified, wherein the target ledger comprises a blockchain-type ledger that stores a plurality of data blocks, wherein in the blockchain-type ledger, each data block of the plurality of data blocks comprises a corresponding block header used to store corresponding metadata and a corresponding block body used to store corresponding data records, and wherein except an initial data block, each data block of the plurality of data blocks comprises at least one data record and a corresponding hash value that is determined by both the at least one data record and a hash value of a previous data block; 
 performing, by the coordinator node and based on block header information stored in the coordinator node, block header integrity verification on block headers of the plurality of data blocks in the target ledger, wherein the block header information comprises information of the corresponding block header of each data block of the plurality of data blocks in the target ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger comprises comparing a hash value of a data block of the plurality of data blocks in the block header information with a hash value generated using data records associated with the data block of the plurality of data blocks; 
 determining, by the coordinator node, that the block header integrity verification fails; and 
 in response to determining that the block header integrity verification fails:
 refraining, by the coordinator node, from further integrity verification of the target ledger; and 
 generating, by the coordinator node, an indicator indicating that integrity of the target ledger has been compromised. 
 
   
     
     
         36 . The computer-implemented system according to  claim 35 , wherein the one or more operations further comprise:
 determining, by the coordinator node and based on the first verification instruction, a second target ledger that is to be verified, wherein the second target ledger comprises a second blockchain-type ledger that stores a second plurality of data blocks, wherein in the second blockchain-type ledger, each data block of the second plurality of data blocks comprises a respective block header used to store respective metadata and a respective block body used to store respective data records; and wherein except an initial data block of the second plurality of data blocks, each data block of the second plurality of data blocks comprises at least one respective data record and a respective hash value that is determined by both the at least one respective data record comprised in each data block of the second plurality of data blocks and a hash value of a previous data block of the second plurality of data blocks;   performing, by the coordinator node and based on second block header information stored in the coordinator node, second block header integrity verification on block headers of the second plurality of data blocks in the second target ledger, wherein the second block header information comprises information of the respective block header of each data block of the second plurality of data blocks in the second target ledger, and wherein performing the second block header integrity verification on the block headers of the second plurality of data blocks in the second target ledger comprises comparing a hash value of a data block of the second plurality of data blocks in the second block header information with a hash value generated using data records associated with the data block of the second plurality of data blocks;   determining, by the coordinator node, that the second block header integrity verification succeeds; and   in response to determining that the second block header integrity verification succeeds:
 determining, by the coordinator node and for each data block of the second plurality of data blocks in the second target ledger, a corresponding target data node in the database system based on routing information stored in the coordinator node, wherein the routing information comprises mapping relationship between each data block of the second plurality of data blocks in the second target ledger and a corresponding data node in the database system; 
 sending, by the coordinator node and to each target data node in the database system, a corresponding second verification instruction, wherein each target data node stores a corresponding data block of the second plurality of data blocks in the second target ledger, and wherein the corresponding second verification instruction comprises a corresponding data block identifier associated with the corresponding data block of the second plurality of data blocks in the second target ledger; 
 receiving, by the coordinator node and from each target data node, a corresponding verification result, wherein each target data node is associated with the corresponding second verification instruction, wherein the corresponding verification result is of block body integrity verification on a data block corresponding to a data block identifier comprised in the corresponding second verification instruction; and 
 determining, by the coordinator node, the integrity of the target ledger based on the corresponding verification result received from each target data node. 
   
     
     
         37 . The computer-implemented system according to  claim 35 , wherein each data block of the plurality of data blocks in the target ledger is stored in advance in the database system by:
 obtaining, by the coordinator node, each data block of the plurality of data blocks in the target ledger;   determining, by the coordinator node, a corresponding data node in the database system corresponding to each data block based on the corresponding hash value of each data block;   allocating, by the coordinator node, each data block to the corresponding data node, wherein allocating, by the coordinator node, each data block to the corresponding data node comprises:
 obtaining, by the coordinator node, the corresponding block header and the corresponding block body in each data block; and 
 allocating, by the coordinator node, the corresponding block body to the corresponding data node; 
   creating, by the coordinator node, corresponding routing information between each data block and the corresponding data node, wherein creating, by the coordinator node, the corresponding routing information between each data block and the corresponding data node comprises:
 creating, by the coordinator node, the corresponding routing information between the corresponding block body and the corresponding data node; 
   saving, by the coordinator node, the corresponding routing information between each data block and the corresponding data node and block header information of each data block; and   sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node, wherein sending, by the coordinator node and to the corresponding data node, each data block to be stored by the corresponding data node comprises:
 sending, by the coordinator node and to the corresponding data node, the corresponding block body to be stored by the corresponding data node. 
   
     
     
         38 . The computer-implemented system according to  claim 37 , wherein each data block is generated in advance in the database system by:
 receiving data records to be written in an Nth data block;   determining a hash value of the data records; and   if a predetermined block generation condition is reached,
 determining the data records; and 
 generating the Nth data block that comprises the data records and the hash value of the data records, wherein generating the Nth data block that comprises the data records and the hash value of the data records comprises:
 if N=1, setting a hash value and a block height of the initial data block based on a predetermined methodology; and 
 if N>1,
 determining a hash value of the Nth data block based on the data records to be written into the Nth data block and a hash value of a (N−1)th data block; and 
 generating the Nth data block that comprises the hash value of the Nth data block, the data records to be written into the Nth data block, and a block generation time of the Nth data block. 
 
 
   
     
     
         39 . The computer-implemented system according to  claim 35 , wherein receiving the first verification instruction, and determining the target ledger comprises:
 receiving a time point comprised in the first verification instruction;   obtaining a time service certificate corresponding to the time point; and   determining a partial ledger corresponding to the time service certificate as the target ledger, wherein the time service certificate comprises a start data block height, an end data block height, a trusted timestamp, and a root hash of the partial ledger, and wherein performing the block header integrity verification on the block headers of the plurality of data blocks in the target ledger based on the block header information stored in the coordinator node comprises performing the block header integrity verification on the partial ledger based on the time service certificate and the block header information.   
     
     
         40 . The computer-implemented system according to  claim 36 , wherein before receiving the corresponding verification result from each target data node, the one or more operations further comprises:
 generating, by the coordinator node, an integrity array comprising verification results of the second plurality of data blocks in the second target ledger, wherein each element in the integrity array corresponds to a respective data block of the second plurality of data blocks in the second target ledger, wherein the corresponding verification result from each target data node comprises a corresponding feature value that comprises one of a verification failure and a verification success, and wherein the determining, by the coordinator node, the integrity of the second target ledger based on the corresponding verification result received from each target data node comprises determining, by the coordinator node, that the second target ledger is incomplete if a value of an element in the integrity array comprises a feature value that comprises a verification failure.

Join the waitlist — get patent alerts

Track US2021326328A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.