WO2022213577A1 - 一种空间文本的查询方法及装置 - Google Patents
一种空间文本的查询方法及装置 Download PDFInfo
- Publication number
- WO2022213577A1 WO2022213577A1 PCT/CN2021/124888 CN2021124888W WO2022213577A1 WO 2022213577 A1 WO2022213577 A1 WO 2022213577A1 CN 2021124888 W CN2021124888 W CN 2021124888W WO 2022213577 A1 WO2022213577 A1 WO 2022213577A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- ciphertext
- vector
- node
- spatial
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 239000013598 vector Substances 0.000 claims abstract description 419
- 238000012545 processing Methods 0.000 claims description 12
- 238000004422 calculation algorithm Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 17
- 238000004364 calculation method Methods 0.000 description 16
- 238000004590 computer program Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 239000000203 mixture Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9537—Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6227—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
Definitions
- the present invention relates to the field of financial technology (Fintech), and in particular, to a method and device for querying spatial text.
- query services based on space such as geographic location—Shanghai
- text such as query keywords—Sichuan cuisine
- query services based on space such as geographic location—Shanghai
- text such as query keywords—Sichuan cuisine
- query keywords such as query keywords—Sichuan cuisine
- the text relevance and spatial distance in the query request are mainly used to determine the query result.
- the text relevance and spatial distance of the query request are integrated according to a preset weight to obtain a query vector, and then a query result that meets the conditions is determined in the preset spatial vector through the obtained query vector.
- the solutions in the prior art are affected by weights, so that when a user performs a query, the accuracy of the query result obtained is low and unsatisfactory.
- the correlation between the text information of the query result and the text information of the query request is relatively high, but the spatial location of the query result is far away from the query position of the query request (such as the latitude and longitude values when the user queries).
- Embodiments of the present invention provide a method and device for querying spatial text, which are used to improve the accuracy of spatial text query and improve user query experience.
- an embodiment of the present invention provides a method for querying spatial text, including:
- the cloud server obtains the first query ciphertext sent by the client; the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext; the first query space vector ciphertext is based on the query request The first query mixed vector ciphertext is generated according to the text query conditions and the spatial query conditions in the query request;
- the cloud server retrieves the first node that meets the spatial query condition in the ciphertext index tree according to the first query space vector ciphertext; the ciphertext index tree is constructed by the data owner according to each plaintext space text ; The non-leaf nodes in the ciphertext index tree store the space vector ciphertext generated based on the space information in the plaintext space text, and the leaf nodes store the mixed vector ciphertext based on the space information and text information in the plaintext space text. ; the first node is a non-leaf node;
- the cloud server determines, according to the first query mixed vector ciphertext and the mixed vector ciphertext of the leaf nodes under the first node, a second node that meets the text query condition; the second node is a leaf node ; The second node is used as a query result.
- the first query space information ciphertext of the first query ciphertext all the first nodes within the query range, that is, non-leaf nodes, can be determined in the ciphertext index tree, and then according to the first query mixture vector
- the ciphertext determines all the second nodes within the query range in the non-leaf nodes, where the second node is a leaf node within the query range, and determines the correlation between the first query mixed vector ciphertext and each second node, and then Determine the query results, avoid the query results being affected by the weight, and prevent the query results from being too far away from the query location, improve the accuracy of spatial text queries, and make the query results within the query range.
- the relevance of the text information is determined, which improves the user's query experience.
- the cloud server determines, according to the first query mixed vector ciphertext and the mixed vector ciphertext of leaf nodes under the first node, a second node that meets the text query conditions, including:
- the cloud server determines that the node is a non-leaf node according to the first query space vector ciphertext and the space of the node.
- the vector ciphertext determines the first node that intersects the first query space vector ciphertext.
- the cloud server performs retrieval according to the preset retrieval order, so as to improve retrieval efficiency and shorten the time for determining query results.
- the node and the first query space vector ciphertext intersect in the spatial position, which prevents the problem that the query result is too far away from the query position.
- determining the first node intersecting with the first query space vector ciphertext according to the first query space vector ciphertext and the space vector ciphertext of the node including:
- the cloud server determines a plurality of first inner product values according to the first query space vector ciphertext and the node's space vector ciphertext;
- the cloud server determines that the multiple first inner product values are all greater than the space threshold, according to the space vector ciphertext of each first child node of the node and the first query space vector ciphertext, in the In each first child node, a second child node that intersects with the first query space vector ciphertext in spatial position is determined, until the first node that intersects with the first query space vector ciphertext is determined;
- the first node is the parent node of the leaf node;
- the cloud server determines other child nodes under the parent node of the node that intersect the first query space vector ciphertext in spatial positions, Until the first node intersecting with the first query space vector ciphertext is determined.
- the search is performed from top to bottom, and the parent node of the leaf node that intersects with the first query space vector ciphertext in spatial position is determined in turn, so as to improve the retrieval efficiency.
- the specific inner product value is used to determine whether the first node intersects with the first query space vector ciphertext in the spatial position, so as to increase the accuracy of the query result.
- the cloud server determines, according to the first query mixed vector ciphertext and the mixed vector ciphertext of leaf nodes under the first node, a second node that meets the text query conditions, including:
- the cloud server determines a plurality of second inner product values according to the mixed vector ciphertext of the first query and the mixed vector ciphertext of the leaf node;
- the cloud server determines the leaf node as the second node when determining that the multiple second inner product values are all greater than the spatial threshold, and the sum of the multiple second inner product values is greater than the similarity threshold .
- the second node in the first query space vector ciphertext is determined from the first node that intersects the first query space vector ciphertext in spatial position, instead of traversing all leaf nodes to determine the first node.
- the second node can reduce the calculation amount of the cloud server, improve the retrieval efficiency, and shorten the time for determining the query result. Because the second node is a leaf node in the ciphertext of the first query space vector, it prevents the query result from being too far away from the query range.
- the first query ciphertext is encrypted by the user terminal based on the first user key
- the method further includes:
- the cloud server encrypts the first query ciphertext according to the second user key of the client, and determines the second query ciphertext;
- the second query ciphertext includes the second query space vector ciphertext and the second query mixed vector ciphertext;
- the cloud server retrieves the first node that meets the spatial query condition in the ciphertext index tree according to the first query spatial vector ciphertext, including:
- the cloud server retrieves the first node that meets the spatial query condition in the ciphertext index tree according to the second query spatial vector ciphertext;
- the cloud server determines, according to the mixed vector ciphertext of the first query and the mixed vector ciphertext of the leaf nodes under the first node, a second node that meets the text query condition, including:
- the cloud server determines a second node that meets the text query condition according to the second query mixed vector ciphertext and the mixed vector ciphertext of the leaf nodes under the first node.
- the cloud server after obtaining the first query ciphertext, the cloud server encrypts it again to obtain the second query ciphertext, so as to realize a scenario where multiple users can interact with the cloud server to query.
- the second node is used as a query result, including:
- the cloud server sends the spatial text number corresponding to the second node to the edge server to instruct the edge server to query the key ciphertext and spatial text ciphertext corresponding to the spatial text number according to the spatial text number , and determine the intermediate amount of the spatial text ciphertext corresponding to the spatial text number according to the key ciphertext corresponding to the spatial text number;
- the cloud server uses the spatial text ciphertext and the intermediate quantity of the second node as the query result.
- the intermediate amount is calculated by the edge server according to the edge private key and the key ciphertext stored by the edge server.
- the intermediate quantity is decrypted to obtain the symmetric key, and then the spatial text ciphertext is decrypted according to the symmetric key to obtain the plaintext.
- the spatial text number is sent to the edge server to instruct the edge server to perform auxiliary calculation, so as to reduce the calculation amount of the user end, realize the lightweight calculation of the user end, and reduce the resource consumption of the user end.
- an embodiment of the present invention provides a method for querying spatial text, including:
- the client generates a first query spatial vector ciphertext based on the spatial query condition in the query request;
- the client sends the first query ciphertext to the cloud server;
- the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext;
- the client determines the plaintext space text corresponding to the query request based on the query result of the cloud server.
- the client encrypts the query request to prevent leakage of the query request in plain text.
- the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext
- the cloud server determines the query result
- the query result is prevented from being affected by the weight, and the distance between the query result and the query position is too far. The problem.
- the spatial query condition includes a first location point and a second location point indicating a spatial range
- the client generates a first query spatial vector ciphertext based on the spatial query conditions in the query request, including:
- the user terminal generates a first random vector and a second random vector
- the user terminal performs assignments related to the first position point to the first K bits of the first random vector according to the first method;
- the last L bits of the first random vector are assigned values related to the first position point according to the second method, so as to obtain the first sub-vector ciphertext of the first query space vector ciphertext;
- the first bit vector and the second bit vector are randomly generated by the data owner;
- the user terminal performs assignments related to the second position point to the first K bits of the second random vector according to the third method;
- the last L bits of the second random vector are assigned values related to the second position point according to the fourth method, and the first query space vector ciphertext is obtained.
- Two-sub-vector ciphertext Two-sub-vector ciphertext.
- the query range is determined according to the first position point and the second set point, so that the cloud server determines the second node within the query range, so that the query result is within the query range.
- the determination is made according to the relevance of the text information, which improves the user's query experience.
- the user terminal generates a first query mixed vector ciphertext based on the text query conditions and the spatial query conditions in the query request, including:
- the user terminal generates a third random vector and a fourth random vector
- the user terminal assigns values to the first N1 bits of the third random vector and the first N1 bits of the fourth random vector based on the element value of each bit in the third bit vector and the spatial query condition; the The third bit vector is randomly generated by the data owner;
- the user terminal According to whether the randomly selected keyword is located in the query keyword in the text query condition, the user terminal performs random numbers as the last N2 bits of the third random vector and the last N2 bits of the fourth random vector. Assignment.
- the first query mixed vector ciphertext includes text query condition information, so that when the cloud server determines the query result, it is determined according to the relevance of the text information, which improves the accuracy of spatial text query.
- the client determines the plaintext space text corresponding to the query request based on the query result of the cloud server, including:
- the user terminal receives the spatial text ciphertext and the intermediate quantity sent by the edge server; the spatial text ciphertext and the intermediate quantity are determined by the edge server according to the spatial text number sent by the cloud server;
- the user terminal determines the symmetric key of the spatial text ciphertext according to the decryption of the intermediate quantity
- the user terminal decrypts the spatial text ciphertext according to the symmetric key of the spatial text ciphertext to obtain the plaintext spatial text corresponding to the query request.
- the intermediate amount required by the client to decrypt the query result is calculated by the edge server, thereby reducing the amount of calculation on the client, realizing lightweight computing on the client, and reducing resource consumption on the client.
- an embodiment of the present invention also provides a computer device, including:
- the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned spatial text query method according to the obtained program.
- an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, where the computer-executable instructions are used to cause a computer to execute the above-mentioned spatial text query method.
- FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention.
- FIG. 2 is a schematic flowchart of a method for querying spatial text according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of a ciphertext index tree provided by an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of a method for querying spatial text by a user terminal according to an embodiment of the present invention
- FIG. 5 is a schematic diagram of a spatial range to be queried according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a method for querying spatial text according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of an apparatus for querying spatial text according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of an apparatus for querying spatial text according to an embodiment of the present invention.
- the query method for spatial keywords is generally to query the query location. For example, if user A initiates a query request at a specific location, the location is the query location of the query request, and the query location is generally latitude and longitude. Coordinate value, that is, the query point.
- the query value is determined according to the preset weight, spatial distance and keyword similarity, and the query result is determined according to the size of the query value.
- the spatial text corresponding to the maximum query value is used as the query result.
- the index tree is constructed by the data owner according to the plaintext space text, and the minimum outer rectangle is the space range of non-leaf nodes.
- the problem with the above method is that the query value is related to the preset weight.
- the preset weight for the spatial distance is small, and the preset weight for the keyword similarity is large, the query results are likely to appear different from the query results. A node with similar keywords in the request, but the node is far away from the query location of the query request.
- the preset weight for the spatial distance is large and the preset weight for the keyword similarity is small, the query result is likely to be close to the query location of the query request, but the query result is similar to the key in the query request.
- the words are not similar, resulting in low accuracy of query results and affecting the user's query experience.
- the user terminal decrypts the key ciphertext according to the user's private key to obtain a symmetric key, so as to decrypt the query result, which also causes resource overhead to the user terminal. big problem.
- a query method for spatial keywords For the query request of the query scope, only the nodes within the query scope are determined according to the similarity of the query keywords, so as to improve the accuracy of the query result, and the edge server is introduced. It is used to perform auxiliary calculation when constructing the index tree and decrypting the query result by the client, so as to realize lightweight calculation and reduce the resource consumption of the client.
- FIG. 1 exemplarily shows a system architecture to which the embodiments of the present invention are applied, and the system architecture includes a trusted third-party system 110 , a data owner 120 , an edge server 130 , a cloud server 140 and a client 150 .
- the trusted third-party system 110 is used to generate the user's private key, the edge private key and the key, and the user's private key is determined according to the user's unique identification information such as IP (Internet Protocol, Internet Protocol) ) address, network account, identity information, etc.
- IP Internet Protocol, Internet Protocol
- the edge private key is used to calculate the intermediate volume of the spatial text ciphertext.
- the key is used by the client 150 and the cloud server 140 to encrypt the query instruction.
- the data owner 120 is used to generate a corresponding number of symmetric keys according to the number of clients 150, encrypt the plaintext space text with the symmetric key to obtain a space text ciphertext set, and also construct a plaintext index tree according to the plaintext space text, and It is encrypted to obtain the initial ciphertext index tree.
- the edge server 130 is used for encrypting the access structure, which is equivalent to encrypting the symmetric key generated by the data owner 120 to obtain a temporary symmetric key ciphertext, so as to reduce the calculation amount of the data owner.
- the two edge servers 130 shown in FIG. 1 may be the same or two different edge servers, which are not specifically limited herein.
- the cloud server 140 is used for encrypting the initial ciphertext index tree encrypted by the data owner 120 to obtain the final ciphertext index tree, and for encrypting the first query ciphertext sent by the client 150 to obtain the second query ciphertext, further obtain the query result according to the second query ciphertext, and send the query result to the client 150 .
- the user terminal 150 is configured to generate the first query ciphertext, and after receiving the query result, decrypt the plaintext data.
- FIG. 1 the structure shown in FIG. 1 above is only an example, which is not limited in this embodiment of the present invention.
- FIG. 2 exemplarily shows a schematic flowchart of a method for querying spatial text according to an embodiment of the present invention, and the process can be executed by a device for querying spatial text.
- the process specifically includes:
- Step 210 the cloud server obtains the first query ciphertext sent by the client.
- the first query ciphertext includes a first query space vector ciphertext and a first query mixed vector ciphertext, and the first query space vector ciphertext is generated according to a spatial query condition in the query request.
- the first query The mixed vector ciphertext is generated according to the text query conditions and spatial query conditions in the query request.
- the first query space vector indicates the space range to be queried in the query request
- the first query mixed vector ciphertext not only includes the space range to be queried in the query request, but also includes the keyword in the query request, which is used to determine The similarity between each leaf node and the keyword in the query request.
- the spatial range to be queried in the query request may be generated according to the user's query position, for example, a square generated with the latitude and longitude of the user's query position as the center is the spatial range to be queried.
- the spatial range to be queried is a rectangular range formed by two spatial positions directly input by the user.
- Step 220 the cloud server retrieves the first node that meets the spatial query condition in the ciphertext index tree according to the ciphertext of the first query space vector.
- the ciphertext index tree is constructed by the data owner according to each plaintext space text
- the non-leaf nodes in the ciphertext index tree store the space vector ciphertext generated based on the spatial information in the plaintext space text
- the leaf nodes A mixed vector ciphertext generated based on the spatial information and textual information in the plaintext spatial text is stored, and the first node is a non-leaf node.
- the ciphertext index tree is the encrypted plaintext index tree, and the plaintext index tree is constructed by the data owner with each plaintext space text as the leaf node.
- the plaintext index tree except for the leaf nodes, all are non-leaf nodes, non-leaf nodes
- the node has a spatial range, that is, spatial information, and then generates a spatial vector ciphertext.
- the spatial vector ciphertext can represent the spatial range of non-leaf nodes.
- leaf nodes are equivalent to location information, that is, spatial points, and the mixture generated by text information
- the vector ciphertext can represent the spatial position and text information of the leaf node.
- the first query space vector ciphertext can represent the spatial range to be queried in the query request
- the spatial vector ciphertext of non-leaf nodes can represent the spatial range where non-leaf nodes exist. Therefore, through the calculation between the vectors, it can be determined.
- Step 230 the cloud server determines a second node that meets the text query condition according to the mixed vector ciphertext of the first query and the mixed vector ciphertext of the leaf nodes under the first node.
- the second node is a leaf node, and the second node is used as a query result.
- each leaf node has a mixed vector ciphertext, including spatial information and text information
- the first query mixed vector ciphertext includes the keyword information in the query request and the query space range
- the leaf nodes within the spatial range of the query request are determined by the spatial information of the leaf nodes and the query range, and the similarity between each leaf node and the query request is determined.
- the cloud server before retrieving the first node that meets the spatial query condition in the ciphertext index tree according to the first query spatial vector ciphertext, the cloud server will also encrypt the first query ciphertext, so as to realize multi-user access.
- the application scenario of interactive query with cloud server Specifically, the cloud server encrypts the first query ciphertext according to the second user key of the client, and determines the second query ciphertext, where the second query ciphertext includes the second query space vector ciphertext and the second query mixture Vector ciphertext.
- the trusted third-party system generates a second user key K EN,2 for the client, and sends it to the cloud server.
- the trusted third-party system is a second user key generated for the client, which is equivalent to different second user keys for each client.
- step 220 the cloud server retrieves the first node that meets the spatial query condition in the ciphertext index tree according to the ciphertext of the second query space vector.
- step 230 the cloud server determines the second node that meets the text query condition according to the mixed vector ciphertext of the second query and the mixed vector ciphertext of the leaf nodes under the first node.
- the second query ciphertext is only the encrypted first query ciphertext, and does not change the spatial information and text information of the first query ciphertext.
- an implementable manner may include that the cloud server determines whether a node in the index tree is a non-leaf node according to a random manner.
- Another implementable manner includes that, according to the preset retrieval sequence, the cloud server, for any node in the ciphertext index tree, when determining that the node is a non-leaf node, searches the ciphertext according to the first query space vector and the space vector of the node.
- the ciphertext determines the first node that intersects the ciphertext of the first query space vector.
- the preset retrieval order may be from the leaf node in the ciphertext index tree to the root node.
- the preset retrieval order is determined from the root node in the ciphertext index tree to the leaf node.
- FIG. 3 exemplarily shows a schematic diagram of a ciphertext index tree, and it is determined whether R1 is a non-leaf node by judging according to R1.
- the cloud server After determining that the node is a non-leaf node, determine the first node intersecting with the first query space vector ciphertext, specifically, the cloud server determines a plurality of first internal product value; when it is determined that the multiple first inner product values are all greater than the space threshold, according to the space vector ciphertext of each first child node of the node and the first query space vector ciphertext, determine the difference between the first child node and the first child node.
- the first query space vector ciphertext intersects the second child node in spatial position until the first node intersecting with the first query space vector ciphertext is determined, wherein the first node is the parent node of the leaf node.
- the cloud server determines other child nodes under the node's parent node that intersect the ciphertext of the first query space vector in space, until it determines The first node where the vector ciphertexts intersect.
- the cloud server after the cloud server obtains the first query space vector ciphertext, the cloud server encrypts the first query space vector ciphertext according to the second user key K EN, 2 , and obtains the second query space vector ciphertext.
- the node R2 is the first node.
- node R2 does not meet the above conditions, that is, when one, two, three or four inner product values of the four inner product values of the node R2 are not greater than 0, it is determined that the node R2 and the second query space vector ciphertext Disjoint in spatial position, at this time, return to the parent node of node R2, that is, node R1, and determine again whether other child nodes (R3) under node R1 meet the above conditions, and so on, determine all the nodes that meet the conditions, as first node.
- step 230 after determining the non-leaf nodes that intersect the ciphertext of the second query space vector in the spatial position, it is first necessary to determine the location in the second query Leaf nodes within the range of the space vector ciphertext, and then determine the similarity between the leaf nodes that meet the conditions and the query request.
- the leaf nodes that meet the conditions are sorted according to the size of the similarity, and the top N leaf nodes are used as the second node, where N is a preset number, such as 5, 10, etc. .
- the cloud server determines a plurality of second inner product values according to the mixed vector ciphertext of the first query and the mixed vector ciphertext of the leaf node.
- the leaf node is determined as the second node.
- the cloud server first encrypts the first query ciphertext to generate the second query ciphertext, and then determines the second query ciphertext according to the second query mixed vector ciphertext of the second query ciphertext and the mixed vector ciphertext of the leaf node. node.
- the second query ciphertext Eq* ⁇ q* l,1 , q* l,2 , q* r,1 , q* r,2 , b* l,1 , b* l, 2 , b* r, 1 , b* r, 2 ⁇
- the leaf node R7 When it is determined that the four inner product values (in* 1 , in* 2 , in* 3 , in* 4 ) representing spatial information are all greater than 0 (spatial threshold), it is determined that the leaf node R7 is in the spatial position, and in the second query space vector ciphertext. At this time, the leaf node R7 is regarded as a node that satisfies the condition.
- a leaf node inner product value (in* 1 , in* 2 , in* 3 , in* 4 ) has an inner product value not greater than 0, it means that the leaf node is not in the second query space vector ciphertext , that is, the leaf node is a node that does not satisfy the condition.
- the similarity value of each leaf node that meets the condition is determined.
- the similarity value is determined according to the preset weight of the leaf nodes that satisfy the condition.
- the similarity value of the leaf nodes that satisfy the condition is determined according to the inner product value, for example, the inner product value (in* 1 , in* 2 , in* 3 , in* 4 ) of the and as the leaf node similarity value, and then determine the second node from the leaf nodes that satisfy the condition if the similarity value is greater than s (similarity threshold).
- s can be a value preset by human based on experience, such as 6, 7 and so on.
- the cloud server verifies the client, and verifies whether it belongs to an authorized user according to the preset access structure. If the client is an unauthorized user, the client is not allowed to perform query operations, wherein the access structure may be preset by the user on the data owner, edge server, or cloud server.
- the preset access structure is directed to a single plaintext space text, that is, a leaf node. It is equivalent to judging whether the second node is authorized to the user terminal after the second node is determined, that is, each second node authorizes different user terminals, so as to increase the flexibility of the verification method and the security of the plaintext space text.
- the data owner only authorizes the client A for the second node A, and the data owner only authorizes the client B for the second node B.
- the second node includes the second node A, but before using the second node A as the query result corresponding to the query request initiated by the client B, it is determined that the data owner has not authorized the client B for the second node A, then the second node A is not available as a query result.
- the query result includes the spatial text ciphertext of the second node and the intermediate quantity, wherein the key ciphertext and the spatial text ciphertext are queried by the cloud server, and the intermediate quantity is calculated by the edge server.
- the cloud server sends the spatial text number corresponding to the second node to the edge server, so as to instruct the edge server to query the key ciphertext and spatial text ciphertext corresponding to the spatial text number according to the spatial text number, and correspondingly according to the spatial text number
- the key ciphertext of the second node determines the intermediate volume of the spatial text ciphertext corresponding to the spatial text number
- the cloud server takes the spatial text ciphertext and the intermediate volume of the second node as the query result.
- FIG. 4 exemplarily shows a schematic flowchart of a method for querying spatial text by the user terminal, as shown in FIG. 4 .
- the specific process includes:
- Step 410 the client generates a first query spatial vector ciphertext based on the spatial query condition in the query request.
- the query request includes a spatial range to be queried and a keyword.
- the spatial range is a rectangular range determined by two location points, and the two location points include longitude and latitude information.
- the user terminal generates a first random vector and a second random vector
- the user terminal assigns the first K bits of the first random vector related to the first position point according to the first method, and then according to the element value of each bit in the second bit vector value, assign the last L bits of the first random vector related to the first position point according to the second method, and obtain the first sub-vector ciphertext of the first query space vector ciphertext, wherein the first bit vector and the second The bit vector is randomly generated by the data owner.
- the first K bits of the second random vector are assigned values related to the second position point according to the third method, and then according to the value of each bit in the second bit vector For the element value, the last L bits of the second random vector are assigned values related to the second position point according to the fourth method, so as to obtain the second sub-vector ciphertext of the first query space vector ciphertext.
- the difference between the first mode and the second mode is whether the element value of the bit is a preset value, if so, the first mode is executed, otherwise, the second mode is executed.
- FIG. 5 exemplarily shows a schematic diagram of a spatial range to be queried.
- the position point 1 ie the first position point or the second position point
- the position point 2 includes longitude and latitude values, wherein, for different position points, different encoding algorithms are used to obtain the vector ciphertext, for example, the first encoding algorithm is used for the position point 1 in the lower left corner, and the first encoding algorithm is used for the position point 2 in the upper right corner.
- Two encoding algorithm Two encoding algorithm.
- the first encoding algorithm is: generate a random vector with a preset dimension (K+L), and arbitrarily select an unselected t l1th in the first bit vector
- the element value t i1 when it is determined that the element value t i1 is 0, assign 1 (preset value) to the corresponding position of the random vector, and when it is determined that the element value t i1 is not 0, the longitude value or latitude of the position point 1
- the value g1 is assigned to the corresponding position of the random vector.
- the random vector is a 4-dimensional random vector ⁇ K1, K2, L1, L2 ⁇ .
- the random vector becomes ⁇ 1, K2, L1, L2 ⁇ .
- the random vector becomes ⁇ g1, K2, L1, L2 ⁇ .
- the value range of t l1 is ⁇ 1, . . . , K+L/2 ⁇ .
- (K+L/4) random numbers are randomly determined, wherein the sum of the (K+L/4) random numbers is greater than 0.
- arbitrarily select an unselected t l2th element value t i2 in the second bit vector and when the element value t i2 is determined to be 0, assign the value of the first random number yi 1 to the corresponding position of the random vector , when it is determined that the element value t i2 is not 0, the product of the first random number and the longitude value or latitude value g1 of the position point 1 is assigned to the corresponding position of the random vector.
- the value range of t l2 is ⁇ 1, . . .
- the position corresponding to the random vector of t l2 is K+L/2+t l2 .
- the random vector is ⁇ K1, K2, L1, L2 ⁇
- the random vector becomes ⁇ K1, K2, yi 1 , L2 ⁇ .
- the random vector becomes ⁇ g1, K2, (yi 1 ⁇ g1), L2 ⁇ .
- the second encoding algorithm is: randomly determine (K+L/4) random numbers, where the sum of (K+L/4) random numbers is greater than 0. Then arbitrarily select an unselected t r1 th element value t j1 in the first bit vector, when it is determined that the element value t j1 is 0, the first random number yi 2 and the longitude value or latitude of the position point 2 The product of the value g2 is assigned to the corresponding position of the random vector, and when it is determined that the element value t j1 is not 0, the opposite number of the first random number yi 2 is assigned to the corresponding position of the random vector.
- the value range of t r1 is ⁇ 1,...,K+L/2 ⁇ .
- the random vector is ⁇ K1, K2, L1, L2 ⁇ .
- the random The vector becomes ⁇ (yi 2 ⁇ g2), K2, L1, L2 ⁇ .
- the random vector becomes ⁇ -yi 2 , K2, L1, L2 ⁇ .
- the random vector is ⁇ K1, K2, L1, L2 ⁇ .
- the random vector becomes ⁇ 1, K2, g2, L2 ⁇ .
- the random vector becomes ⁇ g1, K2, -1, L2 ⁇ .
- the value range of t r2 is ⁇ 1, ..., K+L/2 ⁇ , and the position corresponding to the random vector of t r2 is K+L/2+t r2 .
- Step 420 the client generates a first query mixed vector ciphertext based on the text query condition and the spatial query condition in the query request.
- the first query mixed vector ciphertext includes query location information and text information of the query request, wherein the text information is keyword information, and there may be multiple keywords.
- the text information is keyword information, and there may be multiple keywords.
- Sichuan cuisine and hot pot are two keywords.
- the user terminal generates a third random vector and a fourth random vector
- the user terminal assigns the first N1 bits of the third random vector and the first N1 bits of the fourth random vector based on the spatial query condition, and then according to whether the randomly selected keyword is located in the text In the query keyword in the query condition, the random numbers are assigned to the last N2 bits of the third random vector and the last N2 bits of the fourth random vector, wherein the third bit vector is randomly generated by the data owner.
- the longitude values of the position point 1 and the position point 2 are taken as two random numbers v1 and v2. Then, multiple random numbers are determined according to the dimension of the third random vector or the fourth random vector. If the dimension of the third random vector is N1+N2, then N1/2 random numbers are generated, and N1/2 random numbers are guaranteed. The sum of the numbers is greater than or equal to the minimum distance MD from the spatial text data to the rectangular query range (the rectangle formed by the position point 1 and the position point 2) to reflect the range condition and similarity value. The dimension of the third random vector is the same as the dimension of the fourth random vector.
- the third random vector is ⁇ N1a, N1b, N2a, N2b ⁇
- the third random vector becomes ⁇ wb1, N1b, N2a, N2b ⁇
- the fourth random vector is ⁇ -wb1, N1 ⁇ b, N2 ⁇ a, N2 ⁇ b ⁇ .
- the third random vector becomes ⁇ wb1 ⁇ -v1, N1b, N2a, N2b ⁇
- the fourth random vector is ⁇ wb1 ⁇ v2, N1 ⁇ b, N2 ⁇ a, N2 ⁇ b ⁇ .
- the value range of t w1 is ⁇ 1,...,N1 ⁇ .
- the third random vector is ⁇ N1a, N1b, sj1, N2b ⁇
- the fourth random vector is ⁇ N1 ⁇ a, N1 ⁇ b,1-sj1,N2 ⁇ b ⁇ .
- the third random vector is ⁇ N1a, N1b, sj2, N2b ⁇
- the fourth random vector is ⁇ N1 ⁇ a, N1 ⁇ b, 0-sj2, N2 ⁇ b ⁇ .
- the value range of t w2 is ⁇ 1,...,N2 ⁇ .
- the position corresponding to t w2 in the random vector is N1+t w2 .
- the user terminal can first increase the longitude and latitude of the first position point and the second position point of the spatial query condition in the query request, which is equivalent to the basis of the spatial scope of the query request. , expand the preset longitude and latitude, and get the expanded space range.
- Step 430 the client sends the first query ciphertext to the cloud server; the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext.
- the user terminal after obtaining the first query space vector ciphertext and the first query mixed vector ciphertext according to the query request, the user terminal performs the first query according to the first user key generated by the third-party trusted system for the user terminal.
- the space vector ciphertext and the first query mixed vector ciphertext are encrypted to obtain the first query ciphertext.
- the trusted third-party system generates the first user key K EN,1 for the user terminal, and sends it to the user terminal.
- the trusted third-party system is the first user key generated for the user terminal, which is equivalent to the first user key of each user terminal being different.
- Step 440 the client determines the plaintext space text corresponding to the query request based on the query result of the cloud server.
- the query result of the cloud server includes the spatial text ciphertext and the intermediate quantity, and the client obtains the plaintext corresponding to the spatial text ciphertext according to the query result.
- the client receives the spatial text ciphertext and the intermediate volume sent by the edge server, decrypts the intermediate volume according to its own user private key, determines the symmetric key of the spatial text ciphertext, and finally parses the spatial text according to the symmetric key.
- the ciphertext is decrypted to obtain the plaintext space text corresponding to the query request.
- the user terminal directly decrypts the ciphertext key according to the user's private key to obtain the symmetric key, which results in a large amount of calculation on the user terminal and excessive consumption of computing resources.
- the server divides the process of determining the symmetric key into two steps.
- the first step is that the edge server determines the intermediate value according to the key ciphertext and the edge private key
- the second step is that the client determines the intermediate value according to the intermediate value and the edge private key.
- the user's private key determines the symmetric key, because one of the steps is calculated by the edge server, so as to reduce the amount of calculation on the user side, reduce the computing resources of the user side, and enable the user side to implement lightweight queries.
- the intermediate quantity is obtained by the edge server according to the edge private key
- the user private key and the edge private key are generated by the trusted third-party system.
- G is an additive cyclic group of order p
- g, g 0 , g 1 , g 2 are generators of G
- G T is a p-order multiplicative cyclic group
- e is a bilinear map G ⁇ G ⁇ G T
- ⁇ represents the first random number: ⁇ Z p
- ⁇ represents the second random number: ⁇ Z p
- ⁇ represents the third random number: ⁇ Z p
- Z p represents the p-
- the encryption of the plaintext space text to obtain the space text ciphertext and the key ciphertext corresponding to the key used to decrypt the space text ciphertext are all calculated by the data owner, which undoubtedly causes the resource overhead of the data owner. big problem.
- the key ciphertext is jointly completed by the data owner and the edge server, so as to realize the lightweight calculation of the data owner and reduce the resource consumption of the data owner.
- the data owner generates a symmetric key for the plaintext space text, and encrypts the plaintext space text according to the symmetric key to obtain the space text ciphertext.
- the data owner For example, if the number of plaintext spatial text ⁇ eg, including text information and spatial information of a restaurant, that is, keywords (cuisine type, restaurant theme, etc.) and spatial location (latitude and longitude) ⁇ is m, then the data owner generates m symmetrical
- the key sk t is used to encrypt the plaintext space text set (including all plaintext space texts) O t by sk t to obtain the space text ciphertext set ct , where the value range of t is ⁇ 1,...,m ⁇ .
- the data owner establishes an access structure for each plaintext space text to determine the authorized user of each plaintext space text (ie, a leaf node in the ciphertext index tree).
- the data owner sends the access structure to the cloud server, so that when the cloud server targets the second node queried by the client, the cloud service determines whether the second node is authorized by the client.
- the data owner sends the access structure to the edge server, so that the cloud server instructs the edge server to determine whether the second node is authorized to the user according to the access structure when targeting the second node queried by the client end.
- the cloud server instructs the edge server to determine whether the second node is authorized to the user according to the access structure when targeting the second node queried by the client end.
- the edge server encrypts the symmetric key of the data owner according to the preset algorithm according to the symmetric key of the data owner, obtains the ciphertext of the temporary key, and sends the ciphertext of the temporary key to the data owner, wherein the preset algorithm It can be a random algorithm, etc., which is not limited here.
- the data owner After obtaining the temporary key ciphertext, the data owner selects a random number, encrypts the temporary key ciphertext, and obtains the key ciphertext corresponding to the key used to decrypt the spatial text ciphertext. Because in this process, edge server-assisted computing is introduced, which realizes the lightweight computing of the data owner and reduces the resource consumption of the data owner.
- the ciphertext index tree may be a structure such as a quad tree or an R tree, which is not limited herein.
- the data owner takes the plaintext space text O t as a leaf node, that is, each plaintext space text is a leaf node, and for each leaf node, the data owner establishes a leaf node
- the mixed vector ciphertext of the node includes spatial information and text information
- the spatial information includes the position information of the leaf node, such as longitude and latitude information
- the text information includes the keywords of the leaf node, such as the leaf node is "Northeast Restaurant" And "couples themed restaurants”.
- the data owner Before constructing the mixed vector ciphertext of leaf nodes, the data owner presets keywords according to all plaintext space texts, wherein the number of keywords is N2.
- the data owner randomly generates the third bit vector, the fifth random vector and the sixth random vector of dimension N1+N2; and then according to the element value of each bit in the third bit vector, based on the preset condition, the value of the fifth random vector is determined.
- the first N1 bits and the first N1 bits of the sixth random vector are assigned.
- the random numbers are assigned to the last N2 bits of the fifth random vector and the last N2 bits of the sixth random vector.
- a third bit vector s' and a fifth random vector ⁇ Na1, Nb1, Na2, Nb2 ⁇ , and a sixth random vector ⁇ N ⁇ a1, N ⁇ b1, N ⁇ a2, N ⁇ b2 ⁇ are generated.
- any leaf node arbitrarily select an unselected t y1 th element value t z1 in the third bit vector s ⁇ , and when the element value t z1 is determined to be 0 (preset condition), assign 1 to the t y1 th element value t z1
- the fifth random vector and the sixth random vector correspond to the positions.
- the longitude value xi of the leaf node is assigned to the corresponding position of the fifth random vector
- the latitude value yi of the leaf node is assigned to the corresponding position of the sixth random vector.
- the fifth random vector is ⁇ 1, Nb1, Na2, Nb2 ⁇
- the sixth random vector is ⁇ 1, N ⁇ b1, N ⁇ a2, N ⁇ b2 ⁇
- the fifth random vector ⁇ xi, Nb1, Na2, Nb2 ⁇
- the sixth random vector ⁇ yi, N ⁇ b1, N ⁇ a2, N ⁇ b2 ⁇ .
- the value range of t z1 is ⁇ 1,...,N1 ⁇ .
- t y2 th keyword t z2 from the keywords (all preset keywords in the R tree) to determine whether the keyword t z2 exists in the keyword of the leaf node (such as the leaf
- the keywords of the node include Sichuan cuisine and hot pot), if so, select a random number sy1 at random, assign sy1 to the corresponding position of the fifth random vector, and assign the difference between 1 and sy1 to the corresponding position of the sixth random vector. Otherwise, a random number sy2 is randomly selected, sy2 is assigned to the corresponding position of the fifth random vector, and the difference between 0 and sy2 is assigned to the corresponding position of the second random vector.
- the fifth random vector ⁇ Na1, Nb1, sy1, Nb2 ⁇ , the first Six random vectors ⁇ N ⁇ a1, N ⁇ b1, 1-sy1, N ⁇ b2 ⁇ .
- the fifth random vector ⁇ Na1, Nb1, sy0, Nb2 ⁇
- the sixth random vector ⁇ N ⁇ a1, N ⁇ b1, 0-sy2, N ⁇ b2 ⁇ .
- the value range of t y2 is ⁇ 1, ..., N2 ⁇ .
- the position corresponding to t y2 in the random vector is N1+t y2 .
- the data owner determines the space vector ciphertext of the non-leaf node according to the above-mentioned first encoding algorithm and the second encoding algorithm, and the specific algorithm is not repeated here.
- the data owner receives the owner key sent by the trusted third-party system, and performs the R-tree (including the leaf node mixed vector ciphertext and the non-leaf node space vector ciphertext) according to the owner key. Encrypt to get the initial ciphertext index tree.
- the initial ciphertext index tree, key ciphertext and spatial text ciphertext are sent to the cloud server, so that the cloud server can re-encrypt the initial ciphertext index tree to obtain the final ciphertext index tree, and then query the matching query request. the second node.
- FIG. 6 exemplarily shows a schematic diagram of a method for querying spatial text.
- the trusted third-party system generates a first owner key and a The second owner key is used to generate the user private key, the edge private key, the first user key and the second user key for the client.
- the data owner performs initial encryption on each plaintext space text, obtains each space text ciphertext, and then obtains the space text ciphertext set.
- An access structure is established for each plaintext space text, and the access structure and the space text ciphertext set are sent to the edge server 1 .
- the edge server 1 encrypts the above-mentioned access structure according to the shared secret algorithm, which is equivalent to encrypting the symmetric key, obtains the temporary key ciphertext of each plaintext space text, and returns it to the data owner.
- the data owner After obtaining each temporary key ciphertext, the data owner selects a random number, encrypts the temporary key ciphertext, obtains each key ciphertext, and then obtains a key ciphertext set.
- the data owner builds a plaintext index tree according to each plaintext space text, and then performs initial encryption on the plaintext index tree according to the first owner's key to obtain the initial ciphertext index tree, and then combines the spatial text ciphertext set, key ciphertext set and initial
- the ciphertext index tree is sent to the cloud server.
- the cloud server After receiving the spatial text ciphertext set, key ciphertext set and initial ciphertext index tree sent by the data owner, the cloud server re-encrypts the initial ciphertext index tree according to the second owner's key to obtain the final ciphertext index tree, and send the spatial text ciphertext set and the key ciphertext set to the edge server 2 that interacts with the client.
- the client initiates a query request, encrypts the query request according to the first user key, obtains the first query space vector ciphertext and the first query mixed vector ciphertext of the query request, and sends them to the cloud server.
- the cloud server After obtaining the first query space vector ciphertext and the first query mixed vector ciphertext of the query request, the cloud server encrypts them according to the second user key to obtain the second query space vector ciphertext and the second query request.
- Mixed vector ciphertext After obtaining the first query space vector ciphertext and the first query mixed vector ciphertext of the query request, the cloud server encrypts them according to the second user key to obtain the second query space vector ciphertext and the second query request.
- Mixed vector ciphertext After obtaining the first query space vector ciphertext and the first query mixed vector ciphertext of the query request, the cloud server encrypts them according to the second user key to obtain the second query space vector ciphertext and the second query request.
- the cloud server determines the first node that intersects with it in the ciphertext index tree according to the ciphertext of the second query space vector of the query request, and determines that it is within the spatial range of the query request according to the ciphertext of the second query mixed vector of the query request.
- the client is the second node of the authorized user, and sends the spatial text number of the spatial text cipher text corresponding to the second node to the edge server 2 .
- the edge server 2 queries the key ciphertext and the spatial text ciphertext corresponding to the second node according to the spatial text number, and then determines the intermediate quantity according to the edge private key and the key ciphertext corresponding to the second node, and finally compares the intermediate quantity with the first ciphertext.
- the spatial text ciphertext corresponding to the two nodes is sent to the client.
- the client decrypts the intermediate quantity according to the user's private key to obtain the symmetric key, and then decrypts the ciphertext of the spatial text according to the symmetric key to obtain the plaintext spatial text.
- all the second nodes in the query position can be determined in the ciphertext index tree, and then the query can be determined in the second node according to the ciphertext of the first query mixed vector
- the first node in the range, and the correlation between the first query mixed vector ciphertext and each first node is determined, and then the query result is determined, which avoids the query result being affected by the weight, improves the accuracy of spatial text query, and the edge
- the server 1 assists in calculating the ciphertext of the temporary key, so as to realize the lightweight calculation of the data owner and reduce the resource consumption of the data owner.
- the edge server 2 assists in calculating the intermediate quantity, so as to realize the lightweight calculation of the client, and reduce the resource consumption of the client.
- FIG. 7 exemplarily shows a schematic structural diagram of an apparatus for querying spatial text according to an embodiment of the present invention, and the apparatus can execute the flow of a method for querying spatial text.
- the device specifically includes:
- the obtaining module 710 is configured to obtain the first query ciphertext sent by the client; the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext; the first query space vector ciphertext is generated according to the spatial query conditions in the query request; the first query mixed vector ciphertext is generated according to the text query conditions and the spatial query conditions in the query request;
- the processing module 720 is configured to retrieve the first node that meets the spatial query condition in the ciphertext index tree according to the first query space vector ciphertext; the ciphertext index tree constructed; the non-leaf nodes in the ciphertext index tree store the space vector ciphertext generated based on the spatial information in the plaintext space text, and the leaf nodes store the mixed vector generated based on the spatial information and text information in the plaintext space text ciphertext; the first node is a non-leaf node;
- a second node that meets the text query condition is determined; the second node is a leaf node; the first node is a leaf node; Two nodes are used as query results.
- processing module 720 is specifically used for:
- any node in the ciphertext index tree when it is determined that the node is a non-leaf node, it is determined according to the first query space vector ciphertext and the space vector ciphertext of the node the first node that intersects the ciphertext of the first query space vector.
- processing module 720 is specifically used for:
- each first child node When it is determined that the multiple first inner product values are all greater than the space threshold, according to the space vector ciphertext of each first child node of the node and the first query space vector ciphertext, in each first child node The second child node that intersects with the first query space vector ciphertext in spatial position is determined in the nodes, until the first node intersects with the first query space vector ciphertext is determined; the first The node is the parent node of the leaf node;
- processing module 720 is specifically used for:
- the leaf node is determined as the second node.
- the first query ciphertext is encrypted by the user terminal based on the first user key
- the processing module 720 is also used for:
- the first query ciphertext is processed according to the second user key of the user terminal. Encrypt, and determine the second query ciphertext; the second query ciphertext includes the second query space vector ciphertext and the second query mixed vector ciphertext;
- the processing module 720 is specifically used for:
- a second node that meets the text query condition is determined.
- processing module 720 is specifically used for:
- the key ciphertext corresponding to the spatial text number determines the intermediate amount of the spatial text ciphertext corresponding to the spatial text number
- the spatial text ciphertext and the intermediate quantity of the second node are used as the query result.
- FIG. 8 exemplarily shows a schematic structural diagram of an apparatus for querying spatial text according to an embodiment of the present invention, and the apparatus can execute the flow of a method for querying spatial text.
- the device specifically includes:
- a generating unit 810 configured to generate a first query spatial vector ciphertext based on the spatial query condition in the query request
- a sending unit 820 configured to send a first query ciphertext to a cloud server;
- the first query ciphertext includes the first query space vector ciphertext and the first query mixed vector ciphertext;
- the decryption unit 830 is configured to determine the plaintext space text corresponding to the query request based on the query result of the cloud server.
- the spatial query condition includes a first location point and a second location point indicating a spatial range
- the generating unit 810 is specifically used for:
- the first K bits of the first random vector are assigned values related to the first position point according to the first method; according to the value of each bit in the second bit vector element value, the last L bits of the first random vector are assigned values related to the first position point according to the second method, so as to obtain the first sub-vector ciphertext of the first query space vector ciphertext; the first The bit vector and the second bit vector are randomly generated by the data owner;
- the first K bits of the second random vector are assigned values related to the second position point according to the third method;
- the last L bits of the second random vector are assigned values related to the second position point according to the fourth method, so as to obtain the second sub-vector ciphertext of the first query space vector ciphertext. arts.
- the generating unit 810 is specifically configured to:
- the first N1 bits of the third random vector and the first N1 bits of the fourth random vector are assigned based on the spatial query condition; the third bit vector is randomly generated by the data owner;
- the last N2 bits of the third random vector and the last N2 bits of the fourth random vector are assigned by random numbers.
- the decryption unit 830 is specifically used for:
- the spatial text ciphertext and the intermediate quantity sent by the edge server Receive the spatial text ciphertext and the intermediate quantity sent by the edge server; the spatial text ciphertext and the intermediate quantity are determined by the edge server according to the spatial text number sent by the cloud server;
- an embodiment of the present invention also provides a computer device, including:
- the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned spatial text query method according to the obtained program.
- an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the above-mentioned spatial text query method.
- the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
- the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种空间文本的查询方法及装置,包括:云服务器获取用户端发送的第一查询密文,其中,第一查询密文包括第一查询空间向量密文和第一查询混合向量密文,第一查询空间向量密文是根据查询请求中的空间查询条件生成的,第一查询混合向量密文是根据查询请求中的文本查询条件和空间查询条件生成的,根据第一查询空间向量密文在密文索引树中检索出第一节点,根据第一查询混合向量密文和第一节点下的叶子节点的混合向量密文,确定符合文本查询条件的第二节点,避免查询结果受权重的影响,使查询结果在查询范围内,防止查询结果与查询位置距离过远的问题,提升了空间文本查询的准确度,提升了用户的查询体验。
Description
相关申请的交叉引用
本申请要求在2021年04月09日提交中国专利局、申请号为202110384135.2、申请名称为“一种空间文本的查询方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及金融科技(Fintech)领域,尤其涉及一种空间文本的查询方法及装置。
随着计算机技术的发展,越来越多的技术(例如:区块链、云计算或大数据)应用在金融领域,传统金融业正在逐步向金融科技转变,大数据技术也不例外,但由于金融、支付行业的安全性、实时性要求,也对大数据技术中文本信息查询提出了更高的要求。
随着基于位置的服务在移动互联网中的广泛应用,近年来基于空间(如地理位置—上海)和文本(如查询关键字—川菜)的查询服务也在工业界和学术界引起了越来越多的关注。在针对空间文本查询时,主要利用了查询请求中的文本相关度和空间距离来确定查询结果。具体的,将查询请求的文本相关度和空间距离按照预设的权重进行整合,得到查询向量,再通过得到的查询向量在预设的空间向量中确定出符合条件的查询结果。
然而,现有技术中的方案受权重的影响,导致用户进行查询时,得到的查询结果准确率低,不尽人意。例如,查询结果的文本信息与查询请求的文本信息之间的相关度较高,但查询结果的空间地点距离查询请求的查询位置(如用户查询时的经纬度值)较远。
因此,需要一种空间文本的查询方法,使查询结果在查询范围内,且文本信息相关度较高。
发明内容
本发明实施例提供一种空间文本的查询方法及装置,用于提升空间文本查询的准确度,提升用户的查询体验。
第一方面,本发明实施例提供一种空间文本的查询方法,包括:
云服务器获取用户端发送的第一查询密文;所述第一查询密文包括第一查询空间向量密文和第一查询混合向量密文;所述第一查询空间向量密文是根据查询请求中的空间查询条件生成的;所述第一查询混合向量密文是根据所述查询请求中的文本查询条件和所述空间查询条件生成的;
所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;所述密文索引树是数据拥有者根据各明文空间文本构建的;所述密文索引树中的非叶子节点存储有基于明文空间文本中的空间信息生成的空间向量密文,叶子节点存储有基于明文空间文本中的空间信息和文本信息生成的混合向量密文;所述第一节点为非叶子节点;
所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点;所述第二节点为叶子节点;所述第二节点用于作为查询结果。
上述技术方案中,根据第一查询密文的第一查询空间信息密文可以在密文索引树中确定出在查询范围内的所有第一节点,即非叶子节点,再根据第一查询混合向量密文在非叶子节点中确定出查询范围内所有第二节点,其中,第二节点为查询范围内的叶子节点,并确定出第一查询混合向量密文与各第二节点的相关度,进而确定出查询结果,避免了查询 结果受权重的影响,且防止了查询结果与查询位置距离过远的问题,提升了空间文本查询的准确度,使查询结果在查询范围内的基础上,仅根据文本信息的相关度进行确定,提升了用户的查询体验。
可选的,所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:
所述云服务器根据预设检索顺序,针对所述密文索引树中的任一节点,在确定所述节点为非叶子节点时,根据所述第一查询空间向量密文和所述节点的空间向量密文确定与所述第一查询空间向量密文相交的所述第一节点。
上述技术方案中,云服务器根据预设检索顺序进行检索,以提高检索效率,缩短确定查询结果的时间,将与第一查询空间向量密文相交的非叶子节点作为第一节点,以保证第一节点与第一查询空间向量密文在空间位置上相交,防止了查询结果与查询位置距离过远的问题。
可选的,根据所述第一查询空间向量密文和所述节点的空间向量密文确定与所述第一查询空间向量密文相交的所述第一节点,包括:
所述云服务器根据所述第一查询空间向量密文和所述节点的空间向量密文确定多个第一内积值;
所述云服务器在确定所述多个第一内积值均大于空间阈值时,根据所述节点的各第一孩子节点的空间向量密文和所述第一查询空间向量密文,在所述各第一孩子节点中确定出与所述第一查询空间向量密文在空间位置上相交的第二孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点;所述第一节点为叶子节点的父节点;
所述云服务器在确定所述多个第一内积值未均大于空间阈值时,确定所述节点的父节点下与所述第一查询空间向量密文在空间位置上相交的其他孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点。
上述技术方案中,基于密文索引树的结构,由上至下的进行检索,依次确定出与第一查询空间向量密文在空间位置上相交的叶子节点的父节点,以提高检索效率,通过具体的内积值来确定第一节点是否与第一查询空间向量密文在空间位置上相交,以增加查询结果的准确度。
可选的,所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:
针对所述第一节点下的任一叶子节点,所述云服务器根据所述第一查询混合向量密文和所述叶子节点的混合向量密文确定多个第二内积值;
所述云服务器在确定所述多个第二内积值均大于空间阈值,且所述多个第二内积值的和大于相似度阈值时,将所述叶子节点确定为所述第二节点。
上述技术方案中,与第一查询空间向量密文在空间位置上相交的第一节点中,来确定在第一查询空间向量密文内的第二节点,而不是通过所有叶子节点遍历进行确定第二节点,可以减少云服务器的计算量,提高检索效率,缩短确定查询结果的时间,因为第二节点为第一查询空间向量密文内的叶子节点,因此防止了查询结果与查询范围距离过远的问题,提升了空间文本查询的准确度,因为确定第二节点的文本查询条件为相似度阈值,因此避免了查询结果受权重的影响,使查询结果在查询范围内的基础上,仅根据文本信息的相关度进行确定,提升了用户的查询体验。
可选的,所述第一查询密文是所述用户端基于第一用户密钥加密的;
所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点之前,还包括:
所述云服务器根据所述用户端的第二用户密钥,对所述第一查询密文进行加密,确定所述第二查询密文;所述第二查询密文包括第二查询空间向量密文和第二查询混合向量密文;
所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点,包括:
所述云服务器根据所述第二查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;
所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:
所述云服务器根据所述第二查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点。
上述技术方案中,云服务器在获取第一查询密文之后,再次进行加密,得到第二查询密文,以实现多用户均可以与云服务器交互进行查询的场景。
可选的,所述第二节点用于作为查询结果,包括:
所述云服务器将所述第二节点对应的空间文本编号发送至边缘服务器,以指示所述边缘服务器根据所述空间文本编号查询出所述空间文本编号对应的密钥密文和空间文本密文,并根据所述空间文本编号对应的密钥密文确定所述空间文本编号对应空间文本密文的中间量;
所述云服务器将所述第二节点的空间文本密文和中间量作为所述查询结果。
上述技术方案中,中间量是边缘服务器根据边缘私钥和边缘服务器存储的密钥密文进行计算得到的,边缘私钥是可信第三方系统发送至边缘服务器的,用户端根据用户私钥对中间量进行解密,得到对称密钥,再根据对称密钥对空间文本密文进行解密,得到明文。以此通过将空间文本编号发送至边缘服务器,以指示边缘服务器进行辅助计算,以减少用户端的计算量,实现用户端轻量级的计算,减少用户端的资源消耗。
第二方面,本发明实施例提供一种空间文本的查询方法,包括:
用户端基于查询请求中的空间查询条件生成第一查询空间向量密文;
所述用户端基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文;
所述用户端将第一查询密文发送至云服务器;所述第一查询密文包括所述第一查询空间向量密文和所述第一查询混合向量密文;
所述用户端基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本。
上述技术方案中,用户端对查询请求进行加密,以防止明文形式的查询请求泄露。
因为第一查询密文包括第一查询空间向量密文和第一查询混合向量密文,以使云服务器在确定查询结果时,避免查询结果受权重的影响,防止查询结果与查询位置距离过远的问题。
可选的,所述空间查询条件包括指示空间范围的第一位置点和第二位置点;
用户端基于查询请求中的空间查询条件生成第一查询空间向量密文,包括:
所述用户端生成第一随机向量和第二随机向量;
所述用户端根据第一比特向量中各比特位的元素值,按照第一方式对所述第一随机向量的前K位进行与所述第一位置点相关的赋值;根据第二比特向量中各比特位的元素值,按照第二方式对所述第一随机向量的后L位进行与第一位置点相关的赋值,得到所述第一查询空间向量密文的第一子向量密文;所述第一比特向量和所述第二比特向量是数据拥有者随机生成的;
所述用户端根据所述第一比特向量中各比特位的元素值,按照第三方式对所述第二随机向量的前K位进行与所述第二位置点相关的赋值;根据所述第二比特向量中各比特位的元素值,按照第四方式对所述第二随机向量的后L位进行与所述第二位置点相关的赋值,得到所述第一查询空间向量密文的第二子向量密文。
上述技术方案中,根据第一位置点和第二置位点,以确定出查询范围,从而使云服务器确定出在查询范围内的第二节点,使查询结果在查询范围内的基础上,仅根据文本信息 的相关度进行确定,提升了用户的查询体验。
可选的,所述用户端基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文,包括:
所述用户端生成第三随机向量和第四随机向量;
所述用户端根据第三比特向量中各比特位的元素值,基于所述空间查询条件为所述第三随机向量的前N1位和所述第四随机向量的前N1位进行赋值;所述第三比特向量是数据拥有者随机生成的;
所述用户端根据随机选取的关键字是否位于所述文本查询条件中的查询关键字中,通过随机数为所述第三随机向量的后N2位和所述第四随机向量的后N2位进行赋值。
上述技术方案中,第一查询混合向量密文中包括文本查询条件信息,从而使云服务器确定查询结果时,根据文本信息的相关度进行确定,提升了空间文本查询的准确度。
可选的,所述用户端基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本,包括:
所述用户端接收边缘服务器发送的空间文本密文和中间量;所述空间文本密文和中间量是边缘服务器根据所述云服务器发送的空间文本编号确定的;
所述用户端根据对所述中间量进行解密,确定所述空间文本密文的对称密钥;
所述用户端根据所述空间文本密文的对称密钥对所述空间文本密文进行解密,得到所述查询请求对应的明文空间文本。
上述技术方案中,用户端对查询结果进行解密所需要的中间量是边缘服务器计算的,以此减少了用户端的计算量,实现用户端轻量级的计算,减少了用户端的资源消耗。
第三方面,本发明实施例还提供一种计算机设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述空间文本的查询方法。
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行上述空间文本的查询方法。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构示意图;
图2为本发明实施例提供的一种空间文本的查询方法的流程示意图;
图3为本发明实施例提供的一种密文索引树的示意图;
图4为本发明实施例提供的一种用户端针对空间文本的查询方法的流程示意图;
图5为本发明实施例提供的一种待查询的空间范围的示意图;
图6为本发明实施例提供的一种空间文本的查询方法的示意图;
图7为本发明实施例提供的一种空间文本的查询装置的结构示意图;
图8为本发明实施例提供的一种空间文本的查询装置的结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有 其它实施例,都属于本发明保护的范围。
在现有技术中,空间关键字的查询方法一般是针对查询位置进行查询,例如,用户A在某一具体位置发起了查询请求,则该位置为查询请求的查询位置,该查询位置一般为经纬度坐标值,即查询点。
针对于查询点查询时,需要确定出该查询点与预先根据明文空间文本数据构建的索引树中各最小外包矩形的最小空间距离,然后再根据各最小外包矩形中存在的空间文本对应的关键字和查询请求的关键字,确定出各空间文本与查询请求的关键字相似度。最后根据预设权重、空间距离和关键字相似度确定出查询值,根据查询值的大小确定查询结果,例如,将最大查询值对应的空间文本(相当于索引树中的叶子节点)作为查询结果。其中,索引树是数据拥有者根据明文空间文本进行构建的,最小外包矩形为非叶子节点的空间范围。
但上述方法存在的问题是,查询值与预设权重相关,例如,对空间距离所预设的权重较小,对关键字相似度所预设的权重较大时,则查询结果易出现与查询请求中的关键字相似的节点,但该节点与该查询请求的查询位置距离较远。或者在对空间距离所预设的权重较大,对关键字相似度所预设的权重较小时,则查询结果易出现与该查询请求的查询位置距离相近,但查询结果与查询请求中的关键字不相似,从而导致查询结果准确度低,影响了用户的查询体验。
且在目前的方法中,在对查询结果进行解密时,由用户端根据用户私钥对密钥密文进行解密得到对称密钥,从而对查询结果进行解密,因此对用户端也造成了资源开销大的问题。
因此,现需要一种空间关键字的查询方法,针对于查询范围的查询请求,仅根据查询关键字的相似度来确定查询范围内的节点,以提升查询结果的准确度,并引入边缘服务器,用于在构建索引树和用户端对查询结果进行解密时进行辅助计算,以实现轻量级的计算,减少用户端的资源消耗。
图1示例性的示出了本发明实施例所适用的一种系统架构,该系统架构包括可信第三方系统110、数据拥有者120、边缘服务器130、云服务器140和用户端150。
其中,可信第三方系统110用于生成用户私钥、边缘私钥和密钥,用户私钥是根据用户的唯一标识信息确定的,用户的唯一标识信息如IP(Internet Protocol,网际互连协议)地址、网络账号、身份信息等。边缘私钥用于计算出空间文本密文的中间量。密钥用于用户端150和云服务器140对查询指令进行加密。
数据拥有者120,用于根据用户端150的数量生成对应数量的对称密钥,利用对称密钥对明文空间文本进行加密,得到空间文本密文集,还根据明文空间文本构建明文索引树,并对其加密,得到初始密文索引树。
边缘服务器130,用于对访问结构进行加密,进而相当于对数据拥有者120生成的对称密钥进行加密,得到临时对称密钥密文,以减少数据拥有者的计算量。
需要说明的是,图1中给出的两个边缘服务器130可以为同一个也可以为两个不同的边缘服务器,在此不做具体限定。
云服务器140,用于对数据拥有者120加密的初始密文索引树进行加密,得到最终的密文索引树,还用于针对用户端150发送的第一查询密文进行加密,得到第二查询密文,进一步根据第二查询密文得到查询结果,并将查询结果发送至用户端150。
用户端150,用于生成第一查询密文,并在接收到查询结果之后,解密出明文数据。
需要说明的是,上述图1所示的结构仅是一种示例,本发明实施例对此不做限定。
基于上述描述,图2示例性的示出了本发明实施例提供的一种空间文本的查询方法的流程示意图,该流程可由空间文本的查询装置执行。
如图2所示,该流程具体包括:
步骤210,云服务器获取用户端发送的第一查询密文。
本发明实施例中,第一查询密文包括第一查询空间向量密文和第一查询混合向量密文,第一查询空间向量密文是根据查询请求中的空间查询条件生成的,第一查询混合向量密文是根据查询请求中的文本查询条件和空间查询条件生成的。
其中,第一查询空间向量指示了查询请求中待查询的空间范围,第一查询混合向量密文不仅包括了查询请求中待查询的空间范围,还包括了查询请求中的关键字,用于确定各叶子节点与查询请求中关键字的相似度。
在一种可实施的方式中,查询请求中的待查询的空间范围可以根据用户的查询位置生成,如以用户查询位置的经纬度值为中心生成的正方形为待查询的空间范围。
在另一种可实施的方式中,待查询的空间范围是由用户直接输入的两个空间位置形成的矩形范围。
步骤220,所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点。
本发明实施例中,密文索引树是数据拥有者根据各明文空间文本构建的,密文索引树中的非叶子节点存储有基于明文空间文本中的空间信息生成的空间向量密文,叶子节点存储有基于明文空间文本中的空间信息和文本信息生成的混合向量密文,第一节点为非叶子节点。
其中,密文索引树是加密后的明文索引树,明文索引树是数据拥有者以各明文空间文本为叶子节点构建的,在明文索引树中,除叶子节点外,均是非叶子节点,非叶子节点存在空间范围,即空间信息,进而生成空间向量密文,空间向量密文可以表示非叶子节点存在的空间范围,同理,叶子节点相当于位置信息,即空间点,与文本信息生成的混合向量密文可以表示叶子节点所在的空间位置及文本信息。
进一步地,第一查询空间向量密文可以表示查询请求中待查询的空间范围,非叶子节点的空间向量密文可以表示非叶子节点存在的空间范围,因此,通过向量之间的计算可以确定出与第一查询空间向量密文在空间位置上相交的非叶子节点,即第一节点。
步骤230,所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点。
本发明实施例中,第二节点为叶子节点,第二节点用于作为查询结果。根据上述混合向量密文所知,每个叶子节点均存在混合向量密文,包括空间信息和文本信息,而第一查询混合向量密文中包括了查询请求中的关键字信息和查询空间范围,进而通过叶子节点的空间信息和查询范围确定出在查询请求的空间范围内的叶子节点,并确定出各叶子节点与查询请求之间的相似度。
进一步地,在步骤220中,云服务器根据第一查询空间向量密文在密文索引树中检索出符合空间查询条件的第一节点之前,还会对第一查询密文进行加密,实现多用户与云服务器进行交互查询的应用场景。具体的,云服务器根据用户端的第二用户密钥,对第一查询密文进行加密,确定第二查询密文,其中,第二查询密文包括第二查询空间向量密文和第二查询混合向量密文。
举例来说,可信第三方系统针对用户端生成了第二用户密钥K
EN,2,并发送给了云服务器,云服务器在接收到第一查询密文Eq={q
l,1,q
l,2,q
r,1,q
r,2,b
l,1,b
l,2,b
r,1,b
r,2}之后,根据第二用户密钥K
EN,2对第一查询密文Eq进行加密得到第二查询密文Eq*={q*
l,
1,q*
l,2,q*
r,1,q*
r,2,b*
l,1,b*
l,2,b*
r,1,b*
r,2}。
需要说明的是,可信第三方系统是针对用户端生成的第二用户密钥,相当于各用户端的第二用户密钥是不同的。
在步骤220中,云服务器根据第二查询空间向量密文在密文索引树中检索出符合空间查询条件的第一节点。
在步骤230中,云服务器根据第二查询混合向量密文和第一节点下的叶子节点的混合向量密文,确定符合文本查询条件的第二节点。
需要说明的是,第二查询密文仅是加密后的第一查询密文,并不会改变第一查询密文的空间信息和文本信息。
在步骤220中,一种可实施的方式可以包括,云服务器根据随机的方式来对索引树中的节点进行判断是否为非叶子节点。
又一种可实施的方式包括,云服务器根据预设检索顺序,针对密文索引树中的任一节点,在确定节点为非叶子节点时,根据第一查询空间向量密文和节点的空间向量密文确定与第一查询空间向量密文相交的第一节点。
其中,预设检索顺序可以为由密文索引树中的叶子节点至根节点,在本发明实施例中,预设检索顺序为由密文索引树中的根节点至叶子节点进行判断。以图3进行举例,图3示例性的示出了一种密文索引树的示意图,由根据R1进行判断,确定R1是否为非叶子节点。
在确定节点为非叶子节点后,确定与第一查询空间向量密文相交的第一节点,具体的,云服务器根据第一查询空间向量密文和节点的空间向量密文确定多个第一内积值;在确定多个第一内积值均大于空间阈值时,根据节点的各第一孩子节点的空间向量密文和第一查询空间向量密文,在各第一孩子节点中确定出与第一查询空间向量密文在空间位置上相交的第二孩子节点,直至确定出与第一查询空间向量密文相交的第一节点,其中,第一节点为叶子节点的父节点。
云服务器在确定多个第一内积值未均大于空间阈值时,确定节点的父节点下与第一查询空间向量密文在空间位置上相交的其他孩子节点,直至确定出与第一查询空间向量密文相交的第一节点。
结合以上描述的内容举例来说,云服务器在得到第一查询空间向量密文之后,云服务器根据第二用户密钥K
EN,2对第一查询空间向量密文进行加密,得到第二查询密文Eq*={q*
l,
1,q*
l,2,q*
r,1,q*
r,2,b*
l,1,b*
l,2,b*
r,1,b*
r,2},其中,第二查询密文的第二查询空间向量密文为q*={b*
l,1,b*
l,2,b*
r,1,b*
r,2},节点的空间向量密文为d
R1*={d*
l,1,d*
l,2,d*
r,1,d*
r,2},因此,得到四个内积值为in
1=b*
l,1×d*
l,1,in
2=b*
l,2×d*
l,2,in
3=b*
r,1×d*
r,1,in
4=b*
r,2×d*
r,2。
然后在确定四个表示空间信息的内积值(in
1,in
2,in
3,in
4)均大于0(空间阈值)时,确定根节点R1与第二查询空间向量密文在空间位置上相交。
然后再确定根节点R1下的孩子节点(R2和R3),以R2为例,根据上述内计算法,在确定节点R2的四个内积值均大于0时,因为R2为叶子节点(R4和R5)的父节点,以此,节点R2为第一节点。
若确定节点R2不满足上述条件,即节点R2的四个内积值中,有一个、两个、三个或四个内积值不大于0时,确定节点R2与第二查询空间向量密文在空间位置上不相交,此时,返回节点R2父节点,即节点R1,再次确定节点R1下的其他孩子节点(R3)是否满足上述条件,以此类推,确定出所有满足条件的节点,作为第一节点。
在一种可实施的方式中,在确定出与第二查询空间向量密文在空间位置上相交的非叶子节点之后,根据上述非叶子节点下的叶子节点的混合向量密文和第二查询混合向量密文直接确定出上述非叶子节点下的各叶子节点与查询请求的相似度。
在另一种可实施的方式中,即本发明实施例步骤230中,在确定出与第二查询空间向量密文在空间位置上相交的非叶子节点之后,首先需要先确定出在第二查询空间向量密文范围内的叶子节点,再确定出满足条件的叶子节点与查询请求的相似度。
在一种可实现的方式中,根据相似度的大小对满足条件的叶子节点进行排序,将排序前N名的叶子节点作为第二节点,其中N是人为预设的数,如5、10等。
在另一种可实施的方式中,针对第一节点下的任一叶子节点,云服务器根据第一查询混合向量密文和叶子节点的混合向量密文确定多个第二内积值,在确定所述多个第二内积值均大于空间阈值,且多个第二内积值的和大于相似度阈值时,将叶子节点确定为第二节点。
本发明实施例中,云服务器根据第一查询密文先加密生成了第二查询密文,然后根据第二查询密文的第二查询混合向量密文和叶子节点的混合向量密文确定第二节点。
结合上述例子,举例说明,第二查询密文Eq*={q*
l,1,q*
l,2,q*
r,1,q*
r,2,b*
l,1,b*
l,
2,b*
r,1,b*
r,2},其中,第二查询密文的第二查询混合向量密文为q*={q*
l,1,q*
l,2,q*
r,
1,q*
r,2},叶子节点的混合向量密文为p
R7*={p*
1,p*
2},然后确定出四个表示空间信息和文本信息的内积值,in*
1=p*
1×q*
l,1,in*
2=p*
2×q*
l,2,in*
3=p*
1×q*
r,1,in*
4=p*
2×q*
r,
2。
在确定四个表示空间信息的内积值(in*
1,in*
2,in*
3,in*
4)均大于0(空间阈值)时,确定叶子节点R7在空间位置上,在第二查询空间向量密文内。此时,将叶子节点R7作为满足条件的节点。
若某一叶子节点内积值(in*
1,in*
2,in*
3,in*
4)中存在不大于0的内积值时,则表示该叶子节点不在第二查询空间向量密文内,即该叶子节点为不满足条件的节点。
在满足条件的叶子节点中,确定出各满足条件的叶子节点的相似度值,在一种可实施的方式中,根据满足条件的叶子节点预设权重确定相似度值。
在另一种可实施的方式中,根据满足条件的叶子节点的内积值确定其相似度值,例如,将内积值(in*
1,in*
2,in*
3,in*
4)的和作为叶子节点相似度值,然后将相似度值大于s(相似度阈值)在满足条件的叶子节点中确定出第二节点。其中,s可以是人为根据经验预设的值,如6、7等。
需要说明的是,在一种可实施的方式中,云服务器在获取用户端发送的第一查询密文之后,对用户端进行验证,根据预设的访问结构验证其是否属于已授权用户,若用户端为未授权的用户,则不允许用户端进行查询操作,其中,访问结构可以是用户在数据拥有者、边缘服务器或云服务器预设的。
在另一种可实施的方式中,预设的访问结构针对于单个明文空间文本,即叶子节点。相当于在确定出第二节点之后,判断第二节点是否授权于用户端,即各第二节点对不同用户端进行了授权,以增加验证方法的灵活性和明文空间文本的安全性。
例如,数据拥有者针对第二节点A仅对用户端A进行了授权,数据拥有者针对第二节点B仅对用户端B进行了授权,若在用户端B发起的查询请求时,查询的第二节点包括第二节点A,但在将第二节点A作为用户端B发起的查询请求对应的查询结果之前,确定数据拥有者针对第二节点A未对用户端B进行授权,则第二节点A不可作为查询结果。
在本发明实施例中,查询结果包括第二节点的空间文本密文和中间量,其中密钥密文和空间文本密文是云服务器查询的,中间量是边缘服务器计算的。
具体的,云服务器将第二节点对应的空间文本编号发送至边缘服务器,以指示边缘服务器根据空间文本编号查询出空间文本编号对应的密钥密文和空间文本密文,并根据空间文本编号对应的密钥密文确定空间文本编号对应空间文本密文的中间量,云服务器将第二节点的空间文本密文和中间量作为查询结果。
为了更好的解释上述技术方案中第一查询密文的由来,以及查询结果的用法,图4示例性的示出了一种用户端针对空间文本的查询方法的流程示意图,如图4所示,具体流程包括:
步骤410,用户端基于查询请求中的空间查询条件生成第一查询空间向量密文。
本发明实施例中,查询请求包括待查询的空间范围及关键字,例如空间范围是由两个位置点确定的矩形范围,两个位置点包括经纬度信息。
具体的,所述用户端生成第一随机向量和第二随机向量;
用户端根据第一比特向量中各比特位的元素值,按照第一方式对第一随机向量的前K位进行与第一位置点相关的赋值,再根据第二比特向量中各比特位的元素值,按照第二方式对第一随机向量的后L位进行与第一位置点相关的赋值,得到第一查询空间向量密文的第一子向量密文,其中,第一比特向量和第二比特向量是数据拥有者随机生成的。
然后根据第一比特向量中各比特位的元素值,按照第三方式对第二随机向量的前K位进行与所述第二位置点相关的赋值,再根据第二比特向量中各比特位的元素值,按照第四方式对第二随机向量的后L位进行与第二位置点相关的赋值,得到第一查询空间向量密文的第二子向量密文。
其中,第一方式和第二方式的区别在于比特位的元素值是否为预设值,若是则执行第一方式,否则执行第二方式。
举例来说,图5示例性的示出了一种待查询的空间范围的示意图,例如,在图5所示的空间范围中,位置点1(即第一位置点或第二位置点)和位置点2包括经、纬度值,其中,针对不同的位置点,使用不同的编码算法得到向量密文,例如针对左下角的位置点1使用第一编码算法,针对右上角的位置点2使用第二编码算法。
以位置点1的经度值或纬度值为例,第一编码算法为:生成预设维数(K+L)的随机向量,在第一比特向量中任意选取一个未选取过的第t
l1个元素值t
i1,在确定元素值t
i1为0时,将1(预设值)赋予在随机向量对应位置上,在确定元素值t
i1不为0时,将位置点1的经度值或纬度值g1赋予在随机向量对应位置上。例如随机向量是4维的随机向量{K1,K2,L1,L2},在t
l1=1,且t
i1=0时,随机向量变为{1,K2,L1,L2}。在t
l1=1,且t
i1≠0时,随机向量变为{g1,K2,L1,L2}。其中,t
l1的取值范围为{1,……,K+L/2}。
然后随机确定出(K+L/4)个随机数,其中,(K+L/4)个随机数的和大于0。然后在第二比特向量中任意选取一个未选取过的第t
l2个元素值t
i2,在确定元素值t
i2为0时,将第1个随机数yi
1的值赋予在随机向量对应位置上,在确定元素值t
i2不为0时,将第1个随机数与位置点1的经度值或纬度值g1的积赋予在随机向量对应位置上。其中,t
l2的取值范围为{1,……,K+L/2},t
l2在随机向量对应的位置为K+L/2+t
l2。例如,随机向量为{K1,K2,L1,L2},在t
l2=1,且t
i2=0时,随机向量变为{K1,K2,yi
1,L2}。在t
l2=1,且t
i2≠0时,随机向量变为{g1,K2,(yi
1×g1),L2}。以此类推,在选取一个未选取过的第t
l2+1个元素值t
i2+1,时根据第2个随机数进行赋值,以此得到具体的随机向量。
以位置点2的经度值或纬度值为例,第二编码算法为:随机确定出(K+L/4)个随机数,其中,(K+L/4)个随机数的和大于0。然后在第一比特向量中任意选取一个未选取过的第t
r1个元素值t
j1,在确定元素值t
j1为0时,将第1个随机数yi
2与位置点2的经度值或纬度值g2的积赋予在随机向量对应位置上,在确定元素值t
j1不为0时,将第1个随机数yi
2的相反数赋予在随机向量对应位置上。其中,t
r1的取值范围为{1,……,K+L/2}例如,随机向量为{K1,K2,L1,L2},在t
r1=1,且t
j1=0时,随机向量变为{(yi
2×g2),K2,L1,L2}。在t
r1=1,且t
j1≠0时,随机向量变为{-yi
2,K2,L1,L2}。
然后在第二比特向量中任意选取一个未选取过的第t
r2个元素值t
j2,在确定元素值t
j2为0时,将g2赋予在随机向量对应位置上,在确定元素值t
j2不为0时,将-1赋予在随机向量对应位置上。例如随机向量为{K1,K2,L1,L2},在t
r2=1,且t
j2=0时,随机向量变为{1,K2,g2,L2}。在t
r2=1,且t
i≠0时,随机向量变为{g1,K2,-1,L2}。其中,t
r2的取值范围为{1,……,K+L/2},t
r2在随机向量对应的位置为K+L/2+t
r2。
步骤420,所述用户端基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文。
本发明实施例中,第一查询混合向量密文中包括了查询请求的查询位置信息和文本信息,其中,文本信息为关键字信息,关键字可以为多个。例如查询川菜和火锅,其中川菜和火锅为两个关键字。
具体的,用户端生成第三随机向量和第四随机向量;
用户端根据第三比特向量中各比特位的元素值,基于空间查询条件为第三随机向量的前N1位和第四随机向量的前N1位进行赋值,然后根据随机选取的关键字是否位于文本查询条件中的查询关键字中,通过随机数为第三随机向量的后N2位和第四随机向量的后N2位进行赋值,其中,第三比特向量是数据拥有者随机生成的。
结合上述图5举例来说,将位置点1和位置点2的经度值作为两个随机数v1和v2。然后根据第三随机向量或第四随机向量的维数确定出多个随机数,如第三随机向量的维数为N1+N2,则生成N1/2个随机数,且保证N1/2个随机数的和大于或等于空间文本数据到矩形查询范围(位置点1和位置点2形成的矩形)的最小距离MD,以反映范围条件和相似度值。其中,第三随机向量的维数和第四随机向量的维数相同。
然后在第三比特向量s`中任意选取一个未选取过的第t
w1个元素值t
b1,在确定元素值t
b1为1时,将第1个随机数wb1赋予在第三随机向量对应位置上,将第1个随机数的相反数赋予在第四随机向量对应位置上。在确定元素值t
b1不为0时,第1个随机数wb1分别与-v1和v2相乘,将对应的积赋予在第三随机向量和第四随机向量对应位置上。
例如第三随机向量为{N1a,N1b,N2a,N2b},第四随机向量为{N1`a,N1`b,N2`a,N2`b},在t
w1=1,且t
b1=1时,第三随机向量变为{wb1,N1b,N2a,N2b},第四随机向量为{-wb1,N1`b,N2`a,N2`b}。在t
w1=1,且t
b1≠1时,第三随机向量变为{wb1×-v1,N1b,N2a,N2b},第四随机向量为{wb1×v2,N1`b,N2`a,N2`b}。其中,t
w1的取值范围为{1,……,N1}。
然后再从关键字中(针对密文索引树中的所有关键字)随机选取一个未选过的第t
w2个关键字t
b2,确定关键字t
b2是否存在于查询关键字中,若是,则随机选一个随机数sj1,将sj1赋予在第三随机向量对应位置上,将1与sj1的差值赋予在第四随机向量对应位置上。否则随机选一个随机数sj2,将sj2赋予在第三随机向量对应位置上,将0与sj2的差值赋予在第四随机向量对应位置上。
例如,在t
w2=1,且关键字t
b2存在于预设的查询关键字中时,第三随机向量为{N1a,N1b,sj1,N2b},第四随机向量为{N1`a,N1`b,1-sj1,N2`b}。在t
w2=1,且关键字t
b2不存在于预设的查询关键字中时,第三随机向量为{N1a,N1b,sj2,N2b},第四随机向量为{N1`a,N1`b,0-sj2,N2`b}。其中,t
w2的取值范围为{1,……,N2}。t
w2在随机向量对应的位置为N1+t
w2。
需要说明的是,在确定第一查询密文之前,用户端可以先将查询请求中空间查询条件的第一位置点和第二位置点的经、纬度增加,相当于在查询请求的空间范围基础上,扩大预设经、纬度,得到扩大后的空间范围。
步骤430,所述用户端将第一查询密文发送至云服务器;所述第一查询密文包括所述第一查询空间向量密文和所述第一查询混合向量密文。
本发明实施例中,用户端在根据查询请求得到第一查询空间向量密文和第一查询混合向量密文之后,根据第三方可信系统针对用户端生成的第一用户密钥对第一查询空间向量密文和第一查询混合向量密文进行加密,进而得到第一查询密文。
举例来说,可信第三方系统针对用户端生成了第一用户密钥K
EN,1,并发送给用户端,用户端在生成第一查询空间向量密文E`b={b`
l,1,b`
l,2,b`
r,1,b`
r,2}和第一查询混合向量密文E`q={q`
l,1,q`
l,2,q`
r,1,q`
r,2}之后,使用第一用户密钥K
EN,1第一查询空间向量密文E`b和第一查询混合向量密文E`q进行加密,得到第一查询密文Eq={q
l,1,q
l,2,q
r,1,q
r,2,b
l,1,b
l,2,b
r,1,b
r,2}。
需要说明的是,可信第三方系统是针对用户端生成的第一用户密钥,相当于各用户端的第一用户密钥是不同的。
步骤440,所述用户端基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本。
本发明实施例中,云服务器的查询结果包括空间文本密文和中间量,用户端根据查询结果得到空间文本密文对应的明文。
具体的,用户端接收边缘服务器发送的空间文本密文和中间量,再根据自身的用户私钥对中间量进行解密,确定出空间文本密文的对称密钥,最后根据对称密钥对空间文本密文进行解密,得到查询请求对应的明文空间文本。因为在现有技术中,是用户端根据用户 私钥直接对密文密钥进行解密得到对称密钥的,导致用户端的计算量较大,过多的消耗计算资源,通过引入边缘服务器,由边缘服务器在保证安全性的基础上,将确定对称密钥的过程分为两步,第一步是边缘服务器根据密钥密文和边缘私钥确定中间量,第二步是用户端根据中间量和用户私钥确定对称密钥,因为其中一步是边缘服务器计算的,以此减少用户端的计算量,降低用户端的计算资源,使用户端实现轻量级的查询。
其中,中间量是边缘服务器根据边缘私钥得到的,用户私钥和边缘私钥是可信第三方系统生成的,例如,可信第三方系统生成公共参数pp=(G,G
T,e,p,g,g
0,g
1,g
2,e(g,g)
α,g
β,g
γ)和主秘钥msk=(α,β,γ),其中G是p阶加法循环群,g,g
0,g
1,g
2是G的生成元,G
T是p阶乘法循环群,e是双线性映射G×G→G
T,α表示第一随机数:α∈Z
p,β表示第二随机数:β∈Z
p,γ表示第三随机数:γ∈Z
p,Z
p表示p阶整数域,p表示一个大素数。
然后在Z
p上随机构造一个Shamir(t,n)-门限秘密共享实例f,并保存f(0)和t-1个f上的点{(a
1,z
1),……,(a
t-1,z
t-1)},其中,a
1,……,a
t-1∈Z
p。再利用概率加密算法,对新加入的用户端的唯一标识信息id
EN进行加密,得到密文a,将密文a带入f,得到相应的函数值z=f(a)。其中,概率加密算法随机性加密算法的使用,当加密相同的信息几次后,会产生不同的密文。
再利用概率加密算法加密a||z,得到密文c∈Z
p,其中,“||”表示连接符号,最后根据新加入的用户端的属性集,生成用户私钥sk
EN=g
(α+(γ+c)r)/β和边缘私钥sk
FN=(K`,L,L`,{K
j,1,,K
j,2}
j∈[1,K]),并将用户私钥sk
EN发送给用户端,将边缘私钥sk
FN发送给用户端所接入的边缘服务器,其中,K`表示第一边缘私钥分量:K`=c,L表示第二边缘私钥分量,L=g
r,L`表示第三边缘私钥分量,L`=g
γr,K
j,1,表示第四边缘私钥分量,K
j,1,=g
rj,K
j,2表示第五边缘私钥分量,
在目前的方法中,加密明文空间文本得到空间文本密文以及用于解密空间文本密文的密钥对应的密钥密文均是由数据拥有者计算的,无疑造成了数据拥有者的资源开销大的问题。
而在本发明中,对于密钥密文由数据拥有者和边缘服务器共同完成,以实现数据拥有者轻量级的计算,减少数据拥有者的资源消耗。
进一步地,数据拥有者针对明文空间文本生成对称密钥,并根据所述对称密钥对所述明文空间文本进行加密,得到空间文本密文。
例如,明文空间文本{如,包括某餐厅的文本信息和空间信息,即关键字(菜系类型,餐厅主题等)和空间位置(经纬度)}的数量为m个,则数据拥有者生成m个对称密钥sk
t,利用sk
t对明文空间文本集(包括所有明文空间文本)O
t进行加密,得到空间文本密文集c
t,其中t的取值范围是{1,……,m}。
数据拥有者针对各明文空间文本建立访问结构,来确定每个明文空间文本(即密文索引树中的叶子节点)的已授权用户。
在一种可实施的方式中,数据拥有者将访问结构发送至云服务器,以使云服务器针对用户端查询到的第二节点时,由云服务来确定第二节点是否授权于用户端。
在另一种可实施的方式中,数据拥有者将访问结构发送至边缘服务器,以使云服务器针对用户端查询到的第二节点时,指示边缘服务器根据访问结构确定第二节点是否授权于用户端。以减少云服务器的计算量,降低云服务器的资源消耗。
边缘服务器针对数据拥有者的对称密钥根据预设算法,对数据拥有者的对称密钥进行加密,得到临时密钥密文,并将临时密钥密文发送至数据拥有者,其中预设算法可以为随机算法等,在此不做限定。
数据拥有者在得到临时密钥密文后,选取随机数,对临时密钥密文进行加密,得到用于解密空间文本密文的密钥对应的密钥密文。因为在此过程中,引入边缘服务器辅助计算,以此实现了数据拥有者轻量级的计算,降低了数据拥有者的资源消耗。
在本发明实施例中,密文索引树可以为四叉树、R树等结构,在此不做限定。
结合以上描述,以密文索引树为R树举例,数据拥有者将明文空间文本O
t作为叶子节点,即每个明文空间文本均为一个叶子节点,针对每个叶子节点,数据拥有者建立叶子节点的混合向量密文。其中,叶子节点的混合向量密文包括空间信息和文本信息,空间信息包括叶子节点的位置信息,如经、纬度信息,文本信息包括叶子节点的各关键字,如该叶子节点为“东北餐馆”以及“情侣主题餐馆”。
在构建叶子节点的混合向量密文之前,数据拥有者根据所有的明文空间文本预设关键字,其中,关键字的数量为N2个。
数据拥有者随机生成第三比特向量以及N1+N2维数的第五随机向量和第六随机向量;再根据第三比特向量中各比特位的元素值,基于预设条件为第五随机向量的前N1位和第六随机向量的前N1位进行赋值。
再根据随机选取的关键字是否位于叶子节点中的关键字中,通过随机数为第五随机向量的后N2位和第六随机向量的后N2位进行赋值。
举例来说,生成第三比特向量s`和第五随机向量{Na1,Nb1,Na2,Nb2},第六随机向量{N`a1,N`b1,N`a2,N`b2}。
针对任一叶子节点,在第三比特向量s`中任意选取一个未选取过的第t
y1个元素值t
z1,在确定元素值t
z1为0时(预设条件),将1赋予在第五随机向量和第六随机向量对应的位置上。在确定元素值t
z1不为0时,将叶子节点的经度值xi赋予在第五随机向量对应位置上,将叶子节点的纬度值yi赋予在第六随机向量对应位置上。
例如,在t
y1=1,且t
z1=0时,第五随机向量为{1,Nb1,Na2,Nb2},第六随机向量为{1,N`b1,N`a2,N`b2}。在t
y1=1,且t
z1≠0时,第五随机向量{xi,Nb1,Na2,Nb2},第六随机向量{yi,N`b1,N`a2,N`b2}。其中,t
z1的取值范围为{1,……,N1}。
然后再从关键字中(R树中的所有预设关键字)随机选取一个未选过的第t
y2个关键字t
z2,确定关键字t
z2是否存在于叶子节点的关键字(如该叶子节点的关键字包括川菜和火锅)中,若是,则随机选一个随机数sy1,将sy1赋予在第五随机向量对应位置上,将1与sy1的差值赋予在第六随机向量对应位置上。否则随机选一个随机数sy2,将sy2赋予在第五随机向量对应位置上,将0与sy2的差值赋予在第二随机向量对应位置上。
例如,在t
y2=1,且关键字t
z2存在于该叶子节点的关键字中时(如选取的关键字为“火锅”),第五随机向量{Na1,Nb1,sy1,Nb2},第六随机向量{N`a1,N`b1,1-sy1,N`b2}。在t
y2=1,且关键字t
z2不存在于该叶子节点的关键字中时,第五随机向量{Na1,Nb1,sy0,Nb2},第六随机向量{N`a1,N`b1,0-sy2,N`b2}。其中,t
y2的取值范围为{1,……,N2}。t
y2在随机向量对应的位置为N1+t
y2。
数据拥有者针对R树中的任一非叶子节点,根据上述第一编码算法和第二编码算法,确定出非叶子节点的空间向量密文,具体算法这里不作赘述。
根据上述确定出的数据,数据拥有者接收可信第三方系统发送的拥有者密钥,根据拥有者密钥对R树(包括叶子节点混合向量密文和非叶子节点的空间向量密文)进行加密,得到初始密文索引树。
然后将初始密文索引树、密钥密文和空间文本密文发送至云服务器,以使云服务器对初始密文索引树进行重加密,得到最终的密文索引树,进而查询出符合查询请求的第二节点。
为了更好的阐述上述技术方案,图6示例性的示出了一种空间文本的查询方法的示意图,如图6所示,可信第三方系统针对数据拥有者生成第一拥有者密钥和第二拥有者密钥,针对用户端生成用户私钥、边缘私钥、第一用户密钥和第二用户密钥。
数据拥有者根据对称密钥,对各明文空间文本进行初始加密,得到各空间文本密文,进而得到空间文本密文集。针对各明文空间文本建立访问结构,并将访问结构和空间文本密文集发送至边缘服务器1。
边缘服务器1根据共享秘密算法对上述访问结构进行加密,进而相当于对称密钥进行加密,得到各明文空间文本的临时密钥密文,并返回给数据拥有者。
数据拥有者在得到各临时密钥密文之后,选取随机数,对临时密钥密文进行加密,得到各密钥密文,进而得到密钥密文集。
数据拥有者根据各明文空间文本构建明文索引树,然后再根据第一拥有者密钥对明文索引树进行初始加密,得到初始密文索引树,然后将空间文本密文集、密钥密文集和初始密文索引树发送至云服务器。
云服务器在接收到数据拥有者发送的空间文本密文集、密钥密文集和初始密文索引树之后,根据第二拥有者密钥对初始密文索引树进行重加密,得到最终的密文索引树,并将空间文本密文集、密钥密文集发送至与用户端相交互的边缘服务器2。
用户端发起查询请求,根据第一用户密钥对查询请求进行加密,得到查询请求的第一查询空间向量密文和第一查询混合向量密文,并发送至云服务器。
云服务器在得到查询请求的第一查询空间向量密文和第一查询混合向量密文之后,根据第二用户密钥对其进行加密,得到查询请求的第二查询空间向量密文和第二查询混合向量密文。
云服务器根据查询请求的第二查询空间向量密文在密文索引树中确定出与之相交的第一节点,根据查询请求的第二查询混合向量密文确定出在查询请求的空间范围内且用户端为授权用户的第二节点,并将第二节点对应的空间文本密文的空间文本编号发送至边缘服务器2。
边缘服务器2根据空间文本编号查询出第二节点对应的密钥密文和空间文本密文,再根据边缘私钥和第二节点对应的密钥密文确定出中间量,最后将中间量和第二节点对应的空间文本密文发送至用户端。
用户端根据用户私钥对中间量进行解密,得到对称密钥,再根据对称密钥对空间文本密文进行解密,得到明文空间文本。
本发明实施例中,根据第一查询空间信息密文可以在密文索引树中确定出在查询位置内的所有第二节点,再根据第一查询混合向量密文在第二节点中确定出查询范围内第一节点,并确定出第一查询混合向量密文与各第一节点的相关度,进而确定出查询结果,避免了查询结果受权重的影响,提升了空间文本查询的准确度,边缘服务器1辅助计算出临时密钥密文,以实现数据拥有者轻量级的计算,降低了数据拥有者的资源消耗。边缘服务器2辅助计算出中间量,以实现用户端轻量级的计算,降低了用户端的资源消耗。
基于相同的技术构思,图7示例性的示出了本发明实施例提供的一种空间文本的查询装置的结构示意图,该装置可以执行空间文本的查询方法的流程。
如图7所示,该装置具体包括:
获取模块710,用于获取用户端发送的第一查询密文;所述第一查询密文包括第一查询空间向量密文和第一查询混合向量密文;所述第一查询空间向量密文是根据查询请求中的空间查询条件生成的;所述第一查询混合向量密文是根据所述查询请求中的文本查询条件和所述空间查询条件生成的;
处理模块720,用于根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;所述密文索引树是数据拥有者根据各明文空间文本构建的;所述密文索引树中的非叶子节点存储有基于明文空间文本中的空间信息生成的空间向量密文,叶子节点存储有基于明文空间文本中的空间信息和文本信息生成的混合向量密文;所述第一节点为非叶子节点;
根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定 符合所述文本查询条件的第二节点;所述第二节点为叶子节点;所述第二节点用于作为查询结果。
可选的,所述处理模块720具体用于:
根据预设检索顺序,针对所述密文索引树中的任一节点,在确定所述节点为非叶子节点时,根据所述第一查询空间向量密文和所述节点的空间向量密文确定与所述第一查询空间向量密文相交的所述第一节点。
可选的,所述处理模块720具体用于:
根据所述第一查询空间向量密文和所述节点的空间向量密文确定多个第一内积值;
在确定所述多个第一内积值均大于空间阈值时,根据所述节点的各第一孩子节点的空间向量密文和所述第一查询空间向量密文,在所述各第一孩子节点中确定出与所述第一查询空间向量密文在空间位置上相交的第二孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点;所述第一节点为叶子节点的父节点;
在确定所述多个第一内积值未均大于空间阈值时,确定所述节点的父节点下与所述第一查询空间向量密文在空间位置上相交的其他孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点。
可选的,所述处理模块720具体用于:
针对所述第一节点下的任一叶子节点,根据所述第一查询混合向量密文和所述叶子节点的混合向量密文确定多个第二内积值;
在确定所述多个第二内积值均大于空间阈值,且所述多个第二内积值的和大于相似度阈值时,将所述叶子节点确定为所述第二节点。
可选的,所述第一查询密文是所述用户端基于第一用户密钥加密的;
所述处理模块720还用于:
根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点之前,根据所述用户端的第二用户密钥,对所述第一查询密文进行加密,确定所述第二查询密文;所述第二查询密文包括第二查询空间向量密文和第二查询混合向量密文;
所述处理模块720具体用于:
根据所述第二查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;
根据所述第二查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点。
可选的,所述处理模块720具体用于:
将所述第二节点对应的空间文本编号发送至边缘服务器,以指示所述边缘服务器根据所述空间文本编号查询出所述空间文本编号对应的密钥密文和空间文本密文,并根据所述空间文本编号对应的密钥密文确定所述空间文本编号对应空间文本密文的中间量;
将所述第二节点的空间文本密文和中间量作为所述查询结果。
基于相同的技术构思,图8示例性的示出了本发明实施例提供的一种空间文本的查询装置的结构示意图,该装置可以执行空间文本的查询方法的流程。
如图8所示,该装置具体包括:
生成单元810,用于基于查询请求中的空间查询条件生成第一查询空间向量密文;
基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文;
发送单元820,用于将第一查询密文发送至云服务器;所述第一查询密文包括所述第一查询空间向量密文和所述第一查询混合向量密文;
解密单元830,用于基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本。
可选的,所述空间查询条件包括指示空间范围的第一位置点和第二位置点;
所述生成单元810具体用于:
生成第一随机向量和第二随机向量;
根据第一比特向量中各比特位的元素值,按照第一方式对所述第一随机向量的前K位进行与所述第一位置点相关的赋值;根据第二比特向量中各比特位的元素值,按照第二方式对所述第一随机向量的后L位进行与第一位置点相关的赋值,得到所述第一查询空间向量密文的第一子向量密文;所述第一比特向量和所述第二比特向量是数据拥有者随机生成的;
根据所述第一比特向量中各比特位的元素值,按照第三方式对所述第二随机向量的前K位进行与所述第二位置点相关的赋值;根据所述第二比特向量中各比特位的元素值,按照第四方式对所述第二随机向量的后L位进行与所述第二位置点相关的赋值,得到所述第一查询空间向量密文的第二子向量密文。
可选的,所述生成单元810具体用于:
生成第三随机向量和第四随机向量;
根据第三比特向量中各比特位的元素值,基于所述空间查询条件为所述第三随机向量的前N1位和所述第四随机向量的前N1位进行赋值;所述第三比特向量是数据拥有者随机生成的;
根据随机选取的关键字是否位于所述文本查询条件中的查询关键字中,通过随机数为所述第三随机向量的后N2位和所述第四随机向量的后N2位进行赋值。
可选的,所述解密单元830具体用于:
接收边缘服务器发送的空间文本密文和中间量;所述空间文本密文和中间量是边缘服务器根据所述云服务器发送的空间文本编号确定的;
根据对所述中间量进行解密,确定所述空间文本密文的对称密钥;
根据所述空间文本密文的对称密钥对所述空间文本密文进行解密,得到所述查询请求对应的明文空间文本。
基于相同的技术构思,本发明实施例还提供一种计算机设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述空间文本的查询方法。
基于相同的技术构思,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行上述空间文本的查询方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (14)
- 一种空间文本的查询方法,其特征在于,包括:云服务器获取用户端发送的第一查询密文;所述第一查询密文包括第一查询空间向量密文和第一查询混合向量密文;所述第一查询空间向量密文是根据查询请求中的空间查询条件生成的;所述第一查询混合向量密文是根据所述查询请求中的文本查询条件和所述空间查询条件生成的;所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;所述密文索引树是数据拥有者根据各明文空间文本构建的;所述密文索引树中的非叶子节点存储有基于明文空间文本中的空间信息生成的空间向量密文,叶子节点存储有基于明文空间文本中的空间信息和文本信息生成的混合向量密文;所述第一节点为非叶子节点;所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点;所述第二节点为叶子节点;所述第二节点用于作为查询结果。
- 如权利要求1所述的方法,其特征在于,所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:所述云服务器根据预设检索顺序,针对所述密文索引树中的任一节点,在确定所述节点为非叶子节点时,根据所述第一查询空间向量密文和所述节点的空间向量密文确定与所述第一查询空间向量密文相交的所述第一节点。
- 如权利要求2所述的方法,其特征在于,根据所述第一查询空间向量密文和所述节点的空间向量密文确定与所述第一查询空间向量密文相交的所述第一节点,包括:所述云服务器根据所述第一查询空间向量密文和所述节点的空间向量密文确定多个第一内积值;所述云服务器在确定所述多个第一内积值均大于空间阈值时,根据所述节点的各第一孩子节点的空间向量密文和所述第一查询空间向量密文,在所述各第一孩子节点中确定出与所述第一查询空间向量密文在空间位置上相交的第二孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点;所述第一节点为叶子节点的父节点;所述云服务器在确定所述多个第一内积值未均大于空间阈值时,确定所述节点的父节点下与所述第一查询空间向量密文在空间位置上相交的其他孩子节点,直至确定出与所述第一查询空间向量密文相交的所述第一节点。
- 如权利要求1所述的方法,其特征在于,所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:针对所述第一节点下的任一叶子节点,所述云服务器根据所述第一查询混合向量密文和所述叶子节点的混合向量密文确定多个第二内积值;所述云服务器在确定所述多个第二内积值均大于空间阈值,且所述多个第二内积值的和大于相似度阈值时,将所述叶子节点确定为所述第二节点。
- 如权利要求1至4任一项所述的方法,其特征在于,所述第一查询密文是所述用户端基于第一用户密钥加密的;所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点之前,还包括:所述云服务器根据所述用户端的第二用户密钥,对所述第一查询密文进行加密,确定所述第二查询密文;所述第二查询密文包括第二查询空间向量密文和第二查询混合向量密文;所述云服务器根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点,包括:所述云服务器根据所述第二查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;所述云服务器根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点,包括:所述云服务器根据所述第二查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点。
- 如权利要求1所述的方法,其特征在于,所述第二节点用于作为查询结果,包括:所述云服务器将所述第二节点对应的空间文本编号发送至边缘服务器,以指示所述边缘服务器根据所述空间文本编号查询出所述空间文本编号对应的密钥密文和空间文本密文,并根据所述空间文本编号对应的密钥密文确定所述空间文本编号对应空间文本密文的中间量;所述云服务器将所述第二节点的空间文本密文和中间量作为所述查询结果。
- 一种空间文本的查询方法,其特征在于,包括:用户端基于查询请求中的空间查询条件生成第一查询空间向量密文;所述用户端基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文;所述用户端将第一查询密文发送至云服务器;所述第一查询密文包括所述第一查询空间向量密文和所述第一查询混合向量密文;所述用户端基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本。
- 如权利要求7所述的方法,其特征在于,所述空间查询条件包括指示空间范围的第一位置点和第二位置点;用户端基于查询请求中的空间查询条件生成第一查询空间向量密文,包括:所述用户端生成第一随机向量和第二随机向量;所述用户端根据第一比特向量中各比特位的元素值,按照第一方式对所述第一随机向量的前K位进行与所述第一位置点相关的赋值;根据第二比特向量中各比特位的元素值,按照第二方式对所述第一随机向量的后L位进行与第一位置点相关的赋值,得到所述第一查询空间向量密文的第一子向量密文;所述第一比特向量和所述第二比特向量是数据拥有者随机生成的;所述用户端根据所述第一比特向量中各比特位的元素值,按照第三方式对所述第二随机向量的前K位进行与所述第二位置点相关的赋值;根据所述第二比特向量中各比特位的元素值,按照第四方式对所述第二随机向量的后L位进行与所述第二位置点相关的赋值,得到所述第一查询空间向量密文的第二子向量密文。
- 如权利要求7所述的方法,其特征在于,所述用户端基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文,包括:所述用户端生成第三随机向量和第四随机向量;所述用户端根据第三比特向量中各比特位的元素值,基于所述空间查询条件为所述第三随机向量的前N1位和所述第四随机向量的前N1位进行赋值;所述第三比特向量是数据拥有者随机生成的;所述用户端根据随机选取的关键字是否位于所述文本查询条件中的查询关键字中,通过随机数为所述第三随机向量的后N2位和所述第四随机向量的后N2位进行赋值。
- 如权利要求7所述的方法,其特征在于,所述用户端基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本,包括:所述用户端接收边缘服务器发送的空间文本密文和中间量;所述空间文本密文和中间量是边缘服务器根据所述云服务器发送的空间文本编号确定的;所述用户端根据对所述中间量进行解密,确定所述空间文本密文的对称密钥;所述用户端根据所述空间文本密文的对称密钥对所述空间文本密文进行解密,得到所述查询请求对应的明文空间文本。
- 一种空间文本的查询装置,其特征在于,包括:获取模块,用于获取用户端发送的第一查询密文;所述第一查询密文包括第一查询空间向量密文和第一查询混合向量密文;所述第一查询空间向量密文是根据查询请求中的空间查询条件生成的;所述第一查询混合向量密文是根据所述查询请求中的文本查询条件和所述空间查询条件生成的;处理模块,用于根据所述第一查询空间向量密文在密文索引树中检索出符合所述空间查询条件的第一节点;所述密文索引树是数据拥有者根据各明文空间文本构建的;所述密文索引树中的非叶子节点存储有基于明文空间文本中的空间信息生成的空间向量密文,叶子节点存储有基于明文空间文本中的空间信息和文本信息生成的混合向量密文;所述第一节点为非叶子节点;根据所述第一查询混合向量密文和所述第一节点下的叶子节点的混合向量密文,确定符合所述文本查询条件的第二节点;所述第二节点为叶子节点;所述第二节点用于作为查询结果。
- 一种空间文本的查询装置,其特征在于,包括:生成单元,用于基于查询请求中的空间查询条件生成第一查询空间向量密文;基于所述查询请求中的文本查询条件和所述空间查询条件生成第一查询混合向量密文;发送单元,用于将第一查询密文发送至云服务器;所述第一查询密文包括所述第一查询空间向量密文和所述第一查询混合向量密文;解密单元,用于基于所述云服务器的查询结果,确定所述查询请求对应的明文空间文本。
- 一种计算机设备,其特征在于,包括:存储器,用于存储程序指令;处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求1至6或7至10任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行权利要求1至6或7至10任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110384135.2A CN113158087B (zh) | 2021-04-09 | 2021-04-09 | 一种空间文本的查询方法及装置 |
CN202110384135.2 | 2021-04-09 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022213577A1 true WO2022213577A1 (zh) | 2022-10-13 |
Family
ID=76889799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/124888 WO2022213577A1 (zh) | 2021-04-09 | 2021-10-20 | 一种空间文本的查询方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113158087B (zh) |
WO (1) | WO2022213577A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113158087B (zh) * | 2021-04-09 | 2024-07-09 | 深圳前海微众银行股份有限公司 | 一种空间文本的查询方法及装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105404675A (zh) * | 2015-11-20 | 2016-03-16 | 苏州大学 | Ranked反近邻空间关键字查询方法及装置 |
US20170124348A1 (en) * | 2014-06-26 | 2017-05-04 | Telefonaktiebolaget Lm Ericsson (Publ) | Privacy-preserving querying mechanism on privately encrypted data on semi-trusted cloud |
CN108549690A (zh) * | 2018-04-12 | 2018-09-18 | 石家庄铁道大学 | 基于空间距离约束的空间关键字查询方法及系统 |
CN112115227A (zh) * | 2020-08-14 | 2020-12-22 | 咪咕文化科技有限公司 | 数据的查询方法、装置、电子设备及存储介质 |
CN113158087A (zh) * | 2021-04-09 | 2021-07-23 | 深圳前海微众银行股份有限公司 | 一种空间文本的查询方法及装置 |
Family Cites Families (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1998054658A1 (fr) * | 1997-05-30 | 1998-12-03 | Hitachi, Ltd. | Systeme de recherche d'informations spatiales |
JP5237837B2 (ja) * | 2009-01-07 | 2013-07-17 | 株式会社日立製作所 | 空間データ管理装置、空間データ管理方法、および、空間データ管理プログラム |
CN104376112B (zh) * | 2014-11-27 | 2018-09-14 | 苏州大学 | 一种路网上空间关键字检索的方法 |
CN104731860B (zh) * | 2015-02-04 | 2017-11-14 | 北京邮电大学 | 隐私保护的空间关键字查询方法 |
CN106708833B (zh) * | 2015-08-03 | 2020-04-07 | 腾讯科技(深圳)有限公司 | 基于位置信息获取数据的方法和装置 |
CN105069094B (zh) * | 2015-08-06 | 2018-08-07 | 苏州大学 | 一种基于语义理解的空间关键字索引方法 |
WO2018122238A1 (en) * | 2016-12-30 | 2018-07-05 | Robert Bosch Gmbh | Method and system for fuzzy keyword search over encrypted data |
CN107294701B (zh) * | 2017-07-05 | 2021-05-18 | 西安电子科技大学 | 具有高效密钥管理的多维密文区间查询装置及查询方法 |
CN107622212A (zh) * | 2017-10-13 | 2018-01-23 | 上海海事大学 | 一种基于双陷门的混合密文检索方法 |
CN108197499B (zh) * | 2018-01-11 | 2020-08-07 | 暨南大学 | 一种可验证的密文数据范围查询方法 |
CN108304585B (zh) * | 2018-03-06 | 2022-05-17 | 苏州大学 | 一种基于空间关键字搜索的结果数据选取方法及相关装置 |
CN108776667B (zh) * | 2018-05-04 | 2022-10-21 | 昆明理工大学 | 一种基于geohash与B-Tree的空间关键词查询方法及装置 |
CN108985094B (zh) * | 2018-06-28 | 2020-07-21 | 电子科技大学 | 云环境下实现密文空间数据的访问控制和范围查询方法 |
US11184149B2 (en) * | 2019-02-19 | 2021-11-23 | International Business Machines Corporation | Computing range queries over encrypted data |
CN110134758A (zh) * | 2019-04-26 | 2019-08-16 | 中国地质大学(武汉) | 一种面向连续空间-模糊关键字查询的索引方法 |
CN110222012B (zh) * | 2019-06-08 | 2022-04-19 | 西安电子科技大学 | 单一用户环境下基于细粒度排序的数据密文查询方法 |
CN110362652B (zh) * | 2019-07-19 | 2022-11-22 | 辽宁工程技术大学 | 基于空间-语义-数值相关度的空间关键字Top-K查询方法 |
CN111212084B (zh) * | 2020-01-15 | 2021-04-23 | 广西师范大学 | 一种面向边缘计算的属性加密访问控制方法 |
CN111597582B (zh) * | 2020-05-18 | 2023-07-21 | 北京思特奇信息技术股份有限公司 | 一种构建加密倒序矩形树方法、一种空间关键词查询方法 |
CN112257455B (zh) * | 2020-10-21 | 2024-04-30 | 西安电子科技大学 | 一种语义理解的密文空间关键字检索方法及系统 |
-
2021
- 2021-04-09 CN CN202110384135.2A patent/CN113158087B/zh active Active
- 2021-10-20 WO PCT/CN2021/124888 patent/WO2022213577A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170124348A1 (en) * | 2014-06-26 | 2017-05-04 | Telefonaktiebolaget Lm Ericsson (Publ) | Privacy-preserving querying mechanism on privately encrypted data on semi-trusted cloud |
CN105404675A (zh) * | 2015-11-20 | 2016-03-16 | 苏州大学 | Ranked反近邻空间关键字查询方法及装置 |
CN108549690A (zh) * | 2018-04-12 | 2018-09-18 | 石家庄铁道大学 | 基于空间距离约束的空间关键字查询方法及系统 |
CN112115227A (zh) * | 2020-08-14 | 2020-12-22 | 咪咕文化科技有限公司 | 数据的查询方法、装置、电子设备及存储介质 |
CN113158087A (zh) * | 2021-04-09 | 2021-07-23 | 深圳前海微众银行股份有限公司 | 一种空间文本的查询方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN113158087B (zh) | 2024-07-09 |
CN113158087A (zh) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Luo et al. | pRide: Privacy-preserving ride matching over road networks for online ride-hailing service | |
US11637689B2 (en) | Efficient encrypted data management system and method | |
CN108494768B (zh) | 一种支持访问控制的密文搜索方法及系统 | |
CN109361644B (zh) | 一种支持快速搜索和解密的模糊属性基加密方法 | |
US11310045B2 (en) | Compression and oblivious expansion of RLWE ciphertexts | |
US20170262546A1 (en) | Key search token for encrypted data | |
CN114142996B (zh) | 一种基于sm9密码算法的可搜索加密方法 | |
US12074966B2 (en) | Encrypted information retrieval | |
WO2022266071A1 (en) | Encrypted information retrieval | |
CN111556048B (zh) | 一种支持密文模式匹配的属性基安全通信方法及系统 | |
Ou et al. | An Efficient and Privacy‐Preserving Multiuser Cloud‐Based LBS Query Scheme | |
Meng et al. | Verifiable spatial range query over encrypted cloud data in VANET | |
Chamili et al. | Searchable encryption: a review | |
WO2022213577A1 (zh) | 一种空间文本的查询方法及装置 | |
CN117786752A (zh) | 一种对称可搜索加密方法、装置、设备及介质 | |
Yang et al. | Privacy‐Preserving Query Scheme (PPQS) for Location‐Based Services in Outsourced Cloud | |
CN112115506B (zh) | 一种支持布尔查询的属性基数据搜索方法及系统 | |
Hou et al. | Public-key searchable encryption from lattices | |
Ge et al. | A Source Hiding Identity‐Based Proxy Reencryption Scheme for Wireless Sensor Network | |
US20230318809A1 (en) | Multi-key information retrieval | |
US20240372709A1 (en) | Encrypted information retrieval | |
Ananthi et al. | Secured Multikeyword Search over Encrypted Cloud Data Based On Quality and Usability | |
Wang et al. | A Secure Searchable Image Retrieval Scheme with Correct Retrieval Identity | |
Prasad et al. | Retrieving documents from encrypted cloud data in a secured way using cosine similarity search with multiple keyword search support | |
Zheng et al. | Using GSW FHE to provide stronger privacy protection for searchable encryption |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21935795 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 230124) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21935795 Country of ref document: EP Kind code of ref document: A1 |