A verifiable boolean top-k query method based on hybrid storage block chain

By employing data digest generation and query result verification methods in hybrid storage blockchains, the verification problem of Boolean Top-K queries in hybrid storage blockchains is solved, achieving accuracy and reliability in task allocation and reducing storage and bandwidth consumption.

CN117688065BActive Publication Date: 2026-08-25HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311750757.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2026-08-25
Estimated Expiration
2043-12-19

AI Technical Summary

Technical Problem

Existing technologies lack effective support for Boolean Top-K queries in hybrid storage blockchains, resulting in inaccurate task allocation and high bandwidth consumption, failing to meet the reliability verification requirements of task publishers.

Method used

A hybrid storage blockchain structure is adopted, and the verifiability of Boolean Top-K queries is achieved by combining RSA accumulators and hash functions through data digest generation, query result proof generation and verification methods.

Benefits of technology

It enables effective verification of Boolean Top-K queries in a hybrid storage blockchain, reduces storage costs and bandwidth consumption, and ensures the accuracy and reliability of task allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117688065B_ABST
    Figure CN117688065B_ABST
Patent Text Reader

Abstract

The application relates to a multi-keyword Boolean Top-K verification query method in a hybrid storage blockchain structure, in particular to a verifiable Boolean Top-K query method based on a hybrid storage blockchain, and belongs to the technical field of verifiable query. The verifiable Boolean Top-K query is realized through four algorithms. 1. A system initialization method, including the generation of system parameters and a public-private key pair. 2. A data digest generation method, wherein a blockchain node generates a digest of received data to generate a verifiable data structure. 3. A query result and its proof generation method, wherein the results meeting the query condition are returned, and the correctness of the query result is proved. 4. A query result verification method, including a matching verification method of the query result and a query expression and a Top-K ranking verification method, so that the query verification of the Boolean Top-K query in the hybrid storage blockchain is realized through a short digest and a verification proof.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a multi-keyword Boolean Top-K verification query method in a hybrid storage blockchain structure, specifically a verifiable Boolean Top-K query method based on a hybrid storage blockchain, belonging to the field of verifiable query technology. Background Technology

[0002] With the rapid development of the internet, crowdsourcing tasks are becoming increasingly prevalent in daily life, such as crowdsourced video translation, crowdsourced food delivery, and crowdsourced logistics. Currently, many companies have launched their own crowdsourcing systems. In these systems, the crowdsourcing platform acts as an intermediary, connecting task publishers with a large number of underutilized task participants. Based on the task publisher's needs, it uses keyword matching and other methods to find suitable participants, providing great convenience for both the publisher and participants. However, as a third party, the crowdsourcing cloud platform also presents certain problems while offering convenience. For example, in order to improve task allocation efficiency, the platform might assign tasks to unsuitable workers at the expense of the task publisher's needs. Therefore, to ensure the reliability of crowdsourcing results, an effective method is for task publishers to be able to verify the results. Meanwhile, blockchain, as a distributed database maintained by multiple parties, possesses tamper-proof and malleable properties, offering a new approach to secure data storage and has recently received widespread attention. However, as an append-only chain structure, blockchain storage costs are extremely high. For example, executing a transaction carrying 17KB of data consumed approximately 600,000 Gas, equivalent to about 11 RMB. To save on blockchain storage costs while ensuring secure data storage, a hybrid blockchain combining on-chain and off-chain storage has emerged. Specifically, task participants outsource their raw data to off-chain storage (such as a crowdsourcing cloud platform), while storing smaller data sets, such as a summary of the raw data and an Authenticated Data Structure (ADS), on the blockchain. The crowdsourcing platform matches task requirements with participants' interests using keywords and generates a Verifiable Object (VO). This VO, along with the matching results, is returned to the user. The user can then verify the results using the ADS obtained through the blockchain and the VO.

[0003] With the increasing variety of stored data types and the growing volume of data, complex matching patterns, such as Boolean query patterns, are often required to ensure the accuracy of task allocation. However, returning all results that satisfy the query pattern would consume significant bandwidth, while task publishers often only need the top K matching results. Therefore, designing a task matching system with Top-K query functionality is crucial. For example, a task publisher wants to publish a video translation task, hoping that crowdsourced workers understand both Chinese and common English, and that the workers complete the task efficiently to ensure translation quality. The task publisher then searches for workers who understand Chinese and have passed the CET-6 or TEM-4 English exams, ranking in the top 100, and initiates the query Q = (Chinese ∧ (CET-6 ∨ TEM-4), 100). Existing solutions support a limited range of query types and do not address the Boolean Top-K query verification problem in hybrid storage blockchains. Therefore, this invention proposes a Boolean Top-K query verification method for hybrid storage blockchains. Summary of the Invention

[0004] To address the above issues, this invention proposes a Boolean Top-K query verification method under a hybrid storage blockchain structure.

[0005] The technical principle of this invention lies in the fact that the method employs four types of entities: data owners, users, crowdsourcing cloud platforms, and blockchain. Data owners store complete data in the crowdsourcing cloud platform and upload simplified data used to generate ADSs to blockchain miner nodes; miner nodes construct ADSs based on the simplified data and upload them to the blockchain; when a user publishes a task to the crowdsourcing platform, the platform performs a Boolean Top-K query based on the task conditions and the data participants' preferences, generating a verifiable object (VO); when the user receives the query results and the VO, they perform verification in conjunction with the ADSs in the blockchain. The method mainly includes three parts: 1. A data summarization generation method is proposed; 2. A method for generating query result proofs is proposed; 3. A method for verifying query results is proposed; Verifiable Boolean Top-K queries are implemented using four algorithms: 1. System initialization method, including the generation of system parameters and public / private key pairs. 2. Data digest generation method, where blockchain nodes generate a digest of received data, creating a verifiable data structure. 3. Query result and proof generation method, returning results that meet the query conditions and providing proof of the query result's correctness. 4. Query result verification method, including methods for verifying the matching of query results and query expressions, and methods for verifying Top-K rankings.

[0006] This invention includes the following steps: Step 1, System initialization method: KeyGen(1 λ )->(pk,sk). Given security parameters Blockchain nodes generate public keys pk = {N, (g, QR)} N )} and private key sk=(p-1)(q-1); Where N = p·q are the parameters of the RSA accumulator, p and q are two large prime numbers, |p·q| > 3λ, and g is the cyclic group QR. N Generators; Step 2, Data Digest Generation Method: ADSGen(D,pk)→{φ I ,φ C ,φ M ,φ R The blockchain nodes generate a digest of the received data. Here, H is a general collision-resistant hash function, and P(x)∈{0,1}. 3λ This represents the prime value corresponding to x; Step 2.1: Create an inverted index for all objects in data D based on keywords, and generate an index object (w i ,o j ), each index object (w i ,o j ) represents object o j The keyword w exists i And generate an index object set Invert IndexObject Set:IO, where IO[t] represents the index object set of the t-th block, containing all index objects within the block, φ I A summary representing the I / O of the indexed object collection; Step 2.2: Generate a count object for each keyword in data D. Keyword w i The object is , generate an Object Count Set: OC, where OC[t] represents the count set of the t-th block, φ C A verification summary of the set of objects represented by OC; Step 2.3: Create an inverted index for all objects in data D based on keywords, and generate non-matching objects (w i ,o j ), each non-matching object (w i ,o j ) represents o j The keyword w does not exist. i And generate a set of mismatched objects, MismatchedObject Set: MO, where MO[t] represents the set of mismatched objects in the t-th block, φ MA verification summary representing the set of non-matching objects MO; Step 2.4: Generate comparison objects (o) for all objects in data D according to their numerical attribute size. i ,o j ), representing o i Numerical attribute greater than 0 j And generate a set of comparison objects, Object Rank Set: OR, where OR[t] represents the set of comparison objects for the t-th block, φ R A validation summary of the OR operation on the comparison set of objects; Step 2.5, Calculation Step 3, Query Results and Proof Generation Method: This includes the query method: Search(Ω,K)→(RES,VO), where the user sends a query to the cloud server Q=(Ω,K), representing the query for the top K query results that satisfy the Boolean expression Ω, where the Boolean expression Ω is in Conjunctive Normal Form (CNF), for example, w1∧(w2∨w3), meaning that the query results satisfy both keyword w1 and keyword w2 or w3. The cloud server returns the result RES. The proof generation method: ProofGen(Ω,K)→VO, generates a proof that the query results satisfy the Boolean expression and the Top-K ranking. Step 3.1: Query the number of objects in set OC[t] that match the first keyword. And put SR C In the middle. Query all indexed objects (w1, o) in the set IO[t] that match the keyword w1. j Let this be Set1. Iterate through Set1 and find objects o that match the complete Boolean expression Ω. i , will (w1,o i )Put SR I For objects that match the first keyword but do not meet the complete condition, o j , will (w1,o j )Put in calculate Among them SR I This represents the set of query results that match the query conditions. π represents the set of query results that are partially matched. C The proof representing the number of objects matching the first keyword, π I Represents SR I and Proof of matching the first keyword in the object; Step 3.2, for each Index object (w1, o j ) object o jThis generates a mismatch object for subsequent Boolean expressions, such as in w1∧(w2∨w3), for each o j Generate (w2,o) j ),(w3,o j ), put it into SR M In, and calculate Among them SR M represent The set of objects that do not match the keyword in the middle, π M Represents SR M Proof of the set of mismatched objects in the dataset; Step 3.3: Find SR I The top-K matching objects in the sorted objects are {(w1,o1),(w1,o2),…(w1,o2),…(w1,o3),…(w1,o4),…(w1,o5),…(w1,o6),…(w1,o7),…(w1,o8),…(w1,o9),…(w1,o1,o2 ... k )}, put SR K In the middle, other matching objects are placed In China, The object in the comparison object is generated (o) k ,o j ), representing o j Less than 0 in sorting k Store these comparison objects in SR R and calculate Among them SR K This represents the set of the top K objects whose values ​​match the complete query criteria, sorted by type. Represents the set of objects other than K, π R Proof of the numerical attribute sorting of the matched objects; Step 3.4: Return to SR in the cloud server K The original data RES of the object, and the verification object VO. Step 4, Query result verification method: Verify(RES,VO,Ω,K)->{0,1}, the user verifies the query result RES, the verification object VO, the query condition Ω,K. It returns 1 only when the query result RES is one of the top-K objects that satisfy the Boolean expression Ω, indicating successful verification; otherwise, it returns 0 to indicate failed verification. Step 4.1: Obtain the verification data structure ADS from the blockchain: {φ I ,φ C ,φ M ,φ R Auxiliary verification; Step 4.2, Verify SR C Does the keyword 'w' in (w, count) match the Boolean expression Ω? Calculate the equation. Check if it's correct. If it's incorrect, return 0, indicating verification failed and the verification process ends; if it's correct, continue verification. Step 4.3, Verification The sum of the number of objects and whether the keyword equals SR C Calculate the equation Check if it's correct. If it's incorrect, return 0, indicating verification failed and the verification process ends; if it's correct, continue verification. Step 4.4, Verification SR M Whether the objects and quantities match, i.e., whether they are correct. Each object in SR M There are sufficient proofs of mismatch in each, and the calculations are performed. Check if the equation is correct. If incorrect, return 0 to indicate verification failure and end the verification process; if correct, continue verification. Step 4.5: Verify SR K , SR R Does the object identifier match, i.e., SR? R Matching objects in (o k ,o j ) j Are they all in In the middle, o k Is it SR? K The smallest object in the equation. Check if it's correct. If incorrect, return 0, indicating verification failure and the verification process ends; if correct, return 1, indicating verification success.

[0007] The advantage of this invention lies in the fact that existing solutions for querying hybrid storage blockchains support a limited range of query types, do not address the verification problem of Boolean Top-K queries in hybrid storage blockchains, and lack relevant technical support in the existing technical field, making it impossible to obtain corresponding technical inspiration. Therefore, this invention proposes a verifiable Boolean Top-K query in hybrid storage blockchains, achieving query verification of Boolean Top-K queries in hybrid storage blockchains with a concise summary and verification proof. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of a hybrid storage blockchain structure.

[0009] Figure 2 This is a schematic diagram of the raw data for the block summary.

[0010] Figure 3 This is a schematic diagram of the generated set of comparison objects OR[t].

[0011] Figure 4This diagram illustrates the generated set of index objects IO[t], the set of index count objects OC[t], and the set of mismatched objects MO[t].

[0012] Figure 5 This is a diagram illustrating the summary information on the blockchain.

[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of this invention clearer, the following description is provided in conjunction with the appendix. Figures 1 to 5 The present invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0015] The query steps of this invention include: a data initialization step, a query and result proof generation step, and a query result verification step. The process is as follows:

[0016] Step 1, Data Initialization Step: The blockchain node receives data such as... Figure 2 After obtaining the simplified data, proceed according to the construction method as follows: Figure 4 The inverted index object IO[t], the number of indexed objects OC[t], the index of mismatched objects MO[t], are constructed as follows: Figure 3 The comparison object OR[t] is used, and the summary information φ is generated based on the RSA accumulator. I ,φ C ,φ M ,φ R Step 2: Query and Result Proof Generation: The user initiates a query in the form Q = (Ω, K), for example, Q = (w4∧(w1∨w3), 2). The query satisfies the keyword w4 and the first two results satisfying either the keyword w1 or w3. The cloud server receives the query Q and returns the query results and the verification object. Step 2.1: Query the number of objects (w4,5) in set OC[t) that match the first keyword, and put them into SR. C In the middle, query all index objects {(w4,o1),(w4,o2),(w4,o4),(w4,o5),(w4,o7)} in set IO[t] that match the keyword w4 and set them as Set1. For the objects {o1,o2,o4,o5,o7} in Set1, the index objects (w4,o1),(w4,o2),(w4,o7) that satisfy the complete query conditions are placed into SR. IOther indexed objects (w4, o4) and (w4, o5) are placed in... And calculation as well as Step 2.2, for The matching objects (w4,o4) and (w4,o5) in the query generate non-match proofs (w1,o4), (w3,o4), (w1,o5), and (w3,o5) for the subsequent query condition (w1∨w3) and put them into the SR. M And calculate Step 2.3 Query SR I The top two matched objects in the SR are (w4, o7) and (w4, o2), and then placed into the SR. K Other matched objects (w4, o1) are placed in In China, The matching objects in the comparison object (o2, o1) are generated, meaning that o1 is numerically smaller than the second largest object o2, and the comparison object is placed in the SR. R In the middle. And calculate. Step 2.4 Return the query result SR K The matching objects (w4, o7) and (w4, o2) correspond to the original data RES and validation object VO of objects o7 and o2, respectively. Step 3, Query Results and Proof Generation Method: This includes the query method: Search(Ω,K)→(RES,VO), where the user sends a query to the cloud server Q=(Ω,K), representing the query for the top K query results that satisfy the Boolean expression Ω, where the Boolean expression Ω is in Conjunctive Normal Form (CNF), for example, w1∧(w2∨w3), meaning that the query results satisfy both keyword w1 and keyword w2 or w3. The cloud server returns the result RES. The proof generation method: ProofGen(Ω,K)→VO, generates a proof that the query results satisfy the Boolean expression and the Top-K ranking. Step 3.1: Query the number of objects in set OC[t] that match the first keyword. And put SR C In the middle. Query all indexed objects (w1, o) in the set IO[t] that match the keyword w1. j Let this be Set1. Iterate through Set1 and find objects o that match the complete Boolean expression Ω. i , will (w1,o i )Put SR I For objects that match the first keyword but do not meet the complete condition, o j , will (w1,o j )Put in calculate Step 3.2, for each Index object (w1, o j ) object o j This generates a mismatch object for subsequent Boolean expressions, such as in w1∧(w2∨w3), for each o j Generate (w2,o) j ),(w3,o j ), put it into SR M In, and calculate Step 3.3: Find SR I The top-K matching objects in the sorted objects are {(w1,o1),(w1,o2),…(w1,o2),…(w1,o3),…(w1,o4),…(w1,o5),…(w1,o6),…(w1,o7),…(w1,o8),…(w1,o9),…(w1,o1,o2 ... k )}, put SR K In the middle, other matching objects are placed In China, The object in the comparison object is generated (o) k ,o j ), representing o j Less than 0 in sorting k Store these comparison objects in SR R and calculate Step 3.4: Return to SR in the cloud server K The original data RES of the object, and the verification object VO. Step 4, Query result verification method: Verify(RES,VO,Ω,K)->{0,1}, the user verifies the query result RES, the verification object VO, the query condition Ω,K. It returns 1 only when the query result RES is one of the top-K objects that satisfy the Boolean expression Ω, indicating successful verification; otherwise, it returns 0 to indicate failed verification. Step 4.1: Obtain the verification data structure ADS from the blockchain: {φ I ,φ C ,φ M ,φ R Auxiliary verification; Step 4.2, Verify SR C Does the keyword 'w' in (w, count) match the Boolean expression Ω? Calculate the equation. Check if it's correct. If it's incorrect, return 0, indicating verification failed and the verification process ends; if it's correct, continue verification. Step 4.3, Verification The sum of the number of objects and whether the keyword equals SR C Calculate the equation Check if it's correct. If it's incorrect, return 0, indicating verification failed and the verification process ends; if it's correct, continue verification. Step 4.4, Verification SR M Whether the objects and quantities match, i.e., whether they are correct. Each object in SR M There are sufficient proofs of mismatch in each, and the calculations are performed. Check if the equation is correct. If incorrect, return 0 to indicate verification failure and end the verification process; if correct, continue verification. Step 4.5: Verify SR K , SR R Does the object identifier match, i.e., SR? R Matching objects in (o k ,o j ) j Are they all in In the middle, o k Is it SR? K The smallest object in the equation. Check if it's correct. If incorrect, return 0, indicating verification failure and the verification process ends; if correct, return 1, indicating verification success.

[0017] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A verifiable Boolean Top-K query method based on hybrid storage blockchain, characterized in that: Includes the following steps: Step 1, System Initialization Method: Given security parameters Blockchain node generation and private key ; in , and They are two large prime numbers. It is a cyclic group Generators; Step 2, Data Digest Generation Method: The blockchain nodes generate a digest of the received data; where H is a general-purpose collision-resistant hash function. This represents the prime value corresponding to x; Step 2.1: Create an inverted index for all objects in data D based on keywords, and generate index objects. Each index object Representative object Existing keywords And generate an index object set Invert Index ObjectSet: IO, where IO[t] represents the index object set of the t-th block, containing all index objects within the block. A summary representing the I / O of the indexed object collection; Step 2.2: Generate a count object for each keyword in data D. , representing keywords The object is , generate an Object Count Set: OC, where OC[t] represents the set of count objects for the t-th block. A validation summary of the set of objects represented by OC; Step 2.3: Create an inverted index for all objects in data D based on keywords, and generate non-matching objects. Each non-matching object represent No keywords exist And generate a set of mismatched objects: MO, where MO[t] represents the set of mismatched objects in the t-th block. A verification summary representing the set of non-matching objects MO; Step 2.4: Generate comparison objects for all objects in data D according to their numerical attributes. ,represent Numerical attributes greater than And generate a set of comparison objects, Object Rank Set: OR, where OR[t] represents the set of comparison objects for the t-th block. A validation summary of the OR operation on the comparison set of objects; Step 2.5, Calculation , , , ; Step 3, Query Results and Proof Generation Method: Including the query method: The user initiates a query to the cloud server. This indicates that the query satisfies the Boolean expression. The former The query results contain Boolean expressions. For conjunctive normal form (CNF), , representing matching keywords And it matches the keywords or The cloud server returns the result RES; proof of the generation method: This generates proof that the query results conform to Boolean expressions and Top-K rankings. Step 3.1: Query the number of objects in set OC[t] that match the first keyword. and put In the middle; query all sets of IO[t] that match the keywords. index object , to make him ,right Iteration will match the complete Boolean expression. object ,Will Put in For objects that match the first keyword but do not meet the complete condition. ,Will Put in ,calculate ;in This represents the set of query results that match the query conditions. This represents the set of query results that are partially matched. Proof representing the number of objects matching the first keyword. represent and Proof of matching the first keyword in the object; Step 3.2, for each index objects object This generates a mismatch object for subsequent Boolean expressions. In, for each generate Put it in In, and calculate ,in represent The collection of objects that do not match the keyword in the middle. represent Proof of the set of mismatched objects in the dataset; Step 3.3, Find Top-K matching objects in object sorting , put In the middle, other matching objects are placed In China, The object in the comparison object is generated ,represent Less than in sorting Store these comparison objects in and calculate ,in This represents the set of the top K objects whose values ​​match the complete query criteria, sorted by type. Represents the set of objects other than K. Proof of the numerical attribute sorting of the matched objects; Step 3.4: Return to the cloud server The raw data of the object , verify object ;in ; Step 4: Query result verification method: The user's query results (RES), validation object (VO), and query conditions. Validate the query only if the query result RES satisfies the Boolean expression. The system returns 1 if the top-K items in the object are verified successfully, and returns 0 otherwise if the verification fails. Step 4.1: Obtain the ADS verification data structure from the blockchain: Auxiliary verification; Step 4.2, Verification Keywords Does it match a boolean expression? Calculate the equation If correct, return 0; if incorrect, it indicates that the verification failed and ended; if correct, continue verification. Step 4.3, Verification The sum of the number of objects and whether the keyword is equal Calculate the equation If correct, return 0; if incorrect, it indicates that the verification failed and ended; if correct, continue verification. Step 4.4, Verification , Whether the objects and quantities match, i.e., whether they are correct. Each object in, There are sufficient proofs of mismatch in each, and the calculations are performed. Check if the equation is correct; if incorrect, return 0 to indicate that the verification failed and ended; if correct, continue verification. Step 4.5, Verification , , Does the object identifier match? Matching objects in middle Are they all in middle, Is it The smallest object in the equation; calculate the equation If the verification is correct, return 0 if it is incorrect, indicating that the verification has failed and the verification has ended; if it is correct, return 1, indicating that the verification has succeeded.

Citation Information

Patent Citations

  • Verifiable keyword Top-K query method based on block chain

    CN115510126A

  • Verifiable block chain indexing method supporting Boolean query and range query

    CN117131049A