CN109634959A - A kind of block index method and block index device - Google Patents

A kind of block index method and block index device Download PDF

Info

Publication number
CN109634959A
CN109634959A CN201811457165.6A CN201811457165A CN109634959A CN 109634959 A CN109634959 A CN 109634959A CN 201811457165 A CN201811457165 A CN 201811457165A CN 109634959 A CN109634959 A CN 109634959A
Authority
CN
China
Prior art keywords
block
subindex
index
information
building
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811457165.6A
Other languages
Chinese (zh)
Other versions
CN109634959B (en
Inventor
扬子
扬子一
李斌
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Brilliant Hi Tech Development Co Ltd
Original Assignee
Beijing Brilliant Hi Tech Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Brilliant Hi Tech Development Co Ltd filed Critical Beijing Brilliant Hi Tech Development Co Ltd
Priority to CN201811457165.6A priority Critical patent/CN109634959B/en
Publication of CN109634959A publication Critical patent/CN109634959A/en
Application granted granted Critical
Publication of CN109634959B publication Critical patent/CN109634959B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to block chain technical field more particularly to a kind of block index method and block index devices.The block index method constructs master index table the following steps are included: choosing n block, wherein includes the index information of the n block in master index table, n is the integer more than or equal to 1;For the block generated after n block, one or more subindex tables are constructed, wherein the block that the subindex table formerly constructed includes chronologically is arranged in front of the block that the subindex table in rear building includes;Wherein, the separation block for connecting with next subindex table is respectively included in master index table and each subindex table, is stored with the block information of corresponding separation block in each subindex table respectively.The present invention can economize on resources by building master index table and subindex table and time, raising update the efficiency and trading efficiency of block index.

Description

A kind of block index method and block index device
Technical field
The present invention relates to block chain technical field more particularly to a kind of block index method and block index devices.
Background technique
Block stack Blockstack constructs an independent naming system on the chain of bottom.Block chain in bottom is mainly used To record " name-value " to the state change of (name-value pair).The bottom of Blockstack, i.e. block link layer mainly include area Block chain (being currently bit coin) and virtual chain (virtualchain).Virtual chain is used to have verified that friendship on storage bottom block chain Easy current state.Current Blockstack realized on virtual chain " block chain naming service (BNS, Blockchain Name System) ", it is similar to the domain name system (DNS, Domain Name System) of internet, and What BNS was stored is the mapping of block chain address and human-readable names.These specific titles are by possessing phase on bottom block chain The user of address and private key is answered to be held, accordingly, user's by inch of candle process registration newname, but relevant technical detail Information is also not known.Pointer is directed toward block file as Hash procedure in bottom block chain, while only storing in block link layer Pointer, so that block chain lightweight.
In addition, encryption data (after being signed by user key) is stored in cloud service by the accumulation layer in Blockstack, And cloud service provider can only see encryption data.The block location information of Blockstack is stored in regional document zone In file.The data structure of each block is revised as relevant database by the existing solution of block positioning, passes through pass It is that type database sql (Structured Query Language, structured query language) sentence carries out quick search;Separately A solution is that quick indexing is to the position of block in the several blocks closed on using timestamp, and timestamp is similar to book The page number of nationality is quickly anchored the position of block according to the timestamp of block.
Existing block index scheme will recalculate packet whenever increasing a block newly when constructing multi-party concordance list The concordance list for including all blocks, not only results in the waste of block chain calculation resources, and will cause the low of trading efficiency.
Summary of the invention
The present invention provides a kind of block index method and block index devices, to solve to construct multi-party rope in the prior art The concordance list including all blocks will be recalculated by increasing block when drawing table newly, cause the waste and transaction effect of block chain calculation resources The low problem of rate.
One aspect of the present invention provides a kind of block index method, comprising the following steps:
It chooses n block and constructs master index table, wherein include the index information of the n block in master index table, n is Integer more than or equal to 1;
For the block generated after n block, one or more subindex tables are constructed, wherein the sub- rope formerly constructed Draw the block that table includes chronologically to be arranged in front of the block that the subindex table in rear building includes;
Wherein, the Disengagement zone for connecting with next subindex table is respectively included in master index table and each subindex table Block is stored with the block information of corresponding separation block in each subindex table respectively.
Further, for the block generated after n block, the step of constructing one or more subindex tables, includes:
For the block generated after n block, using first block generated after n block as initial point, every process Preset time threshold constructs a sub- concordance list.
Further, further includes:
When detecting newly-increased block, the block information for separating block that the subindex table of newest building reports is obtained;
The block information of acquisition is verified, when being verified, and the subindex table of newest building described in current distance Building time when being not up to the preset time threshold, the subindex table of the newest building is updated, by the newly-increased block Index information be added in the subindex table.
Further, the block information of the separation block includes block height and block cryptographic Hash.
Further, the value range of n is in the one third of total block counts between half.
Further, it after constructing one or more subindex tables, further comprises the steps of:
After each node of block chain completes verifying to master index table, most master index table of signing is obtained;
Merkel tree Merkle Tree is constructed between most master index table and subindex table signing;
The Merkel tree Merkle Tree is stored in the common recognition node elected using common recognition algorithm.
Another aspect of the present invention provides a kind of block index device, comprising:
Master index table constructs module, for choosing n block building master index table, wherein include the n in master index table The index information of a block, n are the integer more than or equal to 1;
Subindex table constructs module, for the block for generating after n block, constructs one or more subindexs Table, wherein the block that the subindex table formerly constructed includes chronologically is arranged in the block that the subindex table in rear building includes Before;
Wherein, the Disengagement zone for connecting with next subindex table is respectively included in master index table and each subindex table Block is stored with the block information of corresponding separation block in each subindex table respectively.
Further, subindex table building module is specifically used for the block for generating after n block, with n block First block generated later is initial point, every to construct a sub- concordance list by preset time threshold.
Further, further includes:
Block information obtains module, when for detecting newly-increased block, obtains point that the subindex table of newest building reports Block information from block, and it is sent to subindex table update module;
Subindex table update module, for being verified to the block information of acquisition, when being verified, and current distance institute When stating building time of the subindex table of newest building and being not up to the preset time threshold, the sub- rope of the newest building is updated Draw table, the index information of the newly-increased block is added in the subindex table.
Further, the block information of the separation block includes block height and block cryptographic Hash.
Block index method provided by the invention and block index device have following progress compared with prior art: logical It crosses n block building master index table of selection and one or more subindex tables is constructed, such as the block generated after n block This only needs to recalculate the subindex table including increasing block newly whenever increasing a block newly, can save calculation resources And the time, improve the efficiency and trading efficiency for updating block index;In addition, being wrapped respectively in master index table and each subindex table The separation block for connecting with next subindex table is included, is stored with the area of corresponding separation block in each subindex table respectively Block message can be verified using the block information of separation block with antithetical phrase concordance list, ensure that authenticity, the peace of subindex table Full property and correctness.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the flow chart of block index method in the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of block index device in the embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is 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 It is fully disclosed to those skilled in the art.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless otherwise will not be explained in an idealized or overly formal meaning by specific definitions.
The embodiment of the invention provides a kind of block index method and block index devices.
As shown in Figure 1, the block index method of the embodiment of the present invention, comprising the following steps:
S1, n block building master index table is chosen, wherein include the index information of the n block, n in master index table For the integer more than or equal to 1;
S2, the block for generating after n block construct one or more subindex tables, wherein the son formerly constructed The block that concordance list includes chronologically is arranged in front of the block that the subindex table in rear building includes;
Wherein, the Disengagement zone for connecting with next subindex table is respectively included in master index table and each subindex table Block is stored with the block information of corresponding separation block in each subindex table respectively.
Here, master index table and each subindex table chronologically sort, and master index table includes that the index of preceding n block is believed Breath, subindex table include the index information of generation block after n block.And it is stored in posterior subindex table and is arranged in it The block information of the separation block of subindex table or master index table before.
The block index method of the embodiment of the present invention, by choosing n block building master index table, for n block it The block generated afterwards constructs one or more subindex tables, so only need to recalculate whenever increasing a block newly including Subindex table including newly-increased block, can save calculation resources and time, improve the efficiency for updating block index and transaction effect Rate;In addition, the separation block for connecting with next subindex table is respectively included in master index table and each subindex table, The block information of corresponding separation block is stored in each subindex table respectively, it can be with antithetical phrase using the block information of separation block Concordance list is verified, and ensure that authenticity, safety and the correctness of subindex table.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that can be selected using creating generation block as initial point Take n block building master index table.It can so guarantee the block all in block chain master index table and sub- rope is all recorded Draw in table.It is of course also possible to need to be indexed the building of table using other blocks as initial point according to user.
In the embodiment of the present invention, the index information of block can be block number, block Hash, transaction id index transaction, Block transaction number, transaction id index block or transaction id index transaction verification code etc., but not limited to this.Block Hash can be made It is stored in independent database table for a part of block no data, quickly to retrieve block from hard disk.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that after step S2 is for n block The block of generation, the step of constructing one or more subindex tables include:
For the block generated after n block, using first block generated after n block as initial point, every process Preset time threshold constructs a sub- concordance list.
At this point, all subindex tables chronologically successively construct, the block that subindex table includes also chronologically is arranged successively, i.e., The block that first subindex table includes chronologically is arranged in front of the block that posterior subindex table includes;And subindex table from A upper concordance list starts the time interval preset time threshold t separated to next subindex table when separating, so when newly-increased When block, it is accurate it is determined that being claimed by which subindex table, to quickly update corresponding to can use preset time threshold t Subindex table.
Wherein, preset time threshold t can be calculated by algorithm of knowing together, and can such as pass through POS (Proof of Stake, share entitlements prove) common recognition algorithm be calculated, to guarantee that each node to the consistency of preset time threshold t, avoids Malice is distorted, and safety is improved.Preset time threshold t describes subindex table since when a upper concordance list separates under The time interval of one sub- concordance list separation, it determines the number of blocks indexed in subindex table, utilizes preset time threshold t Can rapid build subindex table, ensure that concordance list establish validity and high efficiency.
Such as Fig. 1, the block index method of the present embodiment, in the specific implementation, it is preferred that further comprise the steps of:
S3, when detecting newly-increased block, the block information for the separation block that the subindex table of newest building reports is obtained;
S4, the block information of acquisition is verified, when being verified, and the subindex of newest building described in current distance When the building time of table is not up to the preset time threshold, the subindex table of the newest building is updated, by the newly-increased area The index information of block is added in the subindex table.
At this point, the block default all in the case where not having " malice " to claim chronologically is ranked up, area is increased newly Block chronologically comes due to being the block being newly generated finally, then theoretically should be by chronologically coming last sub- rope Draw table to claim, i.e., the subindex table of newest building is claimed.Here, the Disengagement zone that the subindex table of newest building reports is obtained first The block information of block verifies the identity of the subindex table of newest building, it was demonstrated that and it is the subindex table of newest building, with Guarantee safety, when being verified, and isolating the time of next subindex table without reaching, updates the newest building Subindex table, to only need to recalculate the subindex table including increasing block newly, energy when increasing a block newly Calculation resources and time are enough saved, the efficiency and trading efficiency for establishing block index are improved.Update the subindex table of newest building When, the related confirmation anti-fraud system of subindex table can be updated simultaneously.
If the verification passes, and the building time of the subindex table of the newest building of current distance has reached preset time threshold Value then constructs a new subindex table, stores the index information of newly-increased block.
Wherein, the block information for the separation block that the subindex table of newest building reports can be deposited with previous subindex table The block information of the separation block of storage compares, to verify to the subindex table of newest building.
Wherein, after constructing master index table, a block is often increased newly, the subindex table of newest building reports first separation area The block information of block is verified, therefore can theoretically receive the block information for the separation block that all subindex tables report, And the identity of all subindex tables can be verified.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that the block information of the separation block Including block height and block cryptographic Hash.For verifying the identity of subindex table, and ensure the authenticity of subindex table.
Such as Fig. 1, it is preferred that further comprised the steps of: after step S2
S21, after each node of block chain completes verifying to master index table, obtain the most master index table of signing;
S22, Merkel tree Merkle Tree is constructed between signature most master index table and subindex table;
S23, the Merkel tree Merkle Tree is stored in the common recognition node elected using common recognition algorithm.
At this point, each node is also possible to each user/participant, the true of master index table and subindex table is guaranteed by signature Property and correctness, be conducive to improve concordance list establish efficiency and reliability.And it can be right using Merkel tree Merkle Tree Master index table and subindex table are verified.If participant is using the private key of oneself to rope currently without newest subindex table Draw record to sign, when reaching time threshold and constructing new subindex table, can promote to generate new subindex table;If worked as Before have existed subindex table, then compare participant cryptographic Hash and quick indexing table cryptographic Hash, if unanimously, show atom index Table is correct, and increases signature in subindex table, as the confirmation to the subindex table.If the confirmation of concordance list exists Controversial issue, Merkle Tree (a kind of data tree, each leaf node record data block finally saved by common recognition node Cryptographic Hash, each non-leaf nodes record is its cryptographic hash for corresponding to leaf node) and each subindex table submit Separation block height and block Hash codetermine.
Preferably, the cryptographic Hash of master index table and subindex table is stored in common recognition node.If subindex table will prove that it is The subindex table of previous concordance list needs that Merkle Proof is submitted (to provide data validity on Merkle Tree to it Prove), block height, and the cryptographic Hash of separation block are separated, with the separation block height etc. stored in previous concordance list It is compared, if they are the same, then the subindex table is the subindex table of previous concordance list, has authenticity.
It preferably, include the index record of multiple arranged in sequence in master index table, an index record has recorded correspondence All records summarize on block, such as cryptographic Hash, the particular content of block, and each block has a main body ID, main body ID It is to be ranked up according to the timestamp of block.When it is implemented, being stored with separation block in master index table and subindex table Block height and block cryptographic Hash, judge the correctness of subindex table for comparing.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that the value range of n is in total block counts One third between half.The value of n is 1/3 to the 1/2 of current block total quantity, chooses that quantity is very few or mistake It is more, all can the embodiment of the present invention quickly update the effect of subindex table, therefore the value of n is 1/3 to the 1/ of current block quantity 2, it can achieve the effect that quickly to update subindex table.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that each node is to master index table or sub- rope Draw after table is verified, private key can be used to sign master index table or subindex table.The most master index of signature can be selected Table or subindex table, to guarantee the correctness and authenticity of concordance list.
The block index method of the embodiment of the present invention, in the specific implementation, it is preferred that index record corresponds to block with it Timestamp is that sequence is arranged, and to guarantee the consistency of the corresponding block of index record, keeps retrieval and inquisition convenient.
As shown in Fig. 2, the block index of realization block index method as described in above-described embodiment of the embodiment of the present invention Device, comprising:
Master index table constructs module 21, for choosing n block building master index table, wherein include institute in master index table The index information of n block is stated, n is the integer more than or equal to 1;
Subindex table constructs module 22, for the block for generating after n block, constructs one or more subindexs Table, wherein the block that the subindex table formerly constructed includes chronologically is arranged in the block that the subindex table in rear building includes Before;
Wherein, the Disengagement zone for connecting with next subindex table is respectively included in master index table and each subindex table Block is stored with the block information of corresponding separation block in each subindex table respectively.
The block index device of the embodiment of the present invention, by choosing n block building master index table, for n block it The block generated afterwards constructs one or more subindex tables, so only need to recalculate whenever increasing a block newly including Subindex table including newly-increased block, can save calculation resources and time, improve the efficiency for updating block index and transaction effect Rate;In addition, the separation block for connecting with next subindex table is respectively included in master index table and each subindex table, The block information of corresponding separation block is stored in each subindex table respectively, it can be with antithetical phrase using the block information of separation block Concordance list is verified, and ensure that authenticity, safety and the correctness of subindex table.
The block index device of the embodiment of the present invention, when it is implemented, preferably, subindex table building module is specifically used for It is every to pass through preset time using first block generated after n block as initial point for the block generated after n block Threshold value constructs a sub- concordance list.Preset time threshold can be calculated by POS (share entitlements prove) common recognition algorithm, in advance If time threshold t describes the time that subindex table is separated since when a upper concordance list separates to next subindex table Interval, it determines the number of blocks indexed in subindex table, ensure that validity and high efficiency that concordance list is established.
As shown in Fig. 2, the block index device of the embodiment of the present invention, when it is implemented, preferably, further includes:
Block information obtains module 23, when for detecting newly-increased block, obtains what the subindex table of newest building reported The block information of block is separated, and is sent to subindex table update module;
Subindex table update module 24, for being verified to the block information of acquisition, when being verified, and current distance When the building time of the subindex table of the newest building is not up to the preset time threshold, the son of the newest building is updated The index information of the newly-increased block is added in the subindex table by concordance list.Advantageously ensuring that has when newly-increased block generates It imitates and quickly establishes new subindex table.
The block index device of the embodiment of the present invention, in the specific implementation, it is preferred that the block information of the separation block Including block height and block cryptographic Hash.For judging and ensuring the authenticity of subindex table.
The block index device of the embodiment of the present invention, in the specific implementation, it is preferred that the value range of n is in total block counts One third between half.The value of n is 1/3 to the 1/2 of current block quantity, and selection quantity is too little or too much, It is all unable to reach the effect of quick indexing, therefore the value of n is 1/3 to the 1/2 of current block quantity.
The block index device of the embodiment of the present invention, in the specific implementation, it is preferred that master index table constructs module to create generation Block is that initial point constructs master index table.It can guarantee the block all in block chain master index table or subindex is all recorded In table.The building of table can also be needed to be indexed according to user using other blocks as initial point.
The block index device of the embodiment of the present invention, in the specific implementation, it is preferred that further include:
Master index table obtains module, for it is most to obtain signature after each node of block chain completes verifying to master index table Master index table;
Merkel tree constructs module, in building Merkel tree between most master index table and subindex table of signing Merkle Tree;
Merkel's tree memory module, for storing the Merkel tree in the common recognition node elected using common recognition algorithm Merkle Tree。
The block index method and block index device of the embodiment of the present invention are when specifically used, data query person Xiang Gongshi Node issues inquiry request, the concordance list where being determined according to Merkle Tree, storage master index table and son in node of knowing together The Hash hash value of concordance list;The main body ID completed in concordance list according to sequence is extracted, the main body ID to be inquired is searched for;If inquiry To required main body ID, extract in index record according to record time sorted entity record;The clothes in record are chosen in access Address be engaged in obtain information;
Block positioning flow is as follows: block locator submits block Location Request to common recognition service node;Common recognition service section Point is broadcasted to other nodes in network at random, and sends the concordance list where request is set to block to block locator; Block locator quickly positions the several blocks closed on according to timestamp and concordance list;Block locator is in the several blocks closed on Middle screening obtains the positioning of accurate block.
Multi-party concordance list is separated into master index table and sub- rope by block offset and time threshold by the embodiment of the present invention Draw table, based on master index and subindex come Merkle Tree, and proves election common recognition service node by share entitlements, it is convenient Quick-searching of the user to block.In addition, because the confirmation of concordance list is independently to calculate common confirmation by multi-party, and set phase The anti-fraud system of pass ensure that the correctness of concordance list.
The block index method and block index device of the embodiment of the present invention, rope of building together in many ways when being able to solve block index Problem is computed repeatedly caused by when drawing table, has the advantages that improve trading efficiency, in addition, the related confirmation anti-fraud system of concordance list Be conducive to improve the accuracy of index.
One embodiment of the invention additionally provides a kind of intelligent contract execution system, including processor, memory are stored in On reservoir and the computer program that can run on the processor, following step is realized when which is executed by processor It is rapid:
It chooses n block and constructs master index table, wherein include the index information of the n block in master index table, n is Integer more than or equal to 1;
For the block generated after n block, one or more subindex tables are constructed, wherein the sub- rope formerly constructed Draw the block that table includes chronologically to be arranged in front of the block that the subindex table in rear building includes;
Wherein, the Disengagement zone for connecting with next subindex table is respectively included in master index table and each subindex table Block is stored with the block information of corresponding separation block in each subindex table respectively.
Optionally, following steps are also realized when which is executed by processor:
For the block generated after n block, using first block generated after n block as initial point, every process Preset time threshold constructs a sub- concordance list.
Optionally, following steps are also realized when which is executed by processor:
When detecting newly-increased block, the block information for separating block that the subindex table of newest building reports is obtained;
The block information of acquisition is verified, when being verified, and the subindex table of newest building described in current distance Building time when being not up to the preset time threshold, the subindex table of the newest building is updated, by the newly-increased block Index information be added in the subindex table.
Optionally, the block information of the separation block includes block height and block cryptographic Hash.
Optionally, the value range of n is in the one third of total block counts between half.
Optionally, following steps are also realized when which is executed by processor:
After each node of block chain completes verifying to master index table, most master index table of signing is obtained;
Merkel tree Merkle Tree is constructed between most master index table and subindex table signing;
The Merkel tree Merkle Tree is stored in the common recognition node elected using common recognition algorithm.
One embodiment of the invention additionally provides a kind of computer readable storage medium, is stored thereon with computer program, on The each process for realizing above-mentioned block index embodiment of the method when computer program is executed by processor is stated, and can be reached identical Technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disk Or CD etc..
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
For embodiment of the method, for simple description, therefore, it is stated as a series of action combinations, but this field Technical staff should be aware of, and embodiment of that present invention are not limited by the describe sequence of actions, because implementing according to the present invention Example, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know that, specification Described in embodiment belong to preferred embodiment, the actions involved are not necessarily necessary for embodiments of the present invention.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of block index method, which comprises the following steps:
Choose n block and construct master index table, wherein include the index information of the n block in master index table, n for greater than Or the integer equal to 1;
For the block generated after n block, one or more subindex tables are constructed, wherein the subindex table formerly constructed The block for including chronologically is arranged in front of the block that the subindex table in rear building includes;
Wherein, the separation block for connecting with next subindex table is respectively included in master index table and each subindex table, The block information of corresponding separation block is stored in each subindex table respectively.
2. block index method according to claim 1, which is characterized in that for the block generated after n block, structure The step of building one or more subindex tables include:
It is every by default using first block generated after n block as initial point for the block generated after n block Time threshold constructs a sub- concordance list.
3. block index method according to claim 2, which is characterized in that further include:
When detecting newly-increased block, the block information for separating block that the subindex table of newest building reports is obtained;
The block information of acquisition is verified, when being verified, and the structure of the subindex table of newest building described in current distance When building the time and being not up to the preset time threshold, the subindex table of the newest building is updated, by the rope of the newly-increased block Fuse breath is added in the subindex table.
4. block index method according to claim 1, which is characterized in that the block information of the separation block includes area Block height and block cryptographic Hash.
5. block index method according to claim 1, which is characterized in that three points in total block counts of the value range of n One of between half.
6. block index method according to claim 1, which is characterized in that after constructing one or more subindex tables, It further comprises the steps of:
After each node of block chain completes verifying to master index table, most master index table of signing is obtained;
Merkel tree Merkle Tree is constructed between most master index table and subindex table signing;
The Merkel tree Merkle Tree is stored in the common recognition node elected using common recognition algorithm.
7. a kind of block index device characterized by comprising
Master index table constructs module, for choosing n block building master index table, wherein include the n area in master index table The index information of block, n are the integer more than or equal to 1;
Subindex table constructs module, for the block for generating after n block, constructs one or more subindex tables, In, the block that the subindex table formerly constructed includes chronologically is arranged in front of the block that the subindex table in rear building includes;
Wherein, the separation block for connecting with next subindex table is respectively included in master index table and each subindex table, The block information of corresponding separation block is stored in each subindex table respectively.
8. block index device according to claim 7, which is characterized in that subindex table construct module be specifically used for for The block generated after n block, it is every to pass through preset time threshold using first block generated after n block as initial point Construct a sub- concordance list.
9. block index device according to claim 8, which is characterized in that further include:
Block information obtains module, when for detecting newly-increased block, obtains the Disengagement zone that the subindex table of newest building reports The block information of block, and it is sent to subindex table update module;
Subindex table update module, for being verified to the block information of acquisition, when being verified, and described in current distance most When the building time of the subindex table newly constructed is not up to the preset time threshold, the subindex of the newest building is updated The index information of the newly-increased block is added in the subindex table by table.
10. block index device according to claim 7, which is characterized in that it is described separation block block information include Block height and block cryptographic Hash.
CN201811457165.6A 2018-11-30 2018-11-30 Block indexing method and block indexing device Expired - Fee Related CN109634959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811457165.6A CN109634959B (en) 2018-11-30 2018-11-30 Block indexing method and block indexing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811457165.6A CN109634959B (en) 2018-11-30 2018-11-30 Block indexing method and block indexing device

Publications (2)

Publication Number Publication Date
CN109634959A true CN109634959A (en) 2019-04-16
CN109634959B CN109634959B (en) 2020-12-25

Family

ID=66070212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811457165.6A Expired - Fee Related CN109634959B (en) 2018-11-30 2018-11-30 Block indexing method and block indexing device

Country Status (1)

Country Link
CN (1) CN109634959B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113148A (en) * 2019-04-28 2019-08-09 武汉理工大学 A kind of software definition opportunistic network node identities verification method based on block chain
CN110347679A (en) * 2019-06-20 2019-10-18 阿里巴巴集团控股有限公司 A kind of date storage method based on receipt, device and equipment
CN111368003A (en) * 2020-03-06 2020-07-03 安徽中科智链信息科技有限公司 Management method of multi-chain anchoring data
CN111782644A (en) * 2020-07-27 2020-10-16 江苏工程职业技术学院 Scientific research data management control system and method based on block chain technology
US10944549B2 (en) 2019-06-20 2021-03-09 Advanced New Technologies Co., Ltd. Blockchain-type data storage
US11354653B2 (en) * 2019-12-03 2022-06-07 Jpmorgan Chase Bank, N.A. Systems and methods for using distributed ledger micro reporting tools

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050021565A1 (en) * 2003-07-08 2005-01-27 Vikram Kapoor Snapshots of file systems in data storage systems
CN102298584A (en) * 2010-06-23 2011-12-28 上海博路信息技术有限公司 Electronic book structure with dynamically-increased data
US8528085B1 (en) * 2011-12-28 2013-09-03 Emc Corporation Method and system for preventing de-duplication side-channel attacks in cloud storage systems
CN103578526A (en) * 2012-07-30 2014-02-12 三星电子株式会社 Refresh address generator, a memory device and method of refreshing memory device
CN107657438A (en) * 2017-09-18 2018-02-02 联动优势科技有限公司 A kind of block chain generation method, data verification method, node and system
CN108769150A (en) * 2018-05-14 2018-11-06 百度在线网络技术(北京)有限公司 Data processing method, device, clustered node and the storage medium of block chain network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050021565A1 (en) * 2003-07-08 2005-01-27 Vikram Kapoor Snapshots of file systems in data storage systems
CN102298584A (en) * 2010-06-23 2011-12-28 上海博路信息技术有限公司 Electronic book structure with dynamically-increased data
US8528085B1 (en) * 2011-12-28 2013-09-03 Emc Corporation Method and system for preventing de-duplication side-channel attacks in cloud storage systems
CN103578526A (en) * 2012-07-30 2014-02-12 三星电子株式会社 Refresh address generator, a memory device and method of refreshing memory device
CN107657438A (en) * 2017-09-18 2018-02-02 联动优势科技有限公司 A kind of block chain generation method, data verification method, node and system
CN108769150A (en) * 2018-05-14 2018-11-06 百度在线网络技术(北京)有限公司 Data processing method, device, clustered node and the storage medium of block chain network

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113148A (en) * 2019-04-28 2019-08-09 武汉理工大学 A kind of software definition opportunistic network node identities verification method based on block chain
CN110347679A (en) * 2019-06-20 2019-10-18 阿里巴巴集团控股有限公司 A kind of date storage method based on receipt, device and equipment
CN110347679B (en) * 2019-06-20 2020-08-04 阿里巴巴集团控股有限公司 Data storage method, device and equipment based on receipt
US10944549B2 (en) 2019-06-20 2021-03-09 Advanced New Technologies Co., Ltd. Blockchain-type data storage
US10999062B2 (en) 2019-06-20 2021-05-04 Advanced New Technologies Co., Ltd. Blockchain-type data storage
US11005648B2 (en) 2019-06-20 2021-05-11 Advanced New Technologies Co., Ltd. Blockchain-type data storage
US11223471B2 (en) 2019-06-20 2022-01-11 Advanced New Technologies Co., Ltd. Blockchain-type data storage
US11354653B2 (en) * 2019-12-03 2022-06-07 Jpmorgan Chase Bank, N.A. Systems and methods for using distributed ledger micro reporting tools
CN111368003A (en) * 2020-03-06 2020-07-03 安徽中科智链信息科技有限公司 Management method of multi-chain anchoring data
CN111782644A (en) * 2020-07-27 2020-10-16 江苏工程职业技术学院 Scientific research data management control system and method based on block chain technology

Also Published As

Publication number Publication date
CN109634959B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN109634959A (en) A kind of block index method and block index device
CN109034809B (en) Block chain generation method and device, block chain node and storage medium
CN110602148B (en) Method and device for generating state tree of block and verifying data on chain
CN106815530B (en) Data storage method, data verification method and device
CN109242500B (en) Block chain transaction validity verification method and device and storage medium
JP2023089207A (en) Consolidated blockchain-based data transfer control method and system
Anagnostopoulos et al. Persistent authenticated dictionaries and their applications
CN107423961B (en) Optimization consensus method based on random correlation analysis
CN110061838A (en) A kind of the decentralization storage system and its realization, information retrieval method of DNS resource record
CN110535660A (en) A kind of evidence obtaining service system based on block chain
CN103227719B (en) Generate the system and method without key digital multi-signature
JP7090972B2 (en) Data processing methods, equipment, computer equipment, and computer programs
CN106095814B (en) Contact person's processing method and server
CN105740440A (en) Indexing method for quickening block chain query
CA3032682C (en) Method for managing information using tree structure based on blockchain, server and terminal using the same
TWI742586B (en) Methods and devices for providing traversable key-value data storage on blockchain
EP2064637B1 (en) Method for dynamic secure management of an authenticated relational table in a database
CN107463597B (en) Passive verification method and system for block chain of modified block volume data
CN110019542A (en) The method, apparatus of the generation method of business connection, generation organizational member database and identification member of the same name in enterprise's map
CN110597922A (en) Data processing method, device, terminal and storage medium
CN107451177B (en) Query method and system for single error-surveying block chain of increased blocks
CN104394166B (en) The certificate false proof Verification System and method of facing moving terminal under a kind of cloud environment
CN113411373B (en) Transaction data storage method, tracking and tracing method and blockchain network
CN107239568B (en) Distributed index implementation method and device
CN113535803B (en) Block chain efficient retrieval and reliability verification method based on keyword index

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