Batch retrieval method based on verifiable bloom filter and electronic device
By employing a batch retrieval method based on verifiable Bloom filters, and utilizing hash and XOR operations combined with equal-duplicate codes and encryption algorithms, this method solves the problems of high computational complexity, query privacy leakage, and low efficiency in existing technologies, achieving efficient batch retrieval and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2026-03-31
AI Technical Summary
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.
A batch retrieval method based on verifiable Bloom filters is adopted, which uses hash and XOR operations, combined with equal-key codes and encryption algorithms, to achieve privacy-preserving batch retrieval through one round of OT operations. The client and server construct the same binary array length and hash function set to perform efficient batch retrieval.
It reduces the computational and communication overhead of batch retrieval, improves retrieval efficiency, protects the client's query privacy, and supports batch retrieval of multiple keywords and multiple response data.
Smart Images

Figure CN121255849B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data security technology, specifically to a batch retrieval method based on a verifiable Bloom filter, an electronic device, and a corresponding storage medium. Background Technology
[0002] Keyword-based privacy information retrieval (Keyword PIR), also known as sparse PIR, means that during Keyword PIR, the server-side database may not contain data corresponding to the keywords being retrieved; such a database is also called a "sparse database." Currently, several unintentional retrieval protocols exist in the Keyword PIR field, including unintentional keyword retrieval schemes based on public-key encryption, techniques based on Oblivious Polynomial Evaluation (OPE), techniques based on Key-Value Store (KVS) structures, and techniques based on Oblivious Pseudorandom Function (OPRF). However, these techniques still have some problems, including high computational complexity and lack of support for batch queries based on keywords. Here, "batch query" means that the client can initiate batch queries to the server, and for each query keyword, the server responds with batch data.
[0003] Existing technologies employ a solution where the data querying party constructs a Bloom filter based on its local data, the data provider constructs a verifiable Bloom filter, and an unintentional transfer protocol is used between the two. However, this approach still has the following drawbacks: it only supports queries on multiple id fields, but does not support batch queries on elements corresponding to the same keyword within a single query process; the data requesting party needs to initiate a query request using the id field first, thus exposing some query privacy (i.e., which field the querying party wants to query) to the data provider, posing a security risk; and for each query, the querying party and the data provider need to perform two rounds of unintentional transfer operations, and after completing the unintentional transfer protocol, the verifiable Bloom filter needs to be reconstructed to obtain the data intersection, resulting in query efficiency issues. Summary of the Invention
[0004] The purpose of this application is to provide a batch retrieval method and electronic device based on a verifiable Bloom filter. The retrieval process uses efficient hash and XOR operations, and only requires one round of OT operations during transmission. It also uses privacy protection technology based on equal-duplicate codes and encryption algorithms to at least solve some of the problems in the background technology.
[0005] To achieve the above objectives, this application provides a batch retrieval method based on a verifiable Bloom filter, comprising: constructing a first verifiable Bloom filter on the client side and a second verifiable Bloom filter on the server side using the same binary array length and hash function set; further comprising: converting the server dataset into key-value pair form using keywords in the server dataset as keys and data entries corresponding to the keywords as values; mapping the keywords in the key-value pair dataset to equal-keywords using an equal-keyword mapping algorithm to obtain an equal-keyword dataset; determining the storage location of the keywords in the equal-keyword dataset in the second verifiable Bloom filter; storing the data entries corresponding to the keywords in the equal-keyword dataset and the checksums generated based on the data entries in the equal-keyword dataset in the storage location; the client processing the query keyword set using the equal-keyword mapping algorithm and mapping it to the first verifiable Bloom filter using the hash function set; executing an unintentional transfer protocol using each bit of the first verifiable Bloom filter as a selection vector to obtain the server-side return result; verifying the return result based on the checksum 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 certain keyword is less than the upper limit, a specific value is used to fill the gap.
[0007] Optionally, the calculation results of the equal-weight code mapping algorithm have the same Hamming weight and codeword length.
[0008] Optionally, determining the storage location of the verifiable Bloom filter based on keywords in the equally homogeneous code dataset includes: obtaining keywords in equally homogeneous code form; performing hash calculations on the keywords in equally homogeneous code form using hash functions from 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 verifiable Bloom filter, with each hash result corresponding to one storage location.
[0009] Optionally, the checksum 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 checksum function; the checksum satisfies the following condition: XORing all hash results after excluding the hash result corresponding to the checksum function to obtain a calculation result, and the calculation result after XORing the calculation result with the checksum is the keyword in the form of identical code.
[0010] Optionally, 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 by 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.
[0011] Optionally, an unintentional transfer protocol is executed using each bit of the first verifiable Bloom filter as a selection vector to obtain a return result from the server, including: when the value of the selection vector is 1, the server returns the value of the 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.
[0012] Optionally, 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.
[0013] Optionally, the method further includes: encrypting all data before mapping it to the first verifiable Bloom filter or the second verifiable Bloom filter; correspondingly, decrypting the data before obtaining the query results.
[0014] This application also provides a batch retrieval device based on a verifiable Bloom filter. The device includes: a dataset processing module, used to convert the server dataset into key-value pair format using keywords as keys and corresponding data entries as values; mapping the keywords in the key-value pair dataset to equal-value pairs using an equal-value mapping algorithm to obtain an equal-value dataset; a filter construction module, used to determine the storage location of a second verifiable Bloom filter based on the keywords in the equal-value dataset; storing the data entries corresponding to the keywords in the equal-value dataset and a checksum generated based on the data entries in the storage location; a client processing module, used by a client to process a set of query keywords using the equal-value mapping algorithm and then map it to a first verifiable Bloom filter using a set of hash functions; and a query processing module, used to execute an unintentional transfer protocol using each bit of the first verifiable Bloom filter as a selection vector to obtain a return result from the server; verifying the return result based on the checksum in the return result to obtain the 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:
[0019] (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.
[0020] (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.
[0021] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0022] 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:
[0023] 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;
[0024] Figure 2 This illustration schematically shows a process of the client and server performing OT operations according to an embodiment of this application;
[0025] Figure 3 The 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;
[0026] 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.
[0027] Figure 5 The diagram schematically illustrates the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0028] 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.
[0029] 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:
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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:
[0037] .
[0038] 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 to a format based on equal-similarity codes:
[0039]
[0040] in, Keywords The corresponding homonymous code, For data encoding values, , .
[0041] 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.
[0042] Optionally, the equal-key mapping algorithm used in this application can be implemented in the following ways.
[0043]
[0044] 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.
[0045] In some embodiments of this application, mapping the dataset to the 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 hash result in binary form, 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 based on 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.
[0046] Specifically, the following is an example of 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:
[0047] 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.
[0048] 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.
[0049] 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... .
[0050] 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.
[0051] In step S03, the client processes the query keyword set using the equal-duplicate code 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:
[0052] 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 .
[0053] 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.
[0054] 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.
[0055] 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:
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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:
[0060] 1. Parameter and algorithm synchronization phase. This includes:
[0061] (1) The data demander and the data service provider negotiate the parameters of the homogeneous code mapping algorithm before data sharing.
[0062] (2) The length of the verifiable Bloom filter can be negotiated between the data requester and the data service provider. .
[0063] (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.
[0064] (4) The data requester and the data service provider negotiate a data encoding algorithm.
[0065] 2. Data preprocessing stage. This includes:
[0066] (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]".
[0067] (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.
[0068] (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.
[0069] 3. Online query stage. This includes:
[0070] 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.
[0071] 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.
[0072] 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 4 As 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.
[0073] 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.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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 5This 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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 search method based on a verifiable Bloom filter, comprising: The method comprises the following steps: constructing a first verifiable Bloom filter at a client side and a second verifiable Bloom filter at a server side by using the same binary array length and hash function set, wherein the method further comprises: transforming the server data set into a key-value pair form by taking the keywords in the server data set as keys and the data entries corresponding to the keywords as values, and mapping the keywords in the key-value pair form to equal-weight codes by using an equal-weight code mapping algorithm to obtain an equal-weight code data set; determining the storage positions of the second verifiable Bloom filter according to the keywords in the equal-weight code data set, which comprises the following steps: obtaining the keywords in the equal-weight code form; performing hash calculation on the keywords in the equal-weight code form by using the hash functions in the hash function set to obtain hash results in binary form, wherein each hash function corresponds to a hash result; and mapping the hash results to the storage positions of the second verifiable Bloom filter, wherein each hash result corresponds to a storage position; generating a check code based on the data entries, which comprises the following steps: taking one hash function in the hash function set as a check function; the check code satisfies the following condition: performing exclusive OR calculation on all hash results except the hash result corresponding to the check function to obtain a calculation result, and the calculation result obtained by performing exclusive OR calculation on the check code and the calculation result is the keyword in the equal-weight code form; 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 position, which comprises the following steps: storing the check code generated based on the data entry into the storage position 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 positions in the storage position; processing the query keyword set by using the equal-weight code mapping algorithm and mapping the processed query keyword set to the first verifiable Bloom filter by using the hash function set; performing an oblivious transfer protocol by taking each bit of the first verifiable Bloom filter as a selection vector to obtain a return result of the server side, and obtaining a query result by verifying the return result based on the check code in the return result.
2. The method of claim 1, wherein, 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.
3. The method of claim 1, wherein, The calculation result of the equal-weight code mapping algorithm has the same Hamming weight and code word length.
4. The method of claim 1, wherein, performing an oblivious transfer protocol by taking each bit of the first verifiable Bloom filter as a selection vector to obtain a return result of the server side, which comprises the following steps: when the value of the selection vector is 1, the server side returns the value of the second verifiable Bloom filter at the position corresponding to the selection vector; when the value of the selection vector is 0, the server side returns a random value.
5. The method of claim 4, wherein, verifying the return result based on the check code in the return result to obtain a query result, which comprises the following steps: if the values in the return result are all random values, it is determined that the query result is not retrieved. If the return result includes a non-random value, determine whether the XOR calculation result of the hash value and the check code corresponding to the return result is equal to the keyword in the form of the equal-weight code; If the XOR calculation result of the hash value and the check code corresponding to the return result is not equal to the keyword in the form of the equal-weight code, determine that the query result is a query process error; If the XOR calculation result of the hash value and the check code corresponding to the return result is equal to the keyword in the form of the equal-weight code, determine that the query result is a correct query process.
6. The method of claim 1, wherein, The method further comprises: performing an encryption operation before all data is mapped to the first verifiable Bloom filter or the second verifiable Bloom filter; Correspondingly, a decryption operation is performed before the query result is obtained.
7. An electronic device, comprising: Comprise: At least one processor; Memory connected with 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 steps of the batch retrieval method based on the verifiable Bloom filter according to any one of claims 1 to 6 by executing the instructions stored in the memory.
8. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the batch retrieval method based on the verifiable Bloom filter according to any one of claims 1 to 6.
9. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the batch retrieval method based on the verifiable Bloom filter according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data retrieval method, equipment and device and computer readable storage medium
CN118797695A
Fragmented storage and query optimization method and system for high-concurrency database
CN120492489A