Point of interest query method and device based on homomorphic encryption, equipment and storage medium
By using homomorphic encryption and leveraging a cloud server architecture with public and private key distribution, along with secure comparison and multiplication protocols and random noise processing, the privacy leakage problem of cloud server outsourced query services is solved, enabling secure point-of-interest (POI) queries.
Patent Information
- Application Number
- CN202410474109.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-04-19
AI Technical Summary
Outsourcing query services to cloud servers in existing technologies poses a risk of privacy breaches, especially when users query data on points of interest, where the cloud server is untrusted, leading to the leakage of sensitive information.
A homomorphic encryption-based method is adopted, and calculations and decryptions are performed on the first cloud server and the second cloud server respectively through the allocation of public and private keys. The characteristics of homomorphic encryption are used to process the calculation results and data, ensuring that the data is not leaked in the ciphertext state. This includes a secure comparison protocol and a secure multiplication protocol, and random noise is added for privacy processing.
This effectively avoids data privacy leaks during the point of interest search process, ensuring that data does not exist directly on the cloud server in plaintext, thus protecting user privacy.
Smart Images

Figure CN118503526B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and storage medium for querying points of interest based on homomorphic encryption. Background Technology
[0002] In recent years, with the rapid development of location technology, LBS (Location Based Services) has become increasingly popular. Thanks to the booming development of mobile positioning technology, LBS has brought convenience to our lives in many ways, such as restaurant recommendations and travel suggestions.
[0003] In location-based services, when users arrive in an unfamiliar place, they often want to find points of interest that match their preferences, such as restaurants near places they've visited, offering similar cuisines and at acceptable prices. In this scenario, users can request a query from the service provider to find new restaurants that meet their criteria. The service provider selects the best restaurants based on the query and recommends relevant listings.
[0004] However, in reality, users want to find restaurants that match their preferences as closely as possible, so they include two or more conditions in their search requests. As service providers' databases and the number of users searching grow, the efficiency of this search service becomes severely impacted. To reduce query latency, service providers typically outsource their search services to cloud servers. However, cloud servers are not entirely trustworthy. Furthermore, because the service provider's point-of-interest data, user search requests, and search results all contain sensitive information, outsourcing this search service to a cloud server carries the risk of privacy breaches. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for querying points of interest based on homomorphic encryption, which addresses the privacy leaks inherent in outsourcing query services to cloud servers in existing technologies. This invention achieves the goal of outsourcing query services to cloud servers, thereby avoiding data privacy leaks during point of interest queries.
[0006] This invention provides a method for querying points of interest based on homomorphic encryption, applied to a first cloud server with a public key. The method includes:
[0007] Obtain a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition;
[0008] The calculation is performed based on each of the request conditions and each of the interest point data to obtain the calculation result, and the calculation result is sent to the second cloud server so that the second cloud server can obtain the detection result of whether each of the interest points meets each of the request conditions based on the calculation result;
[0009] Receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state;
[0010] The target interest point data corresponding to the target interest point is processed for privacy, and the privacy-processed target interest point data is sent to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0011] The system receives the first sub-data sent by the second cloud server, performs privacy-decryption processing on the first sub-data to obtain target sub-data, and sends the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext state based on the target sub-data and the second sub-data sent by the second cloud server.
[0012] According to the present invention, a method for querying points of interest based on homomorphic encryption, wherein determining the target points of interest that satisfy the query request based on the detection result of the ciphertext state includes:
[0013] Based on the homomorphic property, the number of points of interest that satisfy the request conditions is determined according to the detection results;
[0014] The target points of interest that meet all the request conditions are determined based on a security comparison protocol.
[0015] According to the method for querying points of interest based on homomorphic encryption provided by the present invention, the step of performing privacy processing on the target point of interest data includes:
[0016] Based on the secure multiplication protocol, the interest point vector is obtained according to the target interest points;
[0017] Based on a secure comparison protocol, the target interest point data is obtained according to the interest point vector;
[0018] Noise is randomly added to the target point of interest data to complete the privacy processing.
[0019] According to the present invention, a method for querying points of interest based on homomorphic encryption, wherein the step of performing calculations based on each request condition and each point of interest data to obtain a calculation result includes:
[0020] Each of the aforementioned request conditions is calculated in conjunction with each of the aforementioned point of interest data to obtain the target calculation result;
[0021] Noise is randomly added to each of the calculated target results to obtain the corresponding calculation result.
[0022] This invention provides a method for querying points of interest based on homomorphic encryption, applied to a second cloud server with a private key. The method includes:
[0023] The system receives the calculation results sent by the first cloud server and decrypts the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of each query request;
[0024] Based on the calculation results in plaintext state, a detection result is obtained as to whether each point of interest satisfies the request conditions;
[0025] The detection results are encrypted, and the encrypted detection results are sent to the first cloud server.
[0026] Receive the encrypted target interest point data sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data;
[0027] The first sub-data is sent to the first cloud server, and the second sub-data is sent to the requester corresponding to the query request, so that the requester can obtain the target interest data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data.
[0028] According to a method for querying points of interest based on homomorphic encryption provided by the present invention, the step of obtaining a detection result of whether each point of interest satisfies the request condition based on the calculation result of the plaintext state includes:
[0029] Check whether the calculation result of the plaintext state is equal to 0;
[0030] If the calculation result of the plaintext state is equal to 0, a first detection result is obtained that represents that the point of interest satisfies the corresponding request condition;
[0031] If the calculation result of the plaintext state is not equal to 0, a second detection result is obtained, which indicates that the point of interest does not meet the corresponding request condition.
[0032] According to the present invention, a method for querying points of interest based on homomorphic encryption, wherein obtaining first sub-data and second sub-data based on the decrypted target point of interest data includes:
[0033] The decrypted target interest data is split into the first sub-data and the second sub-data.
[0034] The present invention also provides a point-of-interest query device based on homomorphic encryption, applied to a first cloud server having a public key, the device comprising:
[0035] The first acquisition module is configured to acquire a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition.
[0036] The calculation module is configured to perform calculations based on each of the request conditions and each of the interest point data, obtain calculation results, and send the calculation results to the second cloud server so that the second cloud server can obtain a detection result of whether each of the interest points meets each of the request conditions based on the calculation results;
[0037] The first receiving module is configured to receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state.
[0038] The privacy processing module is configured to perform privacy processing on the target interest point data corresponding to the target interest point, and send the privacy-processed target interest point data to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0039] The second receiving module is configured to receive the first sub-data sent by the second cloud server, perform privacy-decryption processing on the first sub-data to obtain target sub-data, and send the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext state based on the target sub-data and the second sub-data sent by the second cloud server.
[0040] The present invention also provides a point-of-interest query device based on homomorphic encryption, applied to a second cloud server having a private key, the device comprising:
[0041] The third receiving module is configured to receive the calculation results sent by the first cloud server, and decrypt the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of the query request.
[0042] The detection result module is configured to obtain a detection result of whether each point of interest meets the request conditions based on the calculation result of the plaintext state;
[0043] The encryption module is configured to encrypt the detection result and send the encrypted detection result to the first cloud server.
[0044] The fourth receiving module is configured to receive target interest point data in encrypted state sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0045] The sending module is configured to send the first sub-data to the first cloud server and send the second sub-data to the requester corresponding to the query request, so that the requester obtains the target interest point data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein the target sub-data is obtained by the first cloud server based on the first sub-data.
[0046] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the point of interest query method based on homomorphic encryption as described above.
[0047] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the point of interest query method based on homomorphic encryption as described above.
[0048] This invention provides a method, apparatus, device, and storage medium for querying points of interest (POIs) based on homomorphic encryption. The method calculates and processes each request condition and each POI data in encrypted state to obtain a calculation result, which is then sent to a second cloud server. The second cloud server, based on the received calculation result, obtains a detection result indicating whether each POI satisfies each request condition. The second cloud server then returns the encrypted state detection result to a first cloud server. The first cloud server, based on the encrypted state detection result, determines the target POIs that satisfy the query request. The first cloud server then performs privacy processing on the target POI data corresponding to the target POIs and sends the privacy-processed target POI data to the second cloud server. The second cloud server decrypts the target POI data and obtains first and second sub-data based on the decrypted target POI data. Because the first cloud server has performed privacy processing on the target POI data, the first and second sub-data in plaintext state are not actual data. The second cloud server sends the first sub-data to the first cloud server. The first cloud server performs de-privacy processing on the first sub-data to obtain the target sub-data. Since the first sub-data is derived from the de-privacy-processed target point-of-interest (POI) data, the target sub-data obtained based on the first sub-data is not the actual data. The obtained target sub-data is then sent to the requester corresponding to the query request. The requester obtains the plaintext target POI data based on the target sub-data and the second sub-data sent by the second cloud server. The plaintext query request, POI data, and target POI data have never existed in either the first or second cloud server, effectively preventing privacy leaks during POI querying. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0050] Figure 1 This is a flowchart illustrating the point-of-interest query method based on homomorphic encryption, provided by the present invention, applied to a first cloud server with a public key.
[0051] Figure 2 This is a schematic diagram illustrating an application scenario of the embodiments provided in this application;
[0052] Figure 3 This is a flowchart illustrating step 130 in the embodiments provided in this application;
[0053] Figure 4This is a flowchart illustrating step 140 in the embodiments provided in this application;
[0054] Figure 5 This is a schematic diagram illustrating the acquisition of target interest point data based on homomorphic multiplication in an embodiment of this application;
[0055] Figure 6 This is a schematic diagram illustrating privacy processing in an embodiment of this application;
[0056] Figure 7 This is a flowchart illustrating step 120 in the embodiments provided in this application;
[0057] Figure 8 This is a flowchart illustrating the point-of-interest query method based on homomorphic encryption, provided by the present invention, applied to a second cloud server with a private key.
[0058] Figure 9 This is a flowchart illustrating step 820 in the embodiments provided in this application;
[0059] Figure 10 This is a schematic diagram of the structure of the point of interest query device based on homomorphic encryption, which is applied to a first cloud server with a public key, provided by the present invention.
[0060] Figure 11 This is a schematic diagram of the structure of the point of interest query device based on homomorphic encryption, which is applied to a second cloud server with a private key, provided by the present invention.
[0061] Figure 12 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0063] The following is combined Figures 1-9 This invention describes a point-of-interest query method based on homomorphic encryption.
[0064] Figure 1 This is a flowchart illustrating a point-of-interest (POI) query method based on homomorphic encryption, according to an exemplary embodiment, which is applied to a first cloud server possessing a public key. Figure 1 As shown in an exemplary embodiment, the method for querying points of interest based on homomorphic encryption includes steps 110 to 150, which are described in detail below:
[0065] Step 110: Obtain the query request for the encrypted state and the interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition.
[0066] In the embodiments of this application, please refer to Figure 2 , Figure 2 This application scenario illustrates the point-of-interest (POI) query method based on homomorphic encryption provided in this embodiment. The scenario includes a requester, a first cloud server, a second cloud server, and a service outsourcing client. The service outsourcing client defines a public key pk and a private key sk. Based on the Paillier encryption system, it sends the public key pk to the first cloud server and the private key sk to the second cloud server. Simultaneously, when the requester initiates a query request, the public key pk is also provided to the requester. In the Paillier encryption system, the public key pk = (N, g), where N is the product of two large prime numbers p and q, and g = N+1; the private key sk = (λ, μ), where λ = lcm(p-1, q-1), and μ = L(g...). λ mod N)mod N2, lcm represents the least common multiple; the symbol [x] is used to represent the ciphertext of x, i.e., E pk (x); The Paillier encryption system satisfies the homomorphic addition property, and the Add() function is used to represent homomorphic addition.
[0067] The requester generates a query request Q as needed, and then homomorphically encrypts the query request Q using a public key to obtain a ciphertext query request E. pk (Q) Then send the ciphertext status query request E pk (Q) is sent to the first cloud server. The query request includes at least one request condition. For example, if the requester's desired point of interest is a restaurant, the request condition could be the type of restaurant, the average price, etc. Therefore, the format of the query request Q can be {p,s,A,dis,pir,R}, where p = {x,y} represents the current requester's location information, x and y represent coordinates, s represents the type of the requested point of interest (e.g., Chinese restaurant, Western restaurant), A represents the acceptable average price, dis represents the acceptable distance, pir represents the highest acceptable price, and R represents the number of conditions that meet the request. In other embodiments, the format of the query request Q may use other symbols to express the corresponding request conditions.
[0068] The service outsourcing client possesses point-of-interest (POI) data from multiple points of interest. This POI data is then homomorphically encrypted using a public key to obtain E. pk (data) is sent to the first cloud server.
[0069] Step 120: Perform calculations based on the request conditions and the point of interest data to obtain calculation results, and send the calculation results to the second cloud server so that the second cloud server can obtain a detection result of whether each point of interest meets the request conditions based on the calculation results.
[0070] In this embodiment, based on the principle of homomorphic encryption, the first cloud server performs calculations based on each request condition and each point of interest (POI) data to obtain calculation results. Based on the calculation results, it can determine whether the POIs meet each request condition. The obtained calculation results are sent to the second cloud server, which possesses a private key. The second cloud server decrypts the calculation results using the private key and then obtains the detection results of whether each POI meets each request condition based on the decrypted calculation results.
[0071] Step 130: Receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state.
[0072] In this embodiment, after receiving the detection result, the second cloud server performs homomorphic encryption on the detection result and then returns the encrypted detection result to the first cloud server. The first cloud server directly determines the target interest points that satisfy the query request based on the received detection result.
[0073] Step 140: Perform privacy processing on the target interest point data corresponding to the target interest point, and send the privacy-processed target interest point data to the second cloud server, so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0074] In this embodiment, after obtaining the target point of interest, the first cloud server performs privacy processing on the target point of interest data corresponding to the target point of interest, and then sends the privacy-processed target point of interest data to the second cloud server. Upon receiving the privacy-processed target point of interest data, the second cloud server decrypts it and obtains first sub-data and second sub-data based on the decrypted data. At this point, both the first and second sub-data are in plaintext, but because the first cloud server has performed privacy processing on the target point of interest data, neither the first nor the second sub-data is actual data. The second cloud server sends the first sub-data back to the first cloud server, and then directly sends the second sub-data R0 to the requester.
[0075] Step 150: Receive the first sub-data sent by the second cloud server, perform privacy-decryption processing on the first sub-data to obtain target sub-data, and send the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext state based on the target sub-data and the second sub-data sent by the second cloud server.
[0076] In this embodiment of the application, after the first cloud server receives the first sub-data sent by the second cloud server, it directly performs privacy-decryption processing on the first sub-data to obtain the target sub-data R0, and then sends the target sub-data to the requester. The requester can obtain the target point of interest data in plaintext state based on the received target sub-data and second sub-data.
[0077] In this embodiment, the request conditions and point-of-interest (POI) data in the encrypted state are calculated to obtain the calculation results, which are then sent to the second cloud server. The second cloud server, based on the received calculation results, determines whether each POI satisfies the request conditions. The second cloud server then returns the encrypted state detection results to the first cloud server. The first cloud server, based on the encrypted state detection results, determines the target POIs that satisfy the query request. The first cloud server then performs privacy processing on the target POI data corresponding to the target POIs and sends the privacy-processed target POI data to the second cloud server. The second cloud server decrypts the target POI data and obtains the first and second sub-data based on the decrypted target POI data. Because the first cloud server has performed privacy processing on the target POI data, the first and second sub-data in the plaintext state are not actual data. The second cloud server sends the first sub-data to the first cloud server. The first cloud server performs de-privacy processing on the first sub-data to obtain the target sub-data. Since the first sub-data is derived from the de-privacy-processed target point-of-interest (POI) data, the target sub-data obtained based on the first sub-data is not the actual data. The obtained target sub-data is then sent to the requester corresponding to the query request. The requester obtains the plaintext target POI data based on the target sub-data and the second sub-data sent by the second cloud server. The plaintext query request, POI data, and target POI data have never existed in either the first or second cloud server, effectively preventing privacy leaks during POI querying.
[0078] In one exemplary embodiment of this application, please refer to Figure 3 In step 130, based on the detection result of the encrypted state, the target interest point that satisfies the query request is determined, including steps 310 to 320, which are detailed below:
[0079] Step 310: Based on the homomorphic property, determine the number of points of interest that satisfy the request conditions according to the detection results.
[0080] In this embodiment of the application, the first cloud server calculates the number of points of interest that satisfy the request conditions based on the homomorphic property. The number of points of interest i that satisfy the request conditions is represented as [Hi] = Add(Add([Xi,[Yi]]),[Zi]).
[0081] Step 320: Determine the target points of interest that meet all the request conditions based on the security comparison protocol.
[0082] In this embodiment of the application, the first cloud server finds the points of interest that satisfy the query request through the Secure Comparison (SC) protocol. That is, the number of points of interest that satisfy the request conditions reaches the number R specified in the query conditions. The points of interest that satisfy the query request are represented as [Fi] = SC([Hi], [R]).
[0083] In one exemplary embodiment of this application, please refer to Figure 4 The privacy processing of the target interest point data in step 140 includes steps 410 to 430, which are detailed below:
[0084] Step 410: Based on the secure multiplication protocol, obtain the interest point vector according to the target interest point.
[0085] In this embodiment of the application, the first cloud server obtains the interest point vector that meets the query request through the Secure Multiplication (SM) protocol. For example, the interest point vector can be represented as [S] = {[0], [1], [0], ...}, where [1] indicates that the corresponding interest point meets the query request, [0] indicates that the corresponding interest point does not meet the query request, and [Si] = SM([Fi], [Recordi]).
[0086] Step 420: Based on the security comparison protocol, obtain the target interest point data according to the interest point vector.
[0087] In this embodiment of the application, based on a security comparison protocol, target interest point data consisting of all interest points that meet the query request is obtained according to the interest point vector, such as... Figure 5 As shown, target interest point data is obtained based on homomorphic multiplication, i.e. Figure 5 R4 in the query represents the target interest point data corresponding to the target interest point that matches the query request.
[0088] Step 430: Randomly add noise to the target point of interest data to complete the privacy processing.
[0089] In the embodiment of the present application, in order to protect the privacy of data, the first cloud server adds a random number as noise to the target point-of-interest data for obfuscation. Specifically, as Figure 6 shown, a random number 8 is added as noise to the obtained R4 in Figure 5 .
[0090] In an exemplary embodiment of the present application, please refer to Figure 7 , the step 120 of performing calculation processing according to each of the request conditions and each of the point-of-interest data to obtain a calculation result includes steps 710 to 720, which are described in detail as follows:
[0091] Step 710, calculating each of the request conditions with each of the point-of-interest data to obtain a calculation target result.
[0092] In the embodiment of the present application, the first cloud server calculates a calculation target result of each request condition and each point-of-interest data in a ciphertext state, the calculation of the request condition and the point-of-interest data is represented as [m-n], and the calculation process is [m-n]=Add([m],Powmod([n],N-1,N2)).
[0093] Step 720, randomly adding noise to each of the calculation target results to obtain the corresponding calculation result.
[0094] In the embodiment of the present application, a random number r (0≤r<N) is selected for each calculation target result, and the corresponding calculation result [t]=Powdmod([m-n],r,N2) is obtained through calculation. All calculation results [t] are sent to the second cloud server, which decrypts the received [t] through a private key. If the decrypted [t] is equal to 0, a first detection result Epk(1) that the corresponding point of interest meets the corresponding request condition is obtained; if the decrypted [t] is not equal to 0, a second detection result Epk(0) that the corresponding point of interest does not meet the corresponding request condition is obtained. The second cloud server encrypts the obtained detection result and sends it to the first cloud server, which receives the detection result in a ciphertext state.
[0095] Specifically, for acceptable distance request conditions, the first cloud server calculates the distance from the requester's location [p] to the point of interest i using the Secure Squared Euclidean Distance (SSED) protocol: [di] = SSED([p], [Coi]), where Coi represents the location information of the point of interest i. Then, using a secure comparison protocol, the distance request condition dis is compared with the distance [di] to obtain the corresponding target result [xi] = SC([dis], [di]). Finally, a random number is added to the target result to obtain the final calculation result.
[0096] The distance request condition dis and the calculation results of each distance are sent to the second cloud server. The second cloud server returns the corresponding detection results based on each calculation result. Therefore, the first cloud server will get a vector X = {[0],[1],[1]…}, which indicates whether the requester and each point of interest meet the distance request condition. Xi = [1] indicates that the requester and point of interest i meet the distance request condition, and Xi = [0] indicates that the requester and point of interest i do not meet the distance request condition.
[0097] Similarly, for the category request condition s, the first cloud server calculates the category request condition s and the categories of each point of interest to obtain the corresponding calculation target result [Yi] = SC([s], [Cui]), where Cui represents the category of the i-th point of interest. For the highest price request condition pir, the first cloud server calculates the highest price request condition pir and the highest price of each point of interest to obtain the corresponding calculation target result [Zi] = SC([pir], [Cpi]), where Cpi represents the highest price of the i-th point of interest. In this embodiment, the location information, category, highest price, etc. of the points of interest are all in encrypted form and are included in the point of interest data corresponding to each point of interest.
[0098] Figure 8 This is a flowchart illustrating a point-of-interest (POI) query method based on homomorphic encryption, according to an exemplary embodiment. This method is applied to a second cloud server possessing a private key. Figure 8 As shown in an exemplary embodiment, the method for querying points of interest based on homomorphic encryption includes steps 810 to 850, which are described in detail below:
[0099] Step 810: Receive the calculation result sent by the first cloud server, and decrypt the calculation result using the private key to obtain the calculation result in plaintext; wherein, the calculation result is obtained based on each point of interest data and each request condition of the query request.
[0100] In this embodiment of the application, after receiving the calculation result, the second cloud server decrypts the calculation result to obtain the calculation result in plaintext.
[0101] Step 820: Based on the calculation results of the plaintext state, obtain the detection results of whether each point of interest meets the request conditions.
[0102] In this embodiment of the application, the detection results corresponding to each calculation result are obtained based on the calculation results of the plaintext state, and the detection results represent whether the corresponding point of interest meets the corresponding request conditions.
[0103] Step 830: Encrypt the detection result and send the encrypted detection result to the first cloud server.
[0104] In this embodiment of the application, the second cloud server encrypts the obtained detection results and then sends the encrypted detection results to the first cloud server.
[0105] Step 840: Receive the encrypted target interest point data sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0106] In this embodiment, after receiving the detection result, the first cloud server decrypts it and then directly determines the target interest points that satisfy the query request based on the received detection result. After obtaining the target interest points, the first cloud server performs privacy processing on the target interest point data corresponding to the target interest points, and then sends the privacy-processed target interest point data to the second cloud server.
[0107] After receiving the privacy-processed target interest data, the second cloud server decrypts it using a private key and then obtains the first and second sub-data based on the decrypted target interest data.
[0108] Step 850: Send the first sub-data to the first cloud server and send the second sub-data to the requester corresponding to the query request, so that the requester can obtain the target interest data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data.
[0109] In this embodiment, the second cloud server sends the first sub-data to the first cloud server and the second sub-data to the requester corresponding to the query request. After receiving the first sub-data sent by the second cloud server, the first cloud server directly performs privacy-decryption processing on the first sub-data to obtain the target sub-data, and then sends the target sub-data to the requester. The requester can obtain the target point of interest data in plaintext state based on the received target sub-data and second sub-data.
[0110] In one exemplary embodiment of this application, please refer to Figure 9 Step 820, based on the calculation results of the plaintext state, obtains the detection results of whether each point of interest meets the request conditions, including steps 910 to 930, which are detailed below:
[0111] Step 910: Check whether the calculation result of the plaintext state is equal to 0;
[0112] In this embodiment of the application, it is detected whether each calculation result of the plaintext state is equal to 0.
[0113] Step 920: If the calculation result of the plaintext state is equal to 0, a first detection result is obtained that represents that the point of interest satisfies the corresponding request condition.
[0114] In this embodiment of the application, if the calculation result of the plaintext state is equal to 0, the first detection result Epk(1) is obtained to represent the interest point that satisfies the corresponding request condition.
[0115] Step 930: If the calculation result of the plaintext state is not equal to 0, a second detection result is obtained that represents that the point of interest does not meet the corresponding request condition.
[0116] In this embodiment of the application, if the calculation result of the plaintext state is not equal to 0, the second detection result Epk(0) is obtained, which indicates that the corresponding interest point does not meet the corresponding request condition.
[0117] In one exemplary embodiment of this application, please refer to Figure 10 Step 840, which describes obtaining the first sub-data and the second sub-data based on the decrypted target interest point data, includes the following steps, detailed below:
[0118] The decrypted target interest data is split into the first sub-data and the second sub-data.
[0119] In the embodiments of this application, such as Figure 6As shown, the second cloud server splits the decrypted target point of interest data, sending the first sub-data to the first cloud server and the second sub-data to the requester. Upon receiving the first sub-data, the first cloud server directly performs de-privacy processing on it, subtracting the random number 8 from R4 to obtain the target sub-data, which is then sent to the requester. The requester adds the received target sub-data to the second sub-data to obtain the plaintext target point of interest data.
[0120] The following describes the point-of-interest (POI) query device based on homomorphic encryption provided by the present invention. The POI query device described below corresponds to the POI query method described above. It should be noted that the device provided in the following embodiments and the method provided in the above embodiments belong to the same concept, and the specific way in which each module and unit performs its operation has been described in detail in the method embodiments, and will not be repeated here.
[0121] In one exemplary embodiment of the present invention, please refer to Figure 10 , Figure 10 This is an exemplary embodiment of a point-of-interest query device based on homomorphic encryption applied to a first cloud server having a public key, comprising:
[0122] The first acquisition module 1010 is configured to acquire a query request for the ciphertext state and interest point data for each interest point in the ciphertext state; wherein, the query request includes at least one request condition.
[0123] The calculation module 1020 is configured to perform calculations based on each of the request conditions and each of the interest point data to obtain calculation results, and send the calculation results to the second cloud server so that the second cloud server can obtain a detection result of whether each of the interest points meets each of the request conditions based on the calculation results;
[0124] The first receiving module 1030 is configured to receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state.
[0125] The privacy processing module 1040 is configured to perform privacy processing on the target interest point data corresponding to the target interest point, and send the privacy-processed target interest point data to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0126] The second receiving module 1050 is configured to receive the first sub-data sent by the second cloud server, perform privacy-decryption processing on the first sub-data to obtain target sub-data, and send the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext state based on the target sub-data and the second sub-data sent by the second cloud server.
[0127] In an exemplary embodiment of the present invention, the first receiving module 1030 includes:
[0128] The first determining submodule is configured to determine the number of points of interest that satisfy the request conditions based on the detection results, according to the homomorphic characteristics.
[0129] The second determination submodule is configured to determine the target point of interest that meets all request conditions based on a security comparison protocol.
[0130] In an exemplary embodiment of the present invention, the privacy processing module 1040 includes:
[0131] The interest point vector submodule is configured to obtain an interest point vector based on the target interest point using a secure multiplication protocol.
[0132] The target interest point data submodule is configured to obtain the target interest point data based on the interest point vector using a secure comparison protocol.
[0133] The first addition submodule is configured to randomly add noise to the target point of interest data in order to complete the privacy processing.
[0134] In an exemplary embodiment of the present invention, the computing module 1020 includes:
[0135] The calculation submodule is configured to calculate each of the request conditions with each of the interest point data to obtain the calculation target result;
[0136] The second submodule is configured to randomly add noise to each of the calculation target results to obtain the corresponding calculation result.
[0137] In one exemplary embodiment of the present invention, please refer to Figure 11 , Figure 11 This is an exemplary embodiment of a point-of-interest query device based on homomorphic encryption applied to a second cloud server having a private key, comprising:
[0138] The third receiving module 1110 is configured to receive the calculation result sent by the first cloud server, and decrypt the calculation result using the private key to obtain the calculation result in plaintext; wherein, the calculation result is obtained based on the data of each point of interest and the request conditions of the query request.
[0139] The detection result module 1120 is configured to obtain a detection result of whether each point of interest meets the request conditions based on the calculation result of the plaintext state.
[0140] The encryption module 1130 is configured to encrypt the detection result and send the encrypted detection result to the first cloud server.
[0141] The fourth receiving module 1140 is configured to receive target interest point data in encrypted state sent by the first cloud server, decrypt the target interest point data using the private key, and obtain first sub-data and second sub-data based on the decrypted target interest point data.
[0142] The sending module 1150 is configured to send the first sub-data to the first cloud server and send the second sub-data to the requester corresponding to the query request, so that the requester can obtain the target interest point data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein the target sub-data is obtained by the first cloud server based on the first sub-data.
[0143] In an exemplary embodiment of the present invention, the detection result module 1120 includes:
[0144] The detection submodule is configured to detect whether the calculation result in the plaintext state is equal to 0;
[0145] The first detection result submodule is configured to obtain a first detection result that represents the interest point satisfying the corresponding request condition if the calculation result in plaintext state is equal to 0.
[0146] The second detection result submodule is configured to obtain a second detection result indicating that the point of interest does not meet the corresponding request condition if the calculation result in the plaintext state is not equal to 0.
[0147] In an exemplary embodiment of the present invention, the fourth receiving module 1140 includes:
[0148] The splitting submodule is configured to split the decrypted target interest point data to obtain the first sub-data and the second sub-data.
[0149] Figure 12 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 12 As shown, the electronic device may include a processor 1210, a communications interface 1220, a memory 1230, and a communication bus 1240, wherein the processor 1210, the communications interface 1220, and the memory 1230 communicate with each other via the communication bus 1240. The processor 1210 can call logical instructions in the memory 1230 to execute a homomorphic encryption-based point-of-interest (POI) query method applied to a first cloud server with a public key, and to execute a homomorphic encryption-based POI query method applied to a second cloud server with a private key.
[0150] This method for querying points of interest based on homomorphic encryption, applied to a first cloud server with a public key, includes:
[0151] Obtain a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition;
[0152] The calculation is performed based on each of the request conditions and each of the interest point data to obtain the calculation result, and the calculation result is sent to the second cloud server so that the second cloud server can obtain the detection result of whether each of the interest points meets each of the request conditions based on the calculation result;
[0153] Receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state;
[0154] Privacy processing is performed on the target interest point data corresponding to the target interest point, and the privacy-processed target interest point data is sent to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data;
[0155] The system receives the first sub-data sent by the second cloud server, performs privacy-decryption processing on the first sub-data to obtain target sub-data, and sends the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext based on the target sub-data and the second sub-data sent by the second cloud server.
[0156] This method for querying points of interest based on homomorphic encryption, applied to a second cloud server with a private key, includes:
[0157] The system receives the calculation results sent by the first cloud server and decrypts the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of each query request;
[0158] Based on the calculation results in plaintext state, a detection result is obtained as to whether each point of interest satisfies the request conditions;
[0159] The detection results are encrypted, and the encrypted detection results are sent to the first cloud server.
[0160] Receive the encrypted target interest point data sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data;
[0161] The first sub-data is sent to the first cloud server, and the second sub-data is sent to the requester corresponding to the query request, so that the requester can obtain the target interest data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data.
[0162] Furthermore, the logical instructions in the aforementioned memory 1230 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0163] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for querying points of interest based on homomorphic encryption applied to a first cloud server having a public key, and a method for querying points of interest based on homomorphic encryption applied to a second cloud server having a private key.
[0164] This method for querying points of interest based on homomorphic encryption, applied to a first cloud server with a public key, includes:
[0165] Obtain a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition;
[0166] The calculation is performed based on each of the request conditions and each of the interest point data to obtain the calculation result, and the calculation result is sent to the second cloud server so that the second cloud server can obtain the detection result of whether each of the interest points meets each of the request conditions based on the calculation result;
[0167] Receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state;
[0168] The target interest point data corresponding to the target interest point is processed for privacy, and the privacy-processed target interest point data is sent to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data.
[0169] The system receives the first sub-data sent by the second cloud server, performs privacy-decryption processing on the first sub-data to obtain target sub-data, and sends the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext based on the target sub-data and the second sub-data sent by the second cloud server.
[0170] This method for querying points of interest based on homomorphic encryption, applied to a second cloud server with a private key, includes:
[0171] The system receives the calculation results sent by the first cloud server and decrypts the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of each query request;
[0172] Based on the calculation results in plaintext state, a detection result is obtained as to whether each point of interest satisfies the request conditions;
[0173] The detection results are encrypted, and the encrypted detection results are sent to the first cloud server.
[0174] Receive the encrypted target interest point data sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data;
[0175] The first sub-data is sent to the first cloud server, and the second sub-data is sent to the requester corresponding to the query request, so that the requester can obtain the target interest data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data.
[0176] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for querying points of interest based on homomorphic encryption, characterized in that, Applied to a first cloud server that has a public key, the method includes: Obtain a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition; The calculation is performed based on each of the request conditions and each of the interest point data to obtain the calculation result, and the calculation result is sent to the second cloud server so that the second cloud server can obtain the detection result of whether each of the interest points meets each of the request conditions based on the calculation result; Receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state; The target interest point data corresponding to the target interest point is processed for privacy, and the privacy-processed target interest point data is sent to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data. The system receives the first sub-data sent by the second cloud server, performs privacy-decryption processing on the first sub-data to obtain target sub-data, and sends the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext based on the target sub-data and the second sub-data sent by the second cloud server. The step of determining the target interest point that satisfies the query request based on the detection result of the encrypted state includes: Based on the homomorphic property, the number of points of interest that satisfy the request conditions is determined according to the detection results; The target points of interest that meet all the request conditions are determined based on a security comparison protocol.
2. The interest point query method based on homomorphic encryption according to claim 1, characterized in that, The privacy processing of the target interest point data includes: Based on the secure multiplication protocol, the interest point vector is obtained according to the target interest points; Based on a secure comparison protocol, the target interest point data is obtained according to the interest point vector; Noise is randomly added to the target point of interest data to complete the privacy processing.
3. The interest point query method based on homomorphic encryption according to claim 1, characterized in that, The calculation process based on each of the request conditions and each of the point of interest data to obtain the calculation result includes: Each of the aforementioned request conditions is calculated in conjunction with each of the aforementioned point of interest data to obtain the target calculation result; Noise is randomly added to each of the calculated target results to obtain the corresponding calculation result.
4. A method for querying points of interest based on homomorphic encryption, characterized in that, Applied to a second cloud server that has a private key, the method includes: The system receives the calculation results sent by the first cloud server and decrypts the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of each query request; Based on the calculation results in plaintext state, a detection result is obtained as to whether each point of interest satisfies the request conditions; The detection results are encrypted, and the encrypted detection results are sent to the first cloud server. Receive the encrypted target interest point data sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data; The first sub-data is sent to the first cloud server, and the second sub-data is sent to the requester corresponding to the query request, so that the requester can obtain the target interest point data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data; The step of obtaining the detection result of whether each point of interest satisfies the request conditions based on the calculation result of the plaintext state includes: Check whether the calculation result of the plaintext state is equal to 0; If the calculation result of the plaintext state is equal to 0, a first detection result is obtained that represents that the point of interest satisfies the corresponding request condition; If the calculation result of the plaintext state is not equal to 0, a second detection result is obtained, which indicates that the point of interest does not meet the corresponding request condition.
5. The interest point query method based on homomorphic encryption according to claim 4, characterized in that, The step of obtaining the first sub-data and the second sub-data based on the decrypted target interest point data includes: The decrypted target interest data is split into the first sub-data and the second sub-data.
6. A point-of-interest query device based on homomorphic encryption, characterized in that, The device, applied to a first cloud server with a public key, includes: The first acquisition module is configured to acquire a query request for the encrypted state and interest point data for each interest point in the encrypted state; wherein the query request includes at least one request condition. The calculation module is configured to perform calculations based on each of the request conditions and each of the interest point data, obtain calculation results, and send the calculation results to the second cloud server so that the second cloud server can obtain a detection result of whether each of the interest points meets each of the request conditions based on the calculation results; The first receiving module is configured to receive the detection result of the encrypted state returned by the second cloud server, and determine the target interest point that satisfies the query request based on the detection result of the encrypted state. The privacy processing module is configured to perform privacy processing on the target interest point data corresponding to the target interest point, and send the privacy-processed target interest point data to the second cloud server so that the second cloud server can decrypt the target interest point data and obtain the first sub-data and the second sub-data based on the decrypted target interest point data. The second receiving module is configured to receive the first sub-data sent by the second cloud server, perform privacy-decryption processing on the first sub-data to obtain target sub-data, and send the target sub-data to the requester corresponding to the query request, so that the requester can obtain the target point of interest data in plaintext state based on the target sub-data and the second sub-data sent by the second cloud server. The first receiving module includes: The first determining submodule is configured to determine the number of points of interest that satisfy the request conditions based on the detection results, according to the homomorphic characteristics. The second determination submodule is configured to determine the target point of interest that meets all request conditions based on a security comparison protocol.
7. A point-of-interest query device based on homomorphic encryption, characterized in that, The device, applied to a second cloud server with a private key, includes: The third receiving module is configured to receive the calculation results sent by the first cloud server, and decrypt the calculation results using the private key to obtain the calculation results in plaintext; wherein, the calculation results are obtained based on the data of each point of interest and the request conditions of the query request. The detection result module is configured to obtain a detection result of whether each point of interest meets the request conditions based on the calculation result of the plaintext state; The encryption module is configured to encrypt the detection result and send the encrypted detection result to the first cloud server. The fourth receiving module is configured to receive target interest point data in encrypted state sent by the first cloud server, decrypt the target interest point data using the private key, and obtain the first sub-data and the second sub-data based on the decrypted target interest point data. The sending module is configured to send the first sub-data to the first cloud server and send the second sub-data to the requester corresponding to the query request, so that the requester can obtain the target interest point data in plaintext state based on the second sub-data and the target sub-data sent by the first cloud server; wherein, the target sub-data is obtained by the first cloud server based on the first sub-data; The detection result module includes: The detection submodule is configured to detect whether the calculation result in the plaintext state is equal to 0; The first detection result submodule is configured to obtain a first detection result that represents the interest point satisfying the corresponding request condition if the calculation result in plaintext state is equal to 0. The second detection result submodule is configured to obtain a second detection result indicating that the point of interest does not meet the corresponding request condition if the calculation result in the plaintext state is not equal to 0.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the point of interest query method based on homomorphic encryption as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the point of interest query method based on homomorphic encryption as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Efficient query processing method for protecting location privacy and query privacy
CN111083631A
Random anchor position privacy protection method and system based on homomorphic encryption
CN113613243A
