CN107451002A - For the Proactive authentication method and system for the block chain for changing block volume data - Google Patents

For the Proactive authentication method and system for the block chain for changing block volume data Download PDF

Info

Publication number
CN107451002A
CN107451002A CN201710425459.XA CN201710425459A CN107451002A CN 107451002 A CN107451002 A CN 107451002A CN 201710425459 A CN201710425459 A CN 201710425459A CN 107451002 A CN107451002 A CN 107451002A
Authority
CN
China
Prior art keywords
block
data
hash value
chain
error correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710425459.XA
Other languages
Chinese (zh)
Other versions
CN107451002B (en
Inventor
谭智勇
王子龙
许进
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Brilliant Hi Tech Development Co Ltd
Original Assignee
Beijing Brilliant Hi Tech Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Brilliant Hi Tech Development Co Ltd filed Critical Beijing Brilliant Hi Tech Development Co Ltd
Publication of CN107451002A publication Critical patent/CN107451002A/en
Application granted granted Critical
Publication of CN107451002B publication Critical patent/CN107451002B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiments of the invention provide a kind of Proactive authentication method and system of the block chain for modification block volume data, belong to block chain technical field, method includes:The block head data of current block and block volume data are generated into the character string of regular length as the first hashed value through non-reversible algorithm, and compared with the second hashed value with being stored in the block head of the sub-block of the current block, obtain first hashed value and second hashed value whether identical result;Outside the chain in errata, search whether comprising the corrigenda record formed using the partial data in the block volume data of the current block as first data;According to above-mentioned comparative result and Query Result, determine whether the current block passes through to the consistency checking between its sub-block.The scheme of the embodiment of the present invention, it is intended to modified to the block volume data in the block chain that has generated in the case of realizing data corrigenda, consistency checking is carried out to block chain.

Description

Active verification method and system for block chain of modified block volume data
Technical Field
The embodiment of the invention belongs to the technical field of block chains, and particularly relates to an active verification method and system for a block chain for modifying block volume data.
Background
With the continuous development of the internet, a block chain technology is produced, and the block chain technology is an internet database technology and has the characteristics of decentralization, openness and transparency. Specifically, the essence of blockchain technology is a decentralized and distributed data storage, transmission and certification method, which replaces the current internet dependency on a central server with data blocks, so that all data changes or transaction items are recorded on multiple book nodes at the same time. Since there is no distributed peer-to-peer network of central control points and a distributed method of collective operation is used, it can be said that the blockchain is a "public big ledger" on the network. The system has a plurality of nodes, each node can observe the whole ledger and participate in maintenance together, the income is the right of obtaining accounting, a complete database can be copied, and a single node cannot modify the database, so that the safety and reliability of ledger data are ensured.
At present, the block chain technology is widely applied to various business fields for organizing and managing data.
In the process of implementing the invention, the inventor finds that the prior art has the following defects:
the existing block chain sequentially generates new blocks along the extension direction of the block chain, and consistency verification is satisfied between the blocks, which also aims to prevent data in the blocks from being maliciously tampered. However, in some cases, when there is an error in the block volume data in a certain block on the blockchain, or the data needs to be modified and corrected due to special needs of the regulatory or policy department, if the data is forcibly modified, the consistency verification of the blockchain is inevitably failed, and thus a contradiction between the modified block data and the blockchain consistency verification occurs.
Disclosure of Invention
The embodiment of the invention provides an active verification method and system for a block chain for modifying block body data, which are suitable for performing consistency verification on the block chain under the condition that data error correction is realized by modifying block body data in a generated block chain by setting an out-of-chain error correction table in the extension process of the existing block chain.
In order to achieve the above object, an embodiment of the present invention provides an active verification method for a blockchain that modifies blockbody data, where an off-chain error correction table is stored in association with the blockchain, where the off-chain error correction table includes a plurality of error correction records made up of location information of first data and second data stored in association in the blockchain, where the first data is a part of data that is in error in the blockbody data of a block in the blockchain, and the first data in the blockchain has been modified into the second data, and the verification method includes: according to the link relation among the blocks, sequentially carrying out the following operations on each block in the block chain: generating a character string with a fixed length by using the block head data and the block body data of the current block through an irreversible algorithm to serve as a first hash value, and comparing the character string with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value; searching whether a mapping error record formed by taking partial data in the block body data of the current block as the first data is included in the off-link mapping error table; determining that the consistency verification between the current block to its sub-blocks is passed if: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or the first hash value is different from the second hash value, and the off-chain error correction table includes an error correction record formed by using partial data in the block volume data of the current block as the first data.
An embodiment of the present invention provides an active verification system for a blockchain that modifies blockbody data, where an off-chain error correction table is stored in association with the blockchain, where the off-chain error correction table includes a plurality of error correction records that are formed by location information of first data and second data, where the first data is part of data that is included in the blockchain and is obtained by performing error correction on the blockbody data of a block in the blockchain, and the first data in the blockchain has been modified into the second data, and the verification system includes: the verification system carries out the following operations on each block in the block chain in sequence according to the link relation among the blocks, wherein: the hash value comparison module is used for generating a character string with a fixed length by using irreversible algorithm on the block head data and the block body data of the current block as a first hash value, and comparing the first hash value with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value; the record searching module is used for searching whether a mapping error record formed by taking part of data in the block body data of the current block as the first data is included in the off-chain mapping error table; the verification determining module is configured to determine that the consistency verification between the current block and its sub-blocks passes if: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or the first hash value is different from the second hash value, and the off-chain error correction table includes an error correction record formed by using partial data in the block volume data of the current block as the first data.
The active verification method and system for the block chain for modifying the block volume data of the embodiment of the invention synchronously perform two operations when verifying each block in the block chain: firstly, obtaining a first hash value by all data in the current block through an irreversible algorithm, and comparing the first hash value with a second hash value stored in a block head of a sub-block of the current block; searching whether a mapping error record formed by using partial data in the block body data of the current block as first data is contained in the off-link mapping error table; if the following conditions exist, the consistency verification between the current block and the sub-blocks thereof is determined to be passed: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by taking partial data in the block body data of the current block as first data; therefore, consistency verification of a block chain formed by blocks with modified block volume data is achieved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Fig. 1 is a first block chain configuration diagram according to an embodiment of the present invention;
FIG. 2 is a block chain configuration diagram II according to an embodiment of the present invention;
fig. 3 is a third diagram illustrating a block chain according to an embodiment of the present invention;
fig. 4 is a flowchart of a first active verification method for a block chain of modified block volume data according to an embodiment of the present invention;
FIG. 5a is a block chain configuration diagram of the present invention;
FIG. 5b is a block chain diagram according to an embodiment of the present invention;
fig. 6 is a flowchart of a second active verification method for a block chain of modified block volume data according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an active verification system for modifying a blockchain of blockvolume data according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that, in the embodiments of the present invention, an active verification method for a block chain of modified block volume data is provided, so as to implement consistency verification on a block in the block chain when block volume data in the block chain is modified. The active verification means that in the process of performing consistency verification on a block chain with modified block volume data, while performing consistency verification on data in each block according to a link relation sequence between the blocks according to a conventional method, the block volume data in the block is verified according to a survey error record in an off-chain survey error table. Specifically, according to the link relationship between the blocks, the following operations are sequentially performed on each block in the block chain: generating a character string with a fixed length by using the block head data and the block body data of the current block through an irreversible algorithm to serve as a first hash value, and comparing the character string with a second hash value stored in the block head of the sub-block of the current block to obtain a result of judging whether the first hash value is the same as the second hash value; searching whether a mapping error record formed by using partial data in the block body data of the current block as first data is included in the off-link mapping error table; if the following conditions exist, the consistency verification between the current block and the sub-blocks thereof is determined to be passed: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as first data; or the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by using partial data in the block body data of the current block as the first data. . The block volume data described herein is understood to be information as actual transaction data, and the block header data includes a hash value, which is a fixed-length character string generated by an irreversible algorithm on all data of a parent block of the current block, and control information related to the current block, and the block volume data and the block header data constitute complete data of one block.
Next, the transaction information described in the block volume data of each block in the block chain in the embodiment of the present invention is not limited to the information of "account book" or "financial transaction" in the business, and may be broadly understood as diversified object data that needs to be managed by such a data organization form as the block chain, such as enterprise management data for managing an enterprise, project progress management data for tracking a project, and the like. In the embodiment of the invention, the shape and the extension direction of the block chain are not limited, but only in the normal extension process of the block chain, the block body data of the blocks in the block chain is corrected and corrected in a mode of setting an off-chain error correction table, and meanwhile, the block chain is subjected to consistency verification by using the off-chain error correction table under the condition of modifying the corresponding block body data part in the original block chain. For example, the extended form of the block chain may be a conventional single-chain block chain as shown in fig. 1, or may be a block chain in an overall tree structure as shown in fig. 2 (each block in the block chain has only one parent block and one or more child blocks), or may be a block chain having a directed acyclic pattern structure as shown in fig. 3 (at least one block in the block chain has one or more parent blocks).
The active verification method for modifying the blockchain of the blockvolume data according to the embodiment of the present invention will be described in detail below.
Example one
Fig. 4 is a flowchart of a first active verification method for a blockchain of modified blockvolume data according to an embodiment of the present invention, where an execution subject of the method may be a system having a data processing function, including a terminal and/or a server. As shown in fig. 4, the active verification method for a block chain of modified block volume data includes, according to a link relationship between blocks, sequentially performing the following operations on each block in the block chain:
s410, generating a character string with a fixed length by using the block head data and the block body data of the current block through an irreversible algorithm to serve as a first hash value, and comparing the first hash value with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value;
in the process of generating a new block by extending the block chain, all data of the previous block, including the block head data and the block body data, are subjected to an irreversible algorithm to generate a character string with a fixed length as a hash value, and the character string is added to the block head of the next block. If the logical link relationship from the previous block to the next block is guaranteed to be correct, it is necessary that the block volume data of the previous block is not tampered. This is also the basic logic to verify blockchain consistency.
The first hash value in this step is a character string of fixed length generated by the irreversible algorithm on the block head data and the block body data of the current block; the second hash value is a fixed-length character string generated by the same irreversible algorithm for the block header data and the block body data of the current block when generating the sub-block of the current block in the block extension process, and is stored in the block header of the sub-block. If the data of the current chunk (especially the chunk volume data) has not been tampered with, then in principle the first hash value and the second hash value should be equal. If not, the token chunk data is tampered (in this embodiment, the default chunk header data is not modified).
Here, in the block chain configuration diagrams shown in fig. 2 and 3, there may be a case where one block has a plurality of parent blocks, and accordingly, a plurality of second hash values are stored in the block header of the block at the same time, and each of the second hash values corresponds to one parent block, and therefore, the case where the first hash value and the second hash value are equal in this step also includes: the first hash value is equal to one of a plurality of concurrent second hash values.
S420, searching whether a mapping error record formed by taking partial data in the block body data of the current block as first data is included in the off-chain mapping error table;
in the foregoing, the technical solution of the present invention is suitable for performing consistency verification on a block chain under the condition that data reconnaissance is realized by setting an out-of-chain reconnaissance table and modifying block body data in the block chain. As shown in table 1, a sample of the out-of-chain error table one is provided for the embodiment of the present invention. In the first off-chain error correction table, each error correction record is associated with and stores an error correction record formed by position information (such as a block number and a data ID of a block where the first data is located in the block chain) of the first data in the block chain and second data, wherein the first data is a part of the block body data of the block in the block chain, and the first data in the block chain has been modified into the second data. For example, as shown in fig. 5a and 5b, they correspond to a Block chain status diagram before and after modification, which modifies the first data olddata with data ID tx01 in the Block2 into the second data newdata. In addition, the off-link error table one may also include information such as the time of the generation of the error record, and is not shown here.
TABLE 1 chainout error Table I
Data ID Second data Number of block in which ……
tx01 newdata Block2 ……
…… …… …… ……
Based on the existence of the out-of-chain error table, when the first hash value is the same as the second hash value, two cases may be involved: the current block has no error-corrected data, i.e. there is no error-corrected record in the off-link error-correction table about the block data of the current block, or there should be error-corrected data in the current block, i.e. there is an error-corrected record in the off-link error-correction table about the block data of the current block, but actually these data are not modified in the block data for some reason. It is clear that the former case is legal, while the latter case is illegal, and the erroneous contents of the block data are not modified in time. In addition, when the first hash value is different from the second hash value, two cases may be included: the current block has data which is mistuned, that is, a mistune record of the block data of the current block is stored in the off-chain mistune table, or the current block should not have data which is mistuned, that is, no mistune record of the block data of the current block exists in the off-chain mistune table, but actually some data in the block data is modified for some reasons. It is clear that the former case is legal, while the latter case is illegal, and it is likely that the block volume data is maliciously tampered with. Therefore, for comprehensive verification, the consistency problem between the current block and its sub-blocks needs to be verified comprehensively by combining the conventional consistency method for verifying the block chain with the verification by using the off-chain error correction table.
The execution sequence of the above steps S410 and S420 is not strictly limited.
S430, according to the comparison result and the query result, determining whether the consistency verification from the current block to the sub-block passes. Specifically, if there is the following case (1) or (2), it is determined that the consistency verification between the current block to its sub-block passes:
(1) the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as first data;
or,
(2) the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by using partial data in the block body data of the current block as the first data.
For the case (1), when the first hash value calculated from all the data of the current block is the same as the second hash value located in the sub-block of the current block, there are two cases, namely, the out-of-chain error correction table does not include the error correction record formed by using part of the data in the block volume data of the current block as the first data, and the first hash value is the same as the second hash value at this time, which indicates that the consistency verification between the sub-block from the current block to the current block is passable; the other is that the off-chain error correction table includes an error correction record formed by using a part of data in the block volume data of the current block as the first data, and at this time, the first hash value is the same as the second hash value, which indicates that the data to be corrected in the block chain is not modified as required, i.e. the consistency verification from the current block to the sub-block of the current block is not passed.
For the case (2), when the first hash value calculated from all the data of the current block is different from the second hash value located in the sub-block of the current block, there are two cases, namely, the out-of-chain error correction table actually contains a error correction record formed by using part of the data in the block volume data of the current block as the first data, and the difference between the first hash value and the second hash value indicates that the consistency verification between the sub-blocks from the current block to the current block is passable; the other is that the off-chain error correction table does not include an error correction record formed by using a part of data in the block volume data of the current block as the first data, and the difference between the first hash value and the second hash value indicates that the data in the block chain is maliciously modified, i.e. the consistency verification from the current block to the sub-block of the current block is not passable.
In the active verification method for a block chain for modifying block volume data according to the embodiment of the present invention, when performing verification operation on each block in the block chain, two operations are performed synchronously: firstly, obtaining a first hash value by all data in the current block through an irreversible algorithm, and comparing the first hash value with a second hash value stored in a block head of a sub-block of the current block; searching whether a mapping error record formed by using partial data in the block body data of the current block as first data is contained in the off-link mapping error table; if the following conditions exist, the consistency verification between the current block and the sub-blocks thereof is determined to be passed: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by taking partial data in the block body data of the current block as first data; therefore, consistency verification of a block chain formed by blocks with modified block volume data is achieved.
Example two
Fig. 6 is a flowchart of a second active verification method for a block chain for modifying block volume data according to an embodiment of the present invention, which may be regarded as a further refinement scheme of the method steps shown in fig. 4, and as shown in fig. 6, the active verification method for a block chain for modifying block volume data includes, according to a link relationship between blocks, sequentially performing the following steps on each block in the block chain:
s610, generating a character string with a fixed length by using the block head data and the block body data of the current block through an irreversible algorithm to be used as a first hash value, and comparing the first hash value with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value;
s620, searching whether the error correction record formed by taking partial data in the block body data of the current block as first data is contained in the off-chain error correction table;
steps S610 to S620 correspond to the same contents as steps S410 to S420.
If the first hash value is the same as the second hash value, go to step S630;
s630, if the out-of-chain error correction table does not include the error correction record formed by using the partial data in the block data of the current block as the first data, determining that the consistency verification between the current block and its sub-block passes.
If the first hash value is different from the second hash value, go to step S640;
and S640, if the off-chain error correction table contains an error correction record formed by using partial data in the block body data of the current block as first data, determining that the consistency verification between the current block and the sub-block of the current block is passed.
Steps S630 to S640 correspond to step S430.
In an actual application scenario, when the off-link error table includes an error correction record formed by using partial data in the block data of the current block as the first data, although the reason that the first hash value is different from the second hash value may be preliminarily determined, and it is likely that the block data in the current block is legally corrected, it cannot be excluded that some data in the block data of the current block is maliciously tampered while the legally corrected, so that the off-link error table includes an error correction record formed by using partial data in the block data of the current block as the first data to directly determine that the consistency verification between the current block and its sub-block passes through a manner that the consistency verification is fast and high in reliability, which is not an optimal solution.
In this embodiment, the content of each error record in the off-link error table is expanded, and as shown in table 2, a hash value, that is, a third hash value is added on the basis of table 1, where the third hash value is a fixed-length character string generated by performing an irreversible algorithm on the block header data and the block body data of the block after the block where the first data is located is error-corrected (the first data in the block is modified into the second data).
TABLE 2 chainout survey error table two
Data ID Second data Number of block in which Hash value ……
tx01 newdata Block2 32 is a character string ……
…… …… …… …… ……
Similarly, in the off-chain error table two, each error record may further include information such as the time when the error record was generated, and is not shown here.
Based on the existence of table 2, in the process of performing step S640, if it is determined that the off-chain error correction table contains an error correction record formed by using a part of data in the block volume data of the current block as the first data, the first hash value may be compared with the third hash value in the error correction record, and if the first hash value is the same as the third hash value, the block volume data representing the current block is legally modified, and it may be determined that the consistency verification between the current block and its sub-blocks passes.
Of course, in an actual application scenario, for a block in a block chain that is surveyed, at least one survey error record corresponding to the block is stored in the off-chain survey table (multiple survey error records may be first data for the same position in the block chain, or first data for different positions in the block chain, or both), and then, when comparing the first hash value with the third hash value in the survey error record, the first hash value may be compared with the third hash value in the survey error record that is generated recently in the survey error record. If the first hash value is the same as the third hash value, the block volume data characterizing the current block is legally modified, and it can be determined that the consistency between the current block and its sub-blocks is verified as passing.
In the active verification method for the block chain of the modified block body data according to the embodiment of the present invention, on the basis of the embodiment shown in fig. 4, each error correction record is added with a character string, that is, a third hash value, of a fixed length obtained by performing an irreversible algorithm on the data of all blocks after data correction of the block corresponding to the error correction record, and the third hash value is used to verify the authenticity and validity of the block after data correction, so that the accuracy of block chain consistency verification is improved.
EXAMPLE III
Fig. 7 is a first schematic diagram of an active verification system for modifying a blockchain of blockvolume data according to an embodiment of the present invention, which can be used to execute the method steps shown in fig. 4. The block chain is stored with an off-chain error correction table, the off-chain error correction table comprises a plurality of error correction records formed by position information of first data and second data, wherein the first data is stored in an associated manner, the position information of the first data in the block chain and the second data form the error correction records, the first data is part of data which is subjected to error correction in block body data of blocks in the block chain, and the first data in the block chain is modified into the second data. As shown in fig. 7, the active verification system for a blockchain of modified blockvolume data includes: the system comprises a hash value comparison module 710, a record search module 720 and a verification determination module 730, wherein the verification system performs the following operations on each block in a block chain according to the link relationship between the blocks, wherein:
a hash value comparison module 710, configured to generate a character string with a fixed length as a first hash value by using an irreversible algorithm on the block header data and the block body data of the current block, and compare the first hash value with a second hash value stored in the block header of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value; a record searching module 720, configured to search, in the off-link error-checking table, whether an error-checking record formed by using a part of data in the block data of the current block as the first data is included; a verification determining module 730, configured to determine that the consistency verification between the current block and its sub-blocks passes if: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as first data; or the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by using partial data in the block body data of the current block as the first data.
Furthermore, the error record may further include a third hash value corresponding to the block in which the first data is located, where the third hash value is a fixed-length character string generated by performing an irreversible algorithm on the block header data and the block body data of the block after the block in which the first data is located is error-corrected,
correspondingly, the verification determining module 730 is further configured to, after determining that the off-chain error correction table includes an error correction record formed by using a part of data in the block data of the current block as the first data, compare the first hash value with a third hash value in the error correction record, and if the first hash value is the same as the third hash value, determine that the consistency verification between the current block and the sub-block thereof is passed.
Preferably, for a block in the block chain that has been surveyed, at least one survey error record corresponding to the block is stored in the off-chain survey error table,
accordingly, the verification determination module 730 is further configured to compare the first hash value to a third hash value in a recently generated reconnaissance record in the reconnaissance record.
Further, the error record may further include: the generated time information is recorded by mistake in the survey; the location information of the first data in the block chain may include: the number of the block where the first data is located, and the data ID of the first data in the block body data of the block.
The verification system in this embodiment may also perform the method steps as shown in fig. 6.
In the active verification system for a block chain for modifying block volume data according to the embodiment of the present invention, when performing verification operation on each block in the block chain, two operations are performed synchronously: firstly, obtaining a first hash value by all data in the current block through an irreversible algorithm, and comparing the first hash value with a second hash value stored in a block head of a sub-block of the current block; searching whether a mapping error record formed by using partial data in the block body data of the current block as first data is contained in the off-link mapping error table; if the following conditions exist, the consistency verification between the current block and the sub-blocks thereof is determined to be passed: the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by taking partial data in the block body data of the current block as first data; therefore, consistency verification of a block chain formed by blocks with modified block volume data is achieved.
Furthermore, each error correction record is additionally provided with a character string with a fixed length, namely a third hash value, obtained by performing an irreversible algorithm on the data of all blocks after the data correction of the block corresponding to the error correction record, and the system of the embodiment utilizes the third hash value to check the authenticity and the legality of the block after the data correction, so that the accuracy of block chain consistency verification is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. An active verification method for a blockchain for modifying blockbody data is characterized in that an off-chain error correction table is stored in association with the blockchain, the off-chain error correction table comprises a plurality of error correction records formed by position information of first data and second data in the blockchain, wherein the first data is the part of the blockbody data of blocks in the blockchain which is subjected to error correction, and the first data in the blockchain is modified into the second data,
the verification method comprises the following steps:
according to the link relation among the blocks, sequentially carrying out the following operations on each block in the block chain:
generating a character string with a fixed length by using the block head data and the block body data of the current block through an irreversible algorithm to serve as a first hash value, and comparing the character string with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value;
searching whether a mapping error record formed by taking partial data in the block body data of the current block as the first data is included in the off-link mapping error table;
determining that the consistency verification between the current block to its sub-blocks is passed if:
the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or,
the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by using partial data in the block data of the current block as the first data.
2. The verification method according to claim 1, wherein the error correction record further includes a third hash value corresponding to the block in which the first data is located, the third hash value is a fixed-length character string generated by applying an irreversible algorithm to the block header data and the block body data of the block after the block in which the first data is located is corrected,
the authentication method further comprises:
after determining that the off-chain error correction table contains an error correction record formed by using partial data in the block data of the current block as the first data, comparing the first hash value with the third hash value in the error correction record, and if the first hash value is the same as the third hash value, determining that the consistency verification between the current block and the sub-block of the current block is passed.
3. The method of claim 2, wherein for a block in the chain of blocks that has been surveyed, the off-chain survey table stores at least one survey record corresponding to the block,
said comparing said first hash value to said third hash value in the error log comprises:
comparing the first hash value to the third hash value in the most recently generated reconnaissance record in the reconnaissance record.
4. The validation method of any one of claims 1-3, wherein the reconnaissance record further comprises: the generated time information is recorded by mistake in the survey; the position information of the first data in the block chain comprises: the number of the block where the first data is located, and the data ID of the first data in the block body data of the block.
5. An active verification system for a blockchain for modifying blockbody data, wherein an off-chain error correction table is stored in association with the blockchain, the off-chain error correction table comprises a plurality of error correction records consisting of position information of first data and second data in the blockchain, wherein the first data is a part of the blockbody data of blocks in the blockchain, and the first data in the blockchain is modified into the second data,
the authentication system includes: the verification system carries out the following operations on each block in the block chain in sequence according to the link relation among the blocks, wherein:
the hash value comparison module is used for generating a character string with a fixed length by using irreversible algorithm on the block head data and the block body data of the current block as a first hash value, and comparing the first hash value with a second hash value stored in the block head of the sub-block of the current block to obtain a result of whether the first hash value is the same as the second hash value;
the record searching module is used for searching whether a mapping error record formed by taking part of data in the block body data of the current block as the first data is included in the off-chain mapping error table;
the verification determining module is configured to determine that the consistency verification between the current block and its sub-blocks passes if:
the first hash value is the same as the second hash value, and the out-of-chain error correction table does not contain an error correction record formed by taking partial data in the block body data of the current block as the first data; or,
the first hash value is different from the second hash value, and the out-of-chain error correction table comprises an error correction record formed by using partial data in the block data of the current block as the first data.
6. The verification system of claim 5, wherein the error correction record further includes a third hash value corresponding to the block in which the first data is located, wherein the third hash value is a fixed-length character string generated by applying an irreversible algorithm to the block header data and the block body data of the block after the block in which the first data is located is corrected,
the authentication determination module is further configured to,
after determining that the off-chain error correction table contains an error correction record formed by using partial data in the block data of the current block as the first data, comparing the first hash value with the third hash value in the error correction record, and if the first hash value is the same as the third hash value, determining that the consistency verification between the current block and the sub-block of the current block is passed.
7. The verification system of claim 6, wherein for a block in the chain of blocks that has been surveyed, the off-chain survey table stores at least one survey record corresponding to the block,
the authentication determination module is further configured to,
comparing the first hash value to the third hash value in the most recently generated reconnaissance record in the reconnaissance record.
8. The validation system of any of claims 5-7, further comprising in the error log: the generated time information is recorded by mistake in the survey; the position information of the first data in the block chain comprises: the number of the block where the first data is located, and the data ID of the first data in the block body data of the block.
CN201710425459.XA 2017-03-24 2017-06-08 Active verification method and system for block chain of modified block volume data Expired - Fee Related CN107451002B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710181077 2017-03-24
CN2017101810777 2017-03-24

Publications (2)

Publication Number Publication Date
CN107451002A true CN107451002A (en) 2017-12-08
CN107451002B CN107451002B (en) 2020-11-10

Family

ID=60486799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710425459.XA Expired - Fee Related CN107451002B (en) 2017-03-24 2017-06-08 Active verification method and system for block chain of modified block volume data

Country Status (1)

Country Link
CN (1) CN107451002B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886690A (en) * 2019-03-06 2019-06-14 上海共链信息科技有限公司 A kind of method that block chain synchronizes account book
CN112003701A (en) * 2020-04-16 2020-11-27 成都质数斯达克科技有限公司 Block self-checking and synchronizing method and device
TWI735841B (en) * 2019-01-19 2021-08-11 宏碁股份有限公司 Computer system and method for verifying archived data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055993A (en) * 2016-08-13 2016-10-26 深圳市樊溪电子有限公司 Encryption storage system for block chains and method for applying encryption storage system
CN106250721A (en) * 2016-07-28 2016-12-21 杭州云象网络技术有限公司 A kind of electronic copyright protection method based on block chain
CN106415530A (en) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 Block mining methods and apparatus
US20170046526A1 (en) * 2015-08-13 2017-02-16 TD Bank Group System and Method for Implementing Hybrid Public-Private Block-Chain Ledgers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106415530A (en) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 Block mining methods and apparatus
US20170046526A1 (en) * 2015-08-13 2017-02-16 TD Bank Group System and Method for Implementing Hybrid Public-Private Block-Chain Ledgers
CN106250721A (en) * 2016-07-28 2016-12-21 杭州云象网络技术有限公司 A kind of electronic copyright protection method based on block chain
CN106055993A (en) * 2016-08-13 2016-10-26 深圳市樊溪电子有限公司 Encryption storage system for block chains and method for applying encryption storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI735841B (en) * 2019-01-19 2021-08-11 宏碁股份有限公司 Computer system and method for verifying archived data
CN109886690A (en) * 2019-03-06 2019-06-14 上海共链信息科技有限公司 A kind of method that block chain synchronizes account book
CN109886690B (en) * 2019-03-06 2023-07-25 上海共链信息科技有限公司 Method for synchronizing account book by block chain
CN112003701A (en) * 2020-04-16 2020-11-27 成都质数斯达克科技有限公司 Block self-checking and synchronizing method and device

Also Published As

Publication number Publication date
CN107451002B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN107463597B (en) Passive verification method and system for block chain of modified block volume data
CN107391291B (en) Block chain error-correcting method and system for modifying block chain namely block body data
CN107391292B (en) Block chain verification method and system for realizing error correction aiming at data of block body
CN107391557B (en) Block chain serial query method and system for setting out-of-chain fault table
US20210109917A1 (en) System and Method for Processing a Database Query
CN107423163B (en) Error surveying method and system for block chain of overall serial added blocks
US11762839B2 (en) Search method using data structure for supporting multiple search in blockchain-based IoT environment, and device according to method
CN107451002B (en) Active verification method and system for block chain of modified block volume data
CN107463596B (en) Block chain parallel query method and system for setting out-of-chain fault table
Verma et al. Introduction of formal methods in blockchain consensus mechanism and its associated protocols
CN112182105B (en) Block chain data modification method based on Merkle tree
US20220114156A1 (en) Trusted ledger management systems and methods
CN107451177B (en) Query method and system for single error-surveying block chain of increased blocks
CN107451007B (en) Verification method and system of block chain for error correction aiming at added blocks
CN108470039A (en) Data processing method and device in block chain
CN115599794A (en) Cross-block-chain joint tracing method and system
CN112115098A (en) Tracing system based on HyperLedger and IPFS
CN107451011B (en) Error correction method and system for block chain of parallel added blocks
CN107451178B (en) Block chain error-surveying method and system for keeping block chain having block body data
CN107451179B (en) Query method and system for block chain for increasing overall error of block
CN107426293B (en) Error correction method and system for block chain of single serial added block
CN110059087B (en) Data attribute identification method, device and equipment in block chain type account book
CN108519985B (en) Bidirectional block chain, data processing method and device
US11973878B2 (en) Non-fungible token custody chain for multi-component hardware devices
CN112948847B (en) Block chain-based data sharing system and data correctness verification method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201110