CN109508411A - Block chain method for quickly retrieving - Google Patents

Block chain method for quickly retrieving Download PDF

Info

Publication number
CN109508411A
CN109508411A CN201811264831.4A CN201811264831A CN109508411A CN 109508411 A CN109508411 A CN 109508411A CN 201811264831 A CN201811264831 A CN 201811264831A CN 109508411 A CN109508411 A CN 109508411A
Authority
CN
China
Prior art keywords
block
address
file
name
retrieving
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.)
Pending
Application number
CN201811264831.4A
Other languages
Chinese (zh)
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.)
Hefei University
Hefei College
Original Assignee
Hefei College
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 Hefei College filed Critical Hefei College
Priority to CN201811264831.4A priority Critical patent/CN109508411A/en
Publication of CN109508411A publication Critical patent/CN109508411A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of block chain method for quickly retrieving, comprising the following steps: S1:, will be in the corresponding address deposit block name file of the All Activity participant of the block name of the block, the block when block catenary system carries out block storage;S2: when the specified one or more transaction participant's names of input, by retrieving user file, the address of each transaction participant is obtained respectively;S3: by block name file described in the address search, one and the matched block list of file names of input condition are obtained;S4: block catenary system parses corresponding block in the list one by one, until retrieving target block.The present invention establishes a kind of table index mechanism based on transaction participant addresses, similar to relational database, greatly improves block recall precision, extend the application field of block chain by extending the treatment process of block storage, increasing block name file.

Description

Block chain method for quickly retrieving
Technical field
The present invention relates to block chain technical fields, more particularly to a kind of block chain method for quickly retrieving.
Background technique
In the block chain for supporting " bit coin " transaction, the retrieval of block chain can only from " last-of-chain " to " first-in-chain(FIC) " carry out sequence inspection Rope, when number of blocks is very big in chain, the time consumption for retrieving the block (close to the block of first-in-chain(FIC)) of an early stage will be Considerable, and block retrieval is that block chain provides the basis of the relevant technologies service, existing ordered retrieval method leads to area The lack of uniformity and inefficiency of block retrieval time, limits the popularization and application of block chain technology.
Therefore it is urgent to provide a kind of novel block chain search methods to solve the above problems.
Summary of the invention
It, being capable of greatly lifting zone technical problem to be solved by the invention is to provide a kind of block chain method for quickly retrieving The efficiency of block chain search extends the popularization and application of block chain technology.
In order to solve the above technical problems, one technical scheme adopted by the invention is that: a kind of block chain quick-searching is provided Method, comprising the following steps:
S1: when block catenary system carries out block storage, by the block name of the block, the All Activity participant couple of the block In the address deposit block name file answered;
S2: it when the specified one or more transaction participant's names of input, by retrieving user file, obtains respectively each The address of transaction participant;
S3: by block name file described in the address search, one and the matched block list of file names of input condition are obtained;
S4: block catenary system parses corresponding block in the list one by one, until retrieving target block.
In a preferred embodiment of the present invention, the storage organization of the block name file be followed successively by block name, separator, Address, separator, this record form the HASH256 value of character string, end mark in order.
In order to solve the above technical problems, another technical solution used in the present invention is: providing a kind of block name file, use In the block chain method for quickly retrieving, including
Block name represents the file name of the block;
At least one address, each address represent the transaction address of this block one transaction participant;
This record forms the HASH256 value of character string in order, for verifying whether the data in this record are tampered;
At least two separators, for separate block name, address, this record in order form character string HASH256 The symbol of value;
End mark represents this record end.
In a preferred embodiment of the present invention,
The hexadecimal number of entitled 32 byte of block;
The address is the hexadecimal number of 20 bytes;
The HASH256 value that described item record forms character string in order is the hexadecimal number of 32 bytes.
The beneficial effects of the present invention are:
(1) treatment process of the invention by extension block storage, increase block name file, establish one kind based on transaction Participant addresses, table index mechanism similar to relational database, greatly improve block recall precision, extend block The application field of chain;
(2) the block name file stores block name, the corresponding address of transaction participant, rather than the participant that trades " name ", the privacy of effective protection transaction participant.
Detailed description of the invention
Fig. 1 is the flow chart of one preferred embodiment of block chain method for quickly retrieving of the present invention;
Fig. 2 is the storage organization schematic diagram of the block name file.
Specific embodiment
The preferred embodiments of the present invention will be described in detail with reference to the accompanying drawing, so that advantages and features of the invention energy It is easier to be readily appreciated by one skilled in the art, so as to make a clearer definition of the protection scope of the present invention.
Referring to Fig. 1, the embodiment of the present invention includes:
A kind of block chain method for quickly retrieving, comprising the following steps:
S1: when block catenary system carries out block storage, by the block name of the block, the All Activity participant couple of the block In the address deposit block name file answered;
In normal blocks storing process, the filename (such as: blk00008.dat) of the block is obtained, the block is extracted " address " of All Activity participant is stored in " block name file ", so that having recorded the area of the block in " block name file " Block name and All Activity participant.As shown in Fig. 2, the block name file includes
Block name represents the file name of the block, is the hexadecimal number of 32 bytes;
At least one address, each address represent the transaction address of this block one transaction participant, are the ten of 20 bytes Senary number, multiple participants then have multiple addresses;
This record forms the HASH256 value of character string in order, for verifying whether the data in this record are tampered, For the hexadecimal number of 32 bytes;
At least two separators ";", for separating block name, address, this record form character string in order The symbol of HASH256 value;
End mark " # " represents this record end.
The content of the block name file press binary storage, storage organization be followed successively by block name, separator, address, Separator, this record form HASH256 value, the end mark of character string in order.
S2: specified one or more transaction participant's names are inputted and obtain each transaction respectively by retrieving user file The address of participant;
The user file is the existing file of block catenary system, is responsible for management by " supervisory node ", use is described The contrast relationship of family name and its address.Compared to user file, the block name file stores block name, transaction participant Corresponding address, rather than trade participant " name ", the privacy of effective protection transaction participant.
S3: by block name file described in the address search, one and the matched block list of file names of input condition are obtained;
S4: block catenary system parses corresponding block in the list one by one, until retrieving target block.
The search method is illustrated with an embodiment below:
It is assumed that listed " address name " and corresponding " address " are as follows in existing " user file ":
…… Address name Address ……
…… ZhangSan 135aded4e2c1fd5cd7ea2cf4ea7e2bc3edc9ae5df ……
…… LiSi 391ef5239da2a3904cda1fd995fb7c4377487ea9 ……
…… WangWu 1e1ef54374cd7e90477487ea9f523da1fd5fb37f ……
…… ZhaoLiu 1ad2cf4ea7dc9ae5dfe2bc3ed4e2c1fd5cd7ea35 ……
…… ZhangWei 35f4ea7dc9ae3b9da2a390d91e5f3d67f89a4312 ……
…… LiuQiang 34cda1fd995fb7c4377487ea991ef5239da2a390 ……
…… WangFang 3df5239da2a390995fb7c4377487ea991e4cda1f ……
…… XiaoLong 17ea9f523da1fd5fb37fe1ef54374cd7e9047748 ……
…… HuYaPing 3377487ea991e4cda1fdf5239da2a390995fb7c4 ……
…… ZhouHong 1ed4e2c1fd5cd7ea35ad2cf4ea7dc9ae5dfe2bc3e ……
…… …… ……
It is assumed that having generated 10 blocks, block file is as follows:
blk00000.dat
blk00001.dat
blk00002.dat
blk00003.dat
blk00004.dat
blk00005.dat
blk00006.dat
blk00007.dat
blk00008.dat
blk00009.dat
Then, supervisory node has been formed simultaneously the block name file, content is such as when above-mentioned block is generated and stored Under:
blk00000.dat;1ed4e2c1fd5cd7ea35ad2cf4ea7dc9ae5dfe2bc3e;3df5239da2a39 0995fb7c4377487ea991e4cda1f;7be56cdbf6cc760aa485d359888bcc32d80845505346e1fd a348ffffe43bae7a#blk00001.dat;135aded4e2c1fd5cd7ea2cf4ea7e2bc3edc9ae5df;1e1e f54374cd7e90477487ea9f523da1fd5fb37f;4874d0f515e0daa7f4b3206ded55bfbeeda8add c95eba3c991bf90a17a55d595#blk00002.dat;3377487ea991e4cda1fdf5239da2a390995fb 7c4;1e1ef54374cd7e90477487ea9f523da1fd5fb37f;2b2203c82f0dd0f34a7ead2c1098cbd 544a8a79275d5e15b4e62d838c13aab9f#blk00003.dat;34cda1fd995fb7c4377487ea991ef 5239da2a390;17ea9f523da1fd5fb37fe1ef54374cd7e9047748;d1389041f753778d6f2043f cfa23fd4d918df131f2d3ff75ca3b36db225fa0df#blk00004.dat;135aded4e2c1fd5cd7ea2 cf4ea7e2bc3edc9ae5df;391ef5239da2a3904cda1fd995fb7c4377487ea9;1934ec3471abb1 61137b3d97ca0daec57a1f76ec1341e1bf1e1daa325c05e0e2#blk00005.dat;3df5239da2a3 90995fb7c4377487ea991e4cda1f;1ed4e2c1fd5cd7ea35ad2cf4ea7dc9ae5dfe2bc3e;6a927 1b3b6745a276e24e3f92e6ee09759017e396dfa5536eb6f8bcbbbd03dcd#blk00006.dat;1ed 4e2c1fd5cd7ea35ad2cf4ea7dc9ae5dfe2bc3e;1ad2cf4ea7dc9ae5dfe2bc3ed4e2c1fd5cd7e a35;abc9802a3d9de14e6dce8ca0a0ecb7977dded928c32a5976b474e7e41bc8d21c# blk00007.dat;1ed4e2c1fd5cd7ea35ad2cf4ea7dc9ae5dfe2bc3e;35f4ea7dc9ae3b9da2a39 0d91e5f3d67f89a4312;4fa33716b6951509cd44ec422c1ea1b3def62543c5b3814604a2ad76 8cf59664#blk00008.dat;1ad2cf4ea7dc9ae5dfe2bc3ed4e2c1fd5cd7ea35;1ed4e2c1fd5cd 7ea35ad2cf4ea7dc9ae5dfe2bc3e;ff8d7fab6e842437d28e5ad5dbf861121c96412d4b1de3f 589cb12e9e630cc69#blk00009.dat;34cda1fd995fb7c4377487ea991ef5239da2a390;17ea 9f523da1fd5fb37fe1ef54374cd7e9047748;e126d9585a4598beb0b8c2441f7aa1a141d4840 fdeb854ee4910c9fa84ef775c#
When input transaction participant's name, such as: ZhangSan and LiSi, then quick-searching process is as follows:
(1) " user file " is opened, obtains " address " of ZhangSan and LiSi respectively, is respectively as follows:
135aded4e2c1fd5cd7ea2cf4ea7e2bc3edc9ae5df and
391ef5239da2a3904cda1fd995fb7c4377487ea9
(2) " block name file " is retrieved:
(2.1) this document is divided into several rows using " # " as end-of-line character;
(2.2) it uses
135aded4e2c1fd5cd7ea2cf4ea7e2bc3edc9ae5df;391ef5239da2a3904cda1fd995 Fb7c4377487ea9 each row of complete match in order;
(3) matching row obtained are as follows:
blk00004.dat;135aded4e2c1fd5cd7ea2cf4ea7e2bc3edc9ae5df;391ef5239da2a 3904cda1fd995fb7c4377487ea9;1934ec3471abb161137b3d97ca0daec57a1f76ec1341e1bf 1e1daa325c05e0e2#
(4) indicate that block relevant to ZhangSan and LiSi is blk00004.dat
(5) block blk00004.dat is hit target.
The present invention is established a kind of based on ginseng of trading by extending the treatment process of block storage, increasing block name file Table index mechanism with person address, similar to relational database, greatly improves block recall precision, extends block chain Application field.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (4)

1. a kind of block chain method for quickly retrieving, comprising the following steps:
S1: when block catenary system carries out block storage, the All Activity participant of the block name of the block, the block is corresponding Address is stored in block name file;
S2: when the specified one or more transaction participant's names of input, by retrieving user file, each transaction is obtained respectively The address of participant;
S3: by block name file described in the address search, one and the matched block list of file names of input condition are obtained;
S4: block catenary system parses corresponding block in the list one by one, until retrieving target block.
2. block chain method for quickly retrieving according to claim 1, which is characterized in that the storage knot of the block name file Structure is followed successively by block name, separator, address, separator, this record the HASH256 value of composition character string, end mark in order.
3. a kind of block name file, for any one of claims 1 or 2 block chain method for quickly retrieving, which is characterized in that Include:
Block name represents the file name of the block;
At least one address, each address represent the transaction address of this block one transaction participant;
This record forms the HASH256 value of character string in order, for verifying whether the data in this record are tampered;
At least two separators, for separating block name, address, this record form the HASH256 value of character string in order Symbol;
End mark represents this record end.
4. block name file according to claim 3, which is characterized in that
The hexadecimal number of entitled 32 byte of block;
The address is the hexadecimal number of 20 bytes;
The HASH256 value that described item record forms character string in order is the hexadecimal number of 32 bytes.
CN201811264831.4A 2018-10-29 2018-10-29 Block chain method for quickly retrieving Pending CN109508411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811264831.4A CN109508411A (en) 2018-10-29 2018-10-29 Block chain method for quickly retrieving

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811264831.4A CN109508411A (en) 2018-10-29 2018-10-29 Block chain method for quickly retrieving

Publications (1)

Publication Number Publication Date
CN109508411A true CN109508411A (en) 2019-03-22

Family

ID=65746945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811264831.4A Pending CN109508411A (en) 2018-10-29 2018-10-29 Block chain method for quickly retrieving

Country Status (1)

Country Link
CN (1) CN109508411A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506661A (en) * 2020-04-22 2020-08-07 腾讯科技(深圳)有限公司 Content access management method, device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999618A (en) * 2012-11-30 2013-03-27 深圳市络道科技有限公司 Address subscription-based individual behavior attribute information base establishing method and system
CN107273556A (en) * 2017-08-23 2017-10-20 上海点融信息科技有限责任公司 Block chain data index method and equipment
CN107729371A (en) * 2017-09-12 2018-02-23 深圳先进技术研究院 The data directory and querying method of block chain, device, equipment and storage medium
CN107943951A (en) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of search method and system of block chain business information
CN107947940A (en) * 2017-11-29 2018-04-20 树根互联技术有限公司 A kind of method and device of data exchange
CN108027867A (en) * 2015-07-14 2018-05-11 Fmr有限责任公司 Calculate efficient transfer accounts processing, audit and searcher, method and system
US20180268151A1 (en) * 2017-03-19 2018-09-20 International Business Machines Corporation Automatic generating analytics from blockchain data
US20180268504A1 (en) * 2017-03-15 2018-09-20 Factom Indexing Mortgage Documents via Blockchains

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999618A (en) * 2012-11-30 2013-03-27 深圳市络道科技有限公司 Address subscription-based individual behavior attribute information base establishing method and system
CN108027867A (en) * 2015-07-14 2018-05-11 Fmr有限责任公司 Calculate efficient transfer accounts processing, audit and searcher, method and system
US20180268504A1 (en) * 2017-03-15 2018-09-20 Factom Indexing Mortgage Documents via Blockchains
US20180268151A1 (en) * 2017-03-19 2018-09-20 International Business Machines Corporation Automatic generating analytics from blockchain data
CN107273556A (en) * 2017-08-23 2017-10-20 上海点融信息科技有限责任公司 Block chain data index method and equipment
CN107729371A (en) * 2017-09-12 2018-02-23 深圳先进技术研究院 The data directory and querying method of block chain, device, equipment and storage medium
CN107943951A (en) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of search method and system of block chain business information
CN107947940A (en) * 2017-11-29 2018-04-20 树根互联技术有限公司 A kind of method and device of data exchange

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
凌锋著: "《一本书读懂区块链》", 31 July 2018, 台海出版社 *
杨茂江: "基于密码和区块链技术的数据交易平台设计", 《信息通信技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506661A (en) * 2020-04-22 2020-08-07 腾讯科技(深圳)有限公司 Content access management method, device and storage medium

Similar Documents

Publication Publication Date Title
CN105630938A (en) Intelligent question-answering system
AU2013366088B2 (en) Searchable data archive
EP1026603A3 (en) Apparatus and method for depersonalizing information
CN103995879B (en) Data query method, apparatus and system based on OLAP system
CN104036187B (en) Method and system for determining computer virus types
EP1304628A3 (en) Method and apparatus for selecting and reproducing information
CN106708841B (en) The polymerization and device of website visitation path
CN104750783B (en) A kind of advertisement placement method
CN107748739A (en) A kind of extracting method and relevant apparatus of short message text masterplate
CN106033438A (en) Public sentiment data storage method and server
CN107169003B (en) Data association method and device
CN107783974A (en) Data handling system and method
CN109508411A (en) Block chain method for quickly retrieving
CN106933919A (en) The connection method of tables of data and device
EP1480129A3 (en) Database search information output method
Frohlich MADS about Gnetales
Słomka et al. Lack of correlation between pollen aperture number and environmental factors in pansies (Viola L., sect. Melanium Ging.)–pollen heteromorphism re‐examined
Sokoloff et al. Morphology and development of the gynoecium in Centrolepidaceae: the most remarkable range of variation in Poales
CA2628815A1 (en) System and method for correlating messages within a wireless transaction
CN108416610A (en) Frequency control method is launched in user's history feedback information forming method and advertisement
CN107784588A (en) Insurance user information merging method and device
CN106933934A (en) The connection method of tables of data and device
CN106126633B (en) Processing method, the device and system of noble metal data
CN103870462B (en) A kind of data processing method and device
Bruelheide Cocktail clustering–a new hierarchical agglomerative algorithm for extracting species groups in vegetation databases

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190322

RJ01 Rejection of invention patent application after publication