CN107451179A - For the querying method and system of the block chain integrally corrected errors in printing for increasing block - Google Patents
For the querying method and system of the block chain integrally corrected errors in printing for increasing block Download PDFInfo
- Publication number
- CN107451179A CN107451179A CN201710425484.8A CN201710425484A CN107451179A CN 107451179 A CN107451179 A CN 107451179A CN 201710425484 A CN201710425484 A CN 201710425484A CN 107451179 A CN107451179 A CN 107451179A
- Authority
- CN
- China
- Prior art keywords
- data
- block
- record
- copy
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The embodiments of the invention provide a kind of querying method and system of the block chain integrally corrected errors in printing for increase block, belong to block chain technical field, method includes:The data inquiry request for the block volume data of block in current established extension block chain is received, the data inquiry request includes:The key message of target data to be checked;According to the key message, inquired about in the 3rd data record in the tables of data, to obtain the target data record with the key information match;3rd data record includes:In the absence of the first data record corresponding to the copy block original block associated with it, and the second data record corresponding to the copy block generated the latest corresponding to copy block original block associated with it be present;By the data output in the target data record.The scheme of the embodiment of the present invention, it is intended in the case of overall corrigenda is completed by increasing block, there is provided a kind of querying method to the block chain, allow the user to accurately inquire desired data.
Description
Technical field
The embodiment of the present invention belongs to block chain technical field, more particularly to a kind of area integrally to correct errors in printing for increase block
The querying method and system of block chain.
Background technology
With the continuous development of internet, block chain technology is arisen at the historic moment, and it is a kind of internet database technology, is had
Decentralization, it is open and clear the characteristics of.Specifically, the essence of block chain technology is decentralization and resides in the number of distributed frame
According to storage, transmission and the method proved, substitute dependence of the current internet to central server with data block so that all numbers
According to change or trading item be all recorded simultaneously on multiple account book nodes.Due to the distribution of no central control point
Peer-to-peer network, and the method operated using distributed collective, it may be said that block chain is " to disclose big account book " on network.It
Many nodes be present, each node can observe whole account book, and participate in safeguarding jointly, and its income is then to be kept accounts
Right, and a complete database can be replicated, individual node can not change database, so as to ensure that account book data
It is safe and reliable.
Instantly, the organization and management for data being carried out using block chain technology has been widely used various business necks
Domain.
Inventor has found that prior art has following defect during the present invention is realized:
Existing block chain is the extension direction along block chain, sequentially generates new block, and meet one between block
The checking of cause property, this is maliciously tampered also for preventing the data in block.But in some cases, when on block chain
Block volume data in some block is implicitly present in mistake, or for supervision or the specific demand of police department, it is necessary to be repaiied
Change corrigendum, but if being modified by force to the data, the consistency checking of block chain will certainly be caused not by so as to occur
Change the contradiction between block data and block chain consistency checking.
The content of the invention
The embodiment of the present invention provides a kind of querying method and system of the block chain integrally corrected errors in printing for increase block, purport
In the spreading process of existing block chain, for established block chain, the situation of corrigenda is completed by increasing number of blocks
Under, there is provided a kind of querying method to the block chain, allow the user to accurately inquire desired data.
To reach above-mentioned purpose, the embodiments of the invention provide a kind of block chain integrally corrected errors in printing for increase block
Querying method, the block chain include an extension block chain, or an extension block chain and it is at least one with it is described
The copy block of extension block chain link;The copy block is the block volume data to original block in the extension block chain
The block generated after being corrected errors in printing;Block body number of the block volume data of the copy block compared with the original block corrected errors in printing
According to, in addition to the data to be corrected errors in printing in each secondary data corrigenda request when being generated to this copy block are by modification, other numbers
Identical according to corresponding to, the block volume data of block is stored in a tables of data in the block chain, wherein, the tables of data includes
The of the Composition of contents of positional information and first data of a plurality of the first data by associated storage in the block chain
One data record is all described original in the Composition of contents of all first data in the tables of data block chain
The block volume data of block;Also include a plurality of the second data by associated storage the position in the block chain in the tables of data
Confidence ceases and the second data record of the Composition of contents of second data, all second data in the tables of data
The block volume data of all copy blocks in the Composition of contents block chain;The original block with to the original block
Block volume data corrected errors in printing after there is incidence relation between the copy block that is formed;The querying method includes:
The data inquiry request for the block volume data of block in current established extension block chain is received, the data query please
Asking includes:The key message of target data to be checked;According to the key message, the 3rd data in the tables of data
Inquired about in record, to obtain the target data record with the key information match;3rd data record includes:No
The first data record corresponding to the copy block original block associated with it be present, and the copy block be present
Second data record corresponding to the copy block generated the latest corresponding to the original block associated with it;By the mesh
Mark the data output in data record.
The embodiments of the invention provide a kind of inquiry system of the block chain integrally corrected errors in printing for increase block, the area
Block chain includes an extension block chain, or an extension block chain and at least one is linked with the extension block chain
Copy block;The copy block is to be generated after being corrected errors in printing to the block volume data of original block in the extension block chain
Block;The block volume data of the copy block compared with the original block corrected errors in printing block volume data, except by this pair
Data correct errors in printing in each secondary data corrigenda request when this block generates by modification outside, other data correspond to it is identical, it is described
The block volume data of block is stored in a tables of data in block chain, wherein, the tables of data includes a plurality of by associated storage
Positional information and first data of first data in the block chain Composition of contents the first data record, it is described
The block body number of all original blocks in the Composition of contents of all first data in the tables of data block chain
According to;Also include positional information of a plurality of the second data by associated storage in the block chain and described the in the tables of data
Second data record of the Composition of contents of two data, the Composition of contents of all second data in the tables of data are described
The block volume data of all copy blocks in block chain;The original block to the block volume data of the original block with entering
There is incidence relation between the copy block formed after row corrigenda;The inquiry system includes:Request receiving module, use
The data inquiry request of the block volume data of block, the data query in receiving for current established extension block chain
Request includes:The key message of target data to be checked;Data inquiry module, for according to the key message, in institute
State and inquired about in the 3rd data record in tables of data, to obtain the target data record with the key information match;Institute
Stating the 3rd data record includes:Remember in the absence of the first data corresponding to the copy block original block associated with it
Record, and institute corresponding to the copy block generated the latest corresponding to the copy block original block associated with it be present
State the second data record;Data outputting module, for by the data output in the target data record.
The querying method and system of the block chain integrally corrected errors in printing for increase block of the embodiment of the present invention, according to reception
Data inquiry request in key message data query carried out in the 3rd data record obtain target data record, described
Three data records include:In the absence of the first data record corresponding to copy block original block associated with it, and exist secondary
Second data record corresponding to the copy block generated the latest corresponding to this block original block associated with it;Then by target
Data output in data record, the data corrected so as to ensure the target data of output to be corrected errors in printing for block chain warp.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
Fig. 1 is the aspect graph one of block chain provided in an embodiment of the present invention;
Fig. 2 is the aspect graph two of block chain provided in an embodiment of the present invention;
Fig. 3 is the aspect graph three of block chain provided in an embodiment of the present invention;
Fig. 4 is the querying method flow of the block chain provided in an embodiment of the present invention that integrally correct errors in printing for increase block
Figure;
Fig. 5 is the aspect graph four of block chain provided in an embodiment of the present invention;
Fig. 6 a are the aspect graph five of block chain provided in an embodiment of the present invention;
Fig. 6 b are the aspect graph six of block chain provided in an embodiment of the present invention;
Fig. 7 is the inquiry system schematic diagram of the block chain provided in an embodiment of the present invention that integrally correct errors in printing for increase block
One;
Fig. 8 is the inquiry system schematic diagram of the block chain provided in an embodiment of the present invention that integrally correct errors in printing for increase block
Two.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Firstly the need of explanation, the embodiment of the present invention will provide a kind of block chain integrally corrected errors in printing for increase block
Querying method, in the case of to carrying out corrigenda corrigendum to block chain by increasing block, there is provided for the number of the block chain
According to querying method.The overall corrigenda of so-called increase block, which refers to be directed to, is located at the area that each in extension block chain is corrected errors in printing
Block, all previous corrigenda result data before when the copy block generates is contained in each copy block corresponding to it, and
These copy blocks are linked on extension block chain with single-chain serial manner or parallel form.This programme is then to provide
A kind of data query method for being directed to the block chain formed in a manner of increasing integrally the correcting errors in printing of number of blocks.Especially by
In each receive for current established extension block chain after the data inquiry request of the block volume data of block, according to number
According to the key message in inquiry request, inquired about in the 3rd data record in tables of data, so as to obtain and key message
The target data record of matching;Wherein, the 3rd data record includes:In the absence of copy block original block pair associated with it
The first data record answered, and the copy block pair generated the latest corresponding to copy block original block associated with it be present
The second data record answered;Then by the data output in target data record, so as to be supplied to consultant to correct errors in printing after corrigendum
The data of block chain.Block volume data described here can be regarded as the information as real trade data, in block head data
The character string for the regular length that all data comprising father's block by current block generate through non-reversible algorithm is hashed value, with
And the control information related to current block, block volume data and block head data form the partial data of a block.
Secondly it should be noted that the transaction that the block volume data of each block is recorded in block chain in the embodiment of the present invention
Information is not limited to the information of " account book " or " financial transaction " in business, can also broad sense be not understood as needing pass through block
The diversified object data of this data tissue format management of chain, the business administration data being such as managed for enterprise, pin
Project management of process data of progress tracking etc. are carried out to project.In the embodiment of the present invention, to block chain form in itself and prolong
Exhibition direction does not limit, during normally extending in block chain, to being corrected errors in printing by increasing the overall of number of blocks
Mode, to the block volume data of block in block chain correct the situation of corrigenda, there is provided a kind of area in the block chain
The method that block data are inquired about.For example, the extension form of block chain can be the area of traditional single-chain as shown in Figure 1
Block chain or as shown in Figure 2 (each block only has a father in the block chain in the block chain of tree structure on the whole
Block, and have one or more sub-blocks), it can also be that the block chain with directed acyclic pattern structure as shown in Figure 3 (should
At least one block in block chain be present has one or more father's blocks).
The querying method of the block chain integrally corrected errors in printing for increase block of the embodiment of the present invention will be carried out below detailed
It is thin to illustrate.
Embodiment one
Fig. 4 is the querying method flow of the block chain provided in an embodiment of the present invention that integrally correct errors in printing for increase block
Figure, the executive agent of this method can be the system with data processing function, including terminal and/or server.It is of the invention real
The block chain applied in example is related to following concept:Extension block chain, original block and copy block.
Extension block chain:When generating new block for new caused data, the new block is linked in whole block chain
Partial Block chain be referred to as extension block chain, each block in extension block chain is referred to as original block.In the present embodiment, one
Complete block chain may include an extension block chain, or an extension block chain and at least one be linked with extension block chain
Copy block.These copy blocks simply play carries out corrigendum of correcting errors in printing to the block volume data of the block in extension block chain
Purpose, it is not intended as the new block for new caused data generation.The block volume data of the copy block is original compared with what is corrected errors in printing
The block volume data of block, except data the to be corrected errors in printing quilt in each secondary data corrigenda request when being generated to this copy block
Modification is outer, and other data correspond to identical.In other words, except the number for needing to be corrected errors in printing before when being generated to this copy block
Changed according to content outer, the position for the data corrected errors in printing in the position and original block in copy block where the data of the corrigenda
It is corresponding identical to put, and the position of other data contents and data for not corrected errors in printing within a block is also corresponding identical.
The block volume data of block is stored in a tables of data in above-mentioned block chain, and the tables of data includes more data notes
Record, the block volume data per data in the corresponding memory block chain of record at diverse location.
Wherein, tables of data includes a plurality of positional information by the first data of associated storage in block chain and the first number
According to Composition of contents the first data record, all originals in the Composition of contents of all first data in tables of data block chain
The block volume data of beginning block;
Also include a plurality of positional information and the second data by the second data of associated storage in block chain in tables of data
Composition of contents the second data record, all copies in the Composition of contents of all second data in tables of data block chain
The block volume data of block.
Data organizational form is identical in the first data record and the second data record in tables of data, and difference only exists
In:First data record is used for the block volume data of original block in memory block chain, and the second data record is used for memory block
The block volume data of copy block in chain.Original block is with being formed after being corrected errors in printing to the block volume data of the original block
There is incidence relation, the incidence relation can pass through increasing in the first data record and/or the second data record between copy block
Add identification information to embody, for example, adding position of the first data corrected errors in printing in extension block chain in the second data record
Confidence ceases.
In order to facilitate storage state of the block volume data in tables of data of each block in description block chain, first to block
The block volume data of block (original block and copy block do not distinguish here) is simply described as follows in chain.The present embodiment
The block volume data of each block in block chain is divided for multiple Data Entries, it is independent in each Data Entry to include one
Transaction Information, and a corresponding data ID, such as shown in Fig. 5, it illustrates the block volume data of block in block chain to deposit
A plurality of Data Entry can be included in form, i.e., the block volume data of each block.In Fig. 5, by Block1, Block2 and
In the block chain of block3 ... compositions, the tx01 in block Block2:Olddata, as a Data Entry, it is counted
It is tx01 according to ID, Transaction Information is olddata (olddata refers to the original transaction information do not corrected errors in printing also in block chain).
In fact, above-mentioned first data, the second data can be handed over corresponding to the one or more of Data Entries in block volume data
Easy information.For the ease of the explanation of subsequent processes content, first data or second data here correspond to block
A data entry in chain.
When the block volume data of block during block chain manager needs to block chain is corrected errors in printing, it can input and treat to system
Positional information of first data in block chain of corrigenda, the positional information can be specifically the volumes of the block where the first data
Number (numbering of each block uniquely determines in block chain, as " Block1 " in Fig. 5, " Block2 ", " Block3 ", can conduct
The numbering of block), and data ID (" tx01 " in such as Fig. 5) of first data in the block volume data of block.Pass through
The block number that the first data are locked where in block chain, and the data ID cans in the block volume data of the block
Uniquely determine a Data Entry and its comprising Transaction Information.Therefore, explanation is needed exist for, for some Data Entry
In Transaction Information carry out corrigenda determine carry out data corrigenda when just have determined, and specifically perform data corrigenda
When, it is only necessary to locking is positional information of first data in block chain by corrigenda data, without clear and definite to system again
Input the particular content of the first data.
The second described data, refer to the first data corrected errors in printing after data, that is, be used for replace the first data corresponding to
Part data.Include two parts content in the data corrigenda request inputted to system, i.e.,:First data to be corrected errors in printing are being prolonged
Positional information in the block chain of exhibition section, and the second data after being corrected errors in printing to the first data.
In practical application scene, block chain manager may disposably input a plurality of Transaction Information in block to system
Positional information in chain, and the object information after being corrected errors in printing to these Transaction Informations, system can be according to these Transaction Informations
Positional information in block chain, the data entries corresponding to it are analyzed, so as in units of data entries, be regarded as multiple
Data corrigenda request is handled, i.e., only please comprising the data corrigenda for a Data Entry in each data corrigenda request
Ask.
In the present embodiment, the mode that the block volume data in block chain is corrected errors in printing is by increasing copy block reality
Corrigenda corrigendum now is carried out to the block volume data of original block.Corresponding to the overall corrigenda method for showing increase block such as Fig. 6 a
A kind of aspect graph of block chain.
Based on the existence of the block volume data of block in the above-mentioned chain to block, can understand first in explanation tables of data
The meaning of data record and the second data record.
Table 1 is the particular content corresponding to Fig. 6 a tables of data.
The tables of data of table 1
Data ID | First data | Second data | Block number | …… |
tx01 | olddata1 | (sky) | Block2ver:1.0 | …… |
tx02 | olddata2 | (sky) | Block2ver:1.0 | …… |
tx01 | (sky) | newdata1 | Block2ver:2.0 | …… |
tx02 | olddata2 | (sky) | Block2ver:2.0 | |
tx01 | (sky) | newdata1 | Block2ver:3.0 | …… |
tx02 | (sky) | newdata2 | Block2ver:3.0 | …… |
…… | …… | …… | …… | …… |
In table 1, the record comprising the first data is designated as the first data record, and the record comprising the second data is designated as the second number
According to record.In Fig. 6 a, the data ID in block " Block2 " in extension block chain is respectively the data of " tx01 " and " tx02 "
Corrected errors in printing in copy block " Block2 (ver2.0) " and copy block " Block2 (ver3.0) ".In the present embodiment,
In block data table corresponding to block chain, the version number for each original block that can be defaulted as in extension block chain is ver1.0, then
Can be using former block number+version number as final block number, for example, the block number of original block:“Block2
(ver1.0) ", the block number of copy block:“Block2(ver2.0)”、“Block2(ver3.0)”.
In addition, in concrete application scene, it is also possible to which same first data existed for an original block carry out multiple
The situation of corrigenda, every time corrigenda can correspond to the copy block for generating a more highest version, and such as Fig. 6 b, it is for original block
The block chain that data ID by tx01 the first data formed after repeatedly correcting errors in printing in Block2 (ver1.0), wherein,
For first data are carried out with the copy block that is formed after first time corrigenda, Block2 (ver3.0) is Block2 (ver2.0)
First data are carried out second with the copy block formed after correcting errors in printing.
In the tables of data of the present embodiment, the first data record contains the area of original block in current established block chain
The particular content of positional information and first data of first data in block chain in block data, wrap in the second data record
Positional information and second data of second data in block chain in the block volume data of copy block in block chain are contained
Content information, while the first data for being corrected errors in printing and position of second data in block body after being corrected errors in printing to first data
Put (data ID is corresponding identical).For the querying method for the block chain integrally corrected errors in printing for increasing block, its core in this programme
Thought wants that data are carried out in the second data record corresponding with copy block of the first data record corresponding to original block to be looked into
Ask the process with data processing.
As shown in figure 4, it should comprise the following steps for the querying method of the block chain integrally corrected errors in printing of increase block:
S410, the data inquiry request for the block volume data of block in current established extension block chain is received,
The data inquiry request includes:The key message of target data to be checked;
Wherein, described current established extension block chain refers to the extension block chain by current time, formed
The block chain form presented on the whole;The key message of the target data to be checked can be had in block volume data
Positional information of first data in block chain corresponding to the partial content of the Transaction Information of body or the Transaction Information,
The numbering of block as where the first data, and the data ID of first data in the block volume data of block etc..
Specifically, after system receives the data inquiry request of consultant's input, extract and be used to inquire about mesh in the request
Mark the key message of data.
S420, according to key message, inquired about in the 3rd data record in tables of data, to obtain and key message
The target data record of matching;3rd data record includes:In the absence of corresponding to copy block original block associated with it
First data record, and exist corresponding to the copy block generated the latest corresponding to copy block original block associated with it
Second data record;
Semanteme can be used to obtain the method for target data record by carrying out Data Matching in tables of data according to key message
The methods of similarity, regular expression.The present embodiment to specific implementation information matches used by technology and principle do not limit.
But to the scope of the object data for Data Matching with requiring as follows, i.e.,:
In the absence of the first data record corresponding to copy block original block associated with it, and exist copy block with
Second data record corresponding to the copy block generated the latest corresponding to its original block associated.
Specifically, when the original block in block chain is without the copy block associated, then by such original block
First data record corresponding in tables of data is as the object data for Data Matching, when the original block tool in block chain
During related copy block, then by the copy block generated the latest in the copy block associated by such original block in number
According to corresponding second data record in table as the object data for Data Matching.The first number in the object data selected
It is otherwise known as the 3rd data record according to record and the second data record.
S430, by the data output in target data record.
Using the data record to match with key message obtained from each 3rd data record as target data record
Exported, make it that be presented to consultant is the block volume data after corrigenda is corrected.
It should be noted that in practical application scene, for the block body number of a certain original block in extension block chain
Repeatedly corrected errors in printing according to there may be, and there is the copy block of multiple associations.Such as the region of initiation as shown in Fig. 6 a, Fig. 6 b
Two copy blocks " Block2 (ver2.0) " associated with it, " Block2 be present in block " Block2 (ver1.0) "
(ver3.0)”。
In order to embody the order of the copy block generation corresponding to each second data record in tables of data, in each second number
According to may also include in record:For marking the version number of the copy block where the second data in second data record;This
In the size of version number sequentially increase with the production time of copy block.Such as " Block2 in Fig. 6 a, Fig. 6 b
(ver2.0) ", ver2.0, ver3.0 in " Block2 (ver3.0) " are version number corresponding to respective copies block.
Accordingly, can be corresponding by the plurality of copy block if multiple copy blocks be present for same original block
The second data record in, comprising the data record of version number's highest second as the 3rd data record.
Specifically, the create-rule according to version number in copy block, comprising in the data record of version number's highest second
Include the result data after all previous corrigenda in the original block of its corresponding corrigenda.Therefore version number's highest second will can be included
Data record is as the 3rd data record, so as to ensure to choose the second number as in the second data record of the 3rd data record
According to the data for being the latest edition corrected errors in printing.
It is further noted that after this programme basic goal to be reached is to provide for the corrigenda newest to consultant
Block volume data, these block volume datas are probably to come from the first data record corresponding to original block, it is also possible to copy
Second data record corresponding to block, and consultant for these data whether be corrigenda after data be imperceptible.Example
Such as, when the target data record of output is positioned at copy block block2 (ver:2.0) when, data ID is tx01 data, look into
Reader can not also know that the data are the data corrected errors in printing or the data do not corrected errors in printing.
In order that learning whether the data are corrected errors in printing in the target data record that user obtains from inquiry, this programme is above-mentioned
On the basis of protocol step, following steps are added:
If for choosing in the second data record as the 3rd data record, exist in the second data and tables of data
First data are content identical data, then the first data record comprising first data are replaced into second data record
As the 3rd selected data record.
Specifically, if choosing the second data record the first data corresponding with original block as the 3rd data record
Record it is identical, then show second data be not be directed to original block in block volume data corrected errors in printing after data, this
When can using comprising the first data record with second the first data of data content identical replace second data record as
The 3rd selected data record.
Operated based on the processing, one is only existed for the second data in the second data record as the 3rd data record
Kind situation, it is exactly the second data corrected errors in printing corresponding to the first data, and the data for not corrected errors in printing in the 3rd data record,
It is entirely located in the first data record corresponding to original block.Therefore, in the target data record of output, by checking this
(have version number can check version number to positional information of the first data or the second data that data record includes in block chain
Information) it is known that whether the data are corrected errors in printing.For example, working as positional information in the data record exported corresponds to original block
Position and/or version number be minimum version number, then illustrate that the target data was not corrected errors in printing;When the data record middle position of output
Confidence breath is not least version number corresponding to the position of copy block and/or version number, then illustrates that the target data was corrected errors in printing,
And corrected errors in printing in the copy block corresponding to the data record.
In the present embodiment, it may also include in the second data record:The generation temporal information of this data record;And again
Reaffirm, positional information of first data in block chain may include:The numbering of block where first data, and first number
According to the data ID in the block volume data of block;Positional information of second data in block chain may include:Second data institute
Block numbering, and data ID of second data in the block volume data of the block.
The querying method of the block chain integrally corrected errors in printing for increase block of the embodiment of the present invention, according to the data of reception
Key message in inquiry request carries out data query in the 3rd data record and obtains target data record, the 3rd data
Record includes:In the absence of the first data record corresponding to copy block original block associated with it, and copy block be present
Second data record corresponding to the copy block generated the latest corresponding to original block associated with it;Then target data is remembered
Data output in record, the data corrected so as to ensure the target data of output to be corrected errors in printing for block chain warp.
Further, when choosing three data records, there are multiple copy blocks for same original block
Scheme refinement is carried out.So that during inquiry is performed, the number being queried is embodied by the target data record of output
According to whether being corrected errors in printing, and the specifying information corrected errors in printing in which copy block so that consultant can more clearly obtain
Know the relevant information of inquired about result data.
Embodiment two
Fig. 7 is the inquiry system signal of the block chain provided in an embodiment of the present invention that integrally correct errors in printing for increase block
Figure, available for the method and step performed shown in embodiment one, the block chain includes an extension block chain, or one is prolonged
Exhibition section block chain and at least one copy block linked with extension block chain;The copy block is to original in extension block chain
The block that the block volume data of block generates after being corrected errors in printing;The block volume data of copy block is compared with the region of initiation corrected errors in printing
The block volume data of block, except the data to be corrected errors in printing in each secondary data corrigenda request when being generated to this copy block are repaiied
Change it is outer, other data correspond to it is identical,
The block volume data of block is stored in a tables of data in block chain, wherein, tables of data includes a plurality of by associating
First data record of the Composition of contents of positional information and first data of first data in block chain of storage, in tables of data
All first data Composition of contents block chain in all original blocks block volume data;
Also include a plurality of the second data by associated storage the positional information and second in the block chain in tables of data
Second data record of the Composition of contents of data, all pairs in the Composition of contents of all second data in tables of data block chain
The block volume data of this block;
Between the copy block that the original block and block volume data to the original block are formed after correcting errors in printing
With incidence relation.As shown in fig. 7, it should include for the block chain query system of the single corrigenda of increase number of blocks:Request
Receiving module 710, data inquiry module 720 and data outputting module 730, wherein:
Request receiving module 710, for receiving the block volume data for block in current established extension block chain
Data inquiry request, the data inquiry request includes:The key message of target data to be checked;Data inquiry module
720, for according to the key message, being inquired about in the 3rd data record in tables of data, to obtain and key message
The target data record of matching;3rd data record includes:In the absence of corresponding to copy block original block associated with it
First data record, and exist corresponding to the copy block generated the latest corresponding to copy block original block associated with it
Second data record;Data outputting module 730, for by the data output in target data record.
Further, may also include in each second data record in above-mentioned tables of data:For marking second data to remember
The version number of the copy block where the second data in record;
Accordingly, as shown in figure 8, said system may also include:
First record extraction module 740, if for multiple copy blocks be present for same original block, this is more
In second data record corresponding to individual copy block, comprising the data record of version number's highest second as the 3rd data record.
Further, as shown in figure 8, said system may also include:
Second record extraction module 750, if for for choosing in the second data record as the 3rd data record,
It is content identical data in the presence of the first data in the second data and tables of data, then by the first data comprising first data
Record replaces second data record as the 3rd selected data record.
Further, also include in above-mentioned second data record:The generation temporal information of this data record, the first data
Positional information in block chain includes:The numbering of block where first data, and first data are in the block of block
Data ID in volume data;Positional information of second data in block chain includes:The numbering of block where second data, with
And data ID of second data in the block volume data of block.
System shown in Figure 8 can be used for performing method and step as shown in Figure 4.
The inquiry system of the block chain integrally corrected errors in printing for increase block of the embodiment of the present invention, according to the data of reception
Key message in inquiry request carries out data query in the 3rd data record and obtains target data record, the 3rd data
Record includes:In the absence of the first data record corresponding to copy block original block associated with it, and copy block be present
Second data record corresponding to the copy block generated the latest corresponding to original block associated with it;Then target data is remembered
Data output in record, the data corrected so as to ensure the target data of output to be corrected errors in printing for block chain warp.
Further, when choosing three data records, there are multiple copy blocks for same original block
Scheme refinement is carried out.So that during inquiry is performed, the number being queried is embodied by the target data record of output
According to whether being corrected errors in printing, and the specifying information corrected errors in printing in which copy block so that consultant can more clearly obtain
Know the relevant information of inquired about result data.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on
The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should
Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers
Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation
Method described in some parts of example or embodiment.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.
Claims (8)
1. the querying method of a kind of block chain integrally corrected errors in printing for increase block, it is characterised in that the block chain includes
One extension block chain, or an extension block chain and at least one copy region linked with the extension block chain
Block;The copy block is the block generated after being corrected errors in printing to the block volume data of original block in the extension block chain;
The block volume data of the copy block compared with the original block corrected errors in printing block volume data, except by this copy block
Data correct errors in printing in each secondary data corrigenda request during generation by modification outside, other data correspond to it is identical,
The block volume data of block is stored in a tables of data in the block chain, wherein, the tables of data include it is a plurality of by
First data of the Composition of contents of positional information and first data of the first data of associated storage in the block chain
Record, all original blocks in the Composition of contents of all first data in the tables of data block chain
Block volume data;
Also include positional information of a plurality of the second data by associated storage in the block chain and described in the tables of data
Second data record of the Composition of contents of the second data, the Composition of contents of all second data in tables of data institute
State the block volume data of all copy blocks in block chain;
Between the copy block that the original block and block volume data to the original block are formed after correcting errors in printing
With incidence relation;
The querying method includes:
The data inquiry request for the block volume data of block in current established extension block chain is received, the data are looked into
Asking request includes:The key message of target data to be checked;
According to the key message, inquired about in the 3rd data record in the tables of data, to obtain and the key
The target data record of information matches;3rd data record includes:It is associated with it described in the absence of the copy block
First data record corresponding to original block, and exist corresponding to the copy block original block associated with it most
I into copy block corresponding to second data record;
By the data output in the target data record.
2. querying method according to claim 1, it is characterised in that each second data record in the tables of data
In also include:For marking the version number of the copy block where second data in second data record;
Methods described also includes:
, will be described corresponding to the plurality of copy block if multiple copy blocks be present for same original block
In second data record, comprising the second data record described in version number's highest as the 3rd data record.
3. querying method according to claim 1, it is characterised in that methods described also includes:
If for choosing in second data record as the 3rd data record, the second data and the number be present
It is content identical data according to first data in table, then the first data record comprising first data is replaced this
Second data record is as selected the 3rd data record.
4. according to the querying method any one of claim 1-3, it is characterised in that also wrapped in second data record
Include:The generation temporal information of this data record, positional information of first data in the block chain include:Described
The numbering of block where one data, and data ID of first data in the block volume data of the block;Described
Positional information of two data in the block chain includes:The numbering of block where second data, and second number
According to the data ID in the block volume data of the block.
5. the inquiry system of a kind of block chain integrally corrected errors in printing for increase block, it is characterised in that the block chain includes
One extension block chain, or an extension block chain and at least one copy region linked with the extension block chain
Block;The copy block is the block generated after being corrected errors in printing to the block volume data of original block in the extension block chain;
The block volume data of the copy block compared with the original block corrected errors in printing block volume data, except by this copy block
Data correct errors in printing in each secondary data corrigenda request during generation by modification outside, other data correspond to it is identical,
The block volume data of block is stored in a tables of data in the block chain, wherein, the tables of data include it is a plurality of by
First data of the Composition of contents of positional information and first data of the first data of associated storage in the block chain
Record, all original blocks in the Composition of contents of all first data in the tables of data block chain
Block volume data;
Also include positional information of a plurality of the second data by associated storage in the block chain and described in the tables of data
Second data record of the Composition of contents of the second data, the Composition of contents of all second data in tables of data institute
State the block volume data of all copy blocks in block chain;
Between the copy block that the original block and block volume data to the original block are formed after correcting errors in printing
With incidence relation;
The inquiry system includes:
Request receiving module, the data for receiving for the block volume data of block in current established extension block chain are looked into
Request is ask, the data inquiry request includes:The key message of target data to be checked;
Data inquiry module, for according to the key message, being inquired about in the 3rd data record in the tables of data,
To obtain the target data record with the key information match;3rd data record includes:In the absence of the copy region
First data record corresponding to the block original block associated with it, and the copy block to be present associated with it described
Second data record corresponding to the copy block generated the latest corresponding to original block;
Data outputting module, for by the data output in the target data record.
6. inquiry system according to claim 5, it is characterised in that each second data record in the tables of data
In also include:For marking the version number of the copy block where second data in second data record;
The system also includes:
First record extraction module, if for multiple copy blocks be present for same original block, will be the plurality of
In second data record corresponding to the copy block, the second data record conduct described in version number's highest is included
3rd data record.
7. inquiry system according to claim 5, it is characterised in that the system also includes:
Second record extraction module, if for for choosing second data record as the 3rd data record
In, the second data be present with first data in the tables of data is content identical data, then will include first number
According to the first data record replace second data record as selected the 3rd data record.
8. according to the inquiry system any one of claim 5-7, it is characterised in that also wrapped in second data record
Include:The generation temporal information of this data record, positional information of first data in the block chain include:Described
The numbering of block where one data, and data ID of first data in the block volume data of the block;Described
Positional information of two data in the block chain includes:The numbering of block where second data, and second number
According to the data ID in the block volume data of the block.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710181140 | 2017-03-24 | ||
CN2017101811407 | 2017-03-24 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107451179A true CN107451179A (en) | 2017-12-08 |
CN107451179B CN107451179B (en) | 2020-09-15 |
Family
ID=60486970
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710425484.8A Expired - Fee Related CN107451179B (en) | 2017-03-24 | 2017-06-08 | Query method and system for block chain for increasing overall error of block |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107451179B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110598218A (en) * | 2019-09-24 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Information error surveying method and related device |
CN112597192A (en) * | 2020-12-09 | 2021-04-02 | 杭州趣链科技有限公司 | Data query method, device, server and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102323923A (en) * | 2011-05-18 | 2012-01-18 | 北京百纳威尔科技有限公司 | Method for processing historical record and equipment |
CN104025087A (en) * | 2011-12-22 | 2014-09-03 | 艾玛迪斯简易股份公司 | Method and system for data filing systems |
CN104216908A (en) * | 2013-06-03 | 2014-12-17 | 上海普华诚信信息技术有限公司 | Internet data management system and reading and writing method thereof |
US20150379510A1 (en) * | 2012-07-10 | 2015-12-31 | Stanley Benjamin Smith | Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain. |
CN105447033A (en) * | 2014-08-28 | 2016-03-30 | 国际商业机器公司 | Method and apparatus for generating initial copy in replication initialization |
CN106445993A (en) * | 2016-07-11 | 2017-02-22 | 天津米游科技有限公司 | Data fingerprint query method and device based on block chain |
-
2017
- 2017-06-08 CN CN201710425484.8A patent/CN107451179B/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102323923A (en) * | 2011-05-18 | 2012-01-18 | 北京百纳威尔科技有限公司 | Method for processing historical record and equipment |
CN104025087A (en) * | 2011-12-22 | 2014-09-03 | 艾玛迪斯简易股份公司 | Method and system for data filing systems |
US20150379510A1 (en) * | 2012-07-10 | 2015-12-31 | Stanley Benjamin Smith | Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain. |
CN104216908A (en) * | 2013-06-03 | 2014-12-17 | 上海普华诚信信息技术有限公司 | Internet data management system and reading and writing method thereof |
CN105447033A (en) * | 2014-08-28 | 2016-03-30 | 国际商业机器公司 | Method and apparatus for generating initial copy in replication initialization |
CN106445993A (en) * | 2016-07-11 | 2017-02-22 | 天津米游科技有限公司 | Data fingerprint query method and device based on block chain |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110598218A (en) * | 2019-09-24 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Information error surveying method and related device |
CN112597192A (en) * | 2020-12-09 | 2021-04-02 | 杭州趣链科技有限公司 | Data query method, device, server and medium |
Also Published As
Publication number | Publication date |
---|---|
CN107451179B (en) | 2020-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391557A (en) | Block chain Series poll method and system for setting errata outside chain | |
CN107451177A (en) | For the querying method and system of the block chain of the single corrigenda of increase block | |
CN107423163A (en) | The corrigenda method and system of the block chain of overall serial increase block | |
US9703808B2 (en) | Data masking setup | |
CN107391291B (en) | Block chain error-correcting method and system for modifying block chain namely block body data | |
CN107463597A (en) | For the passive verification method and system of the block chain for changing block volume data | |
CN106897352A (en) | The generation method and system of the block chain modified in expansion | |
CN107463596A (en) | Block chain parallel query method and system for setting errata outside chain | |
US8538913B2 (en) | Test strategy system and method for accounts held direct at-fund | |
CN106844523A (en) | The generation method and system of the block chain that sequence type multidimensional is expanded | |
CN106897353A (en) | The generation method and system of the block chain that centre type multidimensional is expanded | |
CN107391292A (en) | The block chain verification method and system of corrigenda are realized for holding area block data | |
CN106815330A (en) | The generation method and system of the block chain expanded along Spatial Dimension | |
CN106909605A (en) | The generation method and system of the block chain transversely expanded | |
CN103631967B (en) | A kind of processing method and processing device of the tables of data with independent increment identification field | |
CN107066495A (en) | The generation method and system for the block chain expanded along longitudinal direction | |
CN107451007A (en) | The verification method and system for the block chain corrected errors in printing for increase block | |
CN107451011A (en) | The corrigenda method and system of the block chain of parallel increase block | |
CN107451179A (en) | For the querying method and system of the block chain integrally corrected errors in printing for increasing block | |
US11153379B2 (en) | Metadata synchronization system | |
CN107944866B (en) | Transaction record duplication elimination method and computer-readable storage medium | |
CN111768202B (en) | Payment verification method, payment verification node, full-quantity node and storage medium | |
CN107426293A (en) | The corrigenda method and system of the block chain of single serial increase block | |
CN107451178A (en) | It is the block chain corrigenda method and system for having block volume data to keep block chain | |
CN107451002A (en) | For the Proactive authentication method and system for the block chain for changing block volume data |
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 |
Granted publication date: 20200915 |
|
CF01 | Termination of patent right due to non-payment of annual fee |