Data encryption method and encryption query method
Through the homomorphic encryption method and the secure index of SAR-Tree structure, the problems of low query efficiency and insufficient privacy protection in the existing encryption query methods are solved, and efficient query and comprehensive privacy protection are achieved in the encryption state.
Patent Information
- Application Number
- CN202411874454.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Due to the changes in the data structure by the encryption method, the existing encryption query methods cannot implement accurate query in an encrypted state, resulting in reduced query efficiency and insufficient privacy protection capabilities, which can easily lead to information leakage.
Homomorphic encryption is used to encrypt the target data, and a secure index based on the SAR-Tree structure is built and stored on the cloud server to perform effective query operations on the encrypted data while preventing privacy leakage.
It realizes efficient querying in an encrypted state, significantly reduces the computational volume and storage overhead during the query process, improves query efficiency, and provides comprehensive protection of data privacy, query privacy, result privacy and access mode privacy.
Smart Images

Figure CN119848889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a data encryption method and an encryption query method. Background Art
[0002] With the development of cloud computing infrastructure, more and more small and medium-sized enterprises are migrating services and data to cloud platforms. In order to protect data privacy, data is usually encrypted before outsourcing, however, the query performance of encrypted data will be affected.
[0003] After data is encrypted, query performance is often affected due to the complexity of the encryption algorithm and the change in data structure. Although traditional encryption methods such as AES provide powerful data encryption functions, they require decryption operations when querying, which increases the complexity and time cost of queries. In addition, encrypted data may also face additional overhead during storage and transmission.
[0004] Order-Preserving Encryption (OPE) and Order-Revealing Encryption (ORE) are used to encrypt data sets and then query them. Although this can solve the problem of decryption required for querying, these two methods are based on sequential queries. Range queries can be performed directly on encrypted data, but exact value queries in most cases require decryption before they can be performed. Therefore, accurate location distance calculations cannot be performed without decryption.
[0005] The above methods also have deficiencies in protecting access pattern privacy. Access pattern refers to the pattern and habits of users querying data. By analyzing the access pattern, attackers may infer the user's sensitive information or query purpose. However, the above methods do not fully consider this point, resulting in the user's access pattern being easily leaked.
[0006] In summary, the existing encrypted query methods cannot achieve accurate queries in an encrypted state due to the changes in the data structure caused by the encryption methods, which reduces the query efficiency. In addition, the privacy protection capabilities of the existing methods are insufficient and easily lead to information leakage. Summary of the invention
[0007] To this end, the technical problem to be solved by the present invention is to overcome the problem in the prior art that due to the change of the data structure by the encryption method, accurate query cannot be achieved in the encrypted state, resulting in reduced query efficiency and insufficient privacy protection capability.
[0008] In order to solve the above technical problems, the present invention provides a data encryption method, which is applied to a client and includes: Use homomorphic encryption to create a key pair consisting of a public key and a private key; Encrypt the target data using the public key to obtain the corresponding encrypted data; Using encrypted data as nodes, a secure index based on the SAR-Tree structure is constructed and sent to the cloud server for storage.
[0009] Preferably, the homomorphic encryption method includes: Paillier algorithm, RSA algorithm and ElGamal algorithm.
[0010] Preferably, the security index based on the SAR-Tree structure includes: Leaf nodes are represented as: ; Ordinary non-leaf nodes are represented as: ; A non-leaf node containing a blind object is represented as: ; in, represents the encrypted data represented by the i-th leaf node in the security index, Indicates the total number of data nodes in the subtree contained in the root node of the node. represents the minimum bounding matrix of the node, represents the center of the spatial matrix of the node, is the encryption symbol, Indicates that the node points to the node in the next layer; Represents the encryption carrier combination corresponding to all blind objects under the same parent node, Indicates the node buckets that have the same parent node. Indicates based on and The expression for the obtained child nodes is: , Indicates the number of nodes in the subtree containing the non-leaf node containing the blind object. Layer A blind subject, , , Indicates the total number of leaf nodes associated with the parent node. Indicates the total number of blind objects that can be accommodated in each leaf node.
[0011] This embodiment provides an encryption query method based on the data encryption method described above, which is applied to a cloud server and includes: Obtain an encrypted query request after the client encrypts the original query request using the public key in the key pair; Based on the encrypted query request, security index and private key, the loose score corresponding to each non-leaf node in the security index is calculated, and the heap sort is used to descend to obtain the corresponding descending heap; Based on the descending heap, obtain the non-leaf node with the largest loose score, and access the child nodes of the non-leaf node. Based on the dimensions of the non-leaf node and the corresponding child nodes, obtain the result vector, update the loose score of the non-leaf node, and obtain the exact score corresponding to the non-leaf node. Calculate the exact scores of the nodes in the descending heap in sequence, and build a pruner and an encrypted result set based on the exact scores and a preset pruning threshold, until all the remaining uncalculated nodes in the descending heap are dominated by the nodes in the pruner, and obtain the target encrypted result set; Add each node in the target encryption result set to a preset noise component to obtain a noise vector and an encrypted interference point set, and use a private key to decrypt each encrypted interference point in the encrypted interference point set to obtain a corresponding decrypted data set; The decrypted data set and the noise vector are sent to the client so that the client can use the noise vector to denoise each decrypted data in the decrypted data set, obtain the corresponding original data, and restore the data to be queried in the target data set required by the original query request.
[0012] Preferably, based on the encrypted query request, the security index and the private key, calculating the loose score corresponding to each non-leaf node in the security index includes: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 2? If the non-leaf node If the number of layers is not greater than 2, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 2, then the non-leaf node is judged Is there a dominating object belonging to the non-leaf object set: If it exists, the non-leaf node The recursive call points to the non-leaf node According to the homomorphic property, the loose score of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node are added. After adding, add it to the non-leaf node The loose scores of the non-leaf nodes are added together. The loose fraction of If it does not exist, the non-leaf node will not be updated. The loose fraction of .
[0013] Preferably, obtaining a result vector based on the dimensions of the non-leaf node and the corresponding child node includes: The non-leaf node and the corresponding child node are used as the first encryption object. With the second encrypted object , respectively calculating the spatial dimension and the non-spatial dimension of the first encrypted object and the second encrypted object; Calculate the sum of the spatial dimension and the non-spatial dimension of the first encrypted object as the dimension sum of the first encrypted object ; Calculate the sum of the spatial dimension and the non-spatial dimension of the second encrypted object as the dimension sum of the second encrypted object ; Compare the dimensions of the first encrypted object and and the dimension of the second encrypted object : like , the returned result vector is 0; like , then compare the first encrypted object With the second encrypted object , and obtains a result vector containing the comparison results of the spatial dimensions and the non-spatial dimensions.
[0014] Preferably, obtaining a result vector including the comparison result of the spatial dimension and the non-spatial dimension comprises: If the first encrypted object The spatial dimension of the second encrypted object is no greater than If the spatial dimension is , the spatial dimension comparison result is 1, otherwise the spatial dimension comparison result is 0; If the first encrypted object The non-spatial dimension of the second encrypted object is no greater than If it is a non-spatial dimension, the comparison result of the non-spatial dimension is 1, otherwise the comparison result of the non-spatial dimension is 0; A result vector is constructed based on the comparison result of the spatial dimension and the comparison result of the non-spatial dimension.
[0015] Preferably, updating the loose score of the non-leaf node to obtain the exact score corresponding to the non-leaf node includes: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 1? If the non-leaf node If the number of layers is not greater than 1, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 1, then the non-leaf object set is calculated Result vector for non-leaf nodes : If there is a non-leaf node that satisfies and , then the recursive call of the non-leaf node points to the child node of the non-leaf node; If there is a non-leaf node that satisfies , then according to the homomorphic property, the loose fraction of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node After adding, add it to the non-leaf node The loose scores of the non-leaf nodes are added together. The exact fraction of in, is the encrypted object represented by the non-leaf node, Indicates encrypted query, represents the encrypted minimum bounding rectangle MBR with the maximum spatial distance, Represents the encrypted minimum bounding rectangle with minimum spatial distance.
[0016] Preferably, based on the exact score and the preset pruning threshold, a pruner and an encrypted result set are constructed until all remaining uncalculated nodes in the descending heap are dominated by the nodes in the pruner, and a target encrypted result set is obtained, including: Judge the child nodes of each non-leaf node in the descending heap in descending order according to the exact score: If the exact score of a child node of a non-leaf node is greater than the preset pruning threshold, the corresponding child node is added to the encrypted result set and the dominating point is added to the pruner set; Until all the child nodes of non-leaf nodes are dominated by the nodes in the pruner set, the current encryption result set is output as the target encryption result set.
[0017] Preferably, the client uses the noise vector to denoise each decrypted data in the decrypted data set to obtain the corresponding original data, which is expressed as: ; in, Indicates the first The original data corresponding to the decrypted data, Indicates the first Decrypted data, Indicates the first The noise component corresponding to the decrypted data.
[0018] The above technical solution of the present invention has the following beneficial effects compared with the prior art: The data encryption method described in the present invention utilizes a homomorphic encryption method to encrypt a target data set to ensure that effective query operations can be performed on the encrypted data without the need to decrypt the data before querying, while also preventing potential privacy leaks during the query process. Using encrypted data as nodes, a security index based on a SAR-Tree structure is constructed and stored in a cloud server for query based on the security index. The SAR-Tree structure can significantly reduce the amount of computation and storage overhead during the query process, thereby improving query efficiency.
[0019] The encrypted query method of the present invention performs a dominated query based on the security index of the SAR-Tree structure constructed by the data encryption method of the present invention, calculates the loose score corresponding to each non-leaf node in the security index, and uses heap sorting to descend, obtains the corresponding descending heap, and further calculates the precise score to prune the descending heap to obtain the target encrypted result set; by constructing a descending heap, the node most likely to contain the required data can be quickly located, the precise score of the node is gradually calculated, and a pruner is constructed using a preset pruning threshold, and the dominated nodes are continuously eliminated, the query range is gradually narrowed, and the objects dominated by the Top-k position are retained to complete the query, effectively reducing unnecessary calculations and improving query efficiency. The present invention adds each node in the target encrypted result set to a preset noise component, obtains a noise vector and an encrypted interference point, decrypts the encrypted interference point using a private key, obtains decrypted data, and sends it to the client to restore the original data; during the entire query process, the data exists in an encrypted form, and will not be decrypted until the data is sent to the client, thereby protecting data privacy, ensuring the security of the query result during transmission, and preventing the leakage of the result information; the query request is also encrypted to prevent the leakage of the query content. The present invention provides comprehensive protection of data privacy, query privacy, result privacy and access mode privacy while executing queries, thereby ensuring data query security. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein: Figure 1 It is a flow chart of the steps of the data encryption method provided by the present invention; Figure 2 It is a flowchart of the steps of the encryption query method provided by the present invention; Figure 3It is a schematic diagram of the data circulation model provided by the present invention; Figure 4 is a flowchart of the steps of Top-k dominance query provided by the present invention; Figure 5 is a schematic diagram of a target data set provided by the present invention; Figure 6 It is a schematic diagram of the SAR-Tree structure provided by the present invention; Figure 7 It is a query iteration schematic diagram provided by the present invention. DETAILED DESCRIPTION
[0021] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Embodiment 1:
[0022] Reference Figure 1 As shown, the step flow chart of the data encryption method provided by the present invention is applied to the client, and the specific steps include: S101: Create a key pair including a public key and a private key using a homomorphic encryption method; S102: Encrypt the target data using the public key to obtain corresponding encrypted data; S103: Using the encrypted data as nodes, a security index based on the SAR-Tree structure is constructed and sent to the cloud server for storage.
[0023] Specifically, the homomorphic encryption method includes: Paillier algorithm, RSA algorithm and ElGamal algorithm.
[0024] Specifically, the security index based on the SAR-Tree structure includes: Leaf nodes are represented as: ; Ordinary non-leaf nodes are represented as: ; A non-leaf node containing a blind object is represented as: ; in, represents the encrypted data represented by the i-th leaf node in the security index, Indicates the total number of data nodes in the subtree contained in the root node of the node. represents the minimum bounding matrix of the node, represents the center of the spatial matrix of the node, is the encryption symbol, Indicates that the node points to the node in the next layer; Represents the encryption carrier combination corresponding to all blind objects under the same parent node, Indicates the node buckets that have the same parent node. Indicates based on and The expression for the obtained child nodes is: , Indicates the number of nodes in the subtree containing the non-leaf node containing the blind object. Layer A blind subject, , , Indicates the total number of leaf nodes associated with the parent node. Indicates the total number of blind objects that can be accommodated in each leaf node.
[0025] The data encryption method described in the present invention utilizes a homomorphic encryption method to encrypt a target data set to ensure that effective query operations can be performed on the encrypted data without the need to decrypt the data before querying, while also preventing potential privacy leaks during the query process. Using encrypted data as nodes, a security index based on a SAR-Tree structure is constructed and stored in a cloud server for query based on the security index. The SAR-Tree structure can significantly reduce the amount of computation and storage overhead during the query process, thereby improving query efficiency.
[0026] Embodiment 2: Reference Figure 2 As shown, the step flow chart of the encrypted query method provided by the present invention is applied to a cloud server, and the specific steps include: S201: Obtain an encrypted query request obtained by encrypting the original query request by the client using the public key in the key pair; S202: Based on the encrypted query request, the security index and the private key, the loose score corresponding to each non-leaf node in the security index is calculated, and the nodes are sorted in descending order using a heap sort to obtain a corresponding descending heap; S203: Based on the descending heap, obtain the non-leaf node with the largest loose score, access the child nodes of the non-leaf node, obtain the result vector based on the dimensions of the non-leaf node and the corresponding child nodes, update the loose score of the non-leaf node, and obtain the exact score corresponding to the non-leaf node; S204: Calculate the exact scores of the nodes in the descending heap in sequence, and construct a pruner and an encrypted result set based on the exact scores and a preset pruning threshold, until all the remaining uncalculated nodes in the descending heap are dominated by the nodes in the pruner, and obtain a target encrypted result set, including: S204-1: Determine the child nodes of each non-leaf node in the descending heap in descending order according to the exact scores: S204-2: If the exact score of the child node of the non-leaf node is greater than the preset pruning threshold, the corresponding child node is added to the encryption result set, and the dominating point is added to the pruner set; S204-3: until all child nodes of non-leaf nodes are dominated by nodes in the pruner set, the current encryption result set is output as the target encryption result set.
[0027] S205: adding each node in the target encryption result set to a preset noise component to obtain a noise vector and an encrypted interference point set, decrypting each encrypted interference point in the encrypted interference point set using a private key to obtain a corresponding decrypted data set; S206: Send the decrypted data set and the noise vector to the client, so that the client can use the noise vector to denoise each decrypted data in the decrypted data set, obtain the corresponding original data, and restore the data to be queried in the target data set required by the original query request.
[0028] Among them, the decrypted data set The original data corresponding to the decrypted data , expressed as: ; Indicates the first Decrypted data, Indicates the first The noise component corresponding to the decrypted data.
[0029] Specifically, in step S202, based on the encrypted query request, the security index and the private key, the loose score corresponding to each non-leaf node in the security index is calculated, including: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 2? If the non-leaf node If the number of layers is not greater than 2, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 2, then the non-leaf node is judged Is there a dominating object belonging to the non-leaf object set: If it exists, the non-leaf node The recursive call points to the non-leaf node According to the homomorphic property, the loose score of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node are added. After adding, add it to the non-leaf node The loose scores of the non-leaf nodes are added together. The loose fraction of If it does not exist, the non-leaf node will not be updated. The loose fraction of .
[0030] Specifically, in step S203, the acquisition of the result vector includes: The non-leaf node and the corresponding child node are used as the first encryption object. With the second encrypted object , respectively calculating the spatial dimension and the non-spatial dimension of the first encrypted object and the second encrypted object; Calculate the sum of the spatial dimension and the non-spatial dimension of the first encrypted object as the dimension sum of the first encrypted object ; Calculate the sum of the spatial dimension and the non-spatial dimension of the second encrypted object as the dimension sum of the second encrypted object ; Compare the dimensions of the first encrypted object and and the dimension of the second encrypted object : like , the returned result vector is 0; like , then compare the first encrypted object With the second encrypted object , and obtains a result vector containing the comparison results of the spatial dimensions and the non-spatial dimensions.
[0031] Among them, if the first encrypted object The spatial dimension of the second encrypted object is no greater than If the first encrypted object has a spatial dimension, the returned spatial dimension comparison result is 1, otherwise the spatial dimension comparison result is 0; The non-spatial dimension of the second encrypted object is no greater than If the non-spatial dimension is a non-spatial dimension, the comparison result of the non-spatial dimension is 1, otherwise the comparison result of the non-spatial dimension is 0; based on the comparison results of the spatial dimension and the non-spatial dimension, a result vector is constructed, that is, a result vector containing the comparison results of the spatial dimension and multiple non-spatial dimensions.
[0032] Specifically, in step S203, the loose score of the non-leaf node is updated to obtain the exact score corresponding to the non-leaf node, including: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 1? If the non-leaf node If the number of layers is not greater than 1, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 1, then the non-leaf object set is calculated Result vector for non-leaf nodes : If there is a non-leaf node that satisfies and , then the recursive call of the non-leaf node points to the child node of the non-leaf node; If there is a non-leaf node that satisfies , then according to the homomorphic property, the loose fraction of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node After adding, add it to the non-leaf node The loose scores of the non-leaf nodes are added together. The exact fraction of in, is the encrypted object represented by the non-leaf node, Indicates encrypted query, represents the encrypted minimum bounding rectangle MBR with the maximum spatial distance, Represents the encrypted minimum bounding rectangle with minimum spatial distance.
[0033] The encryption query method of the present invention performs a control query based on the security index of the SAR-Tree structure constructed by the data encryption method of the present invention, calculates the loose score corresponding to each non-leaf node in the security index, and uses heap sorting to descend, obtains the corresponding descending heap, and further calculates the precise score to prune the descending heap to obtain the target encryption result set; by constructing a descending heap, the node that is most likely to contain the required data can be quickly located, the precise score of the node is gradually calculated, and a pruner is constructed using a preset pruning threshold, effectively reducing unnecessary calculations and improving query efficiency. Each node in the target encryption result set is added to a preset noise component to obtain a noise vector and an encrypted interference point, and the encrypted interference point is decrypted using a private key to obtain decrypted data, which is sent to the client to restore the original data; during the entire query process, the data exists in an encrypted form until the data is sent to the client, and then it will be decrypted, thereby ensuring data privacy, ensuring the security of the query result during transmission, and preventing the leakage of the result information; the query request is also encrypted to prevent the leakage of the query content. While executing the query, the present invention provides comprehensive protection of data privacy, query privacy, result privacy and access mode privacy, ensuring data query security.
[0034] Based on the above embodiments, in the embodiments of the present invention, using the data encryption method and encryption query method provided by the present invention, in the case of Figure 3 In the data circulation model shown in the figure, data encryption request is made. Both the data owner and the user are clients. Figure 4 As shown in the figure, it is a flowchart of the steps of Top-k dominance query, and the specific steps include: S301: Data owner (DO) according to security parameters Create a key pair for the Paillier cryptosystem ; S302: DO according to the public key And the target dataset D, using the Paillier cryptographic system to build a secure index ,This security index uses the SAR-Tree structure; Among them, the public key and security index The key pair is handed over to the data service provider DSP Submit to data assistance provider DAP; In the SAR-Tree structure, the common non-leaf node structure o is expressed as: ; Leaf node structure, expressed as: ; Special non-leaf nodes (containing blind objects) are represented as: ; where the blind object is equipped with an encrypted carrier , to protect the query unlinkability, find the corresponding blind node through IV, for example, if the blind object o i Corresponding to the kth node in NB, IV i [k] is set to 1, and the remaining dimensions are set to 0; express The minimum bounding matrix of express The center of the space matrix, Indicates the node pointing to the next layer. Indicates the number of data nodes contained in the subtree of the root node, Indicates that all blind objects of the same parent node correspond to combination; For input and Calculate the corresponding child nodes.
[0035] At the same time, in order to prevent the data service provider DSP from inferring whether two queries are the same by tracking the entry counts in two leaf nodes, DO generates artificial data points and adds them to the leaf nodes. The encrypted counts of these interference points are set to This does not affect the query.
[0036] Reference Figure 5 As shown, it is a schematic diagram of the target data set; refer to Figure 6 As shown in the figure, it is a schematic diagram of the SAR-Tree structure; As a non-leaf node, is a leaf node ( is a noise point), through and Corresponding to nodes containing blind objects, such as Figure 6 middle correspond The first node in .
[0037] S303: The authorized user AU, according to Query Request Encrypt and send the encrypted query request Submit to DSP for processing; S304: DSP calculates the root node according to the SLBC protocol Initial rating: , insert these scored nodes into heap H; The SLBC protocol (secure lightweight batch counting protocol) is used to calculate the loose scores of non-leaf nodes to guide the search of SAR-Tree; the node of the input SAR-Tree and encrypted query requests , non-leaf object set and , output loose scores; the specific implementation steps are as follows: 1) As the root node of SAR-Tree, initialize Each object in The loose fraction is .
[0038] 2) Traversal For each object of , if L(Z)>2 (L represents the number of layers) and there is a partially dominated object ,but Relative to is partially dominated. In this case, the SLBC protocol needs to recursively call the The child nodes of .
[0039] 3) According to the homomorphic property, loose fractions and Add. If Complete domination , the loose scores are not updated.
[0040] Reference Figure 6 As shown, Initial rating: , insert these scored nodes into heap H.
[0041] S305: Select the highest scoring entry and access the child node , obtained using the SBC protocol Accurately score the nodes, add these scored nodes to table T, and synchronously update the encrypted result set W, the pruner set F and ;
[0042] The SBC protocol (secure batch counting protocol) is mainly used to calculate the accurate score of the node. Its implementation method is similar to SLBC, including: 1) As the root node of SAR-Tree, initialize Each object in The score is .
[0043] 2) Traversal For each object, if L(Z)>1 (L represents the number of layers) and There is an encrypted point p that satisfies and ; In this case, the SBC protocol needs to recursively call the The child nodes of .
[0044] 3) When When .
[0045] Special, when is a non-leaf node and A point in the object partially dominates ,and satisfy ,use enter and calculate .
[0046] is the encryption object, is an encrypted query. and They represent the encrypted minimum bounding rectangle (MBR) with the maximum spatial distance and the encrypted minimum bounding rectangle with the minimum spatial distance, respectively. Represents an encrypted object About Query Dominate or cover in space ; Represents an encrypted object About Query No dominance or coverage in space ; Represents an encrypted object About Query Dominate or cover in space .
[0047] SDDC protocol (secure dynamic dominance check protocol) SDDC determines whether there is a , Represents data points About query points Better than If , the SDDC protocol returns 1, otherwise it returns 0. Its input is an encrypted object , , Euclidean distance , , encrypted query , . Output 1 or 0. The specific implementation steps are as follows: 1) Calculation The dimensions and The spatial dimension and the sum of the non-spatial dimensions, and The dimensions and The spatial dimension Compared with the sum of non-spatial dimensions, using the SIC protocol, if < ,SIC protocol returns 1, otherwise 0.
[0048] 2) When > , the protocol ends and returns 0.
[0049] 3) When < ,Use the SVC protocol to compare the effective dimensions of a and b, and return a result vector c containing the comparison results of each dimension.
[0050] The SIC protocol is used to determine the comparison of two encrypted objects and returns 0 or 1. The SVC protocol is used to calculate the comparison of two encrypted vectors and returns a result vector containing the comparison results (0 or 1) of each dimension.
[0051] Reference Figure 6 As shown, The highest score, visit and calculate its child nodes ,renew ,FSet , The pruner F decides whether to continue exploring a node based on the currently known best result. Ψ represents the threshold of the kth highest score in the current result set, which is used to determine whether the newly discovered node is likely to be included in the final result set; when the node score is less than Ψ, the search for the node is terminated.
[0052] S306: Continue to process other nodes in sequence and skip the dominated nodes to obtain the final result set; Reference Figure 7 The following is a diagram of query iteration; that is, the node with the second highest score is processed next. , visit and calculate its child nodes ,renew , , ; Similarly, continue to visit , ,renew , , ; The points in Domination, no calculation is required; all child nodes under node o1 have scores less than Ψ, so the search is terminated and the result set is not updated. The encrypted result set W is a dynamically updated set specifically used to store the highest scoring nodes related to the query.<p,s> Here p represents a node and s represents its corresponding exact score.
[0053] The SME protocol (secure minimum extraction protocol) extracts data from encrypted datasets without leaking the plaintext content and access patterns of target records to the cloud server. Extract the target record with the minimum score. Its input is the dataset , output a new data set , The last object in is the target record with the minimum score. The specific implementation steps are as follows: 1): DSP for each data calculate , Put in , Put in , DSP encryption Sent to DAP.
[0054] : a binary sequence, : random permutation function, : binary sequence, With scores, is a positive integer generated by a pseudo-random sequence.
[0055] 2):DAP Utilization Decryption ,get , Assigned to ,according to Sort descending Get a new binary sequence . Generate an extraction set , where the first element is Middle Elements ( ), the second element is the target extraction element. The remaining elements in Randomly generate new ,Will Sent to DSP. is a positive integer generated by a pseudo-random sequence, is a random permutation function.
[0056] 3):DSP according to and Perform the same or operation to get .
[0057] S307: DSP for each point in W Adding noise component Form the noise vector r and the encrypted interference point . Among them, r is sent to AU, Send to DAP for decryption; S308: DAP receives interference data and through Decrypted data obtained Send to AU; S309: AU passed Get the original point.
[0058] The present invention utilizes sub-protocols including SLBC, SBC, SDDC, SIC and SME to optimize performance and protect data privacy, query privacy, result privacy and access mode privacy; at the same time, early pruning technology and result update algorithm are used to reduce unnecessary computing and communication overhead and improve query response speed.
[0059] The data encryption method of the present invention uses a homomorphic encryption method to encrypt the target data set to ensure that effective query operations can be performed on the encrypted data without decrypting the data before querying, and also prevents potential privacy leakage during the query process; using the encrypted data as a node, a security index based on the SAR-Tree structure is constructed and stored in a cloud server so that the query can be performed based on the security index. The SAR-Tree structure can significantly reduce the amount of calculation and storage overhead in the query process, and improve the query efficiency. The encrypted query method of the present invention performs a dominant query based on the security index of the SAR-Tree structure constructed by the data encryption method of the present invention, calculates the loose score corresponding to each non-leaf node in the security index, and uses heap sorting to descend, obtains the corresponding descending heap, and further calculates the exact score to prune the descending heap to obtain the target encrypted result set; by constructing a descending heap, the node that is most likely to contain the required data can be quickly located, the exact score of the node is calculated step by step, and a pruner is constructed using a preset pruning threshold, effectively reducing unnecessary calculations and improving query efficiency. Each node in the target encrypted result set is added to the preset noise component to obtain the noise vector and the encrypted interference point, the encrypted interference point is decrypted using the private key, the decrypted data is obtained, and it is sent to the client to restore the original data; during the entire query process, the data exists in an encrypted form until the data is sent to the client, and then it will be decrypted, which protects data privacy, ensures the security of the query results during transmission, and prevents the leakage of result information; the query request is also encrypted to prevent the leakage of the query content. While executing the query, the present invention provides comprehensive protection of data privacy, query privacy, result privacy and access mode privacy, ensuring data query security.
[0060] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0061] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0062] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0064] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A data encryption method, characterized in that: Applied to the client, including: Use homomorphic encryption to create a key pair consisting of a public key and a private key; Encrypt the target data using the public key to obtain the corresponding encrypted data; Using encrypted data as nodes, a secure index based on the SAR-Tree structure is constructed and sent to the cloud server for storage.
2. The data encryption method according to claim 1, characterized in that: The homomorphic encryption method includes: Paillier algorithm, RSA algorithm and ElGamal algorithm.
3. The data encryption method according to claim 1, characterized in that: The security index based on the SAR-Tree structure includes: Leaf nodes are represented as: ; Ordinary non-leaf nodes are represented as: ; A non-leaf node containing a blind object is represented as: ; in, represents the encrypted data represented by the i-th leaf node in the security index, Indicates the total number of data nodes in the subtree contained in the root node of the node. represents the minimum bounding matrix of the node, represents the center of the spatial matrix of the node, is the encryption symbol, Indicates that the node points to the node in the next layer; Represents the encryption carrier combination corresponding to all blind objects under the same parent node, Indicates the node buckets that have the same parent node. Indicates based on and The expression for the obtained child nodes is: , Indicates the number of nodes in the subtree containing the non-leaf node containing the blind object. Layer A blind subject, , , Indicates the total number of leaf nodes associated with the parent node. Indicates the total number of blind objects that can be accommodated in each leaf node.
4. An encryption query method based on the data encryption method according to any one of claims 1 to 3, characterized in that: Applied to cloud servers, including: Obtain an encrypted query request after the client encrypts the original query request using the public key in the key pair; Based on the encrypted query request, security index and private key, the loose score corresponding to each non-leaf node in the security index is calculated, and the heap sort is used to descend to obtain the corresponding descending heap; Based on the descending heap, obtain the non-leaf node with the largest loose score, and access the child nodes of the non-leaf node. Based on the dimensions of the non-leaf node and the corresponding child nodes, obtain the result vector, update the loose score of the non-leaf node, and obtain the exact score corresponding to the non-leaf node. Calculate the exact scores of the nodes in the descending heap in sequence, and build a pruner and an encrypted result set based on the exact scores and a preset pruning threshold, until all the remaining uncalculated nodes in the descending heap are dominated by the nodes in the pruner, and obtain the target encrypted result set; Add each node in the target encryption result set to a preset noise component to obtain a noise vector and an encrypted interference point set, and use a private key to decrypt each encrypted interference point in the encrypted interference point set to obtain a corresponding decrypted data set; The decrypted data set and the noise vector are sent to the client so that the client can use the noise vector to denoise each decrypted data in the decrypted data set, obtain the corresponding original data, and restore the data to be queried in the target data set required by the original query request.
5. The encrypted query method according to claim 4, characterized in that: Based on the encrypted query request, security index and private key, the loose score corresponding to each non-leaf node in the security index is calculated, including: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 2? If the non-leaf node If the number of layers is not greater than 2, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 2, then the non-leaf node is judged Is there a dominating object belonging to the non-leaf object set: If it exists, the non-leaf node The recursive call points to the non-leaf node According to the homomorphic property, the loose score of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node are added. After adding, add the non-leaf node The loose scores of the non-leaf nodes are added together. The loose fraction of If it does not exist, the non-leaf node will not be updated. The loose fraction of .
6. The encrypted query method according to claim 5, characterized in that: Based on the dimensions of the non-leaf node and the corresponding child nodes, a result vector is obtained, including: The non-leaf node and the corresponding child node are used as the first encryption object. With the second encrypted object , respectively calculating the spatial dimension and the non-spatial dimension of the first encrypted object and the second encrypted object; Calculate the sum of the spatial dimension and the non-spatial dimension of the first encrypted object as the dimension sum of the first encrypted object ; Calculate the sum of the spatial dimension and the non-spatial dimension of the second encrypted object as the dimension sum of the second encrypted object ; Compare the dimensions of the first encrypted object and and the dimension of the second encrypted object : like , the returned result vector is 0; like , then compare the first encrypted object With the second encrypted object , and obtains a result vector containing the comparison results of the spatial dimensions and the non-spatial dimensions.
7. The encrypted query method according to claim 6, characterized in that: Get a result vector containing the comparison results of the spatial dimensions and the non-spatial dimensions, including: If the first encrypted object The spatial dimension of the second encrypted object is no greater than If the spatial dimension is , the spatial dimension comparison result is 1, otherwise the spatial dimension comparison result is 0; If the first encrypted object The non-spatial dimension of the second encrypted object is no greater than If it is a non-spatial dimension, the comparison result of the non-spatial dimension is 1, otherwise the comparison result of the non-spatial dimension is 0; A result vector is constructed based on the comparison result of the spatial dimension and the comparison result of the non-spatial dimension.
8. The encrypted query method according to claim 7, characterized in that: Update the loose score of the non-leaf node to obtain the exact score corresponding to the non-leaf node, including: Initialize the non-leaf object set consisting of all non-leaf nodes in the security index Each non-leaf node The loose fraction is ; Iterate over non-leaf object sets Each non-leaf node , determine the non-leaf node Is the number of layers greater than 1? If the non-leaf node If the number of layers is not greater than 1, the non-leaf node will not be updated. The loose fraction of If the non-leaf node If the number of layers is greater than 1, then the non-leaf object set is calculated Result vector for non-leaf nodes : If there is a non-leaf node that satisfies and , then the recursive call of the non-leaf node points to the child node of the non-leaf node; If there is a non-leaf node that satisfies , then according to the homomorphic property, the loose fraction of the child nodes of the non-leaf node and the total number of data nodes in the subtree contained in the root node of the non-leaf node After adding, add the non-leaf node The loose scores of the non-leaf nodes are added together. The exact fraction of in, is the encrypted object represented by the non-leaf node, Indicates encrypted query, represents the encrypted minimum bounding rectangle MBR with the maximum spatial distance, Represents the encrypted minimum bounding rectangle with minimum spatial distance.
9. The encrypted query method according to claim 4, characterized in that: Based on the exact score and the preset pruning threshold, a pruner and an encrypted result set are constructed until all the remaining uncalculated nodes in the descending heap are dominated by the nodes in the pruner, and the target encrypted result set is obtained, including: Judge the child nodes of each non-leaf node in the descending heap in descending order according to the exact score: If the exact score of a child node of a non-leaf node is greater than the preset pruning threshold, the corresponding child node is added to the encrypted result set and the dominating point is added to the pruner set; Until all the child nodes of non-leaf nodes are dominated by the nodes in the pruner set, the current encryption result set is output as the target encryption result set.
10. The encrypted query method according to claim 4, characterized in that: The client uses the noise vector to denoise each decrypted data in the decrypted data set and obtains the corresponding original data, which is expressed as: ; in, Indicates the first The original data corresponding to the decrypted data, Indicates the first Decrypted data, Indicates the first The noise component corresponding to the decrypted data.
Citation Information
Patent Citations
Privacy protection encrypted data query method based on fog assistance
CN110601812A
Heterogeneous wireless sensor network security data fusion control method based on aggregation tree
CN116546456A
Privacy protection dynamic space keyword query method and device under multi-attribute cost constraint, electronic equipment and storage medium
CN118643055A
Methods for processing within-distance queries
US20160019248A1
Method and System for Verifiable Searchable Symmetric Encryption
US20170300713A1