Batch retrieval method based on verifiable bloom filter and electronic equipment

By employing a batch retrieval method based on verifiable Bloom filters, and using efficient hash and XOR operations combined with equal-duplicate codes and encryption algorithms, this method solves the problems of high computational complexity, lack of support for batch queries, and privacy leakage in existing technologies, and achieves efficient and privacy-preserving batch retrieval of multiple keywords.

CN121255849AActive Publication Date: 2026-01-02BEIJING TOPSEC NETWORK SECURITY TECH +2

Patent Information

Application Number
CN202511228744.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-01-02
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational complexity, lack of support for batch queries, leakage of query privacy, and low query efficiency in keyword retrieval, especially when performing batch searches in sparse databases.

Method used

A batch retrieval method based on verifiable Bloom filters is adopted, which uses efficient hash and XOR operations, combined with equal-duplicate codes and encryption algorithms, to achieve privacy-preserving batch retrieval through one round of OT operations.

Benefits of technology

It reduces the computational and communication overhead of batch retrieval, improves retrieval efficiency, protects query privacy, and supports batch retrieval of multiple keywords.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255849A_ABST
    Figure CN121255849A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a batch retrieval method based on a verifiable bloom filter and electronic equipment, and relates to the technical field of data security. The method comprises the following steps: converting a server data set into a key value pair form, and mapping keywords in the data set in the key value pair form into equal repeated codes through an equal repeated code mapping algorithm to obtain an equal repeated code data set; determining a storage position of a second verifiable bloom filter according to a keyword in the equal-repetition-code data set, and storing a data entry corresponding to the keyword in the equal-repetition-code data set and a check code generated based on the data entry to the storage position; the client receives the query keyword set and maps the query keyword set to the first verifiable Bloom filter; and taking each bit of the first verifiable Bloom filter as a selection vector to execute an oblivious transmission protocol to obtain a return result of the server side. The embodiment provided by the invention provides a safe and efficient batch retrieval method based on the verifiable Bloom filter.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data security, in particular to a batch retrieval method based on a verifiable Bloom filter, an electronic device and a corresponding storage medium. BACKGROUND

[0002] Keyword-based private information retrieval (Keyword PIR) is also known as sparse PIR, that is, in the Keyword PIR process, there may be no data corresponding to the keyword to be retrieved in the database on the server side, and such a database is also called a "sparse database". At present, in the field of Keyword PIR, there are some oblivious retrieval protocols, including an oblivious keyword retrieval scheme based on public key encryption, a technical solution based on oblivious polynomial evaluation (OPE), a technical route based on a key-value store (KVS) structure, a technical route based on an oblivious pseudorandom function (OPRF), etc. However, these technical routes still have some problems, including high computational complexity and not supporting keyword-based batch queries. The "batch query" here refers to that the client can initiate a batch query to the server, and for each query keyword, the server responds with batch data.

[0003] There is already a technical solution in the prior art that uses a Bloom filter constructed by the data query party according to its own local data, constructs a verifiable Bloom filter on the data provider side, and uses an oblivious transmission protocol between the two. However, it still has the following problems: only supports multi-id field queries, but does not support batch query operations for elements corresponding to the same keyword in a single query process; the data demand party needs to initiate a query request using the id field, which leaks part of the query privacy to the data provider (i.e., which field the query party wants to query), which has a security problem; and each query requires two rounds of oblivious transmission operations between the query party and the data provider, and after the oblivious transmission protocol is executed, the verifiable Bloom filter needs to be reconstructed in order to obtain the data intersection, which has a query efficiency problem. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a batch retrieval method based on a verifiable Bloom filter and an electronic device, which uses efficient hash operations and XOR operations in the retrieval process, only needs to perform 1 round of OT operations in the transmission process, and is based on the privacy protection technology of equal weight code and encryption algorithm, to at least solve some of the problems in the background art.

[0005] To achieve the above object, a batch retrieval method based on a verifiable Bloom filter is provided in the present application, comprising: adopting the same binary array length and hash function set, constructing a first verifiable Bloom filter at the client side and constructing a second verifiable Bloom filter at the server side, the method further comprising: taking the keywords in the server data set as keys and the data entries corresponding to the keywords as values, converting the server data set into a key-value pair form, mapping the keywords in the data set in the key-value pair form into equal weight codes through an equal weight code mapping algorithm to obtain an equal weight code data set; determining the storage location of the second verifiable Bloom filter according to the keywords in the equal weight code data set, storing the data entries corresponding to the keywords in the equal weight code data set and the check codes generated based on the data entries into the storage location; processing the query keyword set through the equal weight code mapping algorithm and then mapping the query keyword set into the first verifiable Bloom filter through the hash function set at the client side; taking each bit of the first verifiable Bloom filter as a selection vector to execute an oblivious transfer protocol to obtain the return result of the server side, verifying the return result based on the check codes in the return result to obtain the query result.

[0006] Optionally, the number of data entries corresponding to each keyword has an upper limit, and the number of hash functions in the hash function set is determined according to the upper limit; when the number of data entries corresponding to a keyword is less than the upper limit, a specific value is used for padding.

[0007] Optionally, the calculation result of the equal weight code mapping algorithm has the same Hamming weight and code word length.

[0008] Optionally, determining the storage location of the verifiable Bloom filter according to the keywords in the equal weight code data set comprises: obtaining the keywords in the form of equal weight codes; performing hash calculation on the keywords in the form of equal weight codes through the hash functions in the hash function set to obtain hash results in binary form, each hash function corresponding to a hash result; and mapping the hash results to the storage locations of the verifiable Bloom filter, each hash result corresponding to a storage location.

[0009] Optionally, the check code generated based on the data entry is generated through the following steps: taking one hash function in the hash function set as a check function; the check code satisfies the following condition: performing XOR calculation on all hash results excluding the hash result corresponding to the check function to obtain a calculation result, and the calculation result obtained by performing XOR calculation on the check code and the calculation result is the keyword in the form of equal weight codes.

[0010] Optionally, storing the data entry corresponding to the keyword in the equal-weight code data set and the check code generated based on the data entry into the storage location comprises: storing the check code generated based on the data entry into the storage location determined based on the check function; and storing the data entry corresponding to the keyword in the equal-weight code data set into the remaining storage locations in the storage location.

[0011] Optionally, executing the oblivious transfer protocol with each bit of the first verifiable Bloom filter as a selection vector to obtain a return result of the server side comprises: when the value of the selection vector is 1, the server side returns the value of the verifiable Bloom filter at the position corresponding to the selection vector; and when the value of the selection vector is 0, the server side returns a random value.

[0012] Optionally, obtaining a query result after verifying the return result based on the check code in the return result comprises: if all the values in the return result are random values, determining that the query result is that no data is retrieved; if the return result includes a non-random value, judging whether the exclusive or calculation result of the hash value and the check code corresponding to the return result is equal to the keyword in the equal-weight code form; if the exclusive or calculation result of the hash value and the check code corresponding to the return result is not equal to the keyword in the equal-weight code form, determining that the query result is that the query process is incorrect; and if the exclusive or calculation result of the hash value and the check code corresponding to the return result is equal to the keyword in the equal-weight code form, determining that the query result is that the query process is correct.

[0013] Optionally, the method further comprises: performing an encryption operation before all the data is mapped to the first verifiable Bloom filter or the second verifiable Bloom filter; and correspondingly, performing a decryption operation before the query result is obtained.

[0014] In the present application, a batch retrieval device based on a verifiable Bloom filter is also provided, which comprises: a data set processing module, configured to take a keyword in a server data set as a key and a data entry corresponding to the keyword as a value, convert the server data set into a key-value pair form, and map the keyword in the key-value pair form of the data set into an equal-weight code through an equal-weight code mapping algorithm to obtain an equal-weight code data set; a filter construction module, configured to determine a storage location of a second verifiable Bloom filter according to the keyword in the equal-weight code data set, and store the data entry corresponding to the keyword in the equal-weight code data set and a check code generated based on the data entry into the storage location; a client processing module, configured to process a query keyword set through the equal-weight code mapping algorithm and map the query keyword set to a first verifiable Bloom filter through a hash function set; and a query processing module, configured to execute an oblivious transfer protocol with each bit of the first verifiable Bloom filter as a selection vector to obtain a return result of the server side, and verify the return result based on a check code in the return result to obtain a query result.

[0015] This application also provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the aforementioned batch retrieval method based on a verifiable Bloom filter by executing the instructions stored in the memory.

[0016] This application also provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the aforementioned batch retrieval method based on a verifiable Bloom filter.

[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned batch retrieval method based on a verifiable Bloom filter.

[0018] The above technical solution has the following beneficial effects: (1) During the retrieval process, efficient hash and XOR operations are used. Data encryption and decryption operations are only required when storing ciphertext data in the verifiable Bloom filter, thereby solving the problem of large computational overhead during batch retrieval. During batch retrieval, both parties only need to perform one round of OT operations, thereby reducing the communication overhead during batch retrieval.

[0019] (2) The client maps multiple query keywords to a verifiable Bloom filter and uses each bit stored in the verifiable Bloom filter as a selection bit. When the selection bit is 1, multiple data are obtained from the verifiable Bloom filter on the server as the retrieval response result, thereby solving the problem of batch retrieval based on keywords and improving retrieval efficiency.

[0020] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description

[0021] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 This illustration schematically shows the steps of a batch retrieval method based on a verifiable Bloom filter according to an embodiment of this application; Figure 2 This illustration schematically shows a process of the client and server performing OT operations according to an embodiment of this application; Figure 3The illustration shows a schematic diagram of the implementation process of the batch retrieval method based on a verifiable Bloom filter according to the embodiments of this application; Figure 4 This schematic diagram illustrates the structure of a batch retrieval device based on a verifiable Bloom filter according to an embodiment of this application. Figure 5 The diagram schematically illustrates the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0022] The specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the embodiments of this application.

[0023] Figure 1 The illustration schematically depicts the steps of a batch retrieval method based on a verifiable Bloom filter according to an embodiment of this application. For example... Figure 1 As shown, a batch retrieval method based on verifiable Bloom filters uses the same binary array length and hash function set. A first verifiable Bloom filter is constructed on the client side, and a second verifiable Bloom filter is constructed on the server side. The first and second filters are used to distinguish verifiable Bloom filters at different locations. The method also includes: S01. Using keywords in the server dataset as keys and data entries corresponding to keywords as values, the server dataset is converted into key-value pair format. Keywords in the key-value pair dataset are mapped to equal-value codes using an equal-value code mapping algorithm to obtain an equal-value code dataset. S02. Determine the storage location of the second verifiable Bloom filter based on the keywords in the equal-keyword dataset, and store the data entry corresponding to the keyword in the equal-keyword dataset and the check code generated based on the data entry in the storage location. S03. After the client processes the set of query keywords using the equal-key mapping algorithm, it maps the set of hash functions to the first verifiable Bloom filter. S04. Using each bit of the first verifiable Bloom filter as the selection vector, execute the unintentional transmission protocol to obtain the return result from the server. After verifying the return result based on the checksum in the return result, obtain the query result.

[0024] This involves using the same binary array length and set of hash functions, including: the client and server negotiating the verifiable binary array length based on the size of the server's dataset, which in turn verifies the length of the Bloom filter. This is to avoid hash collisions during data mapping. Client and server synchronization is also required. An ideal hash function , among which the former hash functions Used to map the identical codes corresponding to keywords on the server side to a verifiable Bloom filter, the first hash functions Used to calculate the location where validation data is stored on the verifiable Bloom filter.

[0025] Through the above implementation methods, privacy protection technology based on equal-keyword and encryption algorithms hides the true query request using equal-keyword encryption. Even if an external adversary obtains the equal-keyword encryption, it is difficult to deduce the true query intent, thus protecting the client's query privacy. The verification method in this implementation is also designed based on the Bloom filter mechanism. The verification code is generated using intermediate data from the Bloom filter, and the storage of the verification code adopts the Bloom filter's position mapping method. The verification code can be obtained simultaneously during data querying, improving verification efficiency. Furthermore, based on verifiable Bloom filters and unintended transmission batch retrieval technology, equal-keyword, verifiable Bloom filters, and unintended transmission technology enable batch retrieval of multi-keyword and multi-response data, improving retrieval efficiency.

[0026] In some embodiments of this application, the number of data entries corresponding to each keyword has an upper limit, and the number of hash functions in the hash function set is determined according to the upper limit; when the number of data entries corresponding to a keyword is less than the upper limit, a specific value is used to fill the gap. Assume the number of keywords in the server dataset is M. First, the local dataset is converted into key-value pairs, with each keyword ( The corresponding data entries are at most 100. If there are insufficient data entries for a certain keyword The missing values ​​are padded with 0 or null. The transformed dataset is denoted as: .

[0027] Correspondingly, step S01, mapping the keywords in the key-value pair dataset to equal-keyword mapping algorithms to obtain equal-keyword datasets, includes: mapping all keywords to equal-keyword mapping algorithms. These keywords may be of equal or unequal length, therefore, normalization processing is required to facilitate client-side verification of search results during keyword retrieval. Simultaneously, a data encoding algorithm is used to encode the data elements corresponding to each keyword, and the output of this data encoding algorithm is... The encoded value is of length 1 bit. Therefore, the dataset can be... Further conversion into a format based on equal-similarity codes:

[0028] in, Keywords The corresponding homonymous code, For data encoding values, , .

[0029] In some embodiments of this application, the calculation results of the equal-similarity code mapping algorithm have the same Hamming weight and codeword length. In previous work, the client and server synchronized equal-similarity codes. Corresponding Hamming weight Encoding length of homogeneous codes And specific algorithms for mapping identical codes.

[0030] Optionally, the equal-key mapping algorithm used in this application can be implemented in the following ways.

[0031]

[0032] in, The hash algorithm can be one of the hash functions mentioned above. It can be one of the hash algorithms, or it can be other different hash algorithms.

[0033] In some embodiments of this application, mapping a dataset to a second verifiable Bloom filter on the server side may include steps such as location calculation, checksum generation, and data mapping. In some embodiments, this includes: determining the storage location in the second verifiable Bloom filter based on keywords in the equally homonymous dataset, including: obtaining keywords in equally homonymous form; performing hash calculations on the keywords in equally homonymous form using hash functions from the hash function set to obtain a binary hash result, with each hash function corresponding to one hash result; mapping the hash result to the storage location of the verifiable Bloom filter, with each hash result corresponding to one storage location. One hash function from the hash function set is used as a checksum; the checksum satisfies the following condition: XORing all hash results excluding the hash result corresponding to the checksum with the checksum yields a result, and the result of XORing the result with the checksum is the keyword in equally homonymous form. The checksum generated based on the data entry is stored in the storage location determined by the checksum function; the data entry corresponding to the keyword in the equally homonymous dataset is stored in the remaining storage locations within the specified storage location.

[0034] Specifically, the following example illustrates how the server maps a dataset to a verifiable Bloom filter. Here, we'll use a specific equal-duplicate code from the server as an example. corresponding Taking the mapping of individual data elements to a verifiable Bloom filter as an example, the construction method of the verifiable Bloom filter used in this application is as follows: 1. Use and hash function The calculation is performed, and the resulting hash value is denoted as... , will be duplicate codes Mapped to a verifiable Bloom filter Each position, then the encoded data This is stored in the verifiable Bloom filter. In each position.

[0035] Optionally, to enhance data security, the data can also be... The corresponding encryption result is stored on a verifiable Bloom filter. When storing the encrypted result of data, this application does not limit the specific encryption method, as long as the client can correctly decrypt the encrypted data upon receiving it.

[0036] 2. Use and hash function Calculations were performed to obtain The corresponding first verifiable Bloom filter At each of the following positions, a binary string is stored. This is used to verify the search results; the binary string satisfies... .

[0037] Repeat the above steps to map the server-side dataset to the verifiable Bloom filter. For locations on the verifiable Bloom filter that are not mapped, use... Fill with random values ​​of a certain length. The resulting verifiable Bloom filter is denoted as... .use This indicates that the verifiable Bloom filter is on the first Data stored in each location.

[0038] In step S03, the client processes the query keyword set using the equal-key mapping algorithm, and then maps it to the first verifiable Bloom filter using the hash function set. This is implemented, exemplarily, through the following steps: The client preprocesses the query keywords. Assume the client's query keyword set is... The preprocessing procedure for query keywords is as follows: 1. Use the same homogeneous code mapping algorithm as the server side to map the query keyword set. Mapped to a set of duplicate codes for querying .

[0039] 2. Use pre-negotiation hash functions Query the set of homophones Mapped onto a Bloom filter, we get . It is a binary vector composed of 0s and 1s, with the same length. .use This indicates the first [item] on the Bloom filter. The binary number (0 or 1) in each position.

[0040] In some embodiments of this application, an oblivious transfer protocol is executed using each bit of the first verifiable Bloom filter as the selection vector to obtain the server's return result. This includes: when the value of the selection vector is 1, the server returns the value of the second verifiable Bloom filter at the corresponding position of the selection vector; when the value of the selection vector is 0, the server returns a random value. Specifically, during the online query phase, the client and server perform an oblivious transfer (OT) operation. Figure 2 This illustration schematically depicts the process of a client and server performing an OT operation according to an embodiment of this application, such as... Figure 2 As shown, the server-side input is a verifiable Bloom filter. and a containing indivual Dataset of random numbers with a length of 1 byte The client's input is a verifiable Bloom filter. This application does not specify the particular OT protocol to be used; a suitable two-party OT protocol can be adopted according to the requirements of the specific scenario. The client and server execute... The OT protocol is a choice between two options. At that time, the client obtains ,when At that time, the server returned A random value of bit length.

[0041] In some embodiments of this application, after verifying the returned result based on the checksum in the returned result, a query result is obtained, including: if all values ​​in the returned result are random values, the query result is determined to be not found; if the returned result includes non-random values, it is determined whether the XOR calculation result of the hash value and checksum corresponding to the returned result is equal to the keyword in the form of identical codes; if the XOR calculation result of the hash value and checksum corresponding to the returned result is not equal to the keyword in the form of identical codes, the query result is determined to be an error in the query process; if the XOR calculation result of the hash value and checksum corresponding to the returned result is equal to the keyword in the form of identical codes, the query result is determined to be an error in the query process. Specifically, for each query identical code... Received After processing a number of data points, the following judgment is made: 1. If All data points are random values, indicating that the data to be retrieved does not exist in the database on the server side.

[0042] 2. If None of the data points are random values ​​and the first... The data is not all 0 and the first... If the value is not zero, it indicates that the data to be retrieved exists in the database on the server side. In this case, the client uses a hash function. Before calculation The hash value of the first data item. For the first... 1 data point, calculate its comparison with the previous one. The result of the XOR operation on the hash values ​​is verified to determine if the result is equal to the original hash value. If they are equal, it indicates that the query process was correct.

[0043] In some alternative implementations, the method further includes: encrypting all data before mapping it to a verifiable Bloom filter; and correspondingly, decrypting the data before obtaining the query results. For example, the data can be... The corresponding encrypted results are stored on a verifiable Bloom filter. If encrypted storage is used, and the query process is error-free, the client uses the corresponding decryption method to decrypt the encrypted data to obtain the final query result. This application does not limit the specific encryption method, as long as it satisfies the requirement that the client can correctly decrypt the encrypted data upon receiving it.

[0044] Figure 3 The illustration schematically depicts an implementation process of a batch retrieval method based on a verifiable Bloom filter according to an embodiment of this application. For example... Figure 3 As shown, this application can be applied to the field of data security, for example, in the following scenario: When sharing data among multiple organizations or countries, privacy protection is a critical issue. The technical solution described in this application enables participating parties to jointly perform query operations without disclosing the specific content of their respective data, promoting the on-demand and effective sharing and utilization of cross-domain data. In this cross-domain data sharing scenario, data requesters and data service providers are involved. The data requester corresponds to the client in this solution, i.e., the queryer. The data service provider corresponds to the server in this solution, and the specific application method is as follows: 1. Parameter and algorithm synchronization phase. This includes: (1) The data demander and the data service provider negotiate the parameters of the homogeneous code mapping algorithm before data sharing.

[0045] (2) The length of the verifiable Bloom filter can be negotiated between the data requester and the data service provider. .

[0046] (3) The data requester and the data service provider shall negotiate the hash functions to be used, including the number of hash functions and the specific hash algorithm.

[0047] (4) The data requester and the data service provider negotiate a data encoding algorithm.

[0048] 2. Data preprocessing stage. This includes: (1) The data service provider preprocesses the dataset stored in its database locally and finally organizes the dataset into the form of "[equal code, the set of encoded data corresponding to the equal code]".

[0049] (2) The data service provider uses the equal-key codes in the dataset as key values, and combines several hash algorithms negotiated during the parameter and algorithm synchronization phase to map the data encoding value or data encryption result corresponding to each equal-key code in the dataset to the verifiable Bloom filter in turn, and finally obtains a verifiable Bloom filter with verification data.

[0050] (3) The data requester maps each keyword in the keyword set to an equal code according to the same equal code mapping algorithm and corresponding parameters as the data service provider. Then, using several hash algorithms consistent with the data service provider, the equal codes corresponding to the keywords are mapped sequentially to the verifiable Bloom filter to obtain a binary vector.

[0051] 3. Online query stage. This includes: Data demanders and data service providers execution In each 2-out-of-1 OT (On-the-Go) operation, the data requester uses a binary element from a verifiable Bloom filter (binary vector) as the selection vector to choose the data they need from the data service provider's verifiable Bloom filter. They then use the obtained verification data to verify whether there are any errors in the data sharing process. If the data sharing process is error-free, and the data requested by the data requester is in encrypted form, the data requester uses the appropriate decryption method to decrypt the encrypted data, thereby obtaining the data shared by the data service provider as needed.

[0052] By using the above methods, we can achieve the goal of protecting both client-side query privacy and server-side data privacy with relatively low computational overhead, and support efficient querying by choosing a two-party OT method with lower communication overhead, or an OTE (Occurrence-Free Transfer Extension) method.

[0053] Based on the same inventive concept, this application also provides a batch retrieval device based on a verifiable Bloom filter. Figure 4 A schematic diagram illustrating the structure of a batch retrieval device based on a verifiable Bloom filter according to an embodiment of this application is shown. Figure 4As shown, the device includes: a dataset processing module, used to convert the server dataset into key-value pair format using keywords in the server dataset as keys and data entries corresponding to the keywords as values, and to map the keywords in the key-value pair dataset into equal-keywords using an equal-keyword mapping algorithm to obtain an equal-keyword dataset; a filter construction module, used to determine the storage location of a second verifiable Bloom filter based on the keywords in the equal-keyword dataset, and to store the data entries corresponding to the keywords in the equal-keyword dataset and the checksums generated based on the data entries in the storage location; a client processing module, used by the client to process the query keyword set using the equal-keyword mapping algorithm and then map it to a first verifiable Bloom filter using the hash function set; and a query processing module, used to execute an unintentional transmission protocol using each bit of the first verifiable Bloom filter as a selection vector to obtain the server's return result, and to verify the return result based on the checksum in the return result to obtain the query result.

[0054] In some optional embodiments of this application, the number of data entries corresponding to each keyword has an upper limit, and the number of hash functions in the hash function set is determined according to the upper limit; when the number of data entries corresponding to a certain keyword is less than the upper limit, a specific value is used to fill the gap.

[0055] In some optional embodiments of this application, the calculation results of the equal-weight code mapping algorithm have the same Hamming weight and codeword length.

[0056] In some optional embodiments of this application, determining the storage location of the second verifiable Bloom filter based on keywords in the homogeneous code dataset includes: obtaining keywords in homogeneous code form; performing hash calculations on the keywords in homogeneous code form using hash functions in the hash function set to obtain hash results in binary form, with each hash function corresponding to one hash result; and mapping the hash results to the storage location of the second verifiable Bloom filter, with each hash result corresponding to one storage location.

[0057] In some optional embodiments of this application, the check code generated based on the data entry is generated through the following steps: using one of the hash functions in the set of hash functions as the check function; the check code satisfies the following condition: XORing all hash results after excluding the hash results corresponding to the check function to obtain a calculation result, and the calculation result after XORing the calculation result with the check code is the keyword in the form of identical code.

[0058] In some optional embodiments of this application, storing the data entry corresponding to the keyword in the identical code dataset and the check code generated based on the data entry to the storage location includes: storing the check code generated based on the data entry to the storage location determined based on the check function; and storing the data entry corresponding to the keyword in the identical code dataset to the remaining storage locations in the storage location.

[0059] In some optional embodiments of this application, an unintentional transfer protocol is executed using each bit of the first verifiable Bloom filter as the selection vector to obtain the return result from the server, including: when the value of the selection vector is 1, the server returns the value of the second verifiable Bloom filter at the corresponding position of the selection vector; when the value of the selection vector is 0, the server returns a random value.

[0060] In some optional embodiments of this application, after verifying the returned result based on the checksum in the returned result, the query result is obtained, including: if all values ​​in the returned result are random values, the query result is determined to be not found; if the returned result includes non-random values, it is determined whether the XOR calculation result of the hash value and checksum corresponding to the returned result is equal to the keyword in the form of identical codes; if the XOR calculation result of the hash value and checksum corresponding to the returned result is not equal to the keyword in the form of identical codes, the query result is determined to be an error in the query process; if the XOR calculation result of the hash value and checksum corresponding to the returned result is equal to the keyword in the form of identical codes, the query result is determined to be an error in the query process.

[0061] In some optional embodiments of this application, the apparatus further includes an encryption / decryption module for encrypting all data before it is mapped to the first verifiable Bloom filter or the second verifiable Bloom filter; correspondingly, for decryption before obtaining the query result.

[0062] The specific limitations of each functional module in the aforementioned batch retrieval device based on verifiable Bloom filters can be found in the limitations of the batch retrieval method based on verifiable Bloom filters described above, and will not be repeated here. Each module in the above system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module. It also achieves the advantages of low computational overhead, high privacy efficiency, and batch retrieval.

[0063] In some embodiments of this application, an electronic device is also provided, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which executes the aforementioned batch retrieval method based on a verifiable Bloom filter. Its internal structure diagram can be shown as follows. Figure 5 As shown. Figure 5 This schematic diagram illustrates the internal structure of an electronic device according to an embodiment of this application. The electronic device includes a processor A01, a network interface A02, a memory (not shown), and a database (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02, and a database (not shown). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A04. The network interface A02 is used for communication with external terminals via a network connection. When the computer program B02 is executed by the processor A01, it implements a batch retrieval method based on a verifiable Bloom filter.

[0064] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0065] In one embodiment provided in this application, a machine-readable storage medium is provided, on which instructions are stored, which, when executed by a processor, cause the processor to be configured to perform the aforementioned batch retrieval method based on a verifiable Bloom filter.

[0066] In one embodiment provided in this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the aforementioned batch retrieval method based on a verifiable Bloom filter.

[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0068] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0071] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0072] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0073] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0074] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0075] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A batch retrieval method based on a verifiable Bloom filter, comprising: Using the same binary array length and set of hash functions, a first verifiable Bloom filter is constructed on the client side, and a second verifiable Bloom filter is constructed on the server side. The method is characterized by further comprising: Using keywords in the server dataset as keys and data entries corresponding to the keywords as values, the server dataset is converted into key-value pair format. The keywords in the key-value pair format dataset are then mapped to equal-key codes using an equal-key mapping algorithm to obtain an equal-key dataset. Based on the keywords in the equal-keyword dataset, determine the storage location in the second verifiable Bloom filter, and store the data entry corresponding to the keyword in the equal-keyword dataset and the check code generated based on the data entry in the storage location; After the client processes the set of query keywords using the equal-key mapping algorithm, it maps the set of hash functions to the first verifiable Bloom filter. Using each bit of the first verifiable Bloom filter as a selection vector, an unintentional transfer protocol is executed to obtain the server's return result. After verifying the return result based on the checksum in the return result, the query result is obtained.

2. The method according to claim 1, characterized in that, The number of data entries corresponding to each keyword has an upper limit, and the number of hash functions in the hash function set is determined according to the upper limit. When the number of data entries corresponding to a certain keyword is less than the maximum number, a specific value is used to fill the gap.

3. The method according to claim 1, characterized in that, The calculation results of the equal-weight code mapping algorithm have the same Hamming weight and codeword length.

4. The method according to claim 1, characterized in that, Determining the storage location of the second verifiable Bloom filter based on keywords in the equally homogeneous code dataset includes: Retrieve keywords with identical code forms; The hash functions in the set of hash functions are used to perform hash calculations on the keywords with the same code form to obtain a hash result in binary form, with each hash function corresponding to a hash result; The hash results are mapped to the storage locations of the second verifiable Bloom filter, with each hash result corresponding to a storage location.

5. The method according to claim 4, characterized in that, The checksum generated based on the data entry is generated through the following steps: Use one of the hash functions in the set of hash functions as the verification function; The verification code satisfies the following conditions: The hash results, excluding those corresponding to the verification function, are XORed to obtain the calculation result. The result of XORing the calculation result with the verification code is the keyword in the form of the same code.

6. The method according to claim 5, characterized in that, Storing the data entry corresponding to the keyword in the identical code dataset and the check code generated based on the data entry to the storage location includes: The checksum generated based on the data entry is stored in the storage location determined by the checksum function; Store the data entry corresponding to the keyword in the equal-keyword dataset to the remaining storage locations in the storage location.

7. The method according to claim 1, characterized in that, Using each bit of the first verifiable Bloom filter as the selection vector, an unintentional transport protocol is executed to obtain the server-side return result, including: When the value of the selection vector is 1, the server returns the value of the second verifiable Bloom filter at the corresponding position of the selection vector; When the value of the selection vector is 0, the server returns a random value.

8. The method according to claim 7, characterized in that, After verifying the returned result based on the checksum in the returned result, the query result is obtained, including: If all the values ​​in the returned results are random values, the query result is determined to be "not found". If the returned result includes a non-random value, determine whether the XOR calculation result of the hash value and the check code corresponding to the returned result is equal to the keyword in the form of a homonym; If the XOR calculation result of the hash value and check code corresponding to the returned result is not equal to the keyword in the same code form, the query result is determined to be an error in the query process; If the XOR calculation result of the hash value and checksum corresponding to the returned result is equal to the keyword in the form of a homonym, then the query result is determined to be correct in the query process.

9. The method according to claim 1, characterized in that, The method further includes: encrypting all data before mapping it to the first verifiable Bloom filter or the second verifiable Bloom filter; Correspondingly, a decryption operation is performed before the query results are obtained.

10. An electronic device, characterized in that, include: At least one processor; A memory connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the steps of the batch retrieval method based on a verifiable Bloom filter as described in any one of claims 1 to 9 by executing the instructions stored in the memory.

11. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When executed by a processor, the computer program / instruction implements the steps of the batch retrieval method based on a verifiable Bloom filter as described in any one of claims 1 to 9.

12. A computer program product comprising a computer program / instructions, characterized in that, When executed by a processor, the computer program / instruction implements the steps of the batch retrieval method based on a verifiable Bloom filter as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Privacy information retrieval method and computer readable storage medium

    CN117056961A

  • Verifiable space keyword query method and device supporting privacy protection

    CN117932125A

  • Method and device for safely retrieving key words in secret state space based on exclusive-or filter

    CN117972795A

  • Data retrieval method, equipment and device and computer readable storage medium

    CN118797695A

  • Privacy information retrieval system and method based on block chain and function secret sharing

    CN120429305A

Cited By

  • Quantum key-based searchable encrypted document management method and device, and medium

    CN121456916A