Encrypted spatial data geometric range query method based on multistage index

By constructing x-trees and y-trees for data segmentation and multi-level encrypted indexing, the problems of inefficient query efficiency and privacy leakage on cloud servers are solved, and efficient and secure spatial data query is achieved.

CN120408701APending Publication Date: 2025-08-01HEBEI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510484914.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing spatial data geometric range query methods pose a risk of privacy leakage on cloud servers and are inefficient in querying, especially on large-scale and densely distributed datasets, which are difficult to maintain efficient search time.

Method used

The geometric range query method of encrypted spatial data based on multi-level index is adopted. Data segmentation is divided by generating x-tree and y-tree, and randomized encoding and fingerprint mapping is performed. Three-layer encryption is combined with hash function, and stored on the x-server and y-server respectively. The uniform segmentation and randomized encoding of the STR tree are used to reduce the calculation amount and improve query efficiency.

Benefits of technology

While ensuring data privacy, it significantly improves query efficiency and availability, reduces the amount of information obtained by the server, reduces query time, and enhances data security and query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408701A_ABST
    Figure CN120408701A_ABST
Patent Text Reader

Abstract

The invention provides an encrypted spatial data geometric range query method based on multistage indexes. The method is a dynamic symmetric searchable encryption scheme for geometric range search, and accords with forward security and backward security. In order to realize efficient query, a multi-stage matching search mode is constructed, screening is performed through three times of matching, and the query efficiency is improved. The data set generates two index directories which are arranged on the two servers respectively, results are obtained through mutual verification of query results on the two servers, and it is ensured that each server can only obtain range information of one dimension, so that when an update or query request is processed, the query efficiency is improved. And each server can only obtain a part of token information stored by the server, so that complete query range information is difficult to construct, and the security of data coordinates is more effectively ensured. In addition, the invention further provides an efficient and safe updating mode, and forward and backward security is ensured by combining an index structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geometric range queries for spatial data, and specifically to an encrypted spatial data geometric range query method based on a multi-level index. Background Art

[0002] Spatial data has extensive applications in the process of providing Location-Based Services (LBS), involving transportation (such as Uber) and social media (such as "Friends Nearby" on Facebook or "People Nearby" on WeChat). These service providers process large datasets and usually outsource the retrieval of these datasets to a third-party server (such as a cloud server), which can provide convenience for the database owner, but the user's location information can easily be leaked. Encrypted transmission can be carried out during transmission and storage, but it will affect the usage efficiency of the dataset, and due to interest factors, the cloud server will obtain some relevant leaks of the dataset. Therefore, the privacy protection and efficient search of spatial datasets are very worthy of attention.

[0003] For such scenarios, Searchable Symmetric Encryption (SSE) is an effective encryption technology that allows data to be securely stored on an incompletely trusted or semi-trusted server while maintaining the search ability. Many SSE schemes particularly focus on keyword equality checks. However, range queries are also one of the most basic and practical queries in practice. Specifically, range queries on geographical data require performing calculation-comparison operations to verify whether a point is within the query area, which makes geographical queries more challenging. From the perspective of a single range query operation, when dealing with datasets of huge size and dense distribution or wide query ranges, maintaining efficient search time is one of the most basic and practical requirements. Summary of the Invention

[0004] The purpose of the present invention is to provide an encrypted spatial data geometric range query method based on a multi-level index, which can improve the query efficiency and enhance the usability of the method while ensuring the security of index data and query privacy.

[0005] The present invention is implemented as follows:

[0006] An encrypted spatial data geometric range query method based on a multi-level index, comprising the following steps:

[0007] a. Generate an index;

[0008] a-1. The data owner divides the spatial data points to form two STR tree structures, namely the x-tree and the y-tree;

[0009] a-2. The data owner performs randomized encoding on the leaf nodes of the two trees respectively to achieve the first-level encryption;

[0010] a-3. The data owner uses a fingerprint generation function to map the encoded information of each data point in the leaf nodes of the two trees into fingerprints respectively to achieve the second-level encryption;

[0011] a-4. The data owner uses a hash function to map the coordinate information and encoded information of each data point in the leaf nodes of the two trees into the G1 multiplicative group to achieve the third-level encryption;

[0012] a-5. The data owner sends the x directory and y directory after three-level encryption to the x server and y server respectively;

[0013] b. The user generates an x query token and a y query token respectively according to the structure of the STR tree and the query target, and sends them to the x and y servers respectively;

[0014] c. Token matching;

[0015] c-1. When the x and y servers receive the corresponding query tokens, they perform the first-level leaf node matching respectively;

[0016] c-2. The x server sends the first-level matching result to the y server, and the y server performs the second-level matching, that is, the y server performs fingerprint information matching;

[0017] c-3. The data points with successful second-level matching are verified by the y server at the third level of ciphertext. After successful verification, the final matching result is obtained;

[0018] d. The y server collects the successfully matched data points and returns them to the user.

[0019] In the above solution, step a-1 is specifically as follows: First, count the number of spatial data points, and then use the STR tree generation algorithm to evenly divide the spatial data points; The method of even division is: First, select the x-axis as the first division coordinate, and select the division position so that the entire map area is divided into two parts, and the number of data points contained in each part is equal; Then select the y-axis as the second division coordinate, and use the same method to evenly divide each part into two parts with the same number of data points; Then select the x-axis as the division coordinate, and so on until the target division times or the number of data points in the target area is reached; Each smallest divided area is used as a leaf node, and each leaf node is inserted into the two trees according to the x dimension and y dimension respectively, so as to form an x tree and a y tree.

[0020] In the above solution, in step a-4, in the G1 generation group, g and h are selected for the third-level encryption of data points. After the third-level encryption, Gx = e(h, g X+Rn ) is obtained as the x-server ciphertext, Gy = e(h, g Y-Rn ) is obtained as the y-server ciphertext, and Gz = e(h, g X+Y+KZ ) is obtained as the verification result; where X, Y, Z, and K are cipher values randomly generated by the data owner, and Rn is the encoded information of the data point.

[0021] In the above solution, in step c-3, the y-server performs the third-level ciphertext verification. Specifically: the y-server calculates Gq = e(h K , g Z ), and determines whether Gx * Gy is equal to Gz / Gq. If they are equal, it is a match; if not, it continues to calculate the subsequent data points. Since the verification calculation efficiency of bilinearity is much lower than the equality verification process, the operation amount of the third level is reduced by adding the second-level comparison, thereby greatly improving the overall query speed of the system.

[0022] In the above solution, in step d, the y-server collects the data points with successful matching, and returns Rne0(g Z , g Z ) and the fingerprint to the user; the user first decrypts the fingerprint and determines whether the data point is the latest information and whether it has been deleted according to the OP information carried in the fingerprint, so as to obtain the real information; where e0 is a bilinear mapping.

[0023] In the above solution, after step a and before step b, it further includes: g Z As an identity authentication information, before the user queries, the data owner first authenticates the user's identity, and only the users who meet the identity authentication can perform the query operation in subsequent step b.

[0024] In the above solution, it further includes step e: updating the data. Specifically: it is updated by the method of a hiding operator. First, a counter is set for each data point, and the operator OP is used to link with the fingerprint to obtain new fingerprint information; then, the encoded information of the data point is used for bilinear operation to replace the original bilinear information, find the position of the leaf node in the two trees where the data point is located, and directly insert the data point into the leaf node to complete the update.

[0025] In step e of the above solution, several fictional data points are randomized and inserted into several different nodes simultaneously with the real updated data points to confuse the real update target.

[0026] In the present invention, the data set is divided according to the horizontal and vertical coordinates using the uniform partitioning method of the STR tree to obtain the smallest intervals that form leaf nodes, forming two tree structures, namely the x-tree and the y-tree, which are stored in two servers respectively. When querying, the query ranges corresponding to the dimensions are found in the two servers respectively, and then the x-server sends the query results to the y-server for verification calculation. The final query result is obtained through the mutual verification of the two query sets. The update is carried out by directly inserting the operator in the ciphertext, thus achieving better update efficiency and reducing the leakage during the update process.

[0027] The present invention covers the query range by constructing the x-tree and the y-tree, and at the same time uses node randomization encoding, fingerprints, and verification encryption encoding for three-layer matching. Each pairing can greatly reduce the number of subsequent operations, thus accelerating the query speed. By constructing the x-tree and the y-tree, the information related to the data coordinates is stored in two cloud servers respectively, so that for each query, a single server can only obtain the range information of the corresponding coordinate axis. And since the STR tree is used to construct the directory, the number of data in each leaf node is equal at the initial stage of the directory. For both servers, no effective information can be obtained through the data distribution. In the subsequent update process, invalid obfuscation information can be inserted into the nodes, and all update methods are implemented by insertion, thus protecting the security of the index data. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of the system model of the present invention.

[0029] Figure 2 It is a schematic diagram of the spatial data point segmentation method in the present invention.

[0030] Figure 3 It is a comparison of the time consumption of generating query tokens using different query ranges in the present invention and other solutions in the same data set.

[0031] Figure 4 It is a comparison of the time consumption of searching for the same range in different data scales in the present invention and other solutions.

[0032] Figure 5 It is a comparison of the time consumption in the update process between the present invention and other solutions.

[0033] Figure 6 It is the time consumption of the present invention at different segmentation dimensions and different data scales. DETAILED DESCRIPTION OF THE INVENTION

[0034] To achieve efficient querying, the present invention constructs a multi-level matching search method, which conducts screening through three rounds of matching, thereby improving the query efficiency. To achieve higher security, two index directories are respectively generated for the data set and arranged on two servers. The results are obtained through mutual verification of the query results on the two servers, ensuring that each server can only obtain range information in one dimension. Furthermore, the present invention also designs an efficient and secure update method, which combines the index structure to ensure the security of the index and data. Finally, experiments are conducted to verify the efficiency and practicality of the solution of the present invention.

[0035] The system model used in the present invention is as Figure 1 shown. The system is divided into three main parts: the data owner, the user (or client), and the server. The server includes an x server and a y server.

[0036] The data owner provides spatial data, divides the spatial data to form an STR tree structure, and encrypts the leaf nodes of the tree to generate an x directory and a y directory respectively. The x directory and the y directory are respectively stored in the corresponding servers as query directories.

[0037] The server is responsible for storing the encrypted data and responding to requests such as user queries or data owner updates. When receiving a query token, the two servers respectively perform the first-level node matching. Then the x server sends the query results to the y server, and the y server performs the second-level equality matching. The y server performs the third-level ciphertext verification on the data items that match successfully to obtain the final matching result, and collects the data points that match successfully and returns them to the user.

[0038] The user is the user of the system, queries and uses the system in the server, generates corresponding tokens locally according to the structure of the STR tree and the query target, sends them to the corresponding server, and obtains the required query results.

[0039] The present invention divides the data point set according to the horizontal and vertical coordinates using the uniform division method of the STR tree to obtain the smallest intervals that form the leaf nodes, forming two tree structures, namely the x tree and the y tree, which are respectively stored in two servers. When querying, the query ranges corresponding to the respective dimensions (x dimension or y dimension) are found in the two servers respectively. Then the x server sends its query range to the y server for verification calculation, and the final query result is obtained through mutual verification of the two query sets. The update is performed by the direct insertion method of carrying the operator in the ciphertext, thereby achieving better update efficiency and reducing leakage during the update process.

[0040] For the received spatial data point information, first count the quantity, and use the STR tree generation algorithm to evenly divide the spatial data point set. This uniform division method is beneficial to the search and encoding processes, avoiding a situation where a subtree is too deep or the number of data points in some leaf nodes is excessive. Also, when initially uploaded to the server, it can prevent the server from inferring the corresponding spatial range based on the distribution pattern of the data points in the nodes, minimizing the information that the server can obtain.

[0041] The splitting method is as follows: First, select the x-axis as the first division coordinate. According to the distribution characteristics of the abscissa, select the division position to divide the entire map area into two parts, with an equal number of data points in each part. Then, perform a division on the ordinate distribution. Since the entire area has already been divided into two parts according to the x-axis division result, then count the data points in these two parts separately, and use the same method to divide the ordinate so that each part is further evenly divided into two parts with the same number of data points. And so on until the target division count is reached or the number of data points in the target area is reached. As Figure 2 shown, the red line is the first division according to the x-axis, dividing the set into two parts with eight data points in each part. The yellow line is the first division according to the y-axis, further dividing the two parts after the x-axis division into two parts each, with four data points in each part. The green line is the second division according to the x-axis, further dividing the current smallest interval into two parts, each containing two data points. The purple line is the second division according to the y-axis, further dividing the current smallest interval into two parts, each containing one data point.

[0042] Place the divided nodes into the leaf nodes of two trees according to the dimensions (x-dimension, y-dimension), and form a sequential number and coverage range information for each leaf node, generating tokens more effectively during the subsequent query token generation process or the insertion process of updated data, forming data point distribution directories for the x-axis and y-axis respectively. Only when the two parts of the directories are mutually verified can the complete data point coordinate information be obtained. After storing the two directories in different cloud servers respectively, since it is difficult for cloud servers to collude with each other and there is no relatively specific data information, when processing update or query requests, each server can only obtain a part of the token information it stores, making it difficult to construct the complete query range information, which more effectively guarantees the security of the data coordinates.

[0043] After the data points are split and the x-tree and y-tree are formed, perform hierarchical encryption on the spatial data points. First, randomize the node numbers of the two trees, and use the PRF pseudo-random function F(*) to perform random encoding for each node storing data points, obtaining the first-level query directory TAGi. The first-level query directory TAGi contains the split data point information.

[0044] Then, the fingerprint generation of the second level is carried out. FingerH(*) is a fingerprint generation function, which is constructed using a simplified pseudo-random function and maps the encoded information of the data points in the node into a short fingerprint. The number of bits of the mapped fingerprint needs to be adjusted according to the size of the data point set. Since there is a three-level matching mode during system matching, choosing a shorter mapping can make the same fingerprints exist in different nodes or even the same node, which can further reduce the characteristics of the node. The multi-level verification can also reduce the number of bilinear calculations, improving the system efficiency.

[0045] Finally, the encryption of the third level is carried out, which includes the coordinate information and matching information of the data points. Taking the position information of each data point as the input, the hash function H(*) is used to map the coordinate information and the encoded information Rn of the data points into the G1 generation group. In the G1 generation group, g and h are selected for the encryption process of the data points. Then, the data owner randomly generates two cipher values X and Y, as well as access cipher values Z and K for the x server and the y server, which are used as keys. The data owner calculates Gx = e(h, g X +Rn ), Gy = e(h, g Y-Rn ), and Gz = e(h, g X+Y+KZ ), which are used as the x server ciphertext, the y server ciphertext, and the verification result respectively. Then, Gx and the corresponding fingerprint are placed at the corresponding data points in the corresponding leaf nodes under the x directory; Gy and the corresponding fingerprint are placed at the corresponding data points in the corresponding leaf nodes under the y directory, and Gz is sent to the y server. When the complete coordinate information is obtained through mutual verification, another bilinear mapping e0 is selected for the complete coordinate information, and Rne0(g Z , g Z ) is used as the query result for the user to decrypt. At the same time, g Z can also be used as an identity authentication information. Before the query, the data owner authenticates the identity of the user, and only the users who meet the identity authentication can perform the query operation. After the three-level encryption is completed, the data owner uploads the complete encrypted directory to the two cloud servers respectively.

[0046] When querying, the data owner first authenticates the identity of the user. After the authentication is passed, the data owner sends the x-tree and y-tree structures to the user. The user finds the corresponding nodes through the tree structures and the query range, and then uses the same pseudo-random function F(*) to obtain the x ciphertext node and the y ciphertext node according to the numbers of the nodes in different trees, and sends them to the two servers as the x query token and the y query token respectively.

[0047] After the x-server and the y-server respectively receive the x-query token and the y-query token sent by the user, they each find the corresponding encrypted node according to the ciphertext node in the query token. This is the first-level comparison of the query. The x-server constructs the found encrypted nodes into a whole set, and after removing the node numbers, sends the set to the y-server. Here, the data points in the node set sent by the x-server are called x-data points, and the data points in the encrypted nodes found by the y-server are called y-data points. It should be noted that the node set sent by the x-server contains the second-level fingerprint encryption information and the third-level Gx encryption information of the data points.

[0048] The second-level comparison is performed by the y-server. Since the x-server sends the node set after the first-level comparison, the y-server finds the data points with the same data point fingerprints as those in its nodes after the first-level comparison from the nodes sent by the x-server. That is: find the x-data points with the same fingerprints as the y-data points from the x-data points sent by the x-server. In the second-level query, since the length of the fingerprint is simplified, there may be multiple x-data points and y-data points with the same fingerprint. The purpose of doing this is to further reduce the amount of information that the server can obtain in each query. Since the number of data points with the same characteristics within the corresponding range in each query is random, the ability to guess the query range is reduced.

[0049] The third-level query is carried out on the basis of the second-level query. The third-level query is that the y-server calculates Gq = e(h K , g Z ). Determine whether Gx * Gy is equal to Gz / Gq. If they are equal, it is a match; if not, continue to calculate the subsequent data points. Then return the matching result Rne0(g Z , g Z ) and the fingerprint to the user. The user first decrypts the fingerprint and judges whether the data is the latest information and whether it has been deleted according to the OP information carried in the fingerprint, so as to obtain the real information according to the information existing in the returned data points. Since the verification calculation efficiency of bilinearity is much lower than the process of equality verification, the operation amount of the third level is reduced by increasing the second-level comparison, thus greatly improving the overall query speed of the system.

[0050] The update is to meet the requirements of forward and backward privacy, and it is necessary to control the leakage of information. To meet these security requirements, the update process uses a key-value pair dictionary to store encrypted values in the form of (ID, OP), where OP is an insert or delete operation, and ID is the identifier of a specific file related to the operation. The position where the key is stored in the dictionary is generated by a pseudo-random function to ensure that the client can effectively generate all the position sets of the specific data related to a given search operation. In the present invention, OP is added to the fingerprint, a counter is set locally, and when a data is updated, the counter is incremented by one. And the counter and the exclusive OR value of OP are stored with an additional string and used as additional update information to be stored in the fingerprint. Then, the new data is directly encrypted using the framework method, and the corresponding target node is found to directly insert the data point. And some fictional data points are randomized and inserted into several different nodes simultaneously with the real update data points to confuse the real update target. Such an update method can well protect the update target and hide the real update object and update type.

[0051] The detailed implementation method is as follows:

[0052] It is necessary to construct two complete binary trees, one for x-axis search and the other for y-axis search. As mentioned above, the implementation algorithm of the present invention altogether includes parts such as key generation, tree construction, directory construction, directory encryption, query, and update.

[0053] The details of the algorithm are as follows:

[0054] At the beginning, after inputting the security parameter λ, the total dataset size N, the number of leaf nodes of the generated tree, and two empty initial datasets, the data owner generates a key (starting from the empty initial dataset for encryption).

[0055] The key generation algorithm generates corresponding hyperbola parameters, including generating a group, a generator, and a separate number for data points, to provide parameters for subsequent generation and encryption work.

[0056] The tree construction algorithm divides the entire spatial data set using the partitioning method of the STR tree. For example, first divide the x-axis, count the entire data set, and divide it at the position where the quantity is split in half, into two equal parts. Then, on the basis of the division, divide the two parts in the same way according to the y-axis, into four parts but regarded as two discontinuous parts, until the number of midpoints in each part reaches the preset value or the number of leaf nodes meets the requirements. Then, two trees corresponding to the x-axis and y-axis are obtained in this way, and the tree structure is saved as the basis for query.

[0057] The directory construction algorithm encrypts each leaf node in the partitioned tree structure. The leaf node generates a randomized code for use as a subsequent query token. The data points within the node are encrypted using fingerH(), e(h,g X+Rn ), e(h,g Y-Rn ) respectively to obtain the directory of the leaf node for use in second-level and third-level queries. The encrypted directory is stored in two servers respectively.

[0058] The query algorithm consists of two parts, namely the query token generation phase on the client side and the search and matching phase on the server:

[0059] Firstly, for token generation, on the client side, the node ranges corresponding to the two spanning trees are found according to the search scope, and then the randomized node codes are sent to the two servers respectively as query tokens.

[0060] The search phase is carried out separately on the two servers. According to the received query tokens, the corresponding point sets are found, and then the found nodes are sent to the other server. Two-level matching is performed according to the received results. First, it is checked whether the fingerprints match. For the nodes with matching fingerprints, bilinear verification calculations are performed. The points with correct calculations are the target data points. The matching coordinate data are collected and sent back to the client, and the client decrypts them to obtain the final result.

[0061] The update algorithm uses a forward and backward secure update method and is updated through the method of hiding operators. Firstly, a counter is set for each data point and linked with the fingerprint using the operator OP to obtain new fingerprint information. Then, bilinear operations are performed using the coding information to replace the original bilinear information. The positions of the leaf nodes in the two trees where the data points are located are found through searching, and the data points are directly inserted into the leaf nodes to complete the update. When querying, the query results are verified. The original OP is calculated using the fingerprint to determine whether the data has been deleted and whether it is the latest.

[0062] The solution of the present invention compares two relatively similar SSE solutions. These two solutions respectively use similar encryption methods and directory structures. However, it can be seen that the solution of the present invention has high efficiency in dynamic operations such as querying and updating. And because of the partitioning method used when constructing the set, the requirements for the form of the data are also very small, having good applicability. The two relatively similar SSE solutions are the following Literature [1] and Literature [2] respectively, and Literature [2] includes two solutions.

[0063] Reference [1] (Chen Z, Nie J, Li Z, et al. Geometric searchable encryption for privacy-preserving location-based services [J]. IEEE Transactions on Services Computing, 2023, 16(4): 2672-2684.) mainly proposed three directory construction strategies, but did not have very excellent query and update strategies, nor did it consider forward and backward security, so its practicality is not high.

[0064] Reference [2] (Kermanshahi S K K, Sun S F, Liu J K, et al. Geometric range search on encrypted data with Forward / Backward security [J]. IEEE Transactions on Dependable and Secure Computing, 2022, 19(1): 698-716.) includes two structures. The first structure protects forward security but will disclose the update path, and its overall efficiency is not much different from the solution of the present invention. However, the second structure protects backward security and has lower search and update efficiency. The time complexity comparison of the present invention with References [1] and [2] in theory is shown in Table 1, which includes three parts: generating tokens, querying, and updating. Tbm in the table refers to the bilinear mapping matching time.

[0065] Table 1

[0066] Parameter Generate Token Query Update The present invention O((log R)N) O(tTbm) O(1) Document [1] O(tTbm) O(NTbm) NA Document [2]-1 O((log R)N) O(log(2R)N) O(ktN) Document [2]-2 O((log R)N) O(log(2R)N) <![CDATA[O((2 t )N)]]>

[0067] The solution of the present invention is implemented in Java on a 64-bit machine equipped with a 3.1GHz Intel Core i5 processor and 16GB of memory. The pseudo-random function (PRF) is implemented using SHA-256, and the JPBC library is used for bilinear mapping-related operations. Due to the excellent adaptability of this solution, the data of world cities, including the longitude and latitude information of major world cities, are selected as the coordinate information of the x-axis and y-axis respectively. However, for other solutions, the overly precise longitude and latitude information may not be applicable. Therefore, the present invention performs standardized preprocessing on the dataset so that the preprocessed data is also applicable to other solutions, and finally 10,000 data points are selected as the experimental data.

[0068] Figure 3It compares the time consumption of generating query tokens for three schemes in the same data set for different query ranges. Among them, the two structures in Document [2] use the same token generation method. It can be seen that the present invention and Document [2] have similar efficiency, but are far lower than Document [1].

[0069] Figure 4 It compares the time consumption of searching for the same range in different data scales for four schemes. It can be seen that the present invention still has similar efficiency to Document [2]-1, but is far lower than Document [1] and Document [2]-2.

[0070] Figure 5 It compares the update time consumption. Since Document [1] has no update method, the present invention is compared with Document [2]-1 and Document [2]-2. It can be seen that the present invention has better speed in different data scales.

[0071] Figure 6 It shows the time consumption of the segmentation algorithm of the present invention for different data scales and different segmentation dimensions.

[0072] The present invention proposes a multi-level matching method for implementing a spatial range searchable encryption scheme while protecting forward privacy and backward privacy. The present invention first uniformly divides the spatial set by using an STR tree and randomizes the generated sub-regions as the first-level matching. Subsequently, fingerprints are generated for each data point and bilinear encryption for verification calculation is formed to form an efficient three-level matching mode. These data are stored on two independent servers for mutual matching calculation. In addition, efficient update is achieved by directly inserting a hiding operator, ensuring forward privacy and backward privacy. Finally, experiments are carried out on a real geographical data set, and the results verify the feasibility and efficiency of the scheme of the present invention.

Claims

1. A method for querying the geometric range of encrypted spatial data based on multi-level indexing, characterized in that, It includes the following steps: a. Generate an index; a-1. The data owner divides the spatial data points to form two STR tree structures, namely the x-tree and the y-tree; a-2. The data owner performs randomized encoding on the leaf nodes of the two trees respectively to achieve the first-level encryption; a-3. The data owner uses a fingerprint generation function to map the encoded information of each data point in the leaf nodes of the two trees into fingerprints respectively to achieve the second-level encryption; a-4. The data owner uses a hash function to map the coordinate information and encoded information of each data point in the leaf nodes of the two trees into the G1 generation group to achieve the third-level encryption; a-5. The data owner sends the x-directory and y-directory after three-level encryption to the x-server and y-server respectively; b. The user generates an x-query token and a y-query token respectively according to the STR tree structure and the query target, and sends them to the x and y servers respectively; c. Token matching; c-1. When the x and y servers receive the corresponding query tokens, they respectively perform the first-level leaf node matching; c-2. The x-server sends the first-level matching result to the y-server, and the y-server performs the second-level matching, that is, the y-server performs fingerprint information matching; c-3. The data points with successful second-level matching are verified by the y-server at the third level of ciphertext. After successful verification, the final matching result is obtained; d. The y-server collects the successfully matched data points and returns them to the user.

2. The geometric range query method for encrypted spatial data based on multi-level index according to claim 1, characterized in that Step a-1 is specifically: First, count the number of spatial data points, and then use the STR tree generation algorithm to evenly divide the spatial data points; The method of even division is: First, select the x-axis as the first division coordinate, and select the division position so that the entire map area is divided into two parts, and the number of data points contained in each part is equal; Then select the y-axis as the second division coordinate, and use the same method to evenly divide each part into two parts with the same number of data points; Then select the x-axis as the division coordinate, and so on until the target division times are reached or the number of data points in the target area is reached; Each smallest divided area is used as a leaf node, and each leaf node is inserted into the two trees according to the x-dimension and y-dimension respectively, so as to form the x-tree and the y-tree.

3. The geometric range query method for encrypted spatial data based on multi-level index according to claim 1, characterized in that, In step a-4, in the generated group G1, g and h are selected for the third-level encryption of data points. After the third-level encryption, Gx = e(h, g X+Rn ) is obtained as the ciphertext of the x server, Gy = e(h, g Y-Rn ) is obtained as the ciphertext of the y server, and Gz = e(h, g X+Y+KZ ) is obtained as the verification result; where X, Y, Z, and K are the cipher values randomly generated by the data owner, and Rn is the encoding information of the data point.

4. The geometric range query method for encrypted spatial data based on multi-level index according to claim 3, characterized in that, In step c-3, the y server performs the third-level ciphertext verification, specifically: the y server calculates Gq = e(h K , g Z ), and determines whether Gx * Gy is equal to Gz / Gq. If they are equal, it is a match; if not, it continues to calculate the subsequent data points.

5. The method for querying the geometric range of encrypted spatial data based on multi-level index according to claim 3, wherein In step d, the y server collects the successfully matched data points and returns Rne0(g Z , g Z ) and the fingerprint to the user; The user first decrypts the fingerprint and judges whether the data point is the latest information and whether it is deleted according to the OP information carried in the fingerprint, so as to obtain the real information; where e0 is a bilinear mapping.

6. The geometric range query method for encrypted spatial data based on multi-level index according to claim 3, characterized in that, in After step a and before step b, it further includes: g Z As an identity authentication information, before the user's query, the data owner first authenticates the user's identity, and only users who meet the identity authentication can perform the query operation in subsequent step b.

7. The geometric range query method for encrypted spatial data based on multi-level index according to claim 1, characterized in that It also includes step e: Update the data. Specifically: Update by the method of a hidden operator. First, set a counter for each data point, use the operator OP to link with the fingerprint to obtain new fingerprint information; Then perform a bilinear operation with the encoded information of the data point to replace the original bilinear information, find the position of the leaf node in the two trees where the data point is located, and directly insert the data point into the leaf node to complete the update.

8. The geometric range query method for encrypted spatial data based on multi-level index according to claim 7, characterized in that, In step e, a number of fictional data points are randomized and inserted into a number of different nodes together with the real updated data points to confuse the real update target.