CN107451178B - Block chain error-surveying method and system for keeping block chain having block body data - Google Patents

Block chain error-surveying method and system for keeping block chain having block body data Download PDF

Info

Publication number
CN107451178B
CN107451178B CN201710425482.9A CN201710425482A CN107451178B CN 107451178 B CN107451178 B CN 107451178B CN 201710425482 A CN201710425482 A CN 201710425482A CN 107451178 B CN107451178 B CN 107451178B
Authority
CN
China
Prior art keywords
data
error
record
block
chain
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.)
Expired - Fee Related
Application number
CN201710425482.9A
Other languages
Chinese (zh)
Other versions
CN107451178A (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 Rui Zhuo Xi Tou Technology Development Co ltd
Original Assignee
Beijing Rui Zhuo Xi Tou Technology 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 Rui Zhuo Xi Tou Technology Development Co ltd filed Critical Beijing Rui Zhuo Xi Tou Technology Development Co ltd
Publication of CN107451178A publication Critical patent/CN107451178A/en
Application granted granted Critical
Publication of CN107451178B publication Critical patent/CN107451178B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables

Abstract

The embodiment of the invention provides a block chain error-surveying method and a system for keeping a block chain with block body data, belonging to the technical field of block chains, wherein the method comprises the following steps: receiving a data error-mining request aiming at block body data of a block in a currently formed block chain, wherein the data error-mining request comprises the following steps: the position information of the first data to be subjected to error correction in the block chain, and second data obtained after error correction of the first data; generating a surveying error record according to the data surveying error request; and storing the error record into an out-of-chain error table, wherein the out-of-chain error table and the block chain have an incidence relation so as to be used for a consultant to consult the block chain by combining the out-of-chain error table. The scheme of the embodiment of the invention aims to correct the error of the block data in the block chain under the condition that the block data in the generated block chain is not modified.

Description

Block chain error-surveying method and system for keeping block chain having block body data
Technical Field
The embodiment of the invention belongs to the technical field of block chains, and particularly relates to a block chain error-surveying method and a block chain error-surveying system for keeping block chains with block 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 a block chain error-correcting method and a block chain error-correcting system for keeping a block chain, namely block data, and aims to realize error-correcting of the block data in the block chain under the condition that the block data in a generated block chain is not modified by setting an out-of-chain error-correcting table in the extension process of the existing block chain.
To achieve the above object, an embodiment of the present invention provides a method for maintaining a blockchain, i.e., a blockchain error correction method with blockbody data, including: receiving a data error-mining request aiming at block body data of a block in a currently formed block chain, wherein the data error-mining request comprises the following steps: the position information of the first data to be subjected to error correction in the block chain, and second data obtained after error correction of the first data; generating an error-surveying record according to the data error-surveying request, wherein the error-surveying record comprises: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data; and storing the error record into an out-of-chain error table, wherein the out-of-chain error table and the block chain have an incidence relation so as to be used for a consultant to consult the block chain by combining the out-of-chain error table.
The embodiment of the invention provides a block chain error-surveying system for keeping a block chain, namely data of a block body, comprising: a request receiving module, configured to receive a data error correction request for blockbody data of a block in a currently formed blockchain, where the data error correction request includes: the position information of the first data to be subjected to error correction in the block chain, and second data obtained after error correction of the first data; the record generation module is used for generating a data error investigation request according to the data error investigation request, and the data error investigation request comprises the following steps: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data; and the record storage module is used for storing the error record into an off-chain error table, and the off-chain error table and the block chain have an incidence relation so as to be used for a reviewer to consult the block chain by combining the off-chain error table.
According to the method and the system for keeping the blockchain, namely the blockchain error correction of the blockchain data, disclosed by the embodiment of the invention, the position information of the first data needing error correction in each time in the blockchain and the second data obtained by error correction of the first data are stored in the off-chain error correction table in an associated manner by setting the off-chain error correction table, so that the error correction of the blockchain data in the blockchain is realized under the condition that the blockchain data in the generated blockchain is not modified.
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 first flowchart of a method for maintaining a blockchain, i.e., a blockchain error correction method with blockbody data according to an embodiment of the present invention;
FIG. 5 is a block chain configuration diagram of the present invention;
FIG. 6 is a flowchart of a block chain error checking method for keeping block chains, i.e., data of blocks according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a first method for storing an error record in an out-of-chain error table according to an embodiment of the present invention;
FIG. 8 is a flowchart of a second method for storing an error record in an out-of-chain error table according to an embodiment of the present invention;
FIG. 9 is a first block chain error checking system for keeping block chains, i.e., block data, according to an embodiment of the present invention;
FIG. 10 is a block chain error checking system with block data for holding a block chain according to an embodiment of the present invention;
FIG. 11 is a first diagram illustrating a structure of storing a survey error record according to an embodiment of the present invention;
fig. 12 is a second schematic structural diagram of storing a survey error record 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, a blockchain error correction method for maintaining a blockchain, that is, a blockchain with blocky data, is provided to correct error in the blockchain without modifying blocky data in the generated blockchain. Specifically, after receiving a data error-correcting request for the block data of a block in a currently formed block chain each time, generating an error-correcting record according to the data error-correcting request, wherein the error-correcting record comprises: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data; and storing the error record into an off-chain error table, wherein the off-chain error table and the block chain have an incidence relation so as to be used for a consultant to consult the block chain by combining the off-chain error table. 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 the block body data of the blocks in the block chain is corrected and error is corrected by setting the off-chain error correction table in the normal extension process of the block chain, and meanwhile, the corresponding block body data part in the original block chain is not required to be modified. 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 method for maintaining blockchains, i.e. blockchain mining errors with blockbody data, according to the embodiment of the present invention will be described in detail below.
Example one
Fig. 4 is a flowchart of a blockchain error-mining method for maintaining blockchains, i.e., blockchain data, according to an embodiment of the present invention. As shown in fig. 4, the blockchain error checking method for maintaining blockchains, i.e. having blockbody data, includes the following steps:
s410, receiving a data error correction request for the block data of the block in the currently formed blockchain, where the data error correction request includes: the method comprises the steps of obtaining position information of first data to be subjected to error correction in a block chain, and obtaining second data subjected to error correction on the first data;
the currently formed block chain is a block chain shape which is shown by the formed block chain on the whole by the current time.
Specifically, when block data of a block in a currently formed blockchain needs to be subjected to a data mining, a data mining request may be sent to the system, where the data mining request includes: the position information of the first data to be error-corrected in the block chain, and the second data after error correction of the first data. The first data is partial block volume data located in a block of the block chain, and the partial block volume data is used as target data of the error surveying, and the first data may be data only including the surveyed data or a data set including the surveyed data.
For convenience of describing the block volume data of each block in the block chain, in the embodiment, the block volume data of each block in the block chain is divided into a plurality of data entries, each data entry independently contains one piece of transaction information and corresponds to one data ID, for example, as shown in fig. 5, it shows the existence form of the block volume data in the block chain, that is, the block volume data of each block may include a plurality of data entries. In fig. 5, tx01 located in Block 2: olddata, as a data entry, has a data ID of tx01 and transaction information of olddata (olddata generally refers to original transaction information in a block chain that has not been reconsidered yet). In fact, the first data may be transaction information corresponding to one or more data entries to be investigated, or may be a set of data including the transaction information to be investigated. For convenience of data management, the system in this embodiment processes data error requests one by one in units of data entries in block data existing in a block chain when receiving and processing the data error requests, that is, each received data error request only includes a data error request for one data entry.
Specifically, when the blockchain manager needs to perform the mining on the blockbody data of the blocks in the blockchain, the location information of the first data to be mined in the blockchain may be input to the system, where the location information may specifically be the number of the Block where the first data is located (the number of each Block in the blockchain is uniquely determined, such as "Block 1", "Block 2" and "Block 3" in fig. 5, which may be the number of the Block), and the data ID of the first data in the blockbody data of the Block (such as "tx 01" in fig. 5). By locking the block number of the first data in the block chain and the data ID in the block data of the block, a data entry and the transaction information contained in the data entry can be uniquely determined. Therefore, it should be noted here that the error correction for the transaction information in a certain data entry is already determined when the data correction is determined, and when the data correction is specifically performed, only the position information of the corrected data, i.e., the first data, in the block chain needs to be locked, and the specific content of the first data does not need to be explicitly input into the system.
The second data is data obtained by error correction of the first data, that is, the second data is used to replace the portion of the first data corresponding to the first data. The data error request input to the system comprises two parts, namely: the position information of the first data to be error-corrected in the block chain, and the second data after error correction of the first data.
In an actual application scenario, a blockchain manager may input position information of a plurality of transaction information in a blockchain and result information obtained by performing error correction on the transaction information to the system at one time, and the system may analyze information items corresponding to the transaction information according to the position information of the transaction information in the blockchain, so that the information items are treated as a plurality of data error correction requests by taking the information items as a unit, that is, each data error correction request only includes a data error correction request for one data item.
S420, generating a mistake-investigation record according to the data mistake-investigation request, wherein the mistake-investigation record comprises: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data;
specifically, the system extracts position information of first data to be error-surveyed in a block chain from data error-survey requests received each time, and second data obtained by error-surveying the first data. And the two pieces of information are stored in a correlated mode to form a fault-surveying record. Optionally, the error record may further include time information generated by the error record of the current time.
And S430, storing the error record into an off-chain error table, wherein the off-chain error table and the blockchain have an association relationship, so that a consultant consults the blockchain by combining the off-chain error table.
Store the survey mistake record that generates at present in the outer survey mistake table of chain, this outer survey mistake table of chain is used for outside the block chain, will carry out the survey mistake record of surveying the block chain mistake at every turn and store, and this outer survey mistake table of chain and block chain between the incidence relation has been confirmed, so as to be used for the reviewer can combine outer survey mistake table of chain to look up the block chain when looking over the transaction information of record in the block chain, make the reviewer can in time see the transaction information of being surveyed the mistake in the block chain.
As shown in table 1, an out-of-chain error table one is provided for the embodiment of the present invention. In the off-chain error table one, each error record may further include information such as the time when the error record is generated, and is not shown here.
TABLE 1 chainout error Table I
Data ID Second data Number of block in which ……
tx01 newdata Block2 ……
…… …… …… ……
According to the block chain error correction method for keeping the block chain, namely the block body data, disclosed by the embodiment of the invention, the position information of the first data needing error correction in each time in the block chain and the second data obtained after error correction of the first data are stored in the off-chain error correction table in an associated manner by setting the off-chain error correction table, so that the error correction of the block body data in the block chain is realized under the condition that the block body data in the generated block chain is not modified.
Example two
Fig. 6 is a flowchart of a second method for maintaining blockchains, i.e., blockchain error correction with blockbody data according to an embodiment of the present invention, which may be regarded as a further refinement of the steps of the method shown in fig. 4, as shown in fig. 6, the method for maintaining blockchains, i.e., blockchain error correction with blockbody data, includes the following steps:
s610, receiving a data error correction request for the block data of the block in the currently formed blockchain, where the data error correction request includes: position information of first data to be surveyed in a block chain;
s620, generating a mistake-investigation record according to the data mistake-investigation request, wherein the mistake-investigation record comprises: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data;
steps S610 to S620 correspond to the same contents as steps S410 to S420.
S630, replacing the first data with the second data after error correction, and obtaining character strings with fixed length by performing an irreversible algorithm on the block head data and the block body data of the block where the current second data is located according to the position information of the first data in the block chain;
it should be noted that, in this step, replacing the first data with the second data after error correction is not modifying the original first data existing in the block chain, but is an additional step performed to calculate the hash value corresponding to the block after data error correction, that is, after copying all data (including the block head data and the block body data) of the block in which the first data is located, the step of replacing the first data with the second data after error correction is performed on the copied data.
Specifically, after the first data is replaced by the second data after the error correction, the block data of the block corresponding to the position information of the original first data in the block chain becomes block data composed of the second data and other data except the first data in the original block data. All data (including block head data and block body data) of the block after the data replacement is subjected to an irreversible algorithm to obtain a character string with a fixed length.
The irreversible algorithm may be a fixed-length computation (Hash) algorithm, and correspondingly, the character string obtained by the irreversible algorithm may be a Hash value.
And S640, adding the character string with the fixed length into the error investigation record corresponding to the second data so as to be used for verifying the authenticity of the block body data subjected to the error investigation by a reviewer.
In order to ensure the authenticity and the legality of each error record in an off-chain error table or prevent a person from maliciously tampering other data in block body data when the block body data is mistakenly surveyed, when a survey error record is generated each time, first data in the block body data of a block which is mistaken in a block chain is replaced by corresponding second data, all data of the block after data replacement are subjected to an irreversible algorithm to obtain a character string with a fixed length, and the character string with the fixed length is stored in a corresponding survey error record, so that a reviewer can verify the authenticity and the legality of the survey error record by using the character string with the fixed length, and prevent the survey error data in the survey error record and/or other block body data parts in the block chain from being maliciously tampered.
As shown in table 2, a second out-of-chain error table is provided for the embodiment of the present invention. Comparing the content of the first off-link error table, adding a hash value table entry to each error record in the second off-link error table, where the hash value is the hash value in the step S630: and replacing the first data with the second data after error correction, and carrying out an irreversible algorithm on the block head data and the block body data of the block where the current second data is located according to the position information of the first data in the block chain to obtain a character string with a fixed length.
TABLE 2 chainout survey error table two
Data ID Second data Number of block in which Hash value ……
tx01 newdata Block2 32-bit 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.
And S650, storing the error record into an off-chain error table, wherein the off-chain error table and the blockchain have an association relation, so that a consultant consults the blockchain by combining the off-chain error table. Step S650 is the same as step S430.
In addition, after the error records are generated according to the data error investigation request at every time, the error records can be stored and managed in different modes, so that the looking-up requirements of the look-up person on the off-chain error table are facilitated. The present embodiment shows, but is not limited to, the following two ways.
In a first mode
As shown in fig. 7, a first flowchart of a method for storing a surveying error record in an off-link surveying error table provided in this embodiment includes the following steps:
s710, inquiring whether an out-of-chain error survey table is stored, wherein the error survey record and the currently generated error survey record are error survey records aiming at the same first data;
in the technical scheme of this embodiment, the original block data of each block in the block chain is not modified in the error correction process, and for the determination of whether the original block data is the same first data, it is only required to determine whether the position information of the corrected first data in the block chain is the same. Therefore, to inquire whether the extralink error table stores the error records which are the same as the currently generated error records as the error records for the same first data, the position information of the first data in the block chain is the error record of the same position information by checking whether the error records in the extralink error table and the currently generated error records exist. If the position information of the first data in the block chain is the same as the error record of the position information, the fact that the error record is stored in the off-chain error table and is the same as the currently generated error record of the first data is indicated.
And S720, if the error record which is generated currently is the error record aiming at the same first data, replacing the corresponding error record in the error table with the currently generated error record.
When the fact that the out-of-chain error correction table is stored and the error correction record generated currently is the error correction record aiming at the same first data is determined, the existing error correction record can be replaced by the currently generated error correction record, so that the out-of-chain error correction table is guaranteed to have at most one error correction record aiming at each piece of transaction information in the block chain, and second data recorded in the error correction record are latest error correction result data. Therefore, the data of the off-chain error table can be simple and clear, the increase of data storage and management cost caused by data redundancy is avoided, and meanwhile, a viewer can conveniently view the latest error block data through the off-chain error table.
Mode two
As shown in fig. 8, a flowchart of a second method for storing error records in an off-link error table provided in this embodiment is shown, where each error record in the off-link error table corresponding to the method further includes a version number for marking the current error record. The version number of the error correction record refers to that in the error correction process aiming at the same first data, a plurality of error correction records are generated, and one version number can be marked for each error correction record according to the time sequence for distinguishing. As shown in fig. 8, the method includes the steps of:
s810, inquiring whether an out-of-chain error survey table is stored, wherein the error survey record and the currently generated error survey record are error survey records aiming at the same first data; step S810 is the same as step S710 described above.
And S820, if the error record which is generated currently is the error record aiming at the same first data, storing the error record which is generated currently in the off-chain error table, and marking the version number of the error record according to the existing version number.
When the error record which is generated currently exists in the off-chain error survey table and is the error record aiming at the same first data, the currently generated error record can be stored in the off-chain error survey table, and then the version number of the current error record is marked in a forward delay mode according to the version number of the existing error record in the error survey table.
Correspondingly, if the reconnaissance record which is the same as the currently generated reconnaissance record as the reconnaissance record aiming at the same first data does not exist in the off-chain reconnaissance table, the currently generated reconnaissance record is stored in the off-chain reconnaissance table, and the version number of the reconnaissance record is marked as the initial version number.
By adopting the method steps to store the error investigation records, the historical error investigation condition of each transaction information in the block of the block chain can be clearly shown.
On the basis of the embodiment shown in fig. 4, the blockchain error-correcting method for maintaining blockchains, namely blockbody data, adds a character string with a fixed length, which is obtained by irreversible algorithm on the data of all blocks of the blocks corresponding to the error-correcting records after data error correction, in each error-correcting record, and is used for verifying the authenticity and the legality of the data after error correction; meanwhile, when the error records are stored, the latest error record aiming at the same first data replaces the original error record, or a plurality of error records are stored simultaneously, and the mode of marking the version number of each error record is distinguished, so that the management requirements corresponding to different storage modes are met.
EXAMPLE III
Fig. 9 is a first block chain error correction system for keeping block chains, i.e., block body data according to an embodiment of the present invention, which can be used to execute the method steps shown in fig. 4. As shown in fig. 9, the blockchain error-checking system for holding blockchains with blockbody data includes: a request receiving module 910, a record generating module 920 and a record storing module 930, wherein:
a request receiving module 910, configured to receive a data error correction request for the block data of a block in a currently formed blockchain, where the data error correction request includes: the method comprises the steps of obtaining position information of first data to be subjected to error correction in a block chain, and obtaining second data subjected to error correction on the first data; record generation module 920, configured to generate a mistaking record according to the data mistaking request, where the mistaking record includes: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data; a record storage module 930, configured to store the mapping error record into an off-chain mapping error table, where the off-chain mapping error table has an association relationship with the blockchain, so that a reviewer consults the blockchain in combination with the off-chain mapping error table.
The block chain error correction system for keeping the block chain, namely the block body data, stores the position information of the first data needing error correction in the block chain each time and the second data obtained after error correction of the first data in the off-chain error correction table in an associated manner by setting the off-chain error correction table, thereby realizing error correction of the block body data in the block chain under the condition that the block body data in the generated block chain is not modified.
Example four
Fig. 10 is a schematic diagram of a blockchain error-mining system with blockchain data according to an embodiment of the present invention, which can be regarded as a refinement of the system structure shown in fig. 9, and can be used to perform the method steps shown in fig. 6. As shown in fig. 10, based on the embodiment of the system shown in fig. 9, the blockchain-based blockchain error correction system for maintaining blockchains, i.e. blockchain error correction system with blockbody data, further includes:
a data calculating module 940, configured to replace the first data with the second data after error correction, and obtain a character string with a fixed length by performing an irreversible algorithm on the block header data and the block body data of the block where the current second data is located according to the position information of the first data in the block chain;
the data adding module 950 is configured to add a character string with a fixed length to a reconnaissance record corresponding to the second data, so that a reviewer performs authenticity verification on the block data after the reconnaissance.
In addition, on the basis of fig. 9 or fig. 10, the above-mentioned blockchain i.e. blockchain error-surveying system with blockbody data may further include a structural diagram of storing error records shown in fig. 11 or fig. 12, wherein,
the structure shown in fig. 11 includes:
the first data query module 111 is configured to query whether an out-of-link reconnaissance table stores a reconnaissance record that is the same as the currently generated reconnaissance record as the reconnaissance record for the same first data;
a first data processing module 112, configured to replace a corresponding error survey record in the error survey table with a currently generated error survey record if the error survey record exists for the same first data as the currently generated error survey record.
The structure shown in fig. 11 may be used to perform the method steps shown in fig. 7.
The structure shown in fig. 12 includes:
the second data query module 121 is configured to query whether an out-of-chain error table stores an error record for the same first data as the currently generated error record;
and the second data processing module 122 is configured to, if there is an error record that is the same as the currently generated error record as the error record for the same first data, store the currently generated error record into the out-of-chain error table, and mark the version number of the error record in a forward-backward manner according to the existing version number.
The structure shown in fig. 12 may be used to perform the method steps shown in fig. 8.
Further, in the above system, the error log further includes: the time information generated by the error record of the current survey, and 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.
On the basis of the embodiment shown in fig. 6, the blockchain error-surveying system for maintaining blockchains, namely blockbody data, adds a character string with a fixed length, which is obtained by carrying out an irreversible algorithm on data of all blocks of a block corresponding to an error survey record after data survey, in each error survey record, and is used for verifying authenticity and legality of the data after survey; meanwhile, when the error records are stored, the latest error record aiming at the same first data replaces the original error record, or a plurality of error records are stored simultaneously, and the mode of marking the version number of each error record is distinguished, so that the management requirements corresponding to different storage modes are met.
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 (10)

1. A blockchain error-mining method for maintaining blockchain-i.e. blockbody data, comprising:
receiving a data error-mining request aiming at block body data of a block in a currently formed block chain, wherein the data error-mining request comprises the following steps: the position information of the first data to be subjected to error correction in the block chain, and second data obtained after error correction of the first data;
generating an error-surveying record according to the data error-surveying request, wherein the error-surveying record comprises: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data;
and storing the error record into an out-of-chain error table, wherein the out-of-chain error table and the block chain have an incidence relation so as to be used for a consultant to consult the block chain by combining the out-of-chain error table.
2. A method of surveying error according to claim 1, characterized in that the method further comprises:
replacing the copied first data with the second data after error correction, and obtaining character strings with fixed length by performing an irreversible algorithm on block head data and block body data of a block where the second data is located currently according to the position information of the first data in the block chain;
and adding the character string with the fixed length into the error investigation record corresponding to the second data so as to be used for verifying the authenticity of the block body data after the error investigation by a reviewer.
3. A method of surveying error according to claim 1, characterized in that the method further comprises:
inquiring whether the out-of-chain error correction table is stored or not, wherein the error correction record and the currently generated error correction record are error correction records aiming at the same first data;
and if the corresponding error survey record in the error survey table is the error survey record aiming at the same first data, replacing the corresponding error survey record in the error survey table with the currently generated error survey record.
4. The method of claim 1, wherein each of the reconnaissance records in the out-of-chain reconnaissance table further comprises: is used for marking the version number of the error record of the survey,
the method further comprises the following steps:
inquiring whether the extralink error table stores the error record which is aiming at the same first data as the currently generated error record or not;
and if the error record which is generated currently is the error record aiming at the same first data, storing the error record which is generated currently into the out-of-chain error table, and marking the version number of the error record according to the existing version number.
5. A method of surveying errors according to any of claims 1-4, characterized in that the surveying error record further comprises: and recording the generated time information by mistake in the survey, wherein 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.
6. A blockchain error correction system for maintaining blockchain-as-is blockbody data, comprising:
a request receiving module, configured to receive a data error correction request for blockbody data of a block in a currently formed blockchain, where the data error correction request includes: the position information of the first data to be subjected to error correction in the block chain, and second data obtained after error correction of the first data;
the record generation module is used for generating a data error investigation request according to the data error investigation request, and the data error investigation request comprises the following steps: associating the stored position information of the first data in the block chain, and carrying out error correction on the first data to obtain second data;
and the record storage module is used for storing the error record into an off-chain error table, and the off-chain error table and the block chain have an incidence relation so as to be used for a reviewer to consult the block chain by combining the off-chain error table.
7. The error surveying system of claim 6, further comprising:
the data calculation module is used for replacing the copied first data with the second data after error correction, and obtaining character strings with fixed length by performing an irreversible algorithm on block head data and block body data of a block where the second data is located according to the position information of the first data in the block chain;
and the data adding module is used for adding the character string with the fixed length into the error investigation record corresponding to the second data so as to be used for verifying the authenticity of the block data after the error investigation by a reviewer.
8. The error surveying system of claim 6, further comprising:
the first data query module is used for querying whether the extralink error table stores the error records which are generated currently and are aiming at the same first data;
and the first data processing module is used for replacing the corresponding error surveying record in the error surveying table with the currently generated error surveying record if the error surveying record which is currently generated is the same as the error surveying record of the first data.
9. The error surveying system of claim 6, wherein each of said error records in said off-chain error survey table further comprises: is used for marking the version number of the error record of the survey,
the system further comprises:
the second data query module is used for querying whether the out-of-chain error table stores the error record which is generated currently and is the same as the error record of the first data;
and the second data processing module is used for storing the currently generated error record into the out-of-chain error correction table and marking the version number of the error record according to the existing version number if the error record which is currently generated is the same as the error record aiming at the first data.
10. A surveying system according to any of claims 6-9, characterized in that said surveying record further comprises: and recording the generated time information by mistake in the survey, wherein 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.
CN201710425482.9A 2017-03-24 2017-06-08 Block chain error-surveying method and system for keeping block chain having block body data Expired - Fee Related CN107451178B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710181173 2017-03-24
CN2017101811731 2017-03-24

Publications (2)

Publication Number Publication Date
CN107451178A CN107451178A (en) 2017-12-08
CN107451178B true CN107451178B (en) 2021-03-02

Family

ID=60486499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710425482.9A Expired - Fee Related CN107451178B (en) 2017-03-24 2017-06-08 Block chain error-surveying method and system for keeping block chain having block body data

Country Status (1)

Country Link
CN (1) CN107451178B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033886A (en) * 2018-06-20 2018-12-18 北京欧链科技有限公司 A kind of corrigenda of block chain method and device, storage medium, electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614582A (en) * 2003-11-08 2005-05-11 鸿富锦精密工业(深圳)有限公司 Automatic error-list generating system and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086133A1 (en) * 2011-09-29 2013-04-04 General Electric Company Method and apparatus for file revision tracking
CN103020026B (en) * 2012-11-15 2016-05-25 无锡永中软件有限公司 Cooperated documents treatment system and method
CN106446026B (en) * 2016-08-30 2020-04-03 广联达科技股份有限公司 File management method and file management system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614582A (en) * 2003-11-08 2005-05-11 鸿富锦精密工业(深圳)有限公司 Automatic error-list generating system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"怎样才能修改区块链里的数据?请结合技术和现实场景来描述?";云堂;《https://www.zhihu.com/question/56155060》;20170223;全文 *

Also Published As

Publication number Publication date
CN107451178A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN107391291B (en) Block chain error-correcting method and system for modifying block chain namely block body data
US11914712B1 (en) Blockchain based secure naming and update verification
CN108446407B (en) Database auditing method and device based on block chain
US11895223B2 (en) Cross-chain validation
CN107391557B (en) Block chain serial query method and system for setting out-of-chain fault table
CN107463597B (en) Passive verification method and system for block chain of modified block volume data
CN107423163B (en) Error surveying method and system for block chain of overall serial added blocks
CN107391292B (en) Block chain verification method and system for realizing error correction aiming at data of block body
US20210109917A1 (en) System and Method for Processing a Database Query
CN109002725A (en) Data processing system based on block chain
US11762839B2 (en) Search method using data structure for supporting multiple search in blockchain-based IoT environment, and device according to method
CN107463596B (en) Block chain parallel query method and system for setting out-of-chain fault table
EP3709568A1 (en) Deleting user data from a blockchain
CN107451177B (en) Query method and system for single error-surveying block chain of increased blocks
US20190207766A1 (en) File based transmission validation and failure location identification system
US11455598B2 (en) Automated conflict resolution
US8510566B1 (en) Authentic time-stamping for archival storage
CN107451011B (en) Error correction method and system for block chain of parallel added blocks
CN107451002B (en) Active verification method and system for block chain of modified block volume data
CN107451007B (en) Verification method and system of block chain for error correction aiming at added blocks
CN112115098A (en) Tracing system based on HyperLedger and IPFS
CN107451178B (en) Block chain error-surveying method and system for keeping block chain having block body data
US20230362015A1 (en) Notification control method, verification method, and information processing apparatus
CN107426293B (en) Error correction method and system for block chain of single serial added block
US20230334344A1 (en) Distributed ledger based machine-learning model management

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: 20210302