CN109918398A - A kind of data search classification method based on block chain - Google Patents
A kind of data search classification method based on block chain Download PDFInfo
- Publication number
- CN109918398A CN109918398A CN201910142088.3A CN201910142088A CN109918398A CN 109918398 A CN109918398 A CN 109918398A CN 201910142088 A CN201910142088 A CN 201910142088A CN 109918398 A CN109918398 A CN 109918398A
- Authority
- CN
- China
- Prior art keywords
- data
- location index
- block chain
- attribute
- oid
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000005457 optimization Methods 0.000 claims abstract description 12
- 239000008186 active pharmaceutical agent Substances 0.000 claims description 9
- 239000004744 fabric Substances 0.000 claims 1
- 238000012545 processing Methods 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000010845 search algorithm Methods 0.000 description 3
- RTZKZFJDLAIYFH-UHFFFAOYSA-N Diethyl ether Chemical compound CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 2
- 229910010888 LiIn Inorganic materials 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of data search classification methods based on block chain, and described method includes following steps: S1: object t each in the data-link in a data space is set as with m attribute, and the ith attribute reciprocal fraction value s of ti(t), each object t has unique identifier OID;S2: object and its corresponding attribute scores are stored in different list L according to the difference of attribute1、L2……LmOn;S3: by list L1、L2……LmIt is initialized as m TF table, and TF table is denoted as h1、h2、……hm, and the location index p of m TF table is seti;S4: next object identity of location index is accessed, according to table hiIn location index, directly access hiIn (pi+ 1) object identity;S5: according to pi(pi+ 1) index generates optimization location index point, is scanned for by the optimization location index point to data.
Description
Technical field
The present invention relates to a kind of data search classification methods, and in particular to a kind of data search classification side based on block chain
Method.
Background technique
Publicly-owned chain refers to the whole world, and anyone can enter at any time in system and reads data, sends and can confirm transaction, competing
Strive the block chain of book keeping operation.Publicly-owned chain is typically considered complete decentralization, because nobody or mechanism can control
Or distort the read-write of wherein data.Publicly-owned chain generally can encourage participant to compete book keeping operation by token mechanism, to ensure data
Safety.Bit coin, ether coin are all typical publicly-owned chains.Main feature: user influences from developer, all data are silent
It is low to recognize disclosure, access threshold.It is the block chain controlled by some organisations and institutions that the privately owned privately owned chain of chain, which refers to that permission is written in it,.Ginseng
Qualification with node can be by stringent limitation, and since the node of participation is limited with controllably, privately owned chain can often have
The transactions velocity that is exceedingly fast, lower transaction cost, is not easy by malicious attack and can accomplish body at better secret protection
The necessary requirements of financial industry such as part certification.Compared to centralization database, privately owned chain can in anti-locking mechanism single node it is deliberately hidden
It hides from or altered data.Even if mistake occurs, source can be also found that quickly, therefore many large-scale financial companies are more likely to make
With privately owned chain technology.Main feature: it is preferably ensured to privacy, transaction cost is greatly lowered, transactions velocity is very fast.Connection
Meng Lian alliance chain refers to that by the block chain of the common participative management of several mechanisms, each mechanism runs one or more sections
Point, mechanism of the data therein only in permission system be written and read and send transaction, and records transaction data jointly.It is privately owned
Design privacy authority between chain and alliance's chain has difference, and the Permission Design in alliance's chain requires often more complicated.Perhaps
Can chain license chain refer to that each node participated in block catenary system is by license.Unauthorized node is can not
In access system.Therefore, privately owned chain and alliance's chain belong to license chain.It should be noted that some license chains do not have token machine
System, because not needing token to encourage node competition book keeping operation.Side chain is that side chain is also a block chain, it, which is able to verify that, comes
From the data of other block chains, the mutual phase transfer between block chain of bit coin and other assets can be realized, form one entirely
Newly open development platform.Side chain can allow block chain to realize preferably performance and secret protection.They can also extend to prop up
The currency in various assets, such as stock, bond, real world or virtual world is held, intelligent contract, safe place can also be increased
The function of reason and real world property registration etc.
Summary of the invention
The technical problem to be solved by the present invention is to the data search mode classifications at present in block chain can not be accurate
Target data is found, or looks for data time too long, larger to the burden of whole system, it is an object of that present invention to provide a kind of bases
In the data search classification method of block chain, solve that data classification search time in current technology is too long, and system response time is very
Long problem.
The present invention is achieved through the following technical solutions:
A kind of data search classification method based on block chain, described method includes following steps: S1: by a data sky
Each object t is set as with m attribute, and the ith attribute reciprocal fraction value s of t in interior data-linki(t), each right
As t has unique identifier OID;S2: object and its corresponding attribute scores are stored in difference according to the difference of attribute
List L1、L2……LmOn;S3: by list L1、L2……LmIt is initialized as m TF table, and TF table is denoted as h1、h2、……
hm, and the location index p of m TF table is seti;S4: next object identity of location index is accessed, according to table hiIn position
Index, directly access hiIn (pi+ 1) object identity;S5: according to pi(pi+ 1) index generates optimization location index point,
Data are scanned for by the optimization location index point.
Currently, the field with bloom filter (BF) i.e. Bloom filter is very wide in data search classification field,
It is the Processing Algorithm in mass data, core concept is exactly to solve each data using multiple and different Hash functions to generate
" conflict ", although having great advantage in processing mass data, have if simple carries out data processing with the algorithm
It certain misrecognition and deletes situations such as difficult, reason is that it is determining input element number n, determines bit array m's
When size and hash function number, as hash function number k=(ln2) * (m/n), error rate is minimum.It is not more than in error rate
In the case where E, m will could at least indicate the set of any n element equal to n*lg (1/E).Therefore hash function number not
When in section, error rate can be significantly risen, and in the prior art, can be used the previous step of a redundancy, be carried out data classification,
Give the data in set to the screening that Bloom filter carries out mass data.
The technology that present specification uses is data search classification to be carried out, in order to protect by three-dimensional stepping Bloom filter
The speed of data search is demonstrate,proved, each object of the chain data in block chain has many attributes, and carries out in each object properties
Fractional value determines that the fractional value determines that list can be formed according to the data volume of object properties, and Bloom filter passes through the list
On location index, it may be convenient to table data is scanned for, and because table data be classified in advance,
Data need not classify when rear end is inquired, and can accelerate the speed of search algorithm processing, reduce system when handling data
Response time, entire data search can be allowed more accurate, and because predeterminated position indexes available optimization position, can
Time of the homogeneous data is searched for next time faster to allow, so that whole system can still be kept after a large amount of operations
Efficient data search.
Further, list L is storediFor the data acquisition system of a n member, including the object i-th dimension that is identified with OID
The score of attribute, Li={ (OID, si(t): t ∈ DS) }, the DS is the data space with n object.
Further, in list object according to score on the section [0-1], and in lists according to score size be in descending
Arrangement.
Further, the TF table initialized in the step S3, by (OID, siAnd the corresponding location index P of OID (t))i
Constitute a three-dimensional stepping Bloom filter table.
Further, the three-dimensional stepping Bloom filter table is divided into 3 grades in 1≤i≤m, hi={ n, { eci1,eci2,
eci3},{m1,m2,m3},{k1,k2,k3, wherein eci1,eci2,eci3Indicate the additional I/ when inquiry failure occurs for 3 grades of elements
O expense, m1,m2,m3Respectively indicate the length of the vector V of 3 grades of Bloom filters, k1,k2,k3Indicate the corresponding hash of 3 grades of elements
The number of function.
Compared with prior art, the present invention having the following advantages and benefits:
1, a kind of data search classification method based on block chain of the present invention should by using a list is preset
List can provide preferable set for the Bloom filter of subsequent processing, can sort out Bloom filter and scan for mistake
The higher object of rate carries out fast search to the object in list;
2, a kind of data search classification method based on block chain of the present invention can accelerate the speed of search algorithm processing,
Response time of the reduction system when handling data, entire data search can be allowed more accurate;
3, a kind of data search classification method based on block chain of the present invention, because predeterminated position indexes available optimization
Position can allow and search for time of the homogeneous data next time faster, so that whole system still may be used after a large amount of operations
To keep efficient data search.
Detailed description of the invention
Attached drawing described herein is used to provide to further understand the embodiment of the present invention, constitutes one of the application
Point, do not constitute the restriction to the embodiment of the present invention.In the accompanying drawings:
Fig. 1 is two example schematic of the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below with reference to embodiment and attached drawing, to this
Invention is described in further detail, and exemplary embodiment of the invention and its explanation for explaining only the invention, are not made
For limitation of the invention.
Embodiment one
A kind of data search classification method based on block chain of the present invention, a kind of data search classification side based on block chain
Method, described method includes following steps: S1: object t each in the data-link in a data space is set as belonging to m
Property, and the ith attribute reciprocal fraction value s of ti(t), each object t has unique identifier OID;S2: according to attribute
Difference object and its corresponding attribute scores are stored in different list L1、L2……LmOn;S3: by list L1、L2……
LmIt is initialized as m TF table, and TF table is denoted as h1、h2、……hm, and the location index p of m TF table is seti;S4: access position
The next object identity for setting index, according to table hiIn location index, directly access hiIn (pi+ 1) object identity;S5:
According to pi(pi+ 1) index generates optimization location index point, is scanned for by the optimization location index point to data.
The technology that present specification uses is data search classification to be carried out, in order to protect by three-dimensional stepping Bloom filter
Demonstrate,prove data search speed, by each object of the chain data in block chain have many attributes, and each object properties into
Row fractional value determines that the fractional value determines that list can be formed according to the data volume of object properties, and Bloom filter passes through the column
Location index on table, it may be convenient to table data is scanned for, and because table data is classified in advance, because
This data need not classify when rear end is inquired, and can accelerate the speed of search algorithm processing, reduce system in processing data
When response time, entire data search can be allowed more accurate, and because predeterminated position indexes available optimization position,
It can allow and search for time of the homogeneous data next time faster, so that whole system can still be protected after a large amount of operations
Hold efficient data search.
OID Technology application in modern Internet of Things but is not yet had in the field of data search of block chain than wide
Use, OID be by ISO/IEC, ITU-T International Organization for standardization eighties in last century joint propose identifier mechanism, using point
Layer tree structure carries out the whole world to any kind of object and unambiguously, uniquely names.It is used in the object identity of data object
On, can with the difference between effective district divided data object and data object, can allow each object t will unique identifier,
Different list L can be made according to different classifications according to these identifiers1、L2……Lm, these lists can be convenient subsequent
Bloom filter enter carry out data search, for the ease of quickly scanning for, have location index in these lists
It is allowed to enter, and object is arranged according to score size in descending on the section [0-1], and in lists according to score in list
Column.As shown in table 1.
Pi | (OID,S1(t)) | (OID,S2(t)) | (OID,S3(t)) |
0 | (8,0.70) | (9,0.68) | (4,0.50) |
1 | (6,0.68) | (7,0.47) | (3,0.39) |
2 | (7,0.37) | (11,0.35) | (6,0.28) |
3 | (5,0.26) | (3,0.24) | (1,0.27) |
4 | (2,0.25) | (6,0.13) | (7,0.16) |
The example that table 1 has 3 attribute list files
During this data search, it is first determined location index PI, such as in a two-dimensional space, two-dimensional space
DS={ x1,x2…,xn, if object xi∈ DS, if xi+1It is the xth of DSi+1A tuple, then xi+1Corresponding position is position
Index PI.
When determining optimization location index, during a data scanning, if attribute list LiIn be accessed to
Location index set is denoted as { 0,1,2,3 ... I, j } (wherein 0≤i≤j≤n), if meeting i+1 < j, i.e., in LiIn from location index
0 is all accessed to the data between i, and indexes that (i+1) is not visited, we may be considered i in this visit for it
Optimal location index.
Store list LiFor the data acquisition system of a n member, point of the attribute including the object i-th dimension being identified with OID
Number, Li={ (OID, si(t): t ∈ DS) }, the DS is the data space with n object.It is initialized in the step S3
TF table, by (OID, si(t)) and the corresponding location index PI of OID constitutes a three-dimensional stepping Bloom filter table (hi).It is described
Three-dimensional stepping Bloom filter table is divided into 3 grades in 1≤i≤m, hi={ n, { eci1,eci2, eci3},{m1,m2,m3},{k1,
k2,k3, wherein eci1,eci2,eci3Indicate the additional I/O expense when inquiry failure occurs for 3 grades of elements, m1,m2,m3Table respectively
Show the length of the vector V of 3 grades of Bloom filters, k1,k2,k3Indicate the number of the corresponding hash function of 3 grades of elements.
Embodiment two
As shown in Figure 1, understanding for the ease of those skilled in the art, the present embodiment is to the Bu Long in above-described embodiment
Filter table is specifically described, and 3 dimensions element { 4,6,0.13 } that the 5th in table 1 group data and PI are constituted are as mapping
Data acquisition system, come illustrate TF table how to support triplet information store and inquiry.If TF uses 3 Bloom filter BF1、
BF2、BF3Respectively indicate PI, OID and si(t).If m1=m2=m3=8bit, in order to which technical staff understands, we only make
Illustrate the process with 3 hash functions.3 hash functions are as follows: g1(z)=100z mod8, g2(z)=(100z+3) mod8,
g3(z)=(100z+5) mod8.In BF1It is middle to use g1(z) and g2(z), in BF2And BF3It is middle using 3 functions realize storage and
Inquiry.
As PI=4, g is obtained1(4)=100x4mod8=0, g1(4)=(100x4+3) mod8=3.Therefore BF1[0] and
BF1[3] set;As OID=6, g is obtained1(6)=100x6mod8=0, g2(6)=(100x6+3) mod8=3, g3(6)=
(100x6+5) mod8=5, therefore BF2[0], BF2[3], BF2[5] set;Similarly it is found that as insertion si(t)=0.13 when, BF3
[0], BF3[2], BF3[5] set.
When executing access operation, if accessing hiThe object of middle OID=6, TKBFP algorithm is first in h1BF2Middle use
Hash operation, inquiring the object whether there is, and extract BF if it exists1In location index PiAnd obtain BF3In local score,
It carries out calculating global score.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include
Within protection scope of the present invention.
Claims (5)
1. a kind of data search classification method based on block chain, which is characterized in that described method includes following steps:
S1: object t each in the data-link in a data space is set as with m attribute, and the ith attribute pair of t
Answer fractional value si(t), each object t has unique identifier OID;
S2: object and its corresponding attribute scores are stored in different list L according to the difference of attribute1、L2……LmOn;
S3: by list L1、L2……LmIt is initialized as m TF table, and TF table is denoted as h1、h2、……hm, and m TF table is set
Location index pi;
S4: next object identity of location index is accessed, according to table hiIn location index, directly access hiIn (pi+1)
Object identity;
S5: according to pi(pi+ 1) index generates optimization location index point, is searched by the optimization location index point to data
Rope.
2. a kind of data search classification method based on block chain according to claim 1, which is characterized in that storage list
LiFor the data acquisition system of a n member, the score of the attribute including the object i-th dimension being identified with OID, Li={ (OID, si
(t): t ∈ DS) }, the DS is the data space with n object.
3. a kind of data search classification method based on block chain according to claim 1, which is characterized in that right in list
As being arranged according to score size in descending on the section [0-1], and in lists according to score.
4. a kind of data search classification method based on block chain according to claim 1, which is characterized in that in step S3
The TF table of initialization, by (OID, siAnd the corresponding location index P of OID (t))iConstitute a three-dimensional stepping Bloom filter table.
5. a kind of data search classification method based on block chain according to claim 1, which is characterized in that three-dimensional stepping
Bloom filter table is divided into 3 grades in 1≤i≤m, hi={ n, { eci1,eci2,eci3},{m1,m2,m3},{k1,k2,k3,
Middle eci1,eci2,eci3Indicate the additional I/O expense when inquiry failure occurs for 3 grades of elements, m1,m2,m3It is grand to respectively indicate 3 grades of cloth
The length of the vector V of filter, k1,k2,k3Indicate the number of the corresponding hash function of 3 grades of elements.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910142088.3A CN109918398A (en) | 2019-02-26 | 2019-02-26 | A kind of data search classification method based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910142088.3A CN109918398A (en) | 2019-02-26 | 2019-02-26 | A kind of data search classification method based on block chain |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109918398A true CN109918398A (en) | 2019-06-21 |
Family
ID=66962361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910142088.3A Pending CN109918398A (en) | 2019-02-26 | 2019-02-26 | A kind of data search classification method based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109918398A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143371A (en) * | 2019-12-27 | 2020-05-12 | 中国银联股份有限公司 | Data query method, device, equipment, system and medium |
CN113239078A (en) * | 2021-05-17 | 2021-08-10 | 国网河南省电力公司信息通信公司 | Data rapid query method based on alliance chain |
CN118035519A (en) * | 2024-04-12 | 2024-05-14 | 成都融见软件科技有限公司 | Classification searching method, electronic equipment and storage medium |
-
2019
- 2019-02-26 CN CN201910142088.3A patent/CN109918398A/en active Pending
Non-Patent Citations (1)
Title |
---|
邹志文等: "基于三维分档布鲁姆过滤器的Top-k查询算法", 《江苏大学学报(自然科学版)》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143371A (en) * | 2019-12-27 | 2020-05-12 | 中国银联股份有限公司 | Data query method, device, equipment, system and medium |
WO2021129062A1 (en) * | 2019-12-27 | 2021-07-01 | 中国银联股份有限公司 | Data query method, apparatus, device and system, and medium |
CN111143371B (en) * | 2019-12-27 | 2023-09-19 | 中国银联股份有限公司 | Data query method, device, equipment, system and medium |
CN113239078A (en) * | 2021-05-17 | 2021-08-10 | 国网河南省电力公司信息通信公司 | Data rapid query method based on alliance chain |
CN118035519A (en) * | 2024-04-12 | 2024-05-14 | 成都融见软件科技有限公司 | Classification searching method, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101572630B (en) | Privilege management system and method based on objects | |
CN109918398A (en) | A kind of data search classification method based on block chain | |
CN104794162B (en) | Real-time data memory and querying method | |
CN108989357A (en) | User authorization and data sharing access control method based on block chain | |
CN107332847A (en) | A kind of access control method and system based on block chain | |
CN107766745B (en) | Hierarchical privacy protection method in hierarchical data release | |
CN105183915B (en) | Reduce the multi version management method of index maintenance expense | |
DE102013111436A1 (en) | Sharing data between Nexus using different data-access-control classification schemes | |
KR20190079324A (en) | Method and system for enhancing integrity of batabase based on the block chain system | |
CN109063138A (en) | For in block chain, that is, service platform search data method, equipment and storage medium | |
CN101674334A (en) | Access control method of network storage equipment | |
CN109117669B (en) | Privacy protection method and system for MapReduce similar connection query | |
CN109033841A (en) | It is a kind of to write the weak center's trusted data storage system and management method for testing separation | |
CN110147684A (en) | For realizing the method and apparatus of block chain data-privacy protection | |
CN102542069B (en) | XML (Extensible Makeup Language) document access control method and system for XML database system | |
CN108255859A (en) | A kind of method and system for being used to establish index for mass digital certificate | |
CN106528821A (en) | Method for importing change column data into database | |
CN106933891A (en) | Access the method for distributed data base and the device of Distributed database service | |
CN104699790B (en) | A kind of bank data relation establishing method and device | |
CN106033438A (en) | Public sentiment data storage method and server | |
US10311033B2 (en) | Alleviation of index hot spots in data sharing environment with remote update and provisional keys | |
CN111783141B (en) | Data storage method, device and equipment based on block chain and storage medium | |
CN114930314A (en) | Method and system for converting database application into blockchain application | |
CN108664808A (en) | A kind of user's sensitivity theme guard method and system towards books search service | |
KR102377535B1 (en) | Anonymization of big data personal information and method of combining anonymized 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190621 |
|
RJ01 | Rejection of invention patent application after publication |