Privacy information retrieval method, system and equipment and storage medium
By generating and distributing multiple keys on the client, compute and reduce secret sharing vectors in parallel on the server, and recovering data by client xOR operations, the problem of insufficient performance of existing privacy information retrieval technology in large-scale databases is solved, and efficient privacy information retrieval is achieved.
Patent Information
- Application Number
- CN202411954606.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing private information retrieval technology has challenges in query performance, especially the high computational complexity and large communication overhead, which is difficult to meet the performance requirements of large-scale databases.
By generating multiple keys on the client and distributing them to multiple servers, the server calculates the secret shared vector corresponding to the database table entry index in parallel, and performs vector point multiplication and parallel reduction. Finally, the client recovers the required data through XOR operation.
It significantly improves query efficiency, reduces computing complexity and communication overhead, and realizes efficient private information retrieval under large-scale data processing.
Smart Images

Figure CN119760780A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of secure multi-party computing, and specifically relates to a privacy information retrieval method, system, device and storage medium. Background Art
[0002] Private Information Retrieval (PIR) technology is an encryption technology that completes data query while protecting privacy. It allows users to obtain the required data from the server without exposing their query intentions. Because the server is untrustworthy, the server does not know the specific data queried by the user. This feature is particularly important in query scenarios involving sensitive information.
[0003] Although PIR technology provides theoretical advantages in privacy protection, it still faces several challenges in practical applications, especially in terms of query performance. PIR protocols usually rely on complex encryption algorithms, such as homomorphic encryption and lattice cryptography, which have high computational complexity and result in long query times. In addition, PIR protocols also require a large amount of data transmission, which further increases communication overhead. When processing large-scale databases (such as millions of data records), traditional PIR solutions are difficult to meet the performance requirements of practical applications. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a privacy information retrieval method, system, device and storage medium to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a privacy information retrieval method, comprising: Generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively; The server calculates the secret shared vector corresponding to the table entry index of the database in parallel based on the received key, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data; Performing parallel reduction on the intermediate data at the server end, and sending the reduction result as an evaluation result to the client end; An XOR operation is performed on all received evaluation results at the client to obtain database table item data corresponding to the index.
[0006] In an optional implementation, a client generates multiple keys based on an index and preconfigured parameters using a key generation algorithm, and distributes the multiple keys to corresponding multiple servers respectively, including: Get the number of servers and set the number of keys equal to the number of servers; Generate a corresponding plurality of keys based on the number of keys using a key generation algorithm, the key generation algorithm comprising:
[0007] in, is the index, =1, To set the safety parameters, is an Abelian group; The generated multiple keys are distributed to the corresponding multiple server ends.
[0008] In an optional embodiment, the method further comprises: Based on the tensor transformation technology, the key size is changed from Bit reduction to bits, where n is the length of the point query function; Using a pseudo-random function based on a length of The seed generates a pseudo-random number of double length. During the key generation process, the correction word generated by each layer is calculated to control the output consistency through pseudo-random numbers. The introduction of correction words in each layer ensures that the secret sharing on the non-target path remains consistent.
[0009] In an optional implementation, the server calculates the secret shared vector corresponding to the table entry index of the database in parallel based on the received key, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data, including: Setting database contains In the binary tree constructed by the distributed point function, the global evaluation function is used to start the calculation from the root node of the binary tree downwards. The root node starts a thread to calculate the pseudo-random function once to obtain the random seed and control bit value of the second layer. The second layer starts two threads to calculate the pseudo-random function twice to obtain the random seed and control bit value of the third layer. Iterate layer by layer and start the last layer. Each thread calculates the secret shared vector based on the final random seed and control bit value; In the kernel function, wait for all threads to complete the evaluation synchronously to obtain the secret shared vector, and then calculate the vector dot product of the secret shared vector and the database table entry in parallel.
[0010] In an optional implementation, the server calculates the secret sharing vector corresponding to the table entry index of the database in parallel based on the received key, including: In the construction of the distributed point function, the input arrive Function ; The first server generates a secret shared vector based on the received key , the second server generates a secret sharing vector based on the received key ; when hour, , ensuring consistent secret sharing on non-target paths; when hour, , ensuring that the secret sharing at the target index is inconsistent, facilitating data recovery at the target index.
[0011] In an optional implementation, performing parallel reduction on the intermediate data at the server, and sending the reduction result as an evaluation result to the client, includes: In the first kernel function, the result of vector dot multiplication is reduced within the warp. The number of threads_per_block set in the kernel function is , then each block has / 32 warps, reduced to / 32 results, store these results in shared memory, read the shared memory in the first warp, and perform a second reduction to get a result, a total of blocks, corresponding to The result will The result is stored in global memory and returned; Open the second kernel function to repeat the reduction within the warp and obtain The results are stored in global memory; XOR the result of the second reduction to obtain the final reduction result.
[0012] In an optional implementation, an XOR operation is performed on all received evaluation results at the client to obtain database table item data corresponding to the index, including: Receive evaluation results and ; XOR the evaluation results:
[0013] With index The corresponding database table entry data.
[0014] In a second aspect, the present invention provides a privacy information retrieval system, comprising: A key generation module, used to generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively; A first calculation module is used to calculate the secret shared vector corresponding to the table entry index of the database in parallel based on the received key at the server end, and perform vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data; A second computing module is used to perform parallel reduction on the intermediate data at the server end, and send the reduction result as an evaluation result to the client end; The data acquisition module is used to perform an XOR operation on all received evaluation results at the client to obtain database table item data corresponding to the index.
[0015] In a third aspect, a device is provided, comprising: A memory for storing a privacy information retrieval program; The processor is used to implement the steps of the privacy information retrieval method provided in the first aspect when executing the privacy information retrieval program.
[0016] In a fourth aspect, a computer-readable storage medium is provided, on which a privacy information retrieval program is stored. When the privacy information retrieval program is executed by a processor, the steps of the privacy information retrieval method provided in the first aspect are implemented.
[0017] The beneficial effects of the present invention are that the privacy information retrieval method, system, device and storage medium provided by the present invention realize privacy information retrieval based on the global evaluation of DPF, and reduce the computational complexity of DPF from 100% to 200% by reducing repeated calculations and pruning strategies. Reduce to , significantly improving query efficiency. On this basis, GPU acceleration technology is adopted, and the CUDA architecture is used to realize parallel computing of global evaluation, realizing efficient query under large-scale data processing. At the same time, the present invention integrates parallel global evaluation with vector dot multiplication and reduction algorithm and fully applies optimized reduction strategy, which greatly reduces query time and computing overhead by reducing the use of global memory and shared memory.
[0018] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0021] Figure 2 It is a schematic framework diagram of a method according to an embodiment of the present invention.
[0022] Figure 3 It is a schematic principle diagram of a method according to an embodiment of the present invention.
[0023] Figure 4 It is a schematic application scenario diagram of a method according to an embodiment of the present invention.
[0024] Figure 5 is a schematic block diagram of a system according to an embodiment of the present invention.
[0025] Figure 6 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0028] The key terms appearing in the present invention are explained below: Binary Tree (BT); Secure Multi-Party Computation (MPC); Private Information Retrieval (PIR); Function Secret Sharing (FSS); Distributed Point Function (DPF); Correction Words (CW); Pseudorandom Generator (PRG); Thread (thread); Thread bundle (warp); Thread group (block).
[0029] The privacy information retrieval method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the privacy information retrieval system runs in the computer device.
[0030] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a privacy information retrieval system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0031] like Figure 1 As shown, the method includes: S1. Generate multiple keys on the client side using a key generation algorithm based on an index and pre-configured parameters, and distribute the multiple keys to the corresponding multiple servers respectively.
[0032] On the client side, we use a key generation algorithm that generates multiple keys based on a specific index and preconfigured parameters. These preconfigured parameters may include algorithm type, key length, random seed, etc., which together determine the characteristics and security of the generated keys. The generated multiple keys are then distributed to the corresponding multiple servers to ensure distributed storage and processing of data.
[0033] S2. Based on the received key, the server calculates in parallel the secret shared vector corresponding to the table entry index of the database, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data.
[0034] On the server side, once they receive their respective keys, they use them to calculate the secret shared vector corresponding to the index of the table entry in the database in parallel. This process may involve complex mathematical operations and encryption algorithms to ensure the confidentiality and integrity of the data. The secret shared vector is a special encryption technology that divides the original data into multiple parts, each of which contains information about a part of the original data, but a single part cannot restore the complete original data. In this way, even if the data of a server is leaked, the attacker cannot obtain the complete database table entry data.
[0035] Next, the server performs a vector dot multiplication on the calculated secret shared vector and the database entry. Vector dot multiplication is a linear algebra operation that multiplies the corresponding elements of two vectors and sums them to obtain a scalar result. The purpose of this step is to combine the secret shared vector with the database entry data to generate an intermediate data. This intermediate data contains both the data information of the database entry and the encryption characteristics of the original data.
[0036] S3. Perform parallel reduction on the intermediate data at the server, and send the reduction result as an evaluation result to the client.
[0037] After the servers have finished generating the intermediate data, they perform parallel reduction on the data. Parallel reduction is an optimization technique that speeds up the computation by dividing the data into multiple parts and processing them simultaneously. The result of the reduction is one or more summary values that represent some statistical properties or computational results of all the intermediate data. In this scenario, the reduction result is sent back to the client as the evaluation result.
[0038] S4. Perform an XOR operation on all received evaluation results at the client to obtain database table item data corresponding to the index.
[0039] On the client side, once all the evaluation results from the server are received, it will perform an XOR operation on these results. XOR operation is a binary operation that compares the corresponding bits of two binary numbers. If they are the same, the result is 0, and if they are different, the result is 1. By performing an XOR operation on all the evaluation results, the client can restore the database table item data corresponding to the original index. This process takes advantage of the reversibility and linearity of the XOR operation to ensure the correctness and integrity of the data.
[0040] The application scenario of the present invention is that the Client uses the index Send a request to the Server to retrieve the corresponding table entry in the database without The overall architecture of the privacy information retrieval solution based on distributed point functions proposed in this invention is as follows: Figure 2 shown.
[0041] The client first calculates Generate a key pair ) and distributes it to two servers Server0 and Server1. After receiving the key, the servers perform global evaluation operations to generate secret shares. These secret shares are then shared with the database Perform vector dot multiplication, then XOR all the results and return them to the client. The client XORs the results returned by the two servers to recover the target data. This scheme not only improves the retrieval efficiency but also ensures the privacy and correctness of the query through key distribution and parallel computing.
[0042] In an embodiment of the present invention, based on step S1, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0043] Get the number of servers and set the number of keys equal to the number of servers; Generate a corresponding plurality of keys based on the number of keys using a key generation algorithm, the key generation algorithm comprising:
[0044] in, is the index, =1, To set the safety parameters, is an Abelian group.
[0045] Gen() specifically includes:
[0046] The generated multiple keys are distributed to the corresponding multiple server ends.
[0047] In the overall architecture of the solution, DPF-PIR generates two-part keys through a distributed point function (DPF) to support privacy protection of user queries. A distributed point function is an algorithmic construct that allows clients to query the target index based on the target index. and target data value , generate two keys and , respectively sent to two non-colluding servers. In the construction of DPF, the definition is from the input arrive Function . Two keys generated by DPF and Distributed to two different servers.
[0048] The index is a key variable that usually starts at 0 and increases to assign a unique identifier to each key. The security parameter is an important parameter that determines the complexity and difficulty of the generated key. The Abelian group provides a mathematical framework that allows operations in encryption algorithms to be performed within this framework and ensures the closedness and associative properties of the operations.
[0049] Please refer to Figure 3In one embodiment of the present invention, based on step S2, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.
[0050] S201. Based on the received key, the server calculates in parallel the secret shared vector corresponding to the table entry index of the database.
[0051] The index is taken as the target function f of 0-1, and the target function Break it down into multiple shares: Let the function family Contains the following two collections: Represents a collection of function descriptions; is a polynomial-time algorithm for describing Evaluate the function.
[0052] assumed Defines a function ,in is the input field, is the output domain. The calculation formula of this function is . Typically, assuming the input domain The length is The binary string, and the output domain is a finite Abelian group To simplify the expression, the function description symbol will be omitted , use directly Represents the corresponding function.
[0053] The secret sharing algorithm includes the key generation algorithm Gen and the evaluation algorithm Eval. They are responsible for the key generation task and the calculation task respectively. Specifically, assuming that The implementation steps of the FSS solution are as follows: : This is a key generation algorithm that is completed in polynomial time. The algorithm accepts the input (safety parameters) and (function ) and output a The key of the tuple ;in Contains the input length , Group Description , and the scale parameter and other information; : This is an evaluation algorithm that runs in polynomial time. The algorithm takes the input (Party Index), Key (Define function ), and (input). It outputs a group element ,in express The value of the function is Part of the output of the square, corresponding to No. Shared shares.
[0054] In this embodiment, the default setting .exist In the case of , the index of the participants is simplified to , instead of , in order to represent the scenario involving two parties.
[0055] Gen accepts security parameters and input , generate a key pair , ensure that when evaluating, satisfy: , The lightweight nature of the algorithm makes it possible to quickly generate key pairs on the client device. In the PIR scheme, the client protects the privacy of the query through key distribution.
[0056] It should be noted that this embodiment does not use the above-mentioned additive secret sharing, but subtractive secret sharing. In this sharing mode, when the calculation result is at the target index, the result of subtracting the two or XORing the two is 1, thereby ensuring that the data can be correctly restored at the target index. In addition, the characteristics of subtractive secret sharing can further improve the efficiency and security of the scheme, because subtractive operations are usually more efficient in implementation and have the advantage of simplified processing during data recovery.
[0057] Eval is the key evaluation process performed on the server and includes:
[0058] The server receives the key or After that, perform the global evaluation operation to generate the secret sharing and The server then performs vector dot multiplication on these secret shares and the database entries, obtains the response data, performs XOR operation on it and returns it to the client. and The returned result is XORed to restore the target data .when hour, , to ensure that the calculation results of non-target indexes remain consistent; when hour, to ensure that the data is restored on the target index.
[0059] In the construction of DPF, this paper defines the input arrive Function . Two keys generated by DPF and Distributed to two different servers. Each server evaluates each entry in the database based on the key it holds to generate a secret share and These secret shares have the following properties: when hour, , ensuring consistent secret sharing on non-target paths.
[0060] when hour, , ensuring that the secret sharing at the target index is inconsistent, facilitating data recovery at the target index.
[0061] Through all XOR operation is performed on the corresponding multiplication results to ensure that only the target index A non-zero result, i.e. 1, is obtained at the position where the XOR is located, and a zero is obtained at other positions. This characteristic makes the XOR operation an effective means of verification. The specific calculation formula is as follows. In this formula, and The intermediate results returned by the two servers are respectively. Through XOR operation, ensure that At the same time, due to the pseudo-random structure of DPF, a single server cannot infer the user's query content, thus achieving privacy protection.
[0062] when hour, ,Right now ,product ,ensuring that non-target data items do not affect the final result.,This multiplication operation combines the core idea of the DPF scheme,,which ensures the correctness of the target index by XOR and recovers the target data by,multiplying with the database.
[0063] Through the above parallel calculation and multiplication operations, the final result is the target data item :
[0064]
[0065]
[0066]
[0067]
[0068] This design ensures that The secret sharing at can accurately recover the target data item while remaining zero at non-target indexes, thus achieving the correctness and privacy of PIR.
[0069] In order to improve the efficiency of the solution, the present invention combines mathematical optimization and GPU acceleration, adopts global evaluation in the calculation process to reduce the computational overhead, and uses the parallel capability of GPU to accelerate query processing. In addition, in order to reduce the communication overhead, a communication compression strategy is designed to reduce the amount of query and returned data, thereby improving the communication performance of large-scale database queries.
[0070] In the classic DPF solution, to support a length of Point query function, the key size is usually Bits, of which is a security parameter. In order to optimize the key size, the present invention redesigns the key structure based on the tensor transformation technology and reduces the key size to bits, reducing communication and storage requirements, making DPF more suitable for large-scale PIR applications.
[0071] The DPF generation algorithm also utilizes a pseudo-random generator (PRG) whose receiving length is The seed is used as input to generate a double-length pseudo-random string. During the key generation process, the correction word (CW) generated by each layer is calculated to control the output consistency through a pseudo-random tree. The introduction of the correction word in each layer ensures that the secret sharing on the non-target path remains consistent, thereby supporting efficient and private queries.
[0072] Through the DPF optimization design of the present invention, users can retrieve specific data items from the server in the DPF-based PIR system without leaking the query content. The key and sharing mechanism generated by DPF make it impossible for a single server to infer the user's true query intention, thus achieving privacy protection. In experiments and theory, its performance advantage in large-scale data scenarios ensures privacy and query efficiency through efficient key distribution and parallel computing mechanisms.
[0073] DPF function Only single input However, what is needed in PIR is The vector composed of the secret shares of all numbers in the interval. Assume that the database contains When the basic DPF solution is used directly to query data with a height of The entire binary tree is traversed layer by layer, and the computational complexity is ,in = To improve efficiency, the present invention adopts Full Domain Evaluation, namely, the EvalAll function enables the evaluation algorithm to use the shared path of tree nodes, reduce repeated operations in the calculation process, and thus reduce the overall calculation complexity from Down to .
[0074] The conventional EvalAll function is implemented by recursively calculating upward from the leaf nodes of the binary tree to reduce the number of calls to the PRF function to achieve acceleration. The basic idea is that in the tree structure constructed by DPF, the parent node stores The value determines the random seed for the child nodes. and control bit value , unlike the Eval function which only calculates the path corresponding to the binary representation of x, EvalAll calculates the values corresponding to the left and right subpaths at each layer for use by the next layer, thereby reducing the time of repeated calculations. In order to fully parallelize the global evaluation, the present invention modifies the EvalAll function to start from the root node and calculate downward, where the root node starts a thread to calculate the PRF once to obtain the second layer and , the second layer starts two threads to calculate the PRF twice to get the third layer and t, and so on, open at the last level The threads are based on the final and Calculate the secret share.
[0075] Random seeds are starting values used to generate random numbers or random sequences. In fields such as encryption, simulation, and data analysis, the generation of random numbers or random sequences is crucial. The choice of random seeds directly affects the randomness and unpredictability of the generated random number sequence. In your description, random seeds are used to generate random elements at each layer of the binary tree, which may be used in subsequent encryption, decryption, data obfuscation, and other operations to ensure data security.
[0076] A control bit value, often referred to as a control bit or control bit, is a binary value used to control the flow of data processing or data conversion. The control bit value is used together with the random seed to generate or control the calculation process at each level in the binary tree. These control bit values may determine which data is processed, how it is processed, and the order in which the data is processed. In the field of encryption, the control bit value can also be used to implement a specific encryption algorithm or encryption mode to ensure the confidentiality and integrity of the data.
[0077] S202. Perform vector dot multiplication on the secret shared vector and the database entry to obtain intermediate data.
[0078] After obtaining the result of the global evaluation, that is, the vector Finally, you need to compare the vector with the database entry Compared with saving and returning the evaluation results of the complete domain in the kernel function, a more appropriate method is to wait for all threads to synchronously calculate the evaluation results directly in the kernel function, and then calculate the vector dot product in parallel to obtain .
[0079] In an embodiment of the present invention, based on step S3, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0080] After calculating the result of the vector dot product, all the results need to be XORed. In order to fully utilize the computing resources and characteristics of the GPU, the present invention adopts a highly optimized reduction algorithm.
[0081] Specifically, in the first kernel function, the result of the vector dot product is directly reduced within the warp. Assume that the number of threads_per_block set in the kernel function is , then each block has / 32 warps, reduced to / 32 results, store these results in shared memory, read the shared memory in the first warp, and perform a second reduction to get a result, a total of blocks, corresponding to Finally, these results are stored in global memory and returned. Then the second kernel function is started to repeat the reduction within the warp, and finally the The result is stored in the global memory. The result of the second reduction is XORed directly on the CPU of the server to get the final result.
[0082] Compared with the conventional reduce operator, this reduction method uses operations on local memory instead of operations on shared memory. It solves the problem that block shared memory cannot accommodate large-scale data while also greatly optimizing the reduction performance. Ultimately, the scale of reading and writing global memory is also greatly reduced.
[0083] In an embodiment of the present invention, based on step S4, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0084] Receive evaluation results and ; XOR the evaluation results:
[0085] With index The corresponding database table entry data.
[0086] Based on the above embodiments, a specific application scenario is further provided. Figure 4 As shown: There is a client and two independent servers , . Store the same database separately , the size of the database is The client sends a search request to the server, and the server does not know the index. The client recovers the secret by sharing the two secrets. .
[0087] The flowchart of the scheme is as shown in the overall framework diagram of the scheme above. The specific steps are as follows: (1) Key generation and distribution phase, including: For the database table item index to be retrieved , Client settings Parameters , then calculate the Gen function to generate the key pair ); The client will calculate the key Send to the server separately , .
[0088] (2) Server evaluation phase: For example, the processing methods include: server Receiving Key ; parallel computing Get the secret sharing corresponding to all table indexes b in the database , and perform vector dot multiplication of the secret share and the database table entry to obtain ; Use an optimized reduction algorithm for all Perform parallel reduction and finally get the reduction result ; The final evaluation results Sent to the Client.
[0089] (3) Data recovery and retrieval phase, including: The Client receives two evaluation results and ,calculate You can restore the index to database table entries.
[0090] In some embodiments, the privacy information retrieval system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the privacy information retrieval system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) function for retrieving privacy information.
[0091] In this embodiment, the privacy information retrieval system can be divided into multiple functional modules according to the functions it performs, such as Figure 5 As shown. The functional modules of the system 500 may include: a key generation module 510, a first calculation module 520, a second calculation module 530 and a data acquisition module 540. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0092] A key generation module, used to generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively; A first calculation module is used to calculate the secret shared vector corresponding to the table entry index of the database in parallel based on the received key at the server end, and perform vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data; A second computing module is used to perform parallel reduction on the intermediate data at the server end, and send the reduction result as an evaluation result to the client end; The data acquisition module is used to perform an XOR operation on all received evaluation results at the client to obtain database table item data corresponding to the index.
[0093] Optionally, as an embodiment of the present invention, a plurality of keys are generated based on an index and pre-configured parameters using a key generation algorithm on a client, and the plurality of keys are distributed to corresponding plurality of servers respectively, including: Get the number of servers and set the number of keys equal to the number of servers; Generate a corresponding plurality of keys based on the number of keys using a key generation algorithm, the key generation algorithm comprising:
[0094] in, is the index, =1, To set the safety parameters, is an Abelian group; The generated multiple keys are distributed to the corresponding multiple server ends.
[0095] Optionally, as an embodiment of the present invention, the method further includes: Based on the tensor transformation technology, the key size is changed from Bit reduction to bits, where n is the length of the point query function; Using a pseudo-random function based on a length of The seed generates a pseudo-random number of double length. During the key generation process, the correction word generated by each layer is calculated to control the output consistency through pseudo-random numbers. The introduction of correction words in each layer ensures that the secret sharing on the non-target path remains consistent.
[0096] Optionally, as an embodiment of the present invention, the server calculates the secret shared vector corresponding to the table entry index of the database in parallel based on the received key, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data, including: Setting database contains In the binary tree constructed by the distributed point function, the global evaluation function is used to start the calculation from the root node of the binary tree downwards. The root node starts a thread to calculate the pseudo-random function once to obtain the random seed and control bit value of the second layer. The second layer starts two threads to calculate the pseudo-random function twice to obtain the random seed and control bit value of the third layer. Iterate layer by layer and start the last layer. Each thread calculates the secret shared vector based on the final random seed and control bit value; In the kernel function, wait for all threads to complete the evaluation synchronously to obtain the secret shared vector, and then calculate the vector dot product of the secret shared vector and the database table entry in parallel.
[0097] Optionally, as an embodiment of the present invention, the server calculates in parallel the secret sharing vector corresponding to the table entry index of the database based on the received key, including: In the construction of the distributed point function, the input arrive Function ; The first server generates a secret shared vector based on the received key , the second server generates a secret sharing vector based on the received key ; when hour, , ensuring consistent secret sharing on non-target paths; when hour, , ensuring that the secret sharing at the target index is inconsistent, facilitating data recovery at the target index.
[0098] Optionally, as an embodiment of the present invention, performing parallel reduction on the intermediate data at the server, and sending the reduction result as an evaluation result to the client, includes: In the first kernel function, the result of vector dot multiplication is reduced within the warp. The number of threads_per_block set in the kernel function is , then each block has / 32 warps, reduced to / 32 results, store these results in shared memory, read the shared memory in the first warp, and perform a second reduction to get a result, a total of blocks, corresponding to The result will The result is stored in global memory and returned; Open the second kernel function to repeat the reduction within the warp and obtain The results are stored in global memory; XOR the result of the second reduction to obtain the final reduction result.
[0099] Optionally, as an embodiment of the present invention, an XOR operation is performed on all received evaluation results at the client to obtain database table item data corresponding to the index, including: Receive evaluation results and ; XOR the evaluation results:
[0100] With index The corresponding database table entry data.
[0101] Figure 6 The privacy information retrieval method provided for the embodiment of the present application can be applied to the device. It can be understood by those skilled in the art that the device structure involved in the embodiment of the present invention does not constitute a limitation on the device, and the device may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.
[0102] The device 600 may include: a processor 610, a memory 620 and a communication unit 630. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0103] The memory 620 may be used to store the execution instructions of the processor 610, and the memory 620 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 620 are executed by the processor 610, the device 600 is enabled to perform some or all of the steps in the following method embodiments.
[0104] The processor 610 is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 620, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 610 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0105] The communication unit 630 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0106] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0107] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0108] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0109] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0110] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0112] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A privacy information retrieval method, characterized in that: include: Generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively; The server calculates the secret shared vector corresponding to the table entry index of the database in parallel based on the received key, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data; Performing parallel reduction XOR on the intermediate data at the server end, and sending the reduction result as an evaluation result to the client end; An XOR operation is performed on all received evaluation results at the client to obtain database table item data corresponding to the index.
2. The method according to claim 1, characterized in that Generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively, including: Get the number of servers and set the number of keys equal to the number of servers; Generate a corresponding plurality of keys based on the number of keys using a key generation algorithm, the key generation algorithm comprising: in, is the index, =1, To set the safety parameters, is an Abelian group; The generated multiple keys are distributed to the corresponding multiple server ends.
3. The method according to claim 2, characterized in that The method further comprises: Based on the tensor transformation technology, the key size is changed from Bit reduction to bits, where n is the length of the point query function; Using a pseudo-random function based on a length of The seed generates a pseudo-random number of double length. During the key generation process, the correction word generated by each layer is calculated to control the output consistency through pseudo-random numbers. The introduction of correction words in each layer ensures that the secret sharing on the non-target path remains consistent.
4. The method according to claim 1, characterized in that: The server calculates the secret shared vector corresponding to the table entry index of the database in parallel based on the received key, and performs vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data, including: Setting database contains In the binary tree constructed by the distributed point function, the global evaluation function is used to start the calculation from the root node of the binary tree downwards. The root node starts a thread to calculate the pseudo-random function once to obtain the random seed and control bit value of the second layer. The second layer starts two threads to calculate the pseudo-random function twice to obtain the random seed and control bit value of the third layer. Iterate layer by layer and start the last layer. Each thread calculates the secret shared vector based on the final random seed and control bit value; In the kernel function, wait for all threads to complete the evaluation synchronously to obtain the secret shared vector, and then calculate the vector dot product of the secret shared vector and the database table entry in parallel.
5. The method according to claim 4, characterized in that Based on the received key, the server calculates the secret shared vector corresponding to the table index of the database in parallel, including: In the construction of the distributed point function, the input arrive Function ; The first server generates a secret shared vector based on the received key , the second server generates a secret sharing vector based on the received key ; when hour, , ensuring consistent secret sharing on non-target paths; when hour, , ensuring that the secret sharing at the target index is inconsistent, facilitating data recovery at the target index.
6. The method according to claim 4, characterized in that The server performs parallel reduction on the intermediate data and sends the reduction result as an evaluation result to the client, including: In the first kernel function, the result of vector dot multiplication is reduced within the warp. The number of threads_per_block set in the kernel function is , then each block has / 32 warps, reduced to / 32 results, store these results in shared memory, read the shared memory in the first warp, and perform a second reduction to get a result, a total of blocks, corresponding to The result will The result is stored in global memory and returned; Open the second kernel function to repeat the reduction within the warp and obtain The results are stored in global memory; The result of the second reduction is XORed to obtain the final reduction result.
7. The method according to claim 1, characterized in that Perform an XOR operation on all received evaluation results at the client to obtain database table item data corresponding to the index, including: Receive evaluation results and ; XOR the evaluation results: With index The corresponding database table entry data.
8. A privacy information retrieval system, characterized in that: include: A key generation module, used to generate multiple keys based on the index and pre-configured parameters using a key generation algorithm on the client, and distribute the multiple keys to the corresponding multiple servers respectively; A first calculation module is used to calculate the secret shared vector corresponding to the table entry index of the database in parallel based on the received key at the server end, and perform vector dot multiplication of the secret shared vector and the database table entry to obtain intermediate data; A second computing module is used to perform parallel reduction on the intermediate data at the server end, and send the reduction result as an evaluation result to the client end; The data acquisition module is used to perform an XOR operation on all received evaluation results at the client to obtain database table item data corresponding to the index.
9. A device, characterized in that: include: A memory for storing a privacy information retrieval program; A processor, configured to implement the steps of the privacy information retrieval method according to any one of claims 1 to 7 when executing the privacy information retrieval program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a privacy information retrieval program, and when the privacy information retrieval program is executed by the processor, the steps of the privacy information retrieval method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Cross-modal privacy semantic retrieval method and system and storage medium
CN114519202A
Approximate image retrieval method and system based on fine granularity
CN118094627A
Privacy-preserving machine learning
US20200242466A1
Search and access pattern hiding verifiable searchable encryption for distributed settings with malicious servers
US20220198048A1
Cited By
Data processing method, product, equipment and computer readable storage medium
CN120068158A
A data processing method, product, device and computer readable storage medium
CN120068158B