Method and system for encrypted quadtree-based spatial dataset retrieval and privacy protection
Patent Information
- Application Number
- CN202611038590.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]然而,现有技术存在一些问题,仅能判断空间数据集是否与搜索范围相交,无法在密文状态下进一步计算数据集与搜索范围的相关度,并且对于数据集与搜索范围的关系查询时需要递归检查每个节点的子节点,导致查询延迟增加
本发明支持在密文状态下进行范围搜索,不泄露索引结构、查询范围和数据集内容,通过布隆过滤器和格雷码实现空间区域的高效编码与快速匹配,利用保内积加密实现密文下的相关度累加与排序,支持用户自定义相关度参数,通过阈值剪枝策略减少节点遍历数量,提升查询效率。
Smart Images

Figure CN122903413A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data retrieval and privacy protection technology, specifically to a method and system for spatial dataset retrieval and privacy protection based on encrypted quadtrees. Background Technology
[0002] Existing encrypted spatial retrieval methods include point-by-point encryption of spatial coordinates using order-preserving encryption or searchable encryption. However, order-preserving encryption is vulnerable to frequency analysis and inference attacks. Subsequently, researchers introduced spatial indexing structures such as R-trees and quadtrees, and combined them with attribute-based encryption or symmetric searchable encryption techniques to achieve encrypted retrieval. For example, Wang et al. proposed an encrypted spatial range query scheme based on encrypted R-trees, which encrypts the rectangles of R-tree nodes and uses the minimum boundary rectangle overlap judgment to achieve the query; Li et al. used Bloom filters to encode quadtree nodes and combined them with inner-product encryption to achieve privacy-preserving range queries.
[0003] However, existing technologies have some problems. They can only determine whether the spatial dataset intersects with the search range, but cannot further calculate the relevance between the dataset and the search range in the encrypted state. Furthermore, when querying the relationship between the dataset and the search range, it is necessary to recursively check the child nodes of each node, which increases the query latency. Summary of the Invention
[0004] To address the shortcomings mentioned in the background section, the present invention aims to provide a method and system for spatial dataset retrieval and privacy protection based on encrypted quadtrees, enabling the server to determine the spatial relationship between nodes and the search range through inner product comparison in encrypted form.
[0005] Firstly, the objective of this invention can be achieved through the following technical solution: a spatial dataset retrieval and privacy protection method based on encrypted quadtrees, the method comprising the following steps: Obtain the encrypted search trapdoor, which includes an encrypted search range vector, an encrypted relevance parameter vector, and the number of spatial datasets; The encrypted search range vector is searched based on a pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index equals a preset threshold, the node is added to the result node set; otherwise, it is not added to the result node set. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The relevance between the spatial dataset and the search range is calculated based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set. The spatial dataset corresponding to the number of spatial datasets with the highest relevance is selected. The corresponding encrypted spatial dataset is obtained from the pre-encrypted spatial database according to the corresponding spatial dataset number and returned to the search user.
[0006] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the generation process of the encrypted search range vector and the encrypted relevance parameter vector before encryption, including: Search users based on search scope and index building parameters Determine coverage of the search range Minimum leaf set That is, the set of nodes within the search range. Minimum leaf set Each node in Obtain its Bloom filter vector The By node According to its Gray code pass The hash function mapping is obtained; all of them are mapped. A bitwise OR operation yields the search range vector. ; Based on user-defined relevance parameters Generate a relevance parameter vector .
[0007] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the generation process of the encrypted search trapdoor, comprising: Security key group Security Key For the search range vector Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption .
[0008] Similarly, using For the relevance parameter vector Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption yields an encryption relevance parameter vector. ; The search user will use the encrypted search range vector Encryption relevance parameter vector and the number of spatial datasets returned by the server. Combining them yields an encrypted search trapdoor. And upload it to the server.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of searching the encrypted search range vector based on the pre-encrypted quadtree inverted index, comprising: The cloud server accepts encrypted search traps sent by search users. Inverted index of the encrypted quadtree Each node calculates the current node. The cloud server obtains its encrypted Bloom filter vector. And calculate its relationship with the encrypted search range vector. inner product Due to encryption algorithms Keep the inner product constant. equal to the search vector in plaintext state With node Bloom filter vector inner product ; The cloud server is based on the internal product With preset threshold The comparison results determine the spatial relationship between the nodes and the search space. The process is as follows: If inner product equal This indicates that the node has been completely searched. The node is covered, added to the result node set A, and pruned to prevent further recursive searching.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the inner product Not equal to the preset threshold hour, If inner product A value of zero indicates that the node is within the search range. If there is no overlap, skip the node and all its descendants. If the dot product is between 0 and The spaces between indicate the node and the search scope. If there is partial overlap, it is necessary to recursively check its four child nodes, where a preset threshold is used. According to the node The number of levels in the quadtree and the number of Bloom filter hash functions Predetermined, i.e. .
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of calculating the relevance of the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set, including: The cloud server traverses each node in the result node set A. The cloud server iterates through the encrypted inverted list of the node, and for each item in the list... Calculate the ciphertext feature vector Related parameters vector of encryption inner product ;because Keeping the inner product unchanged, the inner product is equal to the plaintext state. As a spatial dataset At the node The cloud server will determine the relevance contribution value of the nodes. After traversing the inverted list, calculate the value of that point for the dataset. Contribution value Add to In the cumulative correlation; After traversing all result nodes, select the K spatial datasets with the highest relevance from all spatial datasets and obtain their dataset numbers; then, based on these numbers, retrieve data from the encrypted spatial database. The corresponding encrypted spatial dataset is retrieved and returned as a result to the search user; the search user then uses a security key group. In Decrypt the returned encrypted dataset to obtain the plaintext spatial dataset.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the encryption process of the quadtree inverted index and the spatial database, including: Data owners use spatial dataset warehouses With index building parameters Construct a quadtree inverted index Inverted index Each node in the array is a triple. in This represents the rectangular area covered by the node. This is an inverted index list, recording the spatial dataset identifiers and the number of their locations that fall within the rectangular area. There are four pointers, each pointing to one of the four child nodes of this node; The data owner generates a set of keys. ,in and for The security key used by the algorithm It is used to encrypt spatial datasets repository Security key, key Shared by data owners and search users; For the constructed quadtree inverted index Each node in , will the node Encoding with Gray code The obtained Gray code is obtained through Each hash function is mapped to a Bloom filter vector. ,use Algorithm Encryption get For each entry corresponding to each node in the inverted index Construct feature vectors for dataset nodes and use Algorithm encryption obtained Finally, the encrypted quadtree inverted index is obtained. ;use encryption To obtain an encrypted spatial dataset .
[0013] Invert the encrypted quadtree index Spatial Dataset Repository Uploaded to the cloud server.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: an encryption process for the quadtree inverted index, comprising: Given a security parameter ,according to The algorithm generates a security key. ,in It is random dimensional bit vector, and Two random An invertible matrix, : It is a random permutation. It consists of 6 random numbers and satisfies ; For quadtree inverted index Each node in of Perform Bloom filter mapping to form a fixed-length Bloom filter vector. For the generated First, the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and Ultimately, the vector Encryption For each entry corresponding to each node in the inverted index Construct feature vectors for dataset nodes Using the key In Encryption obtained Update nodes Encrypted inverted list Finally, the encrypted quadtree inverted index is obtained. .
[0015] Secondly, in order to achieve the above objectives, this invention discloses a spatial dataset retrieval and privacy protection system based on encrypted quadtrees, comprising: The data acquisition module is used to acquire the encrypted search trapdoor, which includes the encrypted search range vector, the encrypted relevance parameter vector, and the number of spatial datasets. The data processing module searches the encrypted search range vector based on a pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index equals a preset threshold, the node is added to the result node set; otherwise, it is not added. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The encrypted output module is used to calculate the relevance between the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set, select the spatial dataset corresponding to the number of spatial datasets with the highest relevance, and retrieve the corresponding encrypted spatial dataset from the pre-encrypted spatial database according to the corresponding spatial dataset number and return it to the search user.
[0016] The beneficial effects of this invention are: This invention supports range searches in encrypted form without revealing the index structure, query range, and dataset content. It achieves efficient encoding and fast matching of spatial regions through Bloom filters and Gray codes, and uses inner product encryption to accumulate and sort relevance in encrypted form. It supports user-defined relevance parameters and reduces the number of node traversals through threshold pruning strategies, thereby improving query efficiency. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the quadtree inverted index structure of the present invention; Figure 3 This invention relates to the mapping process between Gray code and Bloom filter; Figure 4 This is a schematic diagram of the vectorization process of the search range in this invention; Figure 5 This is a diagram of the overall architecture of the present invention; Figure 6 This is a comparison chart showing the changes in search accuracy and query time before and after encryption of the present invention with the number of quadtree levels; Figure 7 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1: like Figure 1As shown, a spatial dataset retrieval and privacy protection method based on encrypted quadtrees is presented, which includes the following steps: Obtain the encrypted search trapdoor, which includes an encrypted search range vector, an encrypted relevance parameter vector, and the number of spatial datasets; Specifically, establish a spatial data warehouse. ,in, Indicates the first A spatial dataset, This represents the total number of spatial datasets. This experiment uses the Trackable spatial dataset, which contains 66,381 CSV files, each representing a spatial dataset, totaling approximately 30,000 datasets for index building and query testing.
[0020] The specific parameters used in this implementation case are as follows: total number of spatial datasets. Maximum level of a quadtree 3. Bloom filter length Bits, number of hash functions .like Figure 1 As shown, this invention is a privacy protection method for spatial dataset range search based on encrypted quadtrees. The method includes the following two stages: the first stage is the data preprocessing stage; the second stage is the data query stage.
[0021] In the data preprocessing stage, the quadtree inverted index and spatial database are encrypted, and the process is as follows: Step 1-1: The data owner accesses the spatial dataset repository. With index building parameters Construct a quadtree inverted index The data owner scans the geographic locations of all data points in the dataset, recursively dividing the current node into four child nodes, until the maximum number of levels is reached. (taken in the experiment) (To observe changes in accuracy and performance). The index Each node in the array is a triple. ,in This represents the rectangular area covered by the node. This is an inverted index list, recording the spatial dataset identifiers and the number of their locations that fall within the rectangular area. There are four pointers, each pointing to one of the four child nodes of the given node.
[0022] Step 1-2: Based on randomly generated security parameters The data owner calls the EASPE key generation algorithm to generate a set of keys. .in, , used to encrypt node Bloom filter vectors; , used to encrypt inverted feature vectors; The AES-256 key is used to encrypt the spatial dataset repository. Key Distributed to authorized search users via secure channels, meaning it is shared by both the data owner and the search user.
[0023] Steps 1-3: For the quadtree inverted index constructed in step 1-1 Each node in First, the node's The coordinates of the top left and bottom right corners are encoded using Gray code and then concatenated into an encoded string. The obtained Gray code is then passed through... Each independent hash function will Mapping to length Bloom filter vector Secondly, use encryption . Vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately, through vectors Split to obtain vectors and Then use the key Invertible matrices in and For vectors Encryption will be performed, ultimately resulting in a vector. Encryption Finally, for each entry corresponding to each node in the inverted index... Construct feature vectors for dataset nodes Using the key In Encryption obtained Update nodes Encrypted inverted list Finally, the encrypted quadtree inverted index is obtained. . The encryption process for the quadtree inverted index and the spatial database includes: Step 1-3-1: Given a security parameter ,according to The algorithm generates a security key. ,in It is random dimensional bit vector, and Two random An invertible matrix, : It is a random permutation. It consists of 6 random numbers and satisfies .
[0024] Step 1-3-2: For the quadtree inverted index Each node in Graymall Feed in sequence Each function outputs an integer position, and these positions are mapped to a vector. The corresponding bit is set to 1, and the remaining bits are kept to 0, thus obtaining the Bloom feature vector of that node. For the generated First, the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately, through vectors Split to obtain vectors and The splitting rules are as follows: Reuse Key Invertible matrices in and For vectors Encryption will be performed, ultimately resulting in a vector. Encryption Step 1-3-3: For each entry corresponding to each node in the inverted index... Construct feature vectors for dataset nodes Using the key In Encryption obtained Update nodes Encrypted inverted list Finally, the encrypted quadtree inverted index is obtained. .
[0025] Steps 1-4: For each spatial dataset use Perform AES-256-GCM encryption to obtain The whole constitutes an encrypted database The encrypted quadtree inverted index. Spatial Dataset Repository Uploaded to the cloud server.
[0026] The generation process of the encryption search range vector and the encryption relevance parameter vector before encryption includes: Search users based on search scope and index building parameters Determine coverage of the search range Minimum leaf set That is, the set of nodes within the search range. Minimum leaf set Each node in Obtain its Bloom filter vector The By node According to its Gray code pass The hash function mapping is obtained; all of them are mapped. A bitwise OR operation yields the search range vector. ; Based on user-defined relevance parameters Generate a relevance parameter vector .
[0027] The encrypted search range vector is searched based on a pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index equals a preset threshold, the node is added to the result node set; otherwise, it is not added to the result node set. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The process of generating a cryptographic search trapdoor includes: Security key group Security Key To search range Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption .
[0028] Similarly, using For the relevance parameter vector Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption yields an encryption relevance parameter vector. ; The search user will use the encrypted search range vector Encryption relevance parameter vector and the number of spatial datasets returned by the server. Combining them yields an encrypted search trapdoor. And upload it to the server.
[0029] The process of searching an encrypted search range vector based on a pre-encrypted quadtree inverted index includes: The cloud server accepts encrypted search traps sent by search users. Inverted index of the encrypted quadtree Each node calculates the current node. The cloud server obtains its encrypted Bloom filter vector. And calculate its relationship with the encrypted search range vector. inner product Due to encryption algorithms Keep the inner product constant. equal to the search vector in plaintext state With node Bloom filter vector inner product ; The cloud server is based on the internal product With preset threshold The comparison results determine the spatial relationship between the nodes and the search space. The process is as follows: If inner product equal This indicates that the node has been completely searched. The node is covered, added to the result node set A, and pruned to prevent further recursive searching.
[0030] Inner product Not equal to the preset threshold hour, If inner product A value of zero indicates that the node is within the search range. If there is no overlap, skip the node and all its descendants. If the dot product is between 0 and The spaces between indicate the node and the search scope. If there is partial overlap, it is necessary to recursively check its four child nodes, where a preset threshold is used. According to the node The number of levels in the quadtree and the number of Bloom filter hash functions Predetermined, i.e. .
[0031] The relevance between the spatial dataset and the search range is calculated based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set. The spatial dataset corresponding to the number of spatial datasets with the highest relevance is selected. The corresponding encrypted spatial dataset is obtained from the pre-encrypted spatial database according to the corresponding spatial dataset number and returned to the search user.
[0032] The process of calculating the relevance between the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set includes: The cloud server traverses each node in the result node set A. The cloud server iterates through the encrypted inverted list of the node, and for each item in the list... Calculate the ciphertext feature vector Related parameters vector of encryption inner product ;because Keeping the inner product unchanged, the inner product is equal to the plaintext state. As a spatial dataset At the node The cloud server will determine the relevance contribution value of the nodes. After traversing the inverted list, calculate the value of that point for the dataset. Contribution value Add to In the cumulative correlation; After traversing all result nodes, select the K spatial datasets with the highest relevance from all spatial datasets and obtain their dataset numbers; then, based on these numbers, retrieve data from the encrypted spatial database. The corresponding encrypted spatial dataset is retrieved and returned as a result to the search user; the search user then uses a security key group. In Decrypt the returned encrypted dataset to obtain the plaintext spatial dataset.
[0033] Specifically, the present invention will be further illustrated below through embodiments: Figure 2 The image shows an inverted index, where each node of the quadtree is encapsulated as a triple. Among them, This represents the rectangular area covered by the current node. For inverted lists, record the dataset number and the number of points that fall into this node; These are four pointers to child nodes, pointing to child nodes in the northwest, northeast, southwest, and southeast quadrants, respectively. Figure 2 China also The Gray code encoding of each layer node is marked for subsequent Bloom filter mapping.
[0034] Figure 3 This demonstrates the mapping process from the spatial region of a quadtree node to a Bloom filter vector. First, the rectangular region of each node is... The binary string is encoded using Gray code. The advantage of Gray code is that adjacent spatial regions differ by only one bit, which helps maintain spatial proximity. Then, the Gray code string is input into a set of hash functions (total...). (each), mapped to a fixed-length Bloom filter vector. This recoding mechanism transforms the spatial range into a binary vector suitable for encryption, avoiding the problem of directly exposing node encoding in traditional wildcard matching schemes, thus supporting subsequent ciphertext range determination.
[0035] Figure 4 The image shows the rectangular search area given by the user. Vectorization into search vector The process involves first recursively locating the relevant data using a quadtree index. The smallest set of nodes that intersect or contain each other is the minimum set of nodes that cover the area. Then, for Each node in the process obtains its pre-computed Bloom filter vector. Finally, these Bloom filter vectors are bitwise joined and merged into a single complete Bloom filter vector. . This will be used as part of the query trapdoor, along with the relevance parameter vector. They are encrypted together and then sent to the cloud server.
[0036] Figure 5 The system architecture of this invention is described, involving three entities: a data owner, a cloud server, and a querying user. The data owner first vectorizes and encrypts the local plaintext spatial dataset, then outsources the encrypted data to the cloud server, while securely distributing the key to the querying user. When a querying user needs to retrieve the spatial dataset, they generate a search trapdoor based on the query scope and using the shared key, and submit it to the cloud server. The cloud server then performs a privacy-preserving relevance query in encrypted form based on the received trapdoor and the encrypted dataset, and returns the final result to the querying user.
[0037] Figure 6(a) Demonstrates the vectorized query method of the present invention at different quadtree levels. This is consistent with traditional exact queries. In the experiment, the maximum level of the quadtree ( The traditional exact query results are used as a reference benchmark. When As the index granularity increased from 7 to 13, the recall rate of vectorized queries relative to traditional queries monotonically rose to 93%, indicating that as the index granularity became finer, vectorized encoding could reproduce the results of traditional queries more accurately. Because The encryption algorithm maintains the vector inner product unchanged, and the ciphertext query result is completely consistent with the vectorized plaintext query result. Therefore, the encryption process does not introduce any additional precision loss. The vectorized plaintext query used in this invention already approaches the precision of traditional exact queries at high levels, and can be further improved by increasing the length of the Bloom filter or the number of hash functions, thus proving the effectiveness of the encryption method of this invention.
[0038] Figure 6 (b) Shows query time as a function of quadtree level. The changing trend. Plaintext query time varies. The increase is slightly lower because nodes at higher levels are more granular, allowing for faster pruning of the query range and reducing the actual number of nodes traversed. The ciphertext query time is an estimate based on actual testing of encryption primitives and the average number of nodes traversed. The estimation method is as follows: ,middle , , The estimated average number of nodes traversed is shown in Figure (b). Its value stabilizes at... The time difference is significantly greater than the plaintext time, but the overall time difference remains within the same order of magnitude. This result indicates that although the encryption mechanism of this invention introduces fixed overhead for trapdoor generation and per-node inner product calculation, the absolute overhead is very small and fully meets the real-time requirements of practical applications.
[0039] Example 2: To achieve the above objective, such as Figure 7 As shown, based on Embodiment 1, this invention discloses a spatial dataset retrieval and privacy protection system based on an encrypted quadtree, comprising: Data acquisition module 11 is used to acquire encrypted search trapdoors, wherein the encrypted search trapdoors include encrypted search range vectors, encrypted relevance parameter vectors, and spatial dataset quantity; Data processing module 12 is used to search the encrypted search range vector based on the pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index is equal to a preset threshold, the node is added to the result node set; otherwise, it is not added to the result node set. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The encrypted output module 13 is used to calculate the relevance between the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set, select the spatial dataset corresponding to the number of spatial datasets with the highest relevance, and obtain the corresponding encrypted spatial dataset from the pre-encrypted spatial database according to the corresponding spatial dataset number and return it to the search user.
[0040] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.
[0041] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0042] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0043] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.
Claims
1. A spatial dataset retrieval and privacy protection method based on encrypted quadtrees, characterized in that, The method includes the following steps: Obtain the encrypted search trapdoor, which includes an encrypted search range vector, an encrypted relevance parameter vector, and the number of spatial datasets; The encrypted search range vector is searched based on a pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index equals a preset threshold, the node is added to the result node set; otherwise, it is not added to the result node set. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The relevance between the spatial dataset and the search range is calculated based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set. The spatial dataset corresponding to the number of spatial datasets with the highest relevance is selected. The corresponding encrypted spatial dataset is obtained from the pre-encrypted spatial database according to the corresponding spatial dataset number and returned to the search user.
2. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 1, characterized in that, The generation process of the encrypted search range vector and the encrypted relevance parameter vector before encryption includes: Search users based on search scope and index building parameters Determine coverage of the search range Minimum leaf set That is, the set of nodes within the search range. Minimum leaf set Each node in Obtain its Bloom filter vector The By node According to its Gray code pass The hash function mapping is obtained; all of them are mapped. A bitwise OR operation yields the search range vector. ; Based on user-defined relevance parameters Generate a relevance parameter vector .
3. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 1, characterized in that, The process of generating the encrypted search trapdoor includes: Security key group Security Key To search range Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption . Similarly, using For the relevance parameter vector Encrypt: First, let the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and ,vector Encryption yields an encryption relevance parameter vector. ; The search user will use the encrypted search range vector Encryption relevance parameter vector and the number of spatial datasets returned by the server. Combining them yields an encrypted search trapdoor. And upload it to the server.
4. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 1, characterized in that, The process of searching the encrypted search range vector based on the pre-encrypted quadtree inverted index includes: The cloud server accepts encrypted search traps sent by search users. Inverted index of the encrypted quadtree Each node calculates the current node. The cloud server obtains its encrypted Bloom filter vector. And calculate its relationship with the encrypted search range vector. inner product Due to encryption algorithms Keep the inner product constant. equal to the search vector in plaintext state With node Bloom filter vector inner product ; The cloud server is based on the internal product With preset threshold The comparison results determine the spatial relationship between the nodes and the search space. The process is as follows: If inner product equal This indicates that the node has been completely searched. The node is covered, added to the result node set A, and pruned to prevent further recursive searching.
5. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 4, characterized in that, The inner product Not equal to the preset threshold hour, If inner product A value of zero indicates that the node is within the search range. If there is no overlap, skip the node and all its descendants. If the dot product is between 0 and The spaces between indicate the node and the search scope. If there is partial overlap, it is necessary to recursively check its four child nodes, where a preset threshold is used. According to the node The number of levels in the quadtree and the number of Bloom filter hash functions Predetermined, i.e. .
6. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 1, characterized in that, The process of calculating the relevance between the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set includes: The cloud server traverses each node in the result node set A. The cloud server iterates through the encrypted inverted list of the node, and for each item in the list... Calculate the ciphertext feature vector Related parameters vector of encryption inner product ;because Keeping the inner product unchanged, the inner product is equal to the plaintext state. As a spatial dataset At the node The cloud server will determine the relevance contribution value of the nodes. After traversing the inverted list, calculate the value of that point for the dataset. Contribution value Add to In the cumulative correlation; After traversing all result nodes, select the K spatial datasets with the highest relevance from all spatial datasets and obtain their dataset numbers; then, based on these numbers, retrieve data from the encrypted spatial database. The corresponding encrypted spatial dataset is retrieved and returned as a result to the search user; the search user then uses a security key group. In Decrypt the returned encrypted dataset to obtain the plaintext spatial dataset.
7. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 1, characterized in that, The encryption process for the quadtree inverted index and spatial database includes: Data owners use spatial dataset warehouses With index building parameters Construct a quadtree inverted index Inverted index Each node in the array is a triple. in This represents the rectangular area covered by the node. This is an inverted index list, recording the spatial dataset identifiers and the number of their locations that fall within the rectangular area. There are four pointers, each pointing to one of the four child nodes of this node; The data owner generates a set of keys. ,in and for The security key used by the algorithm It is used to encrypt spatial datasets repository Security key, key Shared by data owners and search users; For the constructed quadtree inverted index Each node in , will the node Encoding with Gray code The obtained Gray code is obtained through Each hash function is mapped to a Bloom filter vector. ,use Algorithm Encryption get For each entry corresponding to each node in the inverted index Construct feature vectors for dataset nodes and use Algorithm encryption obtained Finally, the encrypted quadtree inverted index is obtained. ;use encryption To obtain an encrypted spatial dataset . Invert the encrypted quadtree index Spatial Dataset Repository Uploaded to the cloud server.
8. The spatial dataset retrieval and privacy protection method based on encrypted quadtree according to claim 7, characterized in that, The encryption process for the quadtree inverted index includes: Given a security parameter ,according to The algorithm generates a security key. ,in It is random dimensional bit vector, and Two random An invertible matrix, : It is a random permutation. It consists of 6 random numbers and satisfies ; For quadtree inverted index Each node in of Perform Bloom filter mapping to form a fixed-length Bloom filter vector. For the generated First, the vector Expand to dimensional vector Then through By replacing it, we can obtain Ultimately through vectors Split to obtain vectors and Ultimately, the vector Encryption For each entry corresponding to each node in the inverted index Construct feature vectors for dataset nodes Using the key In Encryption obtained Update nodes Encrypted inverted list Finally, the encrypted quadtree inverted index is obtained. .
9. A spatial dataset retrieval and privacy protection system based on encrypted quadtrees, employing the spatial dataset retrieval and privacy protection method based on encrypted quadtrees as described in any one of claims 1 to 7, characterized in that... include: The data acquisition module is used to acquire the encrypted search trapdoor, which includes the encrypted search range vector, the encrypted relevance parameter vector, and the number of spatial datasets. The data processing module searches the encrypted search range vector based on a pre-encrypted quadtree inverted index. If the inner product of the encrypted search range vector and the Bloom filter vector of the node in the quadtree inverted index equals a preset threshold, the node is added to the result node set; otherwise, it is not added. The quadtree inverted index includes the Bloom filter vector of the node and the encrypted inverted index. The Bloom filter vector of the node is obtained through Gray code encoding and hash mapping. The encrypted output module is used to calculate the relevance between the spatial dataset and the search range based on the encrypted inverted index and encrypted relevance parameter vector of each node in the result node set, select the spatial dataset corresponding to the number of spatial datasets with the highest relevance, and retrieve the corresponding encrypted spatial dataset from the pre-encrypted spatial database according to the corresponding spatial dataset number and return it to the search user.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, The memory stores a computer program that can run on a processor. When the processor loads and executes the computer program, it employs the spatial dataset retrieval and privacy protection method based on a cryptographic quadtree as described in any one of claims 1 to 8.