Batch privacy information retrieval method and device

By combining Cuckoo Hash, weighted code encoding, and SIMD technology with homomorphic encryption, the batch privacy information retrieval method was optimized, solving the problem of excessive computation and communication overhead and achieving efficient privacy-protected query.

WO2024239204A1PCT designated stage expired Publication Date: 2024-11-28ZHEJIANG UNIV

Patent Information

Application Number
PCT/CN2023/095566
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

Existing privacy information retrieval methods incur excessive computational and communication overhead when processing multiple queries, and existing solutions fail to fully utilize the characteristics of homomorphic encryption, resulting in low practicality.

Method used

By combining cuckoo hashing and weighted code encoding, and utilizing SIMD technology in homomorphic encryption, the query algorithm is optimized, reducing computational and communication overhead.

Benefits of technology

It significantly reduces computational and communication overhead, improves query efficiency, and is suitable for real-world scenarios, especially privacy-sensitive scenarios such as medical databases, reducing query time and communication volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023095566_28112024_PF_FP_ABST
    Figure CN2023095566_28112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a batch privacy information retrieval method and device. The method comprises: a client and a server agreeing on hash functions, performing calculation on serial number indexes in an original database by means of cuckoo hash technology, keeping a result of each serial number index for each hash function, and obtaining a first hash bucket containing a plurality of baskets; the client filling a second hash bucket having the same length as the first hash bucket with a batch query index by means of a cuckoo hash algorithm, and encoding a filling result in a constant weight code encoding mode; the client encrypting an obtained encoding result by using homomorphic encryption technology to serve as a batch query request; the server comparing the batch query request with the first hash bucket by using the homomorphic encryption technology to obtain a corresponding intermediate result, and performing corresponding calculation on the intermediate result and the original database to obtain a corresponding query result ciphertext; and the client decrypting the query result ciphertext so as to obtain query results of the batch query request.
Need to check novelty before this filing date? Find Prior Art

Description

Batch privacy information retrieval method and device Technical Field

[0001] The present invention belongs to the field of cryptography applications, and in particular relates to a batch privacy information retrieval method and device. Background Art

[0002] The rapid development of Internet technology has made cloud services mainstream. Large service providers use databases installed on cloud servers to provide services to clients. Clients obtain information by accessing cloud servers. However, this efficient service model carries the risk of privacy leakage. The server can know the specific content that the client wants to access, which is unacceptable in many privacy-sensitive scenarios, such as medical databases. Information retrieval methods based on privacy protection can avoid this security issue.

[0003] Traditional privacy-preserving information retrieval methods can only process one query at a time. When users have multiple requests simultaneously, repeatedly running a single-word private information retrieval method cannot achieve higher efficiency, as it involves numerous redundant steps. Using a batch private information retrieval protocol, the amortized computational overhead is much lower than that of a single-word private information query method. However, previous batch private information retrieval methods, such as SealPIR proposed by Hao Chen et al., which first combined cuckoo hashing technology with batch queries, introduced additional communication overhead while reducing the amortized computational overhead due to its use of common encoding properties. RA Mahdavi et al. first proposed applying fixed-weight code encoding to private information retrieval schemes, but they did not consider batch retrieval scenarios, and their implementation did not fully utilize the characteristics of homomorphic encryption, resulting in computational efficiency that cannot be applied in practical scenarios.

[0004] Summary of the Invention

[0005] The purpose of the embodiments of the present application is to provide a batch privacy information retrieval method and device to solve the technical problems of high computational and communication overhead and low practicality existing in related technologies. By combining fixed-weight code technology and cuckoo hashing technology and optimizing the computing characteristics of homomorphic encryption, it can simultaneously save communication amortized overhead and computation amortized overhead, have better performance, and be better applicable to actual scenarios.

[0006] According to a first aspect of an embodiment of the present application, a method for retrieving batch private information is provided, comprising:

[0007] The client and the server agree on a hash function to be used in the cuckoo hashing technique, calculate the serial number index in the original database using the cuckoo hashing technique, retain the result of each hash function for each serial number index, and obtain a first hash bucket containing a plurality of baskets, wherein the results of the serial number index in the first hash bucket are disclosed to both the server and the client;

[0008] The client uses the cuckoo hash algorithm to fill the batch query index into a second hash bucket of the same length as the first hash bucket, wherein the corresponding position is filled with the sequence index of the batch query index in the corresponding basket of the first hash bucket, and the filling result is encoded using a fixed weight code encoding method;

[0009] The client encrypts the obtained encoding results using homomorphic encryption technology as a batch query request and sends it to the server;

[0010] The server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain the corresponding intermediate result;

[0011] The server performs corresponding calculations on the intermediate results and the original database to obtain the query result ciphertext corresponding to the batch query request and sends it to the client;

[0012] The client decrypts the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

[0013] Furthermore, the filling result is encoded using a fixed-weight code encoding method, specifically: the length n of the largest basket in the first hash bucket is selected as the encoding domain of the fixed-weight code, the corresponding length of the fixed-weight code is m, the number k of 1 in the fixed-weight code is selected, and the filling result is mapped to the fixed-weight code.

[0014] Furthermore, the client encrypts the obtained encoding result using the SIMD technology of homomorphic encryption.

[0015] Furthermore, the client encrypts the obtained encoding result using the SIMD technology of homomorphic encryption. The specific process is as follows: for a hash bucket of length B, the B corresponding first bits in the hash bucket are encrypted into the same ciphertext, the second bit is encrypted into the second ciphertext, and so on. If the corresponding position in the corresponding hash bucket is empty, all bits of the default fixed-weight code are 0.

[0016] Furthermore, the server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain a corresponding intermediate result, including:

[0017] Encode each sequence index in each basket of the first hash bucket with a corresponding fixed-weight code;

[0018] For each sequence index, select the ciphertext whose corresponding bit is 1 in the current fixed-weight code, and use the SIMD technology of homomorphic encryption to calculate the product of all selected ciphertexts to obtain the corresponding intermediate result.

[0019] Furthermore, the server performs corresponding calculations on the intermediate result and the original database to obtain the query result ciphertext corresponding to the batch query request, including:

[0020] Multiplying the intermediate result by the corresponding position of the original database to obtain the ciphertext of the corresponding position of the original database;

[0021] Add up all the results in each basket to form the query result ciphertext.

[0022] Furthermore, when the content length of the corresponding position in the original database exceeds the plaintext domain of the SIMD technology, the content is sliced, and after querying separately, several query result ciphertexts are formed and sent to the client separately.

[0023] According to a second aspect of an embodiment of the present application, a batch privacy information retrieval device is provided, comprising:

[0024] A cuckoo hash module is used for the client and the server to agree on a hash function used in the cuckoo hash technology, calculate the serial number index in the original database through the cuckoo hash technology, retain the result of each serial number index for each hash function, and obtain a first hash bucket containing a plurality of baskets, wherein the results of the serial number index in the first hash bucket are disclosed to both the server and the client;

[0025] an encoding module, configured for the client to fill the index of the batch query into a second hash bucket of the same length as the first hash bucket using a cuckoo hash algorithm, wherein the corresponding position is filled with the sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and encode the filling result using a fixed-weight code encoding method;

[0026] The encryption module is used by the client to encrypt the obtained encoding results using homomorphic encryption technology as a batch query request and send it to the server;

[0027] A comparison module, configured for the server to compare the received batch query request with the first hash bucket using homomorphic encryption technology to obtain a corresponding intermediate result;

[0028] A calculation module is used for the server to perform corresponding calculations on the intermediate results and the original database to obtain the query result ciphertext corresponding to the batch query request and send it to the client;

[0029] The decryption module is used for the client to decrypt the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

[0030] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including:

[0031] one or more processors;

[0032] a memory for storing one or more programs;

[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.

[0034] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0035] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0036] As can be seen from the above embodiments, this application redesigns the specific query scheme for batch private information retrieval, combines cuckoo hashing, fixed-weight code encoding and SIMD technology under homomorphic encryption, and utilizes the advantages of different technologies in combination with specific scenarios to design and optimize the query algorithm, thereby greatly reducing the computational overhead and the query time required for batch private information retrieval, making the query scheme more suitable for actual scenarios. At the same time, compared with similar schemes, the batch private information retrieval under this scheme can greatly reduce the communication overhead and significantly reduce the size of the uploaded request ciphertext. Specifically, for millions of (2 20 When completing 2,000 batch queries of a database containing 100,000 data items (each data item is 256 bytes long), the average query time is 3.9 milliseconds, reducing the upload traffic by approximately 75 times compared to previous batch queries. This solution enables privacy-preserving batch information retrieval services with significantly lower communication and computational overhead than previous solutions.

[0037] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] Fig. 1 is a flow chart showing a method for retrieving batch private information according to an exemplary embodiment.

[0040] Fig. 2 is a schematic diagram showing retaining hash function results based on all sequence numbers according to an exemplary embodiment.

[0041] Fig. 3 is a schematic diagram showing an encryption process of a request sent by a client according to an exemplary embodiment.

[0042] FIG4 is a schematic diagram of an algorithm for each index when traversing the sequence number indexes in a basket according to an exemplary embodiment.

[0043] Fig. 5 is a schematic diagram of an algorithm for returning database content using an intermediate result according to an exemplary embodiment.

[0044] Fig. 6 is a block diagram showing a device for retrieving batch private information according to an exemplary embodiment.

[0045] Fig. 7 is a schematic diagram showing an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0046] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this application.

[0047] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0048] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0049] FIG1 is a flow chart of a method for retrieving batch private information according to an exemplary embodiment. As shown in FIG1 , the method is applied in a terminal and may include the following steps:

[0050] (1) The client and the server agree on a hash function to be used in the cuckoo hashing technique, calculate the serial number index in the original database using the cuckoo hashing technique, retain the result of each hash function for each serial number index, and obtain a first hash bucket containing a plurality of baskets, wherein the results of the serial number index in the first hash bucket are disclosed to both the server and the client;

[0051] (2) The client fills the index of the batch query into a second hash bucket of the same length as the first hash bucket using the cuckoo hash algorithm, wherein the corresponding position is filled with the sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and the filling result is encoded using a fixed weight code encoding method;

[0052] (3) The client encrypts the obtained encoding result using homomorphic encryption technology as a batch query request and sends it to the server;

[0053] (4) The server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain the corresponding intermediate result;

[0054] (5) The server performs corresponding calculations on the intermediate results and the original database to obtain the query result ciphertext corresponding to the batch query request and sends it to the client;

[0055] (6) The client decrypts the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

[0056] In specific implementation, this application can be applied to scenarios such as medical databases, where visitors (clients) expect to query detailed descriptions of a series of drugs, such as corresponding treatment conditions, contraindications, instructions for use, inventory, etc., but do not expect the owner of the medical database (server) to know which series of drugs the visitor is interested in. If the server knows the list of drugs that the current querying user is interested in, it can infer that the client may currently be suffering from a certain disease, such as hepatitis B. The user's own physical condition should be sensitive privacy information and is not expected to be exposed to the server. Inadvertent leakage may cause unnecessary trouble, and the possibility of sensitive information leakage may also make some patients worry about the risk of leakage and give up the query function, missing some effective treatment information. In addition, this protocol can also be applied to basic modules in other privacy computing protocols, such as offline acceleration parts for single privacy queries or batch table lookup operations in privacy machine learning. The following is a description in conjunction with drug information query.

[0057] (1) The client and the server agree on the hash function used in the cuckoo hashing technology, and calculate the serial number index in the original database through the cuckoo hashing algorithm, retaining the result of each serial number index for each hash function, and obtaining a first hash bucket containing several baskets, wherein the result of the serial number index in the first hash bucket is public to both the server and the client, as shown in Figure 2.

[0058] The serial number index in the original database is public to both the server and the client, and the elements corresponding to the serial number index are public to the server but not to the client. In a specific implementation, the server has a medical database. Taking a drug database as an example, the database contains detailed descriptions of drugs such as treatment conditions, contraindications, instructions for use, inventory, etc. The client wants to know the specific information of a series of drugs, but does not want to reveal that he is interested in this series of drugs, because such information will indirectly reveal the client's physical condition. The client can query the database through the required drug number to understand the detailed description of the drug, and supports querying multiple drugs at the same time. After the query, the server cannot determine which drug information the client is concerned about, and thus cannot infer effective information such as the user's physical condition based on the query. When the client searches for drugs for some sensitive diseases, there is no need to worry about the leakage of personal physical condition information during the query process. Cuckoo hashing technology includes multiple different hash functions. The cuckoo hashing technology and the specific hash function used here are public to both the server and the client. This method usually selects 3 hash functions.

[0059] Specifically, for each serial number index, the results of three hash functions are calculated and retained in sequence, and the calculated results are evenly divided into a first hash bucket of size B using the cuckoo hash algorithm. The first hash bucket includes several baskets, and the position of each serial number index in each basket in the drug database is public to the server and the client.

[0060] For each position in the hash bucket, multiple serial number indexes will be filled in after the hash function operation. Assume that the length of the hash bucket is B. Assume that the hash bucket size is equivalent to copying the original database three times and using the cuckoo hash algorithm to divide the copied database into B positions. So that when the client queries in step (2), it can query in each basket. At this time, the length of each basket is much smaller than before the separation, which is very friendly to the privacy information retrieval process. And the results after running all the hash functions are public to both the server and the client, that is, the client can know the position of each element in each basket.

[0061] (2) The client fills the index of the batch query into a second hash bucket of the same length as the first hash bucket using the cuckoo hash algorithm, wherein the corresponding position is filled with the sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and the filling result is encoded using a fixed weight code encoding method;

[0062] Specifically, in this embodiment, the index for batch query is the required drug number. The purpose of this step is to fill all the serial number indexes into a second hash bucket, where the length of the second hash bucket is B. Then, using the cuckoo hash algorithm, under the premise of a certain failure rate, L requests to be queried can be filled into B positions using the algorithm. When B=1.5L, the failure rate is (1e-40), which can be ignored. Therefore, in the specific implementation of this application, it is preferred to predetermine the number L of batch queries each time, thereby determining the length of the hash bucket, and then carry out the specific process of steps (1) to (6). Due to the characteristics of the cuckoo hash algorithm, the position where each index in the second hash bucket is filled must be the result of the cuckoo hash function, that is, it will definitely appear in the basket corresponding to the corresponding position of the first hash bucket. At this time, it is only necessary to use the column index in the box to select an element in the basket.

[0063] It should be noted that since the result obtained in step (1) is public to both parties and retains the results of all hash functions, it is equivalent to redividing the database into B baskets after repeating it three times. The client runs the ordinary cuckoo hash algorithm for the index, that is, only one hash result will be retained for each index. When encountering a hash conflict problem, the conflict resolution strategy will be used to recalculate the hash value of the conflicting result. Each index will only appear once in the hash bucket after the cuckoo hash algorithm. When the client fills all the indexes to be queried into the second hash bucket of length B, it is equivalent to retrieving a data in each basket. The size of each basket is much smaller than the size of the original database. After using cuckoo hashing, each serial number to be queried is mapped to the corresponding position, that is, the basket where the element is located is obtained, and the corresponding serial number index is replaced with the corresponding index to be queried in the basket.

[0064] Specifically, the length n of the largest basket in the first hash bucket is selected as the encoding domain of the fixed-weight code, the corresponding fixed-weight code length is m, and the number of 1s in the fixed-weight code is selected as k. Usually, this method recommends that k be 2 to achieve a balance between computational complexity and communication volume. Each specific basket index obtained by (2.2) is encoded using a fixed-weight code. The following pseudocode provides a stable mapping method from ordinary serial numbers to fixed-weight codes. The fixed-weight code length m satisfies Much smaller than the ordinary natural number serial number encoding method:

[0065] The input of this algorithm is the serial index i, which is an integer between 1 and n, and the input of the fixed weight code length m, which determines the number of 1s in the fixed weight code. The output is the encoding result of the fixed weight code. Initialize the variable j equal to i and the variable l to k, and use a loop to operate on each bit of the m-bit fixed weight code, with m' being the current calculation bit. When the result of j is greater than or equal to When , the current calculated bit in the output fixed-weight code is set to 1, and the value of l is reduced to indicate that there are still l 1s that have not appeared. When l is 0, the loop is exited, indicating that there are no more 1s in the remaining positions of the fixed-weight code.

[0066] It should be noted that the method for mapping sequence numbers to fixed-weight codes can be randomly defined, as long as the server and client agree on the same mapping. In another embodiment, as shown in Figure 3, a random mapping is used to implement the mapping of sequence numbers to fixed-weight codes. When the client and server use the same mapping from ordinary sequence numbers to fixed-weight codes, it will not affect the other steps of this method. In practice, n is much larger than k, and the encoding length of the fixed-weight code is smaller than that of the ordinary sequence number encoding.

[0067] (3) The client encrypts the obtained encoding result using homomorphic encryption technology as a batch query request and sends it to the server;

[0068] The fixed-weight code result is encrypted using the SIMD (Single Instruction Multiple Data) technology in homomorphic encryption. The specific encryption method is: the first bit of each of the B corresponding bits in the hash bucket is encrypted into the same ciphertext, the second bit is encrypted into the second ciphertext, and so on. If the corresponding position in the corresponding hash bucket is empty, the default fixed-weight code bits are all 0. For SIMD technology, N corresponding bits of the fixed-weight code in the hash bucket can be encrypted into the same ciphertext at a time, where N depends on the degree of the polynomial selected for homomorphic encryption. It is public to the server and client. For convenience, N = B is selected in the figure. See Figure 3 for an example. In actual application scenarios, N is generally 4096, 8192, or 16384.

[0069] Encryption is performed using the symmetric encryption algorithm in homomorphic encryption. Compared with public key encryption, it can reduce the size of the ciphertext and send all the encrypted results to the server. The number of ciphertexts is m*B / N.

[0070] (4) The server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain the corresponding intermediate result; as shown in FIG4 , the process may include the following:

[0071] (4.1) Encode each sequence index in each basket of the first hash bucket with a corresponding fixed-weight code.

[0072] Specifically, the same fixed-weight code mapping method as in step (2) is adopted, and the server and the client agree in advance to use the same homomorphic encryption algorithm.

[0073] (4.2) For each sequence index, select the ciphertext whose corresponding bit in the current fixed-weight code is 1, and use the SIMD technology of homomorphic encryption to calculate the product of all selected ciphertexts to obtain the corresponding intermediate result, where the homomorphic encryption algorithm supports ciphertext multiplication operations, and SIMD technology can perform the same calculation operation on N baskets at the same time.

[0074] After (4.2), if the fixed-weight code currently being processed is equal to the fixed-weight code of the serial number index taken from the corresponding basket, the corresponding position of the product result is an encrypted 1, otherwise it is 0. All fixed-weight codes are traversed and all product results are stored.

[0075] (5) The server performs corresponding calculations on the intermediate results and the original database to obtain the query result ciphertext corresponding to the batch query request and sends it to the client, as shown in FIG5 .

[0076] (5.1) multiplying the intermediate result by the corresponding position of the original database to obtain the ciphertext of the corresponding position of the original database;

[0077] (5.2) Accumulate the results of all columns in each basket to form the ciphertext query result, reducing the amount of backhaul traffic. Since, after the operation in 4.3, at most one encrypted position in each basket is 1, summing the positions in each basket does not affect the content of the corresponding database query position obtained in 5.1.

[0078] In a specific implementation, when the length of the database content exceeds the plaintext domain of the SIMD technology, the database content is sliced, queried separately and then returned, wherein the result obtained in step 4 can be reused.

[0079] If there are higher requirements for communication volume, such as when the database information is long, the communication and computing overhead can be further reduced by reshaping the database and requesting plaintext packaging combined with rotation operations to reassemble the returned results. When B is less than N, there is still room for compression, which can be expressed as:

[0080] The n elements in each basket in (2) can be split into N / B blocks, spliced ​​vertically, and the database reshaped into N baskets. The maximum length of each basket is n*B / N. At this time, the corresponding encoding length m is reduced accordingly, further reducing the amount of computation in the calculation process. Since the results of the N / B baskets in the returned ciphertext come from the same original basket, that is, only one ciphertext corresponding to the plaintext is valid information, and the rest are 0. At this time, if the length of the original database information is longer than the single plaintext domain of SIMD technology, it will be sliced ​​and multiple query results will be obtained. By rotating each query result by a corresponding multiple of B, where SIMD technology supports rotating the encrypted ciphertext by any number of slots, the results are accumulated. At most N / B ciphertexts can be accumulated together without affecting the final query result. The amount of communication can be reduced by N / B times.

[0081] The rotation and merging algorithm proposed in this application can further compress the size of the returned ciphertext and is more suitable for the actual network environment. Specifically, for millions of (2 20 When completing 2,000 queries in batches using a database containing 1000 pieces of data (each piece of data is set to 20KB in length), the average time required for each query is 0.27 seconds. Compared with previous batch queries, the upload traffic is reduced by about 75 times, and the downlink traffic is on par with other similar solutions (without rotation, the downlink traffic in this scenario will increase).

[0082] (6) The client decrypts the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

[0083] Specifically, the returned ciphertext is decrypted using the private key generated during encryption using the principles of homomorphic encryption, and decoded using the Chinese Remainder Theorem. The client then obtains the requested information. If rotations are used to reassemble the returned results, the client knows the server's rotation algorithm, and thus the specific locations of the corresponding information. Rearranging the results can yield the desired drug information.

[0084] Corresponding to the aforementioned embodiment of the batch private information retrieval method, the present application also provides an embodiment of a batch private information retrieval device.

[0085] FIG6 is a schematic diagram of a batch private information retrieval device according to an exemplary embodiment. Referring to FIG6 , the device may include:

[0086] The Cuckoo Hash module 21 is configured to enable the client and the server to agree on a hash function to be used in the Cuckoo Hash technique, calculate the serial number index in the original database using the Cuckoo Hash technique, retain the result of each hash function for each serial number index, and obtain a first hash bucket containing a plurality of buckets, wherein the results of the serial number index in the first hash bucket are disclosed to both the server and the client;

[0087] An encoding module 22 is configured to, at a client, fill the index of a batch query into a second hash bucket of the same length as the first hash bucket using a cuckoo hash algorithm, wherein the corresponding position is filled with a sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and encode the filling result using a fixed-weight code encoding method;

[0088] The encryption module 23 is used for the client to encrypt the obtained encoding result using homomorphic encryption technology as a batch query request and send it to the server;

[0089] Comparison module 24, configured for the server to compare the received batch query request with the first hash bucket using homomorphic encryption technology to obtain a corresponding intermediate result;

[0090] The calculation module 25 is used for the server to perform corresponding calculations on the intermediate results and the original database to obtain the query result ciphertext corresponding to the batch query request and send it to the client;

[0091] The decryption module 26 is used for the client to decrypt the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

[0092] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0093] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0094] Accordingly, the present application also provides an electronic device comprising: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the batch privacy information retrieval method described above. As shown in FIG7 , a hardware structure diagram of any device with data processing capabilities in which a batch privacy information retrieval method provided in an embodiment of the present invention is provided is shown. In addition to the processor, memory, and network interface shown in FIG7 , any device with data processing capabilities in which the apparatus in the embodiment is provided may also include other hardware, typically based on the actual functionality of the device, which will not be described in detail.

[0095] Accordingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the batch privacy information retrieval method as described above. The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities as described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0096] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed in this application.

[0097] It will be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A batch privacy information retrieval method, characterized in that: include: The client and the server agree on a hash function used in the cuckoo hashing technology, calculate the serial number index in the original database through the cuckoo hashing technology, retain the result of each hash function for each serial number index, and obtain a first hash bucket containing a plurality of baskets, wherein the result of the serial number index in the first hash bucket is open to both the server and the client; The client fills the index of the batch query into a second hash bucket of the same length as the first hash bucket by using the cuckoo hash algorithm, wherein the corresponding position is filled with the sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and the filling result is encoded by using a fixed weight code encoding method; The client encrypts the obtained encoding results using homomorphic encryption technology as a batch query request and sends it to the server; The server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain the corresponding intermediate result; The server performs corresponding calculations on the intermediate result and the original database to obtain the query result ciphertext corresponding to the batch query request and sends it to the client; The client decrypts the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

2. The method according to claim 1, characterized in that: The filling result is encoded using a fixed-weight code encoding method, specifically: the length n of the largest basket in the first hash bucket is selected as the encoding domain of the fixed-weight code, the corresponding length of the fixed-weight code is m, the number k of 1s in the fixed-weight code is selected, and the filling result is mapped to the fixed-weight code.

3. The method according to claim 1, characterized in that The client encrypts the encoded result using homomorphic encryption SIMD technology.

4. The method according to claim 3, characterized in that The client encrypts the obtained encoding result using the SIMD technology of homomorphic encryption as follows: for a hash bucket of length B, encrypt the B corresponding first bits in the hash bucket into the same ciphertext, the second bit into the second ciphertext, and so on. If the corresponding position in the corresponding hash bucket is empty, all bits of the default fixed weight code are 0.

5. The method according to claim 1, characterized in that The server compares the received batch query request with the first hash bucket using homomorphic encryption technology to obtain the corresponding intermediate result, including: Encode each sequence index in each basket of the first hash bucket with a corresponding fixed-weight code; For each sequence index, select the ciphertext whose corresponding bit is 1 in the current fixed-weight code, and use the SIMD technology of homomorphic encryption to calculate the product of all the selected ciphertexts to obtain the corresponding intermediate result.

6. The method according to claim 1, characterized in that The server performs corresponding calculations on the intermediate result and the original database to obtain the query result ciphertext corresponding to the batch query request, including: Multiplying the intermediate result by the corresponding position of the original database to obtain the ciphertext of the corresponding position of the original database; Add all the results in each basket to form the query result ciphertext.

7. The method according to claim 6, characterized in that When the content length of the corresponding position of the original database exceeds the plaintext domain of the SIMD technology, the content is sliced, queried separately to form several query result ciphertexts, and sent to the client separately.

8. A batch privacy information retrieval device, characterized in that: include: A cuckoo hash module is used for the client and the server to agree on the hash function used in the cuckoo hash technology, calculate the serial number index in the original database through the cuckoo hash technology, retain the result of each serial number index for each hash function, and obtain a first hash bucket containing a plurality of baskets, wherein the result of the serial number index in the first hash bucket is open to both the server and the client; An encoding module, used for the client to fill the index of the batch query into a second hash bucket with the same length as the first hash bucket through the cuckoo hash algorithm, wherein the corresponding position is filled with the sequence index of the index of the batch query in the corresponding basket of the first hash bucket, and the filling result is encoded by using a fixed weight code encoding method; The encryption module is used by the client to encrypt the obtained encoding results using homomorphic encryption technology as a batch query request and send it to the server; A comparison module, configured for the server to compare the received batch query request with the first hash bucket using homomorphic encryption technology to obtain a corresponding intermediate result; A calculation module, used for the server to perform corresponding calculations on the intermediate results and the original database, obtain the query result ciphertext corresponding to the batch query request and send it to the client; The decryption module is used for the client to decrypt the query result ciphertext, thereby obtaining the query results of the batch query request at the same time.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Private data intersection calculation method and device, equipment and storage medium

    CN113343305A

  • Private data hiding and sharing method

    CN114661680A

  • Privacy set operation method and system based on fully homomorphic encryption

    CN115529118A

  • Event processing system

    US20190026491A1

Cited By

  • Keyword private information retrieval method and device based on layered dynamic constant weight code

    CN120277104A

  • Multi-keyword private information retrieval method and system based on inverted index

    CN121029976A