Cloud distributed data query method and system
By splitting and storing the data sets on multiple storage cloud servers, combining transmission cloud servers and computing cloud servers, the problem of semi-honest characteristics of the public cloud and poor scalability of the single cloud service system is solved, and a secure and efficient distributed data query is achieved.
Patent Information
- Application Number
- CN202411740105.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-11-29
Smart Images

Figure CN119202098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a cloud-based distributed data query method and system. Background Art
[0002] Driven by the Internet of Things technology, mobile devices with positioning components have become widely popular, and location data has exploded, playing an important role in many fields such as public services and national security. For example, precision marketing, traffic navigation, and urban planning based on location data. Services based on location data have gradually penetrated into all aspects of people's lives.
[0003] As location data continues to grow, local servers of enterprises face high storage and computing pressure. Therefore, more and more enterprises and institutions choose to outsource location data and computing services to public clouds to enjoy the many conveniences brought by cloud servers, such as powerful computing power, storage resources allocated on demand, and lower software and hardware investment costs. However, public clouds are considered untrustworthy. Data outsourcing results in the transfer of data control from the original data owner to the public cloud. Even if the data is encrypted before outsourcing, the semi-honest nature of the public cloud still drives it to capture and infer the privacy information of outsourced data and data users as much as possible while providing range query services, thus causing query security issues. Moreover, driven by economic interests, the services provided by public clouds are no longer convincing. On the one hand, public clouds are likely to return incorrect range query results to users in exchange for compensation. On the other hand, even if public clouds honestly abide by user agreements, they may return incorrect query results to users due to uncontrollable accidents such as program failures and unexpected errors, thereby damaging the interests of users.
[0004] Most existing range query solutions are oriented towards single cloud service systems. As data volume continues to increase and performance requirements continue to improve, single cloud service systems face problems of poor scalability and vendor lock-in. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a cloud distributed data query method and system, which specifically include:
[0006] In a first aspect, the present invention provides a cloud distributed data query method, which is applied to a cloud distributed data query system, the system comprising: a data owner, a client, a transmission cloud server, a computing cloud server and Storage cloud servers, including: is a positive integer greater than or equal to 2;
[0007] The method includes:
[0008] S1, the data owner pre-processes the data set to be outsourced to split the data set to be outsourced and store it in Storage cloud servers;
[0009] S2, the client performs a range query on the outsourced data set based on the transmission cloud server, computing cloud server and storage cloud server. The range query is to query part of the data according to the query range.
[0010] In a second aspect, the present invention further provides a cloud-based distributed data query system, comprising:
[0011] Data owner, client, transmission cloud server, computing cloud server and Storage cloud servers, including: is a positive integer greater than or equal to 2;
[0012] The cloud-based distributed data query system is used to execute the cloud-based distributed data query method provided in the first aspect.
[0013] Beneficial effects of the present invention:
[0014] The cloud-based distributed data query method and system provided by the present invention pre-processes the data set to be outsourced by the data owner, so as to split the data set to be outsourced and store it in storage cloud servers; the client performs range queries on the outsourced data set based on the transmission cloud server, computing cloud server and storage cloud server. By dividing the data set to be outsourced into multiple subsets and outsourcing them to multiple storage cloud servers respectively, it can effectively prevent the problem of vendor lock-in and complete data loss due to single cloud failure. At the same time, it can effectively improve query efficiency through distributed storage and query.
[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the architecture of a cloud-based distributed data query system provided by the present invention;
[0017] Figure 2 A schematic diagram of a flow chart of a cloud-based distributed data query method provided by the present invention;
[0018] Figure 3 A schematic diagram of the division of a data set to be outsourced provided by the present invention;
[0019] Figure 4 A schematic diagram of a subset division situation provided by the present invention;
[0020] Figure 5A schematic diagram of an encrypted small grid corresponding to a subset before permutation processing provided by the present invention;
[0021] Figure 6 A schematic diagram of an encrypted small grid corresponding to a subset after a permutation process provided by the present invention;
[0022] Figure 7 A schematic diagram of the intersection of a small grid and a query range provided by the present invention;
[0023] Figure 8 A schematic diagram of a result set integrity verification process provided by the present invention. DETAILED DESCRIPTION
[0024] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0025] The present invention provides a cloud distributed data query system, such as Figure 1 As shown, the system includes: a data owner, a client, a transmission cloud server, a computing cloud server and Storage cloud servers. Among them, is a positive integer greater than or equal to 2. The cloud-based distributed data query system is used to execute any of the cloud-based distributed data query methods provided by the present invention.
[0026] The cloud-based distributed data query method provided by the present invention is further introduced in detail below.
[0027] Figure 2 A schematic diagram of a process flow of a cloud distributed data query method provided by the present invention is shown in FIG. Figure 2 As shown, the method includes:
[0028] S1. The data owner pre-processes the data set to be outsourced to split the data set and store it in storage cloud server.
[0029] S2. The client performs range query on the outsourced data set based on the transmission cloud server, computing cloud server and storage cloud server.
[0030] Among them, range query is to query part of the data according to the query range.
[0031] The cloud-based distributed data query method provided by the present invention can effectively prevent the problems of vendor lock-in and complete data loss due to single cloud failure by dividing the data set to be outsourced into multiple subsets and outsourcing them to multiple storage cloud servers respectively, while effectively improving query efficiency through distributed storage and query.
[0032] The following is a further detailed description of step S1:
[0033] Specifically, in step S1, the data owner pre-processes the data set to be outsourced, so as to split the data set to be outsourced and store it in In a storage cloud server, the following steps S11-S15 are included:
[0034] S11. The data owner divides the data set to be outsourced into subsets.
[0035] The data owner obtains the data set to be outsourced After that, according to the data set to be outsourced The spatial distribution of data points in the data set is used to determine the data set to be outsourced. In the circumscribed rectangle of the space; further, according to the number of storage cloud servers in the cloud distributed data query system , the data set to be outsourced The circumscribed rectangle in space is divided into The data points covered by each small rectangle constitute a subset. The small rectangle corresponding to the subset is denoted by , is greater than or equal to 1 and less than or equal to For example, Figure 3 As shown, assuming the number of storage cloud servers is 4, the data set to be outsourced is divided into Figure 3 The 4 small rectangles shown. Figure 3 Medium Rectangle Indicates the query scope.
[0036] S12. The data owner generates a pair of public-private key pairs for homomorphic encryption according to preset security parameters, and encrypts the rectangular boundaries of each subset according to the public key in the public-private key pair to obtain encrypted rectangular boundaries of the subsets.
[0037] Specifically, the data owner selects the security parameters , generate a pair of homomorphic encrypted public and private keys , and use the public key Encrypt the small rectangle corresponding to each subset to obtain the encrypted subset rectangle boundary. The encrypted subset rectangle boundary corresponding to the subset is expressed as:
[0038] .
[0039] S13. The data owner divides each subset into fine-grained grids to obtain multiple small grids, and constructs a grid index based on the small grids obtained by the division.
[0040] Specifically, in step S13, the data owner divides each subset into fine-grained grids to obtain multiple small grids, including the following steps A1-A4:
[0041] A1. The data owner determines two mapping directions.
[0042] Specifically, the data owner determines two mutually perpendicular mapping directions, which are expressed as and .
[0043] A2. For any mapping direction, the data owner uses a local sensitive hash function to map the data points in each subset along the corresponding mapping direction to obtain the corresponding hash code. According to the size of the hash code corresponding to the data points in each subset, the data points in each subset are divided into multiple initial hash buckets. Based on the greedy merge principle, the number of data points in the initial hash bucket with the largest number of data points is taken as the standard number, and the initial hash buckets are merged in turn until the number of data points in the merged composite hash bucket is closest to and less than the standard number.
[0044] A3. The data owner obtains the initial grid corresponding to each subset based on all the composite hash buckets corresponding to each subset in the two mapping directions.
[0045] Specifically, according to the size of the hash code corresponding to the data points in each subset, the data points in each subset are divided into multiple initial hash buckets, including: after arranging the data points in each subset in order from large to small or from small to large according to the corresponding hash codes, the data points with the same hash code are divided into the same hash bucket to form initial hash buckets.
[0046] Since each initial hash bucket corresponds to a hash code, the arrangement order of the initial hash buckets is the arrangement order of the hash codes. Accordingly, merging the initial hash buckets in sequence is merging them according to the arrangement order of the hash codes. The data points included in the merged composite hash bucket may correspond to multiple hash codes.
[0047] For example, the data owner uses a locality sensitive hash function Respectively Direction and Direction maps the data points in the subset to direction as an example, the data owner passes each data point in the subset through the locality sensitive hash function After mapping, the corresponding hash code is obtained, and then the data points with the same hash code are divided into the same hash bucket to obtain the initial hash bucket. The data points in the initial hash bucket are uneven. Based on the greedy merging principle, the data owner selects the number of data points in the initial hash bucket with the largest number of data points. The initial hash buckets are merged in sequence until the number of data points in the merged composite hash bucket is closest to and less than the standard number. After the merger is completed, Direction A relatively uniform composite hash bucket. Similarly, Repeat the above mapping process in the direction to obtain a series of uneven initial hash buckets, and then select the initial hash bucket with the largest number of data points. is the standard number, and the initial hash buckets are merged in sequence. Direction A relatively uniform composite hash bucket. Figure 4 As shown, the entire subset is now divided into A small grid is recorded as , and is the position coordinate of the small grid in the entire grid. Indicates the query scope.
[0048] A4. The data owner performs pseudo-point filling processing on each initial grid according to the preset minimum pseudo-point filling rate to obtain a small grid corresponding to each subset.
[0049] Specifically, for the initial grid corresponding to any subset, the data owner calculates the minimum false point filling rate according to the preset The maximum number of data points corresponding to all small grids in the initial grid Get the standard threshold ; Then add fake points to all small grids corresponding to the initial grid, so that the number of data points in all small grids is .
[0050] This method can reserve extra space for each small grid by inserting a certain number of false points in the subset, which not only ensures the indistinguishability between small grids, but also supports flexible insertion and deletion of data.
[0051] Specifically, step S13 constructs a grid index based on the small grids obtained by division, which specifically includes the following steps B1-B3:
[0052] B1. The data owner encrypts each small grid to obtain an encrypted small grid.
[0053] Specifically, for any first small grid in the small grids corresponding to each subset, the data owner encrypts each small grid, and obtaining the encrypted small grid specifically includes the following steps 1)-5):
[0054] 1) The data owner uses a symmetric encryption algorithm and a preset symmetric key to perform overall encryption on the data points in the first small grid, and obtains the encryption result of the data points in the small grid, which is expressed as:
[0055] ,
[0056] in, represents the encrypted result of data points in a small grid, Indicates that a symmetric key is used Encryption processing, Indicates the first A real data point, i.e., a true point, Indicates the first A false point.
[0057] 2) The data owner uses the public key in the public-private key pair to encrypt the rectangular boundary of the first small grid, and obtains the encryption result of the small grid rectangular range, which is expressed as:
[0058] ,
[0059] in, Indicates the result of small grid rectangular range encryption. Indicates the use of public key Encryption processing, Represents the rectangular boundary of the small grid, subscript Corresponding to the lower boundary, subscript Corresponding to the upper boundary, the lower boundary is close to the coordinate origin, and the upper boundary is far away from the coordinate origin.
[0060] 3) The data owner obtains the position coordinates of the first small grid, and uses a symmetric encryption algorithm and a preset symmetric key to encrypt the position coordinates to obtain the encrypted result of the small grid coordinates, which is expressed as:
[0061] ,
[0062] in, Indicates the result of small grid coordinate encryption, Indicates the position coordinates of the small grid.
[0063] Specifically, the position coordinates of the small grid are the position coordinates of the small grid in the entire divided grid corresponding to the subset to which it belongs.
[0064] 4) The data owner determines the small grid hash signature based on the hash function and hash key, as well as the encryption results of the data points in the small grid, the encryption results of the small grid rectangular range, and the encryption results of the small grid coordinates, which is expressed as:
[0065] ,
[0066] in, represents a small grid hash signature, represents a hash function, represents the hash key, Represents a connector.
[0067] 5) The data owner obtains the encrypted first small grid according to the encryption results of the data points in the small grid, the encryption results of the small grid rectangular range, the encryption results of the small grid coordinates and the small grid hash signature, which is expressed as:
[0068] .
[0069] It can be understood that the four data items corresponding to each encrypted first small grid are the encryption result of the data point in the small grid, the encryption result of the small grid rectangular range, the encryption result of the small grid coordinates and the hash signature of the small grid. For ease of writing, the four data items can be abbreviated as , , and .
[0070] B2. The data owner determines the hash value of each encrypted subset rectangular boundary based on the hash function and the hash key.
[0071] Specifically, assuming that The small rectangle corresponding to the subset (i.e. the plaintext of the subset) is denoted as , the data owner uses the hash function and the hash key Calculate the encrypted subset rectangular boundary Hash value .
[0072] B3. The data owner performs permutation processing on the encrypted small grids corresponding to each subset according to the preset row permutation function and column permutation function to obtain the grid index corresponding to each subset.
[0073] Among them, the grid index is expressed as:
[0074] ,
[0075] in, represents the grid index corresponding to the subset, represents the row permutation function, represents the column permutation function, Represents all the encrypted small grids corresponding to the subset before the permutation process.
[0076] Specifically, assuming that the small grids are encrypted separately, the entire grid corresponding to the obtained subset is as follows: Figure 5As shown, all the encrypted small grids corresponding to the subset before permutation are obtained, denoted as The data owner uses two permutation functions and The entire partition grid corresponding to the subset The rows and columns of are permuted to obtain Figure 6 The permuted grid shown, i.e., the grid index, is expressed as .
[0077] S14. The data owner sends the encrypted subsets obtained after rectangular boundary encryption, fine-grained grid division and grid index construction to different storage cloud servers.
[0078] The encrypted subset includes the encrypted data corresponding to the subset. The encrypted subset obtained after rectangular boundary encryption, fine-grained grid division and grid index construction includes but is not limited to the following data: the grid index corresponding to the subset, the encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary.
[0079] Specifically, the data owner outsources the grid index corresponding to each subset, each encrypted subset rectangular boundary, and the hash value of each encrypted subset rectangular boundary to A storage cloud server.
[0080] Understandably, based on the number of storage cloud servers , the data set to be outsourced is divided into subsets, among which The subset corresponds to The encrypted subset, The encrypted subset is stored in A storage cloud server.
[0081] S15. The data owner determines the verification information of the encrypted subsets stored in each storage cloud server according to the small grids corresponding to each subset, obtains the verification information table, generates a real-time key, encrypts the verification information table with the real-time key based on the symmetric encryption algorithm, and stores the encrypted verification information table in the transmission cloud server.
[0082] Specifically, the data owner determines the verification information of the encrypted subsets stored in each storage cloud server according to the small grids corresponding to each subset, obtains the verification information table, generates a real-time key, encrypts the verification information table with the real-time key based on the symmetric encryption algorithm, and stores the encrypted verification information table in the transmission cloud server, including the following steps C1-C3:
[0083] C1. The data owner constructs a verification information table based on the hash signatures of the small grids corresponding to each subset.
[0084] C2. The data owner generates a real-time key based on the current moment and encrypts the verification information table with the real-time key.
[0085] Example, encrypted verification information table As shown in Table 1, the verification information corresponding to each storage cloud server consists of the hash signatures of all the small grids it stores.
[0086] Table 1 Encrypted verification information table
[0087]
[0088] in, Indicates Storage cloud servers, Indicated by The set consisting of the hash signatures of all small grids before permutation corresponding to the encrypted subset stored on the storage cloud server. Indicates the use of real-time key Encryption processing, Represents an assignment operation. Indicates the encrypted authentication information table Middle and The verification information corresponding to the encrypted subset stored on the storage cloud server.
[0089] C3. The data owner sends the encrypted verification information table to the transmission cloud server.
[0090] Specifically, the data owner uses a symmetric encryption algorithm and a real-time key Encrypt the verification information table, and finally get the encrypted verification information table , and the encrypted verification information table Send to the transmission cloud server.
[0091] By setting up the verification information table, the foundation is laid for the subsequent verification of the freshness of the query results and the update of data, thereby avoiding the cloud server violating the user agreement in a malicious cloud environment, resulting in the existence of historical data in the query results.
[0092] S16. The data owner distributes the real-time key and the decryption parameters corresponding to each encryption subset to the client and the computing cloud server.
[0093] Specifically, the data owner will use the real-time key , Symmetric key , hash key and a public-private key pair Send to the client, the public and private key pair The private key in , hash key Send to the computing cloud server.
[0094] The following further describes step S2 in detail:
[0095] Specifically, in step S2, the client performs a range query on the outsourced data set based on the transmission cloud server, the computing cloud server, and the storage cloud server, which specifically includes the following steps S21-S24:
[0096] S21. The client generates a range query trapdoor according to the obtained query range, and sends the range query trapdoor to the transmission cloud server.
[0097] For example, the client obtains a query range, represented as , and then use the public key Encryption query scope , we get the range query trapdoor, expressed as , and then the range query trap Send to the transmission cloud server.
[0098] S22. The transmission cloud server distributes the range query trapdoor to each storage cloud server.
[0099] Specifically, the transmission cloud server sends the range query trap sent by the client Distribute to A storage cloud server.
[0100] S23. Each storage cloud server, based on the computing cloud server and according to the range query trap, queries the encrypted subsets stored locally, and sends the range query results to the transmission cloud server.
[0101] In one possible implementation, Any first storage cloud server among the storage cloud servers, based on the computing cloud server and according to the range query trapdoor, respectively queries in the locally stored encrypted subsets, and sends the range query result to the transmission cloud server, specifically including the following steps S231-S236:
[0102] S231. The first storage cloud server generates four random positive integers, and based on the additive homomorphism and multiplication homomorphism characteristics of homomorphic encryption, calculates a first intermediate result according to the four random positive integers, the encrypted subset rectangular boundaries corresponding to the locally stored encrypted subset, and the range query trapdoor, and sends the first intermediate result to the computing cloud server.
[0103] Among them, the first intermediate result includes:
[0104] ,
[0105] ,
[0106] ,
[0107] ,
[0108] in, , , and The first intermediate result is formed, that is, the intermediate result in the range query process. Represents a range query trapdoor, Indicates the query scope. , , and is a random positive integer used to calculate the first intermediate result in the range query process. The operator represents multiplication, Represents an assignment operation, Indicates The encrypted subset rectangular boundaries corresponding to the subsets.
[0109] S232. The computing cloud server decrypts the data item in the first intermediate result according to the private key in the public-private key pair.
[0110] S233, the computing cloud server calculates the product of the two decryption results in the same direction, and determines whether the products corresponding to different directions are less than or equal to 0 at the same time. If so, it is determined that there is an intersection between the encrypted subset stored locally on the first storage cloud server and the query range, and a first message is sent to the first storage cloud server. If not, it is determined that there is no intersection between the encrypted subset stored locally on the first storage cloud server and the query range, and a second message is sent to the first storage cloud server.
[0111] The directions include the row and column directions of the grid index.
[0112] Exemplarily, the first message is 1, the second message is 0, and accordingly, the computing cloud server calculates the private key in the public-private key pair. Decryption ~ get , and calculate and , and then judge and Are they both less than or equal to 0? If they are both less than or equal to 0, it means that the encrypted subset stored locally on the first storage cloud server intersects with the query range, and the computing cloud server sends a signal 1 to the first storage cloud server; otherwise, it sends a signal 0 to the first storage cloud server.
[0113] S234. In response to the received second message, the first storage cloud server sends the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary, and an empty result set to the transmission cloud server; or, in response to the received first message, generates four groups of random positive integers for the grid index corresponding to the locally stored encrypted subset, generates a first data set and a second data set based on the four groups of random positive integers, and sends the first data set and the second data set to the computing cloud server.
[0114] Combined with the example in the previous step, exemplary, further, if the first storage cloud server receives the signal 0, an empty result set , including locally stored encrypted subset rectangular boundaries and verification information of the hash value of the encrypted subset rectangular boundaries , sent to the transmission cloud server, otherwise, continue with the second round of query, that is, determine the small grids in the grid index stored by the first storage cloud server that intersect with the query range.
[0115] Specifically, for the locally stored grid index, four groups of random positive integers are generated, a first data set and a second data set are generated according to the four groups of random positive integers, and the first data set and the second data set are sent to the computing cloud server, including the following steps 1)-5):
[0116] 1) The first storage cloud server generates four sets of random positive integers, expressed as:
[0117] , , , ,
[0118] in, , , and Respectively represent the first storage cloud server local storage The number of rows and columns of the grid index corresponding to the subset, and denote the row index and column index respectively, , , and Both represent random positive integers.
[0119] 2) The first storage cloud server generates two empty sets, expressed as:
[0120] , ,
[0121] in, represents the first data set, represents the second data set, represents the empty set, Represents an assignment operation.
[0122] 3) The first storage cloud server is based on From 1 to Sequential iterative calculation of:
[0123] ,
[0124] ,
[0125] ,
[0126] in, Used to determine the current small grid (the first Small grid) The lower boundary of the direction is within the query range The relative position relationship between the upper boundaries in the direction.
[0127] Used to determine the current small grid The upper boundary of the direction is within the query range The relative position relationship between the lower boundaries in the direction.
[0128] Used to update the first data set according to the relative position relationship .
[0129] By traversing the small grid of any row in the grid index, the query range is The range in the direction is related to each small grid The intersection operation is performed on the range in the direction, and the two values obtained are taken as a tuple and inserted into the first data set To update the first dataset .
[0130] 4) The first storage cloud server is based on From 1 to Sequential iterative calculation of:
[0131] ,
[0132] ,
[0133] ,
[0134] in, Used to determine the current small grid (the first column in any column of the grid index Small grid) The lower boundary of the direction is within the query range The relative position relationship between the upper boundaries in the direction.
[0135] Used to determine the current small grid The upper boundary of the direction is within the query range The relative position relationship between the lower boundaries in the direction.
[0136] Used to update the second data set based on the relative position relationship .
[0137] By traversing the small grid of any column in the grid index, the query range is The range in the direction is related to each small grid The intersection operation is performed on the range in the direction, and the two values obtained are inserted into the second data set as a tuple. To update the second dataset .
[0138] 5) The first storage cloud server sends the first data set and the second data set finally calculated to the computing cloud server.
[0139] Specifically, the first data set obtained by iterative calculation in the above steps and the second dataset Send to the computing cloud server.
[0140] S235. The computing cloud server uses the private key in the public-private key pair to decrypt the first data set and the second data set, and determines whether each first small grid corresponding to the grid index stored in the first storage cloud server has an intersection with the query range based on the decryption result, constructs the first vector and the second vector based on the judgment result, and determines the hash value of the first vector and the hash value of the second vector based on the hash function and the hash key, and sends the first vector, the second vector, the hash value of the first vector, and the hash value of the second vector to the first storage cloud server.
[0141] Specifically, the computing cloud server generates two empty sets , , and then use the private key Decrypting the first dataset and the second dataset Then, the product of each pair of decrypted results is calculated from the row and column directions to determine whether there is an intersection between the small grid and the query range. Specifically, the first data set after decryption is calculated along the row The product of each pair of results in , if the product is less than or equal to 0, it means that in this direction, the small grid and the query range have an intersection, then signal 1 is merged into Otherwise, it means that the small grid does not intersect with the query range, and the signal 0 is merged into Calculate the decrypted second data set along the column The product of each pair of results in , if the product is less than or equal to 0, it means that in this direction, the small grid and the query range have an intersection, then signal 1 is merged into Otherwise, it means that the small grid does not intersect with the query range, and the signal 0 is merged into , thus obtaining the first vector and the second vector The process can be expressed as From 1 to Loop through the following steps: If Less than or equal to 0, then ,otherwise, ; From 1 to Loop through the following steps: If Less than or equal to 0, then ,otherwise, For example, Figure 7 As shown, , .
[0142] Further, using hash functions and the hash key Calculate the first vector and the second vector The hash value of and , and finally Sent to the first storage cloud server.
[0143] S236. The first storage cloud server filters out the target small grid from all the small grids stored locally according to the first vector and the second vector, and adds the encryption result of the data points in the small grid corresponding to the target small grid to the result set, and sends the result set, as well as the encryption result of the small grid rectangular range corresponding to the target small grid, the encryption result of the small grid coordinates, the small grid hash signature, the first vector, the second vector, the hash value of the first vector and the hash value of the second vector, as well as the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary to the transmission cloud server.
[0144] Specifically, the first storage cloud server traverses each small grid in the grid index, that is, traverses the first For each small grid in the grid index corresponding to the subset, if the small grid has an intersection with the query range in both rows and columns, that is, the small grid satisfy and , then the encrypted data point results in the small grid corresponding to the small grid are added to the corresponding result set And add the corresponding small grid rectangular range encryption result, small grid coordinate encryption result and small grid hash signature to the corresponding verification information After the traversal is completed, the first vector , the second vector , the hash value of the first vector and the hash value of the second vector , and the encrypted subset rectangle boundary corresponding to the locally stored encrypted subset and the hash value of the encrypted subset rectangle boundary ,Right now , added to the verification information Finally, the result set and verification information Send to the transmission cloud server.
[0145] In the method provided by the present invention, each storage cloud server, based on the computing cloud server, determines whether the query range intersects with the range of the locally stored encrypted subset rectangular boundary according to the range query trapdoor and the locally stored encrypted subset rectangular boundary. If not, an empty result set and verification information determined by the locally stored encrypted subset rectangular boundary are sent to the transmission cloud server. If intersecting, the small grid intersecting with the query range is determined based on the computing cloud server according to the range query trapdoor and the grid index corresponding to the locally stored encrypted subset, and the result set and verification information determined by the small grid intersecting with the query range are sent to the transmission cloud server. By setting up multiple storage cloud servers, decentralized data storage can be achieved, effectively preventing the problems of single cloud failure and vendor lock-in; setting up the transmission cloud server can simplify the communication between the client and other cloud servers from one-to-many to one-to-one on the one hand, and on the other hand, the transmission cloud server can store part of the information to assist the user in verifying the freshness of the result; setting up the computing cloud server can effectively assist the storage cloud server in implementing range query on encrypted data, thereby ensuring the security of the query process.
[0146] S24. The transmission cloud server integrates the range query results sent by each storage cloud server to obtain a range integration result, and sends the verification information related to the range integration result in the stored encrypted verification information table and the range integration result to the client.
[0147] Specifically, after receiving the range query results from each storage cloud server, the transmission cloud server determines whether each result set is an empty set in turn. If the result set is not empty, the verification information corresponding to the result set in the encrypted verification information table is added to the verification information corresponding to the result set. After traversing all range query results, the result sets in each range query result are added to the verification information corresponding to the result set. Verification information corresponding to each result set Sent to the client, For the The result set corresponding to the subsets is For the The verification information corresponding to the subset.
[0148] Further, optionally, the cloud-based distributed data query method provided by the present invention further includes:
[0149] S3. The client verifies the range query result based on the real-time key and the decryption parameters corresponding to each encryption subset.
[0150] Specifically, in step S3, the client verifies the range query result according to the real-time key and the decryption parameters corresponding to each encryption subset, including the following steps S31-S34:
[0151] S31. The client verifies the correctness of the range query result according to the decryption parameters corresponding to each encryption subset. If the verification fails, the client executes S34. If the verification passes, the client executes S32.
[0152] For example, the client receives the result set of each range query result. Verification information corresponding to each result set After that, verify the result set and verification information corresponding to each subset in turn. The result set corresponding to the subset , if the result set If it is empty, recalculate the hash value of the encrypted subset rectangle boundary corresponding to the result set, recorded as , and the hash value of the received encrypted subset rectangle boundary Compare them. If they are equal, continue to decrypt the encrypted subset rectangular boundary to obtain the plaintext of the subset rectangular boundary (that is, the plaintext of the subset). , and then re-determine the subset range and query range based on the plain text of the subset Do they intersect? If not, the result set Verification passed; if the result set If it is not empty, use the hash function and the hash key Recalculate the result set The corresponding small grid hash signature is calculated and compared with the received small grid hash signature. If they are equal, the result set is considered Correctness verification passed.
[0153] S32. The client verifies the freshness of the range query result according to the real-time key. If the verification fails, the client executes S34. If the verification passes, the client executes S33.
[0154] For example, combined with the examples in the above steps, the result set After correctness verification, the client uses the hash function and the hash key Recalculate the first vector and the second vector The hash value of and and the hash value of the first vector received , the hash value of the second vector Compare, if equal, use and permutation function and The corresponding inverse permutation function and , respectively and Perform inverse permutation to obtain and , and then use the symmetric key Decrypt verification information The small grid coordinates of each small grid in the encrypted result are obtained to obtain the plain text of the small grid position coordinates , determine the position coordinates of the small grid Is it satisfied? , if satisfied, use the real-time key Decryption , determine whether the corresponding small grid hash signature is equal to the returned small grid hash signature. If they are equal, the freshness verification passes. Indicates the encrypted authentication information table Middle and The verification information corresponding to the subset, that is, The verification information corresponding to the encrypted subset stored on the storage cloud server.
[0155] S33. The client performs integrity verification on the range query result according to the decryption parameters corresponding to each received encryption subset. If the verification fails, the client executes S34.
[0156] For example, combined with the examples in the above steps, the result set After passing the freshness verification, the client uses the small grid position coordinates to determine the result set Whether the small grids contained in can form a complete rectangle in spatial position, if so, continue to decrypt the small grid rectangular range encryption result of each small grid to obtain the rectangular range of the small grid, and use the rectangular range of the small grid to determine whether the rectangular range of the small grid intersects with the query range. If the result set If all the small grids contained in intersect with the query range, the result set is recalculated. The corresponding encrypted subset rectangle boundary hash value is denoted as and compare it with the received hash value of the encrypted subset rectangle boundary Compare them. If they are equal, continue to decrypt the encrypted subset rectangle boundary to get the plaintext of the subset. , determine the rectangular boundary of the plaintext of the subset and the query range Whether they intersect. If they do, continue to verify that the unreturned areas do not intersect with the query range. Figure 8 As shown, Indicates the area covered by the returned result set. Represents the area that has not been returned. As can be seen from the figure, It can be divided into up to 4 complete rectangular areas. In theory, as long as the plaintext of the rectangular boundary of the subset and , you can get , and verify Do the four areas of the query range intersect with each other? If they do not intersect, then the result set Pass integrity verification.
[0157] S34. The client discards the range query result and determines that there is a malicious cloud server in the cloud distributed data query system.
[0158] In the above verification process, if any verification fails, the verification is terminated and the cloud server is considered to have malicious behavior, thus achieving multiple verifications and improving the accuracy of malicious behavior detection. If all verifications pass, the client decrypts the result set in the range query result according to the decryption parameters corresponding to each encrypted subset received, and obtains the target data corresponding to the query range according to the decryption result. Specifically, using the symmetric key Decrypt the result set and perform final refinement on the decrypted data to obtain the precise result of the range query. The final refinement of the decrypted data is as follows: after obtaining the decrypted result set, directly traverse the data points contained in the result set. If it is a fake point added artificially, ignore it directly. If it is a real point existing in the original data set, determine whether the point is in the query range. If not, remove it directly. If it is, add it to the final result set. After the above operations are completed, the refined precise result is obtained.
[0159] The secure index and secure query protocol provided by this method can effectively support secure range queries and verification of result sets.
[0160] Further, optionally, the cloud-based distributed data query method provided by the present invention further includes:
[0161] S4. The data owner conducts a single-point query on the data point based on the transmission cloud server, computing cloud server and storage cloud server.
[0162] S5. The data owner verifies the single-point query result, and after the verification is passed, updates the encrypted subset stored on the corresponding storage cloud server and the encrypted verification information table stored on the transmission cloud server according to the single-point query result.
[0163] Specifically, step S4 includes the following steps S41-S44:
[0164] S41. The data owner generates a single-point query trap based on the acquired data point to be queried, and sends the single-point query trap to the transmission cloud server.
[0165] For example, the data owner obtains the data point to be queried , and then use the public key encryption , get the single-point query trap , the single-point query trap Send to the transmission cloud server.
[0166] S42: The transmission cloud server distributes the single-point query trap sent by the data owner to each storage cloud server.
[0167] For example, the transmission cloud server sends the single-point query trap sent by the data owner Distribute to A storage cloud server.
[0168] S43. Each storage cloud server, based on the computing cloud server and according to the single-point query trap, queries the encrypted subset stored locally, and sends the single-point query result to the transmission cloud server.
[0169] Optional, for Any first storage cloud server among the storage cloud servers, based on the computing cloud server and according to the single-point query trap, respectively queries in the locally stored encrypted subsets, and sends the single-point query result to the transmission cloud server, including the following steps S431-S436:
[0170] S431. The first storage cloud server generates four random positive integers, and based on the additive homomorphism and multiplication homomorphism characteristics of homomorphic encryption, calculates a second intermediate result according to the four random positive integers, the encrypted subset rectangular boundary corresponding to the locally stored encrypted subset, and the single-point query trap, and sends the second intermediate result to the computing cloud server.
[0171] The second intermediate result includes:
[0172] ,
[0173] ,
[0174] ,
[0175] ,
[0176] in, , , and The second intermediate result is formed, that is, the intermediate result in the single-point query process. Represents a single-point query trap. Indicates the data point to be queried. , , and is a random positive integer used to calculate the second intermediate result in the single-point query process. Represents the encrypted subset rectangular boundary.
[0177] S432. The computing cloud server decrypts the data item in the second intermediate result according to the private key in the public-private key pair.
[0178] S433. The computing cloud server calculates the product of the two decryption results in the same direction, and determines whether the products corresponding to different directions are less than or equal to 0 at the same time. If so, it is determined that the encrypted subset stored locally in the first storage cloud server covers the data point to be queried, and a third message is sent to the first storage cloud server. If not, it is determined that the encrypted subset stored locally in the first storage cloud server does not cover the data point to be queried, and a fourth message is sent to the first storage cloud server.
[0179] The directions include the row and column directions of the grid index.
[0180] Exemplarily, the third message is 1, and the fourth message is 0. Accordingly, the computing cloud server calculates the private key in the public-private key pair. Decryption get , and calculate separately and , and then judge and Are they both less than or equal to 0? If they are both less than or equal to 0, it means that the encrypted subset stored locally in the first storage cloud server covers the data point to be queried, and the computing cloud server sends a signal 1 to the first storage cloud server; otherwise, the computing cloud server sends a signal 0 to the first storage cloud server.
[0181] S434. In response to the received fourth message, the first storage cloud server sends the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary, and an empty result set to the transmission cloud server; or, in response to the received third message, generates four groups of random positive integers for the grid index corresponding to the locally stored encrypted subset, generates a third data set and a fourth data set based on the four groups of random positive integers, and sends the third data set and the fourth data set to the computing cloud server.
[0182] Combined with the example in the previous step, exemplary, further, if the first storage cloud server receives the signal 0, an empty result set , including locally stored encrypted subset rectangular boundaries and verification information of the hash value of the encrypted subset rectangular boundaries Send it to the transmission cloud server, otherwise, continue the second round of query, that is, determine the grid index (that is, all small grids) saved by the first storage cloud server that covers the data point to be queried The only small grid.
[0183] Specifically, for the locally stored grid index, four groups of random positive integers are generated, a third data set and a fourth data set are generated according to the four groups of random positive integers, and the third data set and the fourth data set are sent to the computing cloud server, including the following steps 1)-5):
[0184] 1) The first storage cloud server generates four sets of random positive integers, expressed as:
[0185] , , , ,
[0186] in, , , and Respectively represent the first storage cloud server local storage The number of rows and columns of the grid index corresponding to the subset, and denote the row index and column index respectively, , , and Both represent random positive integers.
[0187] 2) The first storage cloud server generates two empty sets, expressed as:
[0188] , ,
[0189] in, represents the third data set, represents the fourth data set, Represents the empty set.
[0190] 3) The first storage cloud server is based on From 1 to Sequential iterative calculation of:
[0191] ,
[0192] ,
[0193] ,
[0194] in, Indicates that the query point is The coordinates in the direction, represents the parameters of homomorphic encryption, Indicates that the current small grid is The left boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is The right boundary in the direction is at The difference in coordinates in the direction is Obfuscated ciphertext.
[0195] Indicates determining the current small grid (the first Small grid) Left boundary and query point in direction exist The relative position relationship of coordinates in direction.
[0196] Indicates that the current small grid is determined The right boundary and query point in the direction exist The relative position relationship of coordinates in direction.
[0197] Indicates that the previously calculated value is put into the third data set as a tuple middle.
[0198] 4) The first storage cloud server is based on From 1 to The sequential loop iteration calculation is:
[0199] ,
[0200] ,
[0201] ,
[0202] in, Indicates that the query point is The coordinates in the direction, Indicates that the current small grid is The left boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is The right boundary in the direction is at The difference in coordinates in the direction is Obfuscated ciphertext.
[0203] Indicates determining the current small grid (the first Small grid) The lower boundary and query point in the direction exist The relative position relationship of coordinates in direction.
[0204] Indicates that the current small grid is determined The upper boundary and query point in the direction exist The relative position relationship of coordinates in direction.
[0205] Indicates that the previously calculated values are put into the fourth data set as a tuple middle.
[0206] 5) The first storage cloud server sends the third data set and the fourth data set finally calculated to the computing cloud server.
[0207] Specifically, the third data set obtained by iterative calculation in the above steps And the fourth data set Send to the computing cloud server.
[0208] S435. The computing cloud server uses the private key in the public-private key pair to decrypt the third data set and the fourth data set, and determines whether the small grid corresponding to the grid index stored in the first storage cloud server covers the data point to be queried from both row and column directions based on the decryption result, constructs the third vector and the fourth vector based on the judgment result, determines the hash value of the third vector and the hash value of the fourth vector based on the hash function and the hash key, and sends the third vector, the fourth vector, the hash value of the third vector, and the hash value of the fourth vector to the first storage cloud server.
[0209] Specifically, the computing cloud server generates two empty sets , , and then use the private key Decrypting the third dataset And the fourth data set Then, the product of each pair of decrypted results is traversed from both the row and column directions to determine whether the small grid rectangle covers the data point to be queried. Specifically, the third data set after decryption is traversed along the row The product of each pair of results in , if the product is less than or equal to 0, it means that in this direction, the small grid rectangle range covers the data point to be queried, then signal 1 is incorporated Otherwise, it means that the small grid rectangle does not cover the data point to be queried, and the signal 0 is merged into Middle; Traverse the fourth data set after decryption along the column The product of each pair of results in , if the product is less than or equal to 0, it means that in this direction, the small grid rectangle range covers the data point to be queried, then signal 1 is incorporated Otherwise, it means that the small grid rectangle does not cover the data point to be queried, and the signal 0 is merged into , thus obtaining the third vector and the fourth vector The process can be expressed as From 1 to Loop through the following steps: If Less than or equal to 0, then ,otherwise, , From 1 to Loop through the following steps: If Less than or equal to 0, then ,otherwise, .
[0210] Further, using hash functions and the hash key Calculate the third vector and the fourth vector The hash value of and , and finally Sent to the first storage cloud server.
[0211] S436. The first storage cloud server filters out the target small grid from all the small grids stored locally according to the third vector and the fourth vector, and adds the encryption result of the data points in the small grid corresponding to the target small grid to the result set, and sends the result set, as well as the encryption result of the small grid rectangular range corresponding to the target small grid, the encryption result of the small grid coordinates and the small grid hash signature, the third vector, the fourth vector, the hash value of the third vector, the hash value of the fourth vector, and the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary to the transmission cloud server.
[0212] Specifically, the first storage cloud server traverses each small grid in the grid index, that is, traverses the first Each small grid in the grid index corresponding to the subset, if the small grid covers the data point to be queried in both rows and columns, that is, the small grid satisfy and , then the encrypted results of the data points in the small grid of the small grid are added to the corresponding result set The small grid rectangular range encryption result, small grid coordinate encryption result and small grid hash signature are added to the corresponding verification information. After the traversal is completed, the third vector , the fourth vector , the hash value of the third vector and the hash value of the fourth vector , and, the encrypted subset rectangular boundary stored by the first storage cloud server and the hash value of the encrypted subset rectangle boundary ,Right now , added to the verification information Finally, the result set and verification information Send to the transmission cloud server.
[0213] In the method provided by the present invention, each storage cloud server, based on the computing cloud server, determines whether the data point to be queried falls within the locally stored encrypted subset rectangular boundary according to the single-point query trap and the encrypted subset rectangular boundary corresponding to the locally stored encrypted subset. If not, an empty result set and verification information determined by the locally stored encrypted subset rectangular boundary are sent to the transmission cloud server. If yes, based on the computing cloud server, the small grid covering the data point to be queried is determined according to the single-point query trap and the grid index corresponding to the locally stored encrypted subset, and the result set including the small grid where the data point to be queried is located and the verification information determined by the small grid where each data point to be queried is located are sent to the transmission cloud server. Through two rounds of interaction between multiple storage cloud servers and computing cloud servers, a single-point query on an encrypted data set is realized, which can not only assist the data owner to realize the effective update of the data set, but also ensure the security of the data set, query request and query result in the entire query process; through a carefully designed security interaction protocol, the correctness, freshness and integrity of the query result can be verified, effectively preventing the misleading of malicious cloud servers.
[0214] S44. The transmission cloud server integrates the single-point query results sent from each storage cloud server to obtain a single-point integration result, and sends the stored encrypted verification information table and the single-point integration result to the data owner.
[0215] Specifically, after receiving the single-point query results from each storage cloud server, the transmission cloud server summarizes the received result sets and verification information to obtain and , and and encrypted authentication information table Sent to the data owner.
[0216] Furthermore, in step S5, the data owner verifies the single-point query result, including the following steps H1-H4:
[0217] H1. The data owner verifies the correctness of the single-point query result based on the decryption parameters corresponding to each encryption subset. If the verification fails, the data owner executes H4. If the verification passes, the data owner executes H2.
[0218] For example, the data owner receives the result set from each single-point query result. Verification information corresponding to each result set After that, verify the result set corresponding to each subset in turn and verification information . For the The result set corresponding to the subset , if the result set If it is empty, recalculate the hash value of the encrypted subset rectangle boundary corresponding to the result set, recorded as , and the hash value of the received encrypted subset rectangle boundary Compare them. If they are equal, continue to decrypt the encrypted subset rectangular boundary to get the plaintext of the subset rectangular boundary. , and then re-determine whether the subset range covers the data point to be queried based on the plain text of the rectangular boundary of the subset If not covered, the result set Verification passed; if the result set If it is not empty, use the hash function and the hash key Recalculate the result set The hash signature of the corresponding small grid is calculated and compared with the received hash signature. If they are equal, the result set is considered Correctness verification passed.
[0219] H2. The data owner verifies the freshness of the query results based on the real-time key. If the verification fails, the data owner executes H4. If the verification passes, the data owner executes H3.
[0220] For example, combined with the examples in the above steps, the result set After correctness verification, the data owner uses the hash function and the hash key Recalculate and Hash signature, denoted as and , and with the received and Compare, if equal, use the inverse permutation function and Respectively and Perform inverse permutation to obtain and , and then use the symmetric key s Decrypt verification information The small grid coordinates of small and medium grids are encrypted to obtain the plain text of small grid position coordinates. , determine the position coordinates of the small grid Is it satisfied? , if satisfied, use the real-time key Decrypt the entire encrypted verification information table and determine whether the hash signature of the corresponding small grid is equal to the hash signature of the returned small grid. If they are equal, the freshness verification passes.
[0221] H3. The data owner performs integrity verification on the single-point query result based on the decryption parameters corresponding to each encrypted subset received. If the verification fails, the data owner executes H4.
[0222] For example, combined with the examples in the above steps, the result set After passing the freshness verification, the data owner decrypts the small grid rectangular range encryption result of the small grid, obtains the rectangular range of the small grid, and determines whether the rectangular range of the small grid covers the data point to be queried. If so, the result set is considered to have passed integrity verification.
[0223] H4, the data owner discards the query results and determines that there is a malicious cloud server in the cloud distributed data query system.
[0224] The secure index and secure query protocol provided by this method can effectively support secure range queries and verification of result sets.
[0225] Furthermore, in S5, the data owner updates the encrypted subset stored on the corresponding storage cloud server according to the single-point query result, and transmits the encrypted verification information table stored on the cloud server, including the following steps S51-S56:
[0226] S51. The data owner decrypts the single-point query result to obtain the plaintext of the data point of the small grid where the data point to be queried is located.
[0227] Specifically, the data owner decrypts the encryption result of the data point in the small grid where the data point to be queried is located, and obtains the original data plaintext of the coverage range of the small grid where the data point to be queried is located.
[0228] S52: The data owner updates the small grid where the data point to be queried is located according to the operation task corresponding to the data point to be queried and the data point to be queried, and encrypts the updated small grid.
[0229] Among them, the operation tasks include deletion and insertion.
[0230] S53. The data owner updates the verification information table according to the encrypted updated small grid.
[0231] S54: The data owner generates a new real-time key and uses the new real-time key to encrypt the updated verification information table.
[0232] S55. The data owner stores the encrypted updated verification information table and the encrypted updated small grid in the transmission cloud server.
[0233] Specifically, when you need to insert a single point When the data owner replaces any false point in the original data with ; When you need to delete a point , the data owner will click Replace it with a new fake point, and then use the symmetric key Re-encrypt the updated small grid to obtain the encrypted result of the data points in the new small grid, and use the hash function and the hash key Recalculate the hash signature of the small grid. Since the hash signature of the small grid is updated, the corresponding small grid hash signature in the verification information table also needs to be updated, and the entire verification information table needs to be re-encrypted. Specifically, the data owner needs to regenerate a real-time key , and then use the symmetric encryption algorithm and real-time key Re-encrypt the entire new verification information table and finally use the real-time key Share with the client in real time, and send the encrypted updated verification information table and the encrypted updated small grid to the transmission cloud server.
[0234] S56. The transmission cloud server sends the encrypted updated small grid to the storage cloud server corresponding to the small grid where the data point to be queried is located, so that the corresponding storage cloud server updates the encrypted subset stored locally.
[0235] Specifically, the transmission cloud server replaces the old verification information table with the re-encrypted verification information table, and sends the encrypted updated small grid to the corresponding storage cloud server. The storage cloud server replaces the old small grid information with the received updated small grid information, thereby completing the data update.
[0236] The above method can realize flexible update of the data set to be outsourced in the cloud distributed data query system.
[0237] The present invention also provides a cloud-based distributed data query system, including: a data owner, a client, a transmission cloud server, a computing cloud server and Storage cloud servers, including: is a positive integer greater than or equal to 2.
[0238] The cloud-based distributed data query system is used to execute any of the cloud-based distributed data query methods provided in the above method embodiments.
[0239] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the specific contents and beneficial effects and other related matters can be referred to the partial description of the method embodiment.
[0240] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0241] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A cloud distributed data query method, characterized in that: Applied to cloud distributed data query system, the system includes: data owner, client, transmission cloud server, computing cloud server and Storage cloud servers, including: is a positive integer greater than or equal to 2; The method comprises: S1, the data owner pre-processes the data set to be outsourced, so as to split the data set to be outsourced and store it in The storage cloud server; S2, the client performs a range query on the data set to be outsourced based on the transmission cloud server, the computing cloud server and the storage cloud server, wherein the range query is to query part of the data according to the query range; The S1 specifically includes: S11, the data owner divides the data set to be outsourced into subsets; S12, the data owner generates a pair of public-private key pairs for homomorphic encryption according to preset security parameters, and encrypts the rectangular boundaries of each subset according to the public key in the public-private key pair to obtain encrypted rectangular boundaries of the subsets; S13, the data owner performs fine-grained grid division on each of the subsets to obtain a plurality of small grids, and constructs a grid index based on the obtained small grids; S14, the data owner sends the encrypted subsets obtained after rectangular boundary encryption, fine-grained grid division and grid index construction to different storage cloud servers respectively; S15, the data owner determines the verification information of the encrypted subsets stored in each storage cloud server according to the small grids corresponding to each subset, obtains a verification information table, generates a real-time key, encrypts the verification information table using the real-time key based on a symmetric encryption algorithm, and stores the encrypted verification information table in the transmission cloud server; S16, the data owner distributes the real-time key and the decryption parameters corresponding to each of the encryption subsets to the client and the computing cloud server; The S2 specifically includes: S21, the client generates a range query trapdoor according to the acquired query range, and sends the range query trapdoor to the transmission cloud server; S22, the transmission cloud server distributes the range query trapdoor to each of the storage cloud servers; S23, each of the storage cloud servers, based on the computing cloud server and according to the range query trapdoor, respectively queries in the locally stored encrypted subsets, and sends the range query results to the transmission cloud server; S24, the transmission cloud server integrates the range query results sent by each of the storage cloud servers to obtain a range integration result, and sends the verification information related to the range integration result in the stored encrypted verification information table and the range integration result to the client; against Any first storage cloud server among the storage cloud servers, the S23 specifically includes: S231, the first storage cloud server generates four random positive integers, and based on the additive homomorphism and multiplication homomorphism characteristics of homomorphic encryption, calculates a first intermediate result according to the four random positive integers, the encrypted subset rectangle boundary corresponding to the locally stored encrypted subset, and the range query trapdoor, and sends the first intermediate result to the computing cloud server, where the first intermediate result includes: , , , , in, , , and Composed first intermediate result, Indicates the query scope. Represents a range query trapdoor, , , and is a random positive integer used to calculate the first intermediate result in the range query process. The operator represents multiplication, Indicates The encrypted subset rectangular boundaries corresponding to the subsets, Represents an assignment operation; S232, the computing cloud server decrypts the data item in the first intermediate result according to the private key in the public-private key pair, where the public-private key pair is generated by the data owner according to preset security parameters; S233, the computing cloud server calculates the product of the two decryption results in the same direction, and determines whether the products corresponding to different directions are less than or equal to 0 at the same time. If so, it is determined that there is an intersection between the encrypted subset stored locally on the first storage cloud server and the query range, and a first message is sent to the first storage cloud server. If not, it is determined that there is no intersection between the encrypted subset stored locally on the first storage cloud server and the query range, and a second message is sent to the first storage cloud server. S234, in response to the received second message, the first storage cloud server sends the encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary corresponding to the locally stored encrypted subset, and an empty result set to the transmission cloud server; or, in response to the received first message, generates four groups of random positive integers for the grid index corresponding to the locally stored encrypted subset, generates a first data set and a second data set according to the four groups of random positive integers, and sends the first data set and the second data set to the computing cloud server; S235, the computing cloud server uses the private key in the public-private key pair to decrypt the first data set and the second data set, and determines whether each small grid corresponding to the grid index stored in the first storage cloud server has an intersection with the query range according to the decryption result, constructs a first vector and a second vector according to the judgment result, and determines a hash value of the first vector and a hash value of the second vector according to a hash function and a hash key, and sends the first vector, the second vector, the hash value of the first vector, and the hash value of the second vector to the first storage cloud server; S236, the first storage cloud server selects a target small grid from all the small grids stored locally according to the first vector and the second vector, and adds the encryption result of the data points in the small grid corresponding to the target small grid to a result set, and sends the result set, the encryption result of the small grid rectangular range corresponding to the target small grid, the encryption result of the small grid coordinates, the small grid hash signature, the first vector, the second vector, the hash value of the first vector and the hash value of the second vector, as well as the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary to the transmission cloud server; The step S234 generates four groups of random positive integers for the locally stored grid index, generates the first data set and the second data set according to the four groups of random positive integers, and sends the first data set and the second data set to the computing cloud server, including:
1. The first storage cloud server generates four groups of random positive integers, expressed as: , , , , in, , , and Respectively represent the first storage cloud server local storage The number of rows and columns of the grid index corresponding to the subset, and denote the row index and column index respectively, , , and All represent random positive integers; 2. The first storage cloud server generates two empty sets, which are expressed as: , , in, represents the first data set, represents the second data set, represents the empty set, Represents an assignment operation; 3. The first storage cloud server is based on From 1 to Sequential iterative calculation of: , , , in, Used to determine the current small grid The lower boundary of the direction is within the query range The relative position relationship between the upper boundaries in the direction, Used to determine the current small grid The upper boundary of the direction is within the query range The relative position relationship between the lower boundaries in the direction, Used to update the first data set according to the relative position relationship , by traversing the small grid of any row in the grid index, the query range is The range in the direction is related to each small grid The intersection operation is performed on the range in the direction, and the two values obtained are inserted into the first data set as a tuple. To update the first dataset ; 4. The first storage cloud server is based on From 1 to Sequential iterative calculation of: , , , in, Used to determine the current small grid The lower boundary of the direction is within the query range The relative position relationship between the upper boundaries in the direction, Used to determine the current small grid The upper boundary of the direction is within the query range The relative position relationship between the lower boundaries in the direction, Used to update the second data set based on the relative position relationship , by traversing the small grid of any column in the grid index, the query range is The range in the direction is related to each small grid The intersection operation is performed on the range in the direction, and the two values obtained are inserted into the second data set as a tuple. To update the second dataset ; 5. The first storage cloud server sends the first data set and the second data set finally calculated to the computing cloud server.
2. The method according to claim 1, characterized in that The method further comprises: S3, the client verifies the range query result according to the real-time key and the decryption parameters corresponding to each of the encryption subsets; The S3 specifically includes: S31, the client verifies the correctness of the range query result according to the decryption parameters corresponding to each of the encryption subsets. If the verification fails, the client executes S34. If the verification passes, the client executes S32. S32, the client verifies the freshness of the range query result according to the real-time key. If the verification fails, the client executes S34. If the verification passes, the client executes S33. S33, the client performs integrity verification on the range query result according to the received decryption parameters corresponding to each of the encryption subsets. If the verification fails, the client executes S34; S34, the client discards the range query result and determines that there is a malicious cloud server in the cloud distributed data query system.
3. The method according to claim 2, characterized in that The method further comprises: S4, the data owner performs a single-point query on a data point based on the transmission cloud server, the computing cloud server and the storage cloud server; S5, the data owner verifies the single-point query result, and after the verification is passed, updates the encrypted subset stored on the corresponding storage cloud server and the encrypted verification information table stored on the transmission cloud server according to the single-point query result; The S4 specifically includes: S41, the data owner generates a single-point query trapdoor according to the acquired data point to be queried, and sends the single-point query trapdoor to the transmission cloud server; S42, the transmission cloud server distributes the single-point query trap sent by the data owner to each of the storage cloud servers; S43, each of the storage cloud servers, based on the computing cloud server and according to the single-point query trapdoor, respectively queries the encrypted subset stored locally, and sends the single-point query result to the transmission cloud server; S44, the transmission cloud server integrates the single-point query results sent by each of the storage cloud servers to obtain a single-point integration result, and sends the stored encrypted verification information table and the single-point integration result to the data owner; In S5, the encrypted subset stored on the corresponding storage cloud server and the encrypted verification information table stored on the transmission cloud server are updated according to the single-point query result, specifically including: S51, the data owner decrypts the single-point query result to obtain the small grid where the data point to be queried is located; S52, the data owner updates the small grid where the data point to be queried is located according to the operation task corresponding to the data point to be queried and the data point to be queried, and encrypts the updated small grid, wherein the operation task includes deletion and insertion; S53, the data owner updates the verification information table according to the encrypted updated small grid; S54, the data owner generates a new real-time key, and uses the new real-time key to encrypt each verification information in the updated verification information table; S55, the data owner stores the encrypted updated verification information table and the encrypted updated small grid in the transmission cloud server; S56, the transmission cloud server sends the encrypted updated small grid to the storage cloud server corresponding to the small grid where the data point to be queried is located, so that the corresponding storage cloud server updates the encrypted subset stored locally.
4. The method according to claim 3, characterized in that The data owner in S13 divides each of the subsets into fine-grained grids to obtain a plurality of small grids, specifically including: The data owner determines two mapping directions; The data owner maps the data points in each subset along the corresponding mapping direction by a locality sensitive hash function for any mapping direction to obtain a corresponding hash code, divides the data points in each subset into a plurality of initial hash buckets according to the size of the hash code corresponding to the data points in each subset, and merges the initial hash buckets in turn based on the greedy merging principle, taking the number of data points in the initial hash bucket with the largest number of data points as the standard number, until the number of data points in the merged composite hash bucket is closest to and less than the standard number; The data owner obtains the initial grid corresponding to each of the subsets according to all the composite hash buckets corresponding to each of the subsets in two mapping directions; The data owner performs pseudo-point filling processing on each of the initial grids according to a preset minimum pseudo-point filling rate to obtain a small grid corresponding to each of the subsets.
5. The method according to claim 4, characterized in that The step of constructing a grid index based on the small grids obtained by division in S13 specifically includes: The data owner encrypts each of the small grids to obtain encrypted small grids; The data owner determines the hash value of each encrypted subset rectangular boundary according to the hash function and the hash key; The data owner performs permutation processing on the encrypted small grids corresponding to each of the subsets according to the preset row permutation function and column permutation function to obtain the grid index corresponding to each of the subsets, which is expressed as: , in, represents the grid index corresponding to the subset, represents the row permutation function, represents the column permutation function, Represents all the encrypted small grids corresponding to the subset before the permutation process; The data owner encrypts each of the small grids to obtain the encrypted small grids, which specifically includes: For any first small grid among the small grids: The data owner uses a symmetric encryption algorithm and a preset symmetric key to perform overall encryption processing on the data points in the first small grid, and obtains an encryption result of the data points in the small grid, which is expressed as: , in, represents the encryption result of data points in a small grid, Indicates that a symmetric key is used Encryption processing, Indicates the first A real data point, Indicates the first A false point; The data owner uses the public key in the public-private key pair to encrypt the rectangular boundary of the first small grid, and obtains the small grid rectangular range encryption result, which is expressed as: , in, Indicates the result of small grid rectangular range encryption. Indicates the use of public key Encryption processing, Rectangular boundaries representing small grids; The data owner obtains the position coordinates of the first small grid, and uses a symmetric encryption algorithm and the preset symmetric key to encrypt the position coordinates to obtain an encrypted result of the small grid coordinates, which is expressed as: , in, Indicates the result of small grid coordinate encryption, Indicates the position coordinates of the small grid; The data owner determines the small grid hash signature according to the hash function and the hash key, as well as the encryption results of the data points in the small grid, the encryption results of the small grid rectangular range, and the encryption results of the small grid coordinates, which is expressed as: , in, represents a small grid hash signature, represents a hash function, represents the hash key, Indicates a connector; The data owner obtains the encrypted first small grid according to the encryption result of the data points in the small grid, the encryption result of the small grid rectangular range, the encryption result of the small grid coordinates and the hash signature of the small grid, which is expressed as: 。 6. The method according to claim 5, characterized in that against Any first storage cloud server among the storage cloud servers, the S43 specifically includes: S431, the first storage cloud server generates four random positive integers, and based on the additive homomorphism and multiplication homomorphism characteristics of homomorphic encryption, calculates a second intermediate result according to the four random positive integers, the encrypted subset rectangular boundary corresponding to the locally stored encrypted subset, and the single-point query trapdoor, and sends the second intermediate result to the computing cloud server, where the second intermediate result includes: , , , , in, , , and Composing the second intermediate result, Represents a single-point query trap. Indicates the data point to be queried. , , and is a random positive integer used to calculate the second intermediate result in the single-point query process. Indicates The encrypted subset rectangular boundaries corresponding to the subsets; S432, the computing cloud server decrypts the data item in the second intermediate result according to the private key in the public-private key pair; S433, the computing cloud server calculates the product of the two decryption results in the same direction, and determines whether the products corresponding to different directions are less than or equal to 0 at the same time. If so, it is determined that the encrypted subset stored locally by the first storage cloud server covers the data point to be queried, and a third message is sent to the first storage cloud server. If not, it is determined that the encrypted subset stored locally by the first storage cloud server does not cover the data point to be queried, and a fourth message is sent to the first storage cloud server. S434, the first storage cloud server sends the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary, and an empty result set to the transmission cloud server in response to the received fourth message; or, in response to the received third message, generates four groups of random positive integers for the locally stored grid index, generates a third data set and a fourth data set according to the four groups of random positive integers, and sends the third data set and the fourth data set to the computing cloud server; S435, the computing cloud server uses the private key in the public-private key pair to decrypt the third data set and the fourth data set, and determines whether the small grid corresponding to the grid index stored in the first storage cloud server covers the data point to be queried from both the row and column directions according to the decryption result, constructs a third vector and a fourth vector according to the judgment result, and determines the hash value of the third vector and the hash value of the fourth vector according to the hash function and the hash key, and sends the third vector, the fourth vector, the hash value of the third vector, and the hash value of the fourth vector to the first storage cloud server; S436, the first storage cloud server selects a target small grid from all the small grids stored locally according to the third vector and the fourth vector, and adds the encryption result of the data points in the small grid corresponding to the target small grid to a result set, and sends the result set, the encryption result of the small grid rectangular range corresponding to the target small grid, the encryption result of the small grid coordinates and the small grid hash signature, the third vector, the fourth vector, the hash value of the third vector, the hash value of the fourth vector, and the locally stored encrypted subset rectangular boundary and the hash value of the encrypted subset rectangular boundary to the transmission cloud server; The step S434 generates four groups of random positive integers for the locally stored grid index, generates a third data set and a fourth data set according to the four groups of random positive integers, and sends the third data set and the fourth data set to the computing cloud server, including:
1. The first storage cloud server generates four groups of random positive integers, expressed as: , , , , in, , , and Respectively represent the first storage cloud server local storage The number of rows and columns of the grid index corresponding to the subset, and denote the row index and column index respectively, , , and All represent random positive integers; 2. The first storage cloud server generates two empty sets, which are expressed as: , , in, represents the third data set, represents the fourth data set, represents the empty set; 3. The first storage cloud server is based on From 1 to Sequential iterative calculation of: , , , in, Indicates that the query point is The coordinates in the direction, represents the parameters of homomorphic encryption, Indicates that the current small grid is The left boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is The right boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is determined Left boundary and query point in direction exist The relative position relationship of the coordinates in the direction, Indicates that the current small grid is determined The right boundary and query point in the direction exist The relative position relationship of the coordinates in the direction, Indicates that the previously calculated value is put into the third data set as a tuple middle; 4. The first storage cloud server is based on From 1 to The sequential loop iteration calculation is: , , , in, Indicates that the query point is The coordinates in the direction, Indicates that the current small grid is The left boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is The right boundary in the direction is at The difference in coordinates in the direction is The obfuscated ciphertext, Indicates that the current small grid is determined The lower boundary and query point in the direction exist The relative position relationship of the coordinates in the direction, Indicates that the current small grid is determined The upper boundary and query point in the direction exist The relative position relationship of the coordinates in the direction, Indicates that the previously calculated values are put into the fourth data set as a tuple middle; 5. The first storage cloud server sends the third data set and the fourth data set finally calculated to the computing cloud server.
7. A cloud-based distributed data query system, characterized in that: include: Data owner, client, transmission cloud server, computing cloud server and Storage cloud servers, including: is a positive integer greater than or equal to 2; The cloud-based distributed data query system is used to execute any of the cloud-based distributed data query methods provided as claimed in claims 1-6.
Citation Information
Patent Citations
Position data encryption method and system, position data retrieval method and system and position privacy protection system
CN113434894A
Cloud-based privacy-protecting safe and efficient biological recognition method and system
CN117370962A