Label limited shortest distance query system and method supporting privacy protection in cloud environment
By designing modules for key generation, secure index generation, query trapdoor generation, privacy query, and result decryption in a cloud environment, the problem of privacy protection for graph data in the cloud environment is solved, achieving efficient and comprehensive privacy protection and shortest path query.
Patent Information
- Application Number
- CN202511555337.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies cannot guarantee the privacy and security of graph data in the cloud environment while achieving efficient computing, especially sensitive information such as edge labels, resulting in a high risk of privacy leakage.
The system employs a key generation module, a secure index generation module, a query trapdoor generation module, a privacy query module, and a result decryption module. It uses cryptographic techniques to encrypt and decrypt the edge label graph and designs a secure index and multi-level verification functions to ensure the privacy of the query process.
It enables efficient retrieval of the shortest path length that satisfies tag constraints in a cloud environment, while protecting the privacy of the original graph data, query user requests, and results in all aspects. It is suitable for practical scenarios such as social network analysis and path planning.
Smart Images

Figure CN121598418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a system and method for querying privacy-protected tags with limited shortest distance in a cloud environment. Background Technology
[0002] With the rapid development of cloud computing technology, data outsourcing services have become a core model for enterprises and individuals to store and process large-scale data. Users host their data in the cloud, utilizing the high-efficiency computing power of cloud servers to complete complex computational tasks, significantly reducing local resource overhead. However, once data is no longer under the user's local control, the risk of privacy breaches increases dramatically, especially for graph data containing sensitive information (such as social network relationships, traffic route planning, biomedical networks, etc.). How to protect data privacy while efficiently processing query requests in the cloud has become a key issue of common concern to both academia and industry.
[0003] Graph data, due to its inherent ability to express complex relationships between entities, is widely used in scenarios such as path navigation, social recommendation, and supply chain optimization. Among these, edge-labeled graphs, by attaching semantic labels to edges, can effectively model multi-dimensional attribute information related to edges in complex networks. For example, in social networks, edge labels can represent the dynamic relationship type between users (such as "friends," "relatives," or "colleagues"), and in transportation networks, they can identify the functional attributes of road segments (such as "highway" or "pedestrian path"). In biomedical networks, edge labels can describe the interaction type between genes or proteins (such as "activation" or "inhibition"). Based on this structure, label-restricted shortest distance queries allow users to retrieve the shortest path length that satisfies specific semantic constraints. For example, in road network scenarios, users can specify necessary nodes (such as gas stations or supermarkets) as path constraints to retrieve the shortest path distance between two target nodes that satisfy such constraints. In communication networks, users can filter optimal paths that meet specific security levels (such as "encrypted links"). With the continuous expansion of real-world network data, the demand for such queries is increasing in privacy-sensitive scenarios such as anonymous social analysis, communication planning, and medical knowledge graph reasoning. However, current technologies cannot guarantee data privacy and security while achieving efficient computation. Current solutions for graph data privacy protection mostly focus on unlabeled graphs, often neglecting the sensitivity of edge labels. For example, in medical collaboration networks, edge labels may implicitly contain private information about disease transmission paths; in social networks, label constraints directly expose user query intentions. Attackers can analyze label distribution or query patterns to infer user identities, key node attributes, and even global semantic features of the network, leading to serious privacy risks. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a system and method for querying the shortest distance with privacy-protected labels in a cloud environment, so as to ensure that the cloud server can still efficiently retrieve and return the shortest path length that satisfies the label constraints even when the original graph data, user query constraints and final calculation results are completely invisible.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a cloud-based system supporting privacy-protected label-constrained shortest distance query, comprising a key generation module, a secure index generation module, a query trapdoor generation module, a privacy query module, and a result decryption module; the key generation module is invoked by the data owner to generate a system key based on security parameters; the secure index generation module is invoked by the data owner to transform the original edge-label graph into a label-constrained index and encrypt it using cryptographic techniques to generate a secure index; the query trapdoor generation module is invoked by the query user to encode the query node and label constraints into a query token using encryption; the privacy query module is invoked by the cloud server to perform a secure and efficient privacy-protected label-constrained shortest distance query based on the secure index and the query trapdoor; the result decryption module is invoked by the query user to decrypt the returned encrypted result using their own key to obtain the shortest path distance between two nodes that satisfies the label constraints.
[0006] In a preferred embodiment, given a security parameter 𝜆, the key generation module outputs a key set K={K1,K2,K3,(PP,SK)}, where each component is defined as follows: K1 is the seed key of the pseudo-random function PRF; K2 is the encryption key of the deterministic encryption algorithm DET; K3 is the permutation key of the pseudo-random permutation function PRP; and (PP, SK) is the public and private key pair of the symmetric homomorphic encryption SHE.
[0007] In a preferred embodiment, the secure index generation module is given an undirected edge-labeled graph G=(V,E,W), where V, E, and W represent the set of nodes, the set of edges, and the set of labels, respectively. The secure index generation module first constructs a label-constrained two-hop index LC: after initializing an empty label-constrained two-hop LC index, it sequentially performs a pruned breadth-first search with each node v in G as the root node. In each round of the search, if a new label path exists from the root node to the currently visited node u, a triple (v,L,d) is generated and added to LC[u], where v represents the root node, u represents the currently visited node, L represents the set of labels on the shortest path from v to u, and d represents the path distance value. Given a label constraint two-hop index LC, the module first constructs a label-constrained two-hop index LC. After initializing an empty label-constrained two-hop LC index, it sequentially performs a pruned breadth-first search with each node v in G as the root node. In each round of the search, if a new label path exists from the root node to the currently visited node u, a triple (v,L,d) is generated and added to LC[u], where v represents the root node, u represents the currently visited node, L represents the set of labels on the shortest path from v to u, and d represents the path distance value. For a query with a constraint (u, v, L), first locate the triples with the same node in LC[u] and LC[v], merge their corresponding label sets, and determine whether the merged set is a subset of the query label constraint L. This determines whether there exists a path between u and v that satisfies the label constraint. If so, add the distance values in the two triples to obtain the shortest distance for the path that satisfies the label constraint. Given a label constraint query (v2, v3, L = ah), according to the LC index of G, LC[v2] and LC[v3] have the following pairs of triples with the same node: {(v0, a, 1)(v0, h, 1)}. The paths {(v0,a,1)(v0,ah,2)}, {(v0,h,2)(v0,h,1)}, {(v0,h,2)(v0,ah,2)}, and {(v1,h,1)(v1,a,1)} are combined with their labels and distances to obtain {v0,ah,2}, {v0,ah,3}, {v0, h,3}, {v0, ah,4}, and {v1, ah,2}. Therefore, given the query label constraint L=ah, the paths corresponding to these five items all satisfy the label constraint, that is, the union of the labels is a subset of L, where the shortest distance is 2. If the query label constraint is a, then there is no path between v2 and v3 that satisfies this constraint.
[0008] Given a label constraint index LC and a key set K, the secure index generation module generates a secure index I: For each node v, the pseudo-random function PRF is first used to hide the node's real symbol v' under key K1; for each triple (u,L,d) in LC[v], the deterministic encryption algorithm DET is used to hide node u under key K2. The deterministic encryption algorithm ensures that the cloud server can compare triples with the same node in the two indices; for each label l in L, the pseudo-random permutation function PRP is first used to perform random permutation under K3, and then the symmetric homomorphic encryption algorithm SHE.ENC is used to randomize and encrypt it under the public key PP; for the distance value d, SHE.ENC is also applied to randomize and encrypt it under the public key PP.
[0009] In a preferred embodiment, the query trapdoor generation module generates a query trapdoor token given a key set K, two query nodes u and v, and a query label constraint set L. u and v are both randomized using a pseudo-random function PRF under key K1 to locate their corresponding index entries in the secure index I. For each label l in the query label constraint set, it is first randomly permuted using a pseudo-random permutation under key K3, and then randomly encrypted using the symmetric homomorphic encryption algorithm SHE.ENC under the public key PP. Finally, the generated query trapdoor token = {u', v', L} is generated, where L represents the encrypted label attribute set.
[0010] In a preferred embodiment, the privacy query module is provided with a security index I and a query trapdoor token. This privacy query module is responsible for performing shortest distance queries with privacy protection label constraints in the cloud. The privacy query module incorporates two levels of security verification functions:
[0011] Given an encrypted label L i 'and a set of encrypted query label constraints L, which the function uses to verify L' i If 'is' an element in L', the function outputs an encrypted 0. ;
[0012] Given a set of encrypted tags L' and a set of encrypted query tag constraints L, this function verifies whether L' is a subset of L. If it is, the function outputs an encrypted 0. ;
[0013] The privacy query module first locates I[u'] and I[v'] in the security index I, and pairs and stores all triples with the same node between them in CE; for any two triples with the same node (Enc(a),L ua ,d ua ) and (Enc(b),L vb ,d vb If Enc(a) = Enc(b), then their label sets and distance values are merged and summed to obtain (L). ua ⋃L ua , d ua +d ua ) is placed into CE; subsequently, for each item in CE, L is used ua ⋃L uaThe encrypted query label constraint L in the token is used to calculate and output an encrypted label constraint flag F based on a two-level verification function. Finally, the privacy query module outputs the label constraint F and the corresponding encrypted distance value d for each item in CE. ua +d ua .
[0014] In a preferred embodiment, the result decryption module is given a set of tuples (F, D), where F is an encrypted tag constraint flag used to identify whether the corresponding path satisfies the query tag constraint condition, and D is the encrypted shortest distance value of the corresponding path. The result decryption module first calls the symmetric homomorphic encryption decryption function SHE.DEC to decrypt each flag F under the private key SK. For each tuple where the decryption result of F is 0, SHE.DEC is called again to decrypt its corresponding shortest distance value d under the private key SK, and finally the minimum value is output as the final query result of this privacy-protected tag-restricted shortest distance query.
[0015] This invention also provides a method for privacy-preserving label-restricted shortest distance query in a cloud environment. Based on the aforementioned system for privacy-preserving label-restricted shortest distance query in a cloud environment, the method includes the following steps: the data owner constructs a secure index from the original edge-label graph and hosts it on a cloud server; after receiving a query trap sent by the querying user, the cloud server performs an efficient privacy-preserving label-restricted shortest distance query based on the secure index; during this process, the cloud server needs to efficiently complete core privacy-preserving operations and calculations such as label constraint verification algorithms and encrypted distance aggregation calculations based on encrypted label data and distance data; finally, the generated encrypted result is returned to the querying user by the cloud server, and the user uses an authorized key to decrypt and obtain the plaintext distance value.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] Highly efficient query support: For the first time, it enables users to efficiently retrieve the shortest path distance between two nodes that satisfy the specified label constraint in a large-scale network with edge semantic information, breaking through the limitations of traditional solutions that only support unlabeled graphs or have low computational efficiency.
[0018] Comprehensive privacy protection: Through innovative secure indexing and cloud-based privacy protection query mechanisms, end-to-end privacy of original graph data, query user requests, and query results is ensured, including the confidentiality of privacy information such as edge labels and path distances;
[0019] Highly practical: The solution balances efficiency and security, and is applicable to real-world scenarios such as social network analysis and path planning, providing a practical solution for privacy-preserving queries of large-scale edge-labeled graphs. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a system model according to a preferred embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of the undirected edge label graph G according to a preferred embodiment of the present invention;
[0022] Figure 3 The preferred embodiment of the present invention and Figure 2 A schematic diagram of the label constraint index LC corresponding to the undirected edge-labeled graph G in the diagram;
[0023] Figure 4 This is a schematic diagram of the security index I according to a preferred embodiment of the present invention. Detailed Implementation
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0026] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations according to this application; as used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise; furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0027] refer to Figure 1 A cloud-based system supporting privacy-protected, tag-restricted shortest-distance query consists of the following three core entities:
[0028] 1. Data Owner: Holds the original edge label graph data, is responsible for building a secure index structure, and distributes system keys to authorized users and servers;
[0029] 2. Cloud Server: Stores and manages secure indexes uploaded by data owners, receives encrypted requests (i.e., query trapdoors) submitted by query users, and performs label-constrained shortest distance query operations based on the secure index;
[0030] 3. Querying User: Generate an encrypted query trap based on actual needs, submit it to the cloud storage server through a secure channel, and receive the final encrypted query result.
[0031] The data owner constructs a secure index from the original edge-labeled graph and hosts it on a cloud server. Upon receiving a query trap from a user, the cloud server performs an efficient, privacy-preserving, label-constrained shortest distance query based on the secure index. During this process, the cloud server efficiently performs core privacy-preserving operations and computations, such as label constraint verification algorithms and encrypted distance aggregation calculations, based on encrypted label and distance data. The final encrypted result is returned to the user by the cloud server, who then uses an authorized key to decrypt and obtain the plaintext distance value. This model ensures the confidentiality and minimizes leakage of the original graph data, query requests, and results throughout the entire chain through a layered encryption mechanism and inter-server security protocols.
[0032] This invention proposes a privacy-preserving, label-constrained shortest distance query scheme for large-scale edge-labeled graphs in cloud environments. By designing a secure label index and multi-level security verification functions, it ensures that the cloud server can efficiently retrieve and return the shortest path length that satisfies the label constraints even when the original graph data, user query constraints, and final calculation results are completely invisible to the cloud server. This scheme achieves, for the first time, full-dimensional privacy protection of edge label semantics, query intent, and distance values, providing a breakthrough solution for privacy and security in complex graph analysis tasks in the cloud.
[0033] The privacy-preserving label-constrained shortest distance query scheme for edge-labeled graphs proposed in this invention includes the following five core algorithm modules: KeyGen, Encrypt, Token, Query, and Decrypt.
[0034] Key generation module (KeyGen): Called by the data owner, it generates a system key based on security parameters;
[0035] Given the security parameter 𝜆, this module outputs a key set K={K1,K2,K3,(PP,SK)}, with each component defined as follows:
[0036] K1: Seed key for the pseudo-random function (PRF);
[0037] K2: The encryption key for the Deterministic Encryption Algorithm (DET);
[0038] K3: The permutation key for the pseudo-random permutation function (PRP);
[0039] (PP, SK): The public and private key pair for Symmetric Homomorphic Encryption (SHE).
[0040] The secure index generation module (Encrypt) is called by the data owner to transform the original edge label graph into a label constraint index and encrypt it using cryptographic techniques to generate a secure index.
[0041] Given an undirected edge-labeled graph G=(V, E, W), where V, E, and W represent the set of nodes, edges, and labels, respectively, this module first constructs a label-constrained two-hop index LC: after initializing an empty LC index, it sequentially performs a pruned breadth-first search with each node v in G as the root node. In each round of the search, if a new label path exists from the root node to the currently visited node u, a triple (v, L, d) is generated and added to LC[u], where v represents the root node, u represents the currently visited node, L represents the set of labels on the shortest path from v to u, and d represents the path distance value. Given... Figure 2 The undirected edge-labeled graph shown has the following corresponding label constraint indices: Figure 3 Given a label-constrained query (u, v, L), first locate the triples with the same nodes in LC[u] and LC[v], merge their corresponding label sets, and determine if this merged set is a subset of the query label constraint L. This determines whether there exists a path between u and v that satisfies the label constraint. If it does, add the distance values in the two triples to obtain the shortest distance of the path that satisfies the label constraint. For example, in... Figure 2 and Figure 3 In the undirected edge-labeled graph shown, given the label constraint query (v2, v3, L=ah), according to the LC index of G, LC[v2] and LC[v3] have the following pairs of triples with the same node: {(v0, a, 1)(v0, h, 1)}, {(v0, a, 1)(v0, ah, 2)}, {(v0, h, 2)(v0, h, 1)}, {(v0, h, 2)(v0, ah, 2)}, {(v1, h, 1)(v1, a, 1)}. After merging their labels and distances, we get: {v0, ah, 2}, {v0, ah, 3}, {v0, h, 3}, {v0, ah, 4}, {v1, ah, 2}. Therefore, given the query label constraint L=ah, the paths corresponding to these five items all satisfy the label constraint, that is, the label union is a subset of L, and the shortest distance is 2. If the query label constraint is 'a', then there is no path between v2 and v3 that satisfies this constraint.
[0042] Given a label constraint index LC and a key set K, this module generates a secure index I: For each node v, the true symbol v' of the node is first hidden using a pseudo-random function PRF under key K1. For each triple (u, L, d) in LC[v], node u is hidden using a deterministic encryption algorithm DET under key K2. The deterministic encryption algorithm ensures that the cloud server can subsequently compare triples with the same node in the two indices. For each label l in L, a random permutation is first performed using a pseudo-random permutation function PRP under key K3, and then it is randomized and encrypted using a symmetric homomorphic encryption algorithm SHE.ENC under the public key PP. The distance value d is also randomized and encrypted using SHE.ENC under the public key PP. Figure 2 The security index I corresponding to the LC index shown is as follows: Figure 4 As shown.
[0043] Query Trapdoor Generation Module (Token): Called by the query user, it encodes the query node and tag constraints into a query token using encryption.
[0044] Given a key set K, two query nodes u and v, and a query label constraint set L, this module generates a query trapdoor token. u and v are both randomized using a pseudo-random function PRF under key K1 to locate their corresponding index entries in secure index I. For each label l in the query label constraint set, it is first randomly permuted using a pseudo-random permutation under key K3, and then randomly encrypted using the symmetric homomorphic encryption algorithm SHE.ENC under public key PP. The final generated query trapdoor token = {u', v', L}, where L represents the encrypted set of label attributes.
[0045] Privacy Query Module: Called by the cloud server, it performs secure and efficient shortest distance queries with privacy-protected label constraints based on secure indexes and query trapdoors.
[0046] Given a security index I and a query trapdoor token, this module is responsible for performing shortest-distance queries with privacy-preserving tag constraints in the cloud. In this module, we design a two-level security verification function to quickly complete tag verification operations on encrypted tag data without leaking any tag privacy information.
[0047] 1. Given an encrypted label L i 'and a set of encrypted query label constraints L, which the function uses to verify L' i Is it an element in L? If yes, the function outputs the encrypted 0, i.e., [0].
[0048] 2. Given a set of encrypted tags L' and a set of encrypted query tag constraints L, this function verifies whether L' is a subset of L. If so, the function outputs an encrypted 0, i.e., [0].
[0049] This module first locates I[u'] and I[v'] in the security index I, and then pairs and combines all triples with the same node between them and stores them in CE. For any two triples with the same node (Enc(a),L... ua ,d ua ) and (Enc(b),L vb ,d vb If (i.e., Enc(a) = Enc(b)), then their label sets and distance values are merged and summed to obtain (L) ua ⋃L ua , d ua +d ua ) is placed into CE. Then, for each item in CE, L is used... ua ⋃L ua The module calculates and outputs an encrypted label constraint flag F based on the encrypted query label constraint L in the token and a two-level verification function. Finally, the module outputs the label constraint F and the corresponding encrypted distance value d for each item in CE. ua +d ua .
[0050] The result decryption module (Decrypt) is called by the querying user and uses their own key to decrypt the returned encrypted result to obtain the shortest path distance between the two nodes that satisfies the label constraints.
[0051] Given a set of tuples (F, D), where F is an encrypted label constraint flag indicating whether the corresponding path satisfies the query label constraint condition, and D is the encrypted shortest distance value of the corresponding path, this module first calls the symmetric homomorphic encryption decryption function SHE.DEC to decrypt each flag F under the private key SK. For each tuple where the decryption result of F is 0, SHE.DEC is called again to decrypt its corresponding shortest distance value d under the private key SK, and finally the minimum value is output as the final query result of this privacy-protected label-restricted shortest distance query.
[0052] This invention proposes a privacy-preserving, label-constrained shortest distance query scheme for cloud environments. By designing five core modules—key generation, secure index generation, query trapdoor generation, privacy query, and result decryption—it achieves efficient querying of the shortest path distance satisfying label constraints in the edge-labeled graph while effectively ensuring data privacy and security. The scheme effectively ensures the privacy of the original graph data, user query requests, and query results, and is suitable for privacy-sensitive applications involving large-scale graph data.
Claims
1. A cloud-based system supporting privacy-protected tag-based shortest-distance query, characterized in that, The system includes a key generation module, a secure index generation module, a query trapdoor generation module, a privacy query module, and a result decryption module. The key generation module, invoked by the data owner, generates a system key based on security parameters. The secure index generation module, also invoked by the data owner, transforms the original edge-label graph into a label-constrained index and encrypts it using cryptographic techniques to generate a secure index. The query trapdoor generation module, invoked by the query user, encodes the query node and label constraints with encryption into a query token. The privacy query module, invoked by the cloud server, performs a secure and efficient privacy-preserving label-constrained shortest distance query based on the secure index and query trapdoor. The result decryption module, invoked by the query user, uses their own key to decrypt the returned encrypted result to obtain the shortest path distance between two nodes that satisfies the label constraints.
2. The cloud-based shortest-distance query system supporting privacy-protected tags as described in claim 1, characterized in that, In the key generation module, given security parameters The key generation module outputs a key set K={K1,K2,K3,(PP,SK)}, with each component defined as follows: K1 is the seed key of the pseudo-random function PRF; K2 is the encryption key of the deterministic encryption algorithm DET; K3 is the permutation key of the pseudo-random permutation function PRP; and (PP, SK) is the public and private key pair of the symmetric homomorphic encryption SHE.
3. The cloud-based shortest-distance query system supporting privacy-protected tags as described in claim 1, characterized in that, In the secure index generation module, given an undirected edge-labeled graph G=(V, E, W), where V, E, and W represent the set of nodes, the set of edges, and the set of labels, respectively; the secure index generation module first constructs a label-constrained two-hop index LC: after initializing an empty label-constrained two-hop LC index, it sequentially performs a pruned breadth-first search with each node v in G as the root node. In each round of the search, if a new label path exists from the root node to the currently visited node u, a triple (v, L, d) is generated and added to LC[u], where v represents the root node, u represents the currently visited node, L represents the set of labels on the shortest path from v to u, and d represents the path distance value; given the label constraints, query (u, v, L). First, locate the triples with the same node in LC[u] and LC[v], merge their corresponding label sets, and determine whether the merged set is a subset of the query label constraint L, i.e., determine whether there is a path between u and v that satisfies the label constraint. If so, add the distance values in the two triples to obtain the shortest distance of the path that satisfies the label constraint. Given the label constraint query (v2, v3, L=ah), according to the LC index of G, LC[v2] and LC[v3] have the following pairs of triples with the same node: {(v0, a, 1)(v0, h, 1)}, {(v0, a, 1)(v0, ah, 2)}. The sets {(v0,h,2)(v0,h,1)}, {(v0,h,2)(v0,ah,2)}, and {(v1,h,1)(v1,a,1)} are combined with their labels and distances to obtain {v0,ah,2}, {v0,ah,3}, {v0, h,3}, {v0, ah,4}, and {v1, ah,2}. Therefore, given the query label constraint L=ah, the paths corresponding to these five items all satisfy the label constraint, that is, the union of the labels is a subset of L, where the shortest distance is 2. If the query label constraint is a, then there is no path between v2 and v3 that satisfies this constraint. Given a label constraint index LC and a key set K, the secure index generation module generates a secure index I: For each node v, the pseudo-random function PRF is first used to hide the node's real symbol v' under key K1; for each triple (u,L,d) in LC[v], the deterministic encryption algorithm DET is used to hide node u under key K2. The deterministic encryption algorithm ensures that the cloud server can compare triples with the same node in the two indices; for each label l in L, the pseudo-random permutation function PRP is first used to perform random permutation under K3, and then the symmetric homomorphic encryption algorithm SHE.ENC is used to randomize and encrypt it under the public key PP; for the distance value d, SHE.ENC is also applied to randomize and encrypt it under the public key PP.
4. A cloud-based shortest-distance query system supporting privacy-protected tags as described in claim 1, characterized in that, In the query trapdoor generation module, given a key set K, two query nodes u and v, and a query label constraint set L, the module generates a query trapdoor token. u and v are both randomized using a pseudo-random function PRF under key K1 to locate their corresponding index entries in the secure index I. For each label l in the query label constraint set, it is first randomly permuted using a pseudo-random permutation under key K3, and then randomly encrypted using the symmetric homomorphic encryption algorithm SHE.ENC under the public key PP. Finally, the generated query trapdoor token = {u', v', L}, where L represents the encrypted label attribute set.
5. A cloud-based shortest-distance query system supporting privacy-protected tags as described in claim 1, characterized in that, The privacy query module is given a security index I and a query trapdoor token. This module is responsible for performing shortest distance queries with privacy protection label constraints in the cloud. The privacy query module incorporates a two-level security verification function. Given an encrypted label L i 'and a set of encrypted query label constraints L, which the function uses to verify L' i If 'is' an element in L', the function outputs an encrypted 0. ; Given a set of encrypted tags L' and a set of encrypted query tag constraints L, this function verifies whether L' is a subset of L. If it is, the function outputs an encrypted 0. ; The privacy query module first locates I[u'] and I[v'] in the security index I, and pairs and stores all triples with the same node between them in CE; for any two triples with the same node (Enc(a),L ua ,d ua ) and (Enc(b),L vb ,d vb If Enc(a) = Enc(b), then their label sets and distance values are merged and summed to obtain (L). ua ⋃L ua , d ua +d ua ) is placed into CE; subsequently, for each item in CE, L is used ua ⋃L ua The encrypted query label constraint L in the token is used to calculate and output an encrypted label constraint flag F based on a two-level verification function. Finally, the privacy query module outputs the label constraint F and the corresponding encrypted distance value d for each item in CE. ua +d ua .
6. A cloud-based shortest-distance query system supporting privacy-protected tags as described in claim 1, characterized in that, The result decryption module is given a set of tuples (F, D), where F is an encrypted label constraint flag used to identify whether the corresponding path satisfies the query label constraint condition, and D is the encrypted shortest distance value of the corresponding path. The result decryption module first calls the symmetric homomorphic encryption decryption function SHE.DEC to decrypt each flag F under the private key SK. For each tuple where the decryption result of F is 0, SHE.DEC is called again to decrypt its corresponding shortest distance value d under the private key SK, and finally the minimum value is output as the final query result of this privacy-protected label-restricted shortest distance query.
7. A method for shortest distance query with privacy-protected tags in a cloud environment, characterized in that, A cloud-based system supporting privacy-preserving label-restricted shortest distance query according to any one of claims 1-6 includes the following steps: the data owner constructs a secure index from the original edge-label graph and hosts it on a cloud server; after receiving a query trap sent by the querying user, the cloud server performs an efficient privacy-preserving label-restricted shortest distance query based on the secure index; during this period, the cloud server needs to efficiently complete core privacy-preserving operations and calculations such as label constraint verification algorithms and encrypted distance aggregation calculations based on encrypted label data and distance data; the finally generated encrypted result is returned to the querying user by the cloud server, and the user uses an authorized key to decrypt and obtain the plaintext distance value.