A multi-attribute fusion shortest path verifiable query method and device
By constructing an encrypted index structure and a pairing verification mechanism, the problems of insufficient query efficiency and security in encrypted graph environments are solved, enabling efficient and secure querying of multi-attribute fusion paths, which is suitable for scenarios such as cloud data outsourcing and privacy-sensitive graph mining.
Patent Information
- Application Number
- CN202511492495.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Existing shortest path indexing methods struggle to guarantee query efficiency, security, and flexibility in encrypted graph environments. They lack effective mechanisms, especially under multi-attribute constraints, and lack verifiable result mechanisms, posing risks of forgery and replay attacks.
A compact encrypted index structure is constructed and a pairing verification mechanism is designed. By generating authorization tokens and query tokens, secure, efficient and reliable querying of multi-attribute constrained paths is achieved. Homomorphic encryption, symmetric encryption and deterministic encryption technologies are used to process graph data, and query tokens are combined for path splicing and verification.
It enables efficient and secure multi-attribute fusion path querying in encrypted graph queries, supports fast querying and personalized optimization, prevents information leakage and attacks, and is suitable for scenarios such as cloud data outsourcing, privacy-sensitive graph mining, and trusted path querying.
Smart Images

Figure CN121000374B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic digital data processing technology, specifically relating to a method and apparatus for verifying the shortest path through multi-attribute fusion. Background Technology
[0002] With the rapid development of cloud computing and large-scale graph data outsourcing, an increasing number of applications require graph structure analysis and path query operations to be performed on third-party servers. Typical applications include traffic navigation, social recommendation, medical referral, and supply chain optimization. This type of graph data often involves sensitive information such as user location, relationship networks, and medical records. Leakage of this data could lead to serious privacy risks. Therefore, how to protect the privacy of graph structure, edge attributes, and user query intent while ensuring query efficiency has become a critical issue that urgently needs to be addressed in the field of graph querying.
[0003] Existing shortest path indexing methods, such as Dijkstra's algorithm, 2-Hop Labeling, and ContractionHierarchies, all rely on plaintext graph structures and full graph visibility, making them difficult to apply directly to encrypted graph environments. Current solutions that support encrypted graph queries often employ label propagation or redundant path storage strategies, lacking a systematic indexing mechanism. This not only limits query efficiency but also makes it difficult to calculate the shortest path under multi-dimensional attribute constraints such as distance, time, and cost. Furthermore, existing methods generally lack verifiable result mechanisms, preventing clients from confirming the correctness and shortestness of the returned path, thus posing security risks of forgery, tampering, or replay.
[0004] Chinese patent document CN120165836A discloses a privacy-preserving graph data constraint shortest path verification query method and system. It obtains a path query request sent by a user, encrypts the target graph data, generates encrypted graph structure features, and segments them into a first encrypted sub-feature and a second encrypted sub-feature. A pre-trained key segmentation model is invoked to match the path constraints with a preset privacy policy, generating a verification token. The first encrypted sub-feature and the verification token are sent to a first computing node via a distributed protocol, and the second encrypted sub-feature and the verification token are sent to a second computing node. This triggers secure multi-party computation between the first and second computing nodes, outputting candidate path ciphertext and a set of verification parameters for consistency verification. If the verification passes, decryption is performed to generate the target shortest path that satisfies the path constraints. However, this scheme still has the following shortcomings: the generation of verification tokens relies on pre-trained models, which are inflexible and difficult to adapt to diverse constraints; the path verification process is complex, requiring multi-node collaborative computing, resulting in high communication overhead and making it difficult to deploy in edge environments; the lack of a structured indexing mechanism leads to low path construction efficiency and makes it difficult to support fast queries and personalized optimization; and the verification method is not bound to the query token, posing a risk of forgery and replay attacks.
[0005] In summary, although some existing solutions have implemented path query, result verification, or attribute constraint functions in encrypted graph environments, they still have shortcomings in terms of query efficiency and verification capabilities. In particular, an effective mechanism for multi-attribute fusion optimization has not yet been established, and a unified and efficient solution framework has not been formed. To address the shortcomings of existing technologies in terms of efficiency, security, and flexibility in encrypted graph queries, this invention proposes a multi-attribute fusion shortest path verifiable query method and apparatus, which possesses advantages such as lightweight structure, high computational efficiency, reliable verification, and flexible optimization. Summary of the Invention
[0006] This invention aims to overcome at least one of the defects of the prior art and provide a verifiable query method for the shortest path with multi-attribute fusion. By constructing a compact encrypted index structure to support the efficient splicing of path segments and designing a pairing verification mechanism to achieve the verifiability of the results, a secure, efficient and reliable query of multi-attribute constrained paths can be completed without revealing the graph structure and query intent.
[0007] The present invention also discloses an apparatus for loading a verifiable query method for the shortest path with multiple attributes fusion.
[0008] The detailed technical solution of this invention is as follows:
[0009] A verifiable query method for shortest path fusion based on multiple attributes includes:
[0010] S1. The graph data owner generates a key and packages the key to generate an authorization token. Authorization token Distribute to client users, including the signing public key contained in the key. The data is sent to the proxy server. At the same time, the graph data owner performs tree decomposition structure construction on the original graph data, encrypts the information in the constructed tree decomposition structure, generates an encrypted index, and uploads the generated encrypted index to the cloud server.
[0011] S2, Client users based on query requests and received authorization tokens The key in the query token T contains a random factor η and is used to generate a query token T, which is then sent to the cloud server.
[0012] S3. The cloud server parses the received query token T, constructs a candidate path set P under the ciphertext based on the received encrypted index, and calculates the fusion cost to obtain the path-level fusion cost ciphertext. From this, select the set of shortest paths under the ciphertext. ;
[0013] S4, the cloud server's set of shortest paths to the filtered ciphertext. The path information is constructed, and the verification materials are extracted. The constructed path information and the extracted verification materials are packaged into a query response package and submitted to the proxy server.
[0014] S5. The proxy server receives the query response packet and uses the random factor η and the signing public key. The pairing verification mechanism is used to verify the validity of the query response packet. If the verification passes, the proxy server sends the query response packet to the client user.
[0015] S6. The client user uses the key in the authorization token to locally decrypt and display the path information in the query response packet sent by the proxy server.
[0016] Preferably, step S1 specifically includes:
[0017] S11. The graph data owner first generates the following keys in sequence:
[0018] Homomorphic encryption key pairs ( ), symmetric encryption key ( ), deterministic encryption key ( ), Signature key pair ( In this process, the Paillier homomorphic encryption algorithm is used to generate the public key pk and the private key sk, and a symmetric encryption algorithm is used to generate the key. A signature key pair is generated using an asymmetric encryption algorithm. This represents the signature private key of the graph data owner. The public and private keys representing the signature of the graph data owner. The public key is used to sign the hash value of the edge. Used by the proxy server to verify the validity of the signature;
[0019] S12. Package the above keys into a complete authorization token. Authorization token transmitted via secure channel Distribute to client users with access rights, and sign the public key. Send to the proxy server, authorization token Recorded as:
[0020] (1)
[0021] in, For authorization tokens, public key Constraint parameters or fusion cost parameters used in encrypted queries; private key Used to decrypt the fusion cost after homomorphic encryption; Used to perform deterministic encryption on the vertex ID field, ensuring consistency and supporting position matching; The public key used to verify the signature of the auxiliary information; : Generators in the pairing signature system;
[0022] S13. The graph data owner uses a minimum degree elimination strategy to construct the tree decomposition index structure of the graph;
[0023] S14. The graph data owner encrypts the information in the tree decomposition index structure constructed in step S13.
[0024] S15. The graph data owner encapsulates the encrypted information generated in step S14 into an encrypted index and uploads the generated encrypted index to the cloud server.
[0025] Further preferably, step S13 specifically involves: prioritizing the elimination of the vertex with the smallest degree in the original graph data; when eliminating a vertex v, forming a bag node together with its neighbor set N(v), denoted as Bag(v), and recording the vertex set and its related edge attributes in the bag node; if the neighbors are not yet connected, adding fill edges and merging or deriving edge attributes according to preset rules; sorting the corresponding bag nodes according to the order of vertex elimination; if two bags have a common vertex, connecting them with an edge; and, to maintain the consistency of parent-child relationships, defining the following connection rule when constructing the tree structure TreeIndex: for a bag Bag(v), the bag Bag(u) corresponding to the earliest eliminated vertex u in its neighbor set is set as its parent bag; the final tree decomposition structure output is a tree structure TreeIndex.
[0026] More preferably, the information encryption in step S14 includes packet node encryption, vertex identity field encryption, edge attribute encryption, and edge verification information generation, wherein a symmetric key is used. Perform symmetric encryption on each packet identifier to obtain Use deterministic encryption keys Encrypt the vertex IDs in the packet node sequentially to generate a matching field: ,Will Embedded in the packet node as a queryable matching field; the attribute value of each edge is encrypted using the Paillier homomorphic encryption public key pk: ;
[0027] The edge verification information generation includes the distribution instructions from the graph data owner for generating signature materials and verification parameters for each edge:
[0028] The signature material specifically refers to:
[0029] Edge label hash value: (2),
[0030] Where Hash(e) represents the hash value of the label of edge e, attr(e) represents the set of attributes of edge e, and u and v represent the two vertices connected by edge e, respectively. This is a concatenation symbol used to connect... , , To splice;
[0031] Signature result: (3),
[0032] The verification material is encapsulated in the verification index and bound to the edge ciphertext and packet node structure, wherein... This represents the signing private key of the graph data owner, Hash(e) is the label hash value of edge e, and Sign(e) indicates that the private key is used. The result of signing Hash(e);
[0033] The specific instructions for distributing the verification materials are as follows:
[0034] Signature verification public key The generator `g` in the pairing signature system is used by the proxy server to perform pairing equality verification:
[0035] (4),
[0036] Where g is a public parameter, selected and distributed to each entity by the graph data owner during the encryption phase. This represents a bilinear pairing operation, used to establish a verifiable mathematical relationship between two groups, ensuring consistency between the signature and the edge label hash value.
[0037] Preferably, step S2 specifically includes:
[0038] S21. The client user uses the deterministic encryption key in the authorization token. Encrypt the starting point s and ending point t of the query path to generate matching fields. and ;
[0039] S22. Use Paillier encryption for constraint parameters or fusion weight parameters in the query request path;
[0040] S23. Construct the random factor η required for the pairing equation and embed it into the query token T to verify the random factor binding;
[0041] S24. Generate query token T:
[0042] (5),
[0043] in It is an encrypted mapping of the starting point s; It is the encrypted mapping of the endpoint t; Enc(params) represents the encrypted constraints if it is a hard constraint mode, and the encrypted fusion weight value if it is a fusion optimization mode. It is a random factor generated by the client user and used for subsequent pairing verification binding;
[0044] S25. The client user sends the query token T to the cloud server.
[0045] Preferably, in step S3, the cloud server parses the received query token T, specifically by parsing the encrypted fields in the query token T:
[0046] Start and End Points: The server uses the query token T... , To match packet nodes in the encrypted index structure , That is, whether it is equal to the first node identifier stored in the packet node.
[0047] Preferably, step S3, which involves constructing a candidate path set P under the ciphertext based on the received encrypted index, specifically involves the cloud server locating and expanding the starting path chain and the ending path chain based on the encrypted starting point and ending point identifiers in the query token T, and then performing path splicing and constructing the candidate path set based on the lowest common ancestor identification.
[0048] More preferably, step S3, which involves constructing a candidate path set P under the ciphertext based on the encryption index in the tree decomposition structure, specifically includes:
[0049] The server locates the starting packet node Bag(s) based on the encrypted starting point identifier in the query token. From this node, it expands layer by layer along the parent node direction of the tree structure to build the starting path chain and record the packet node connection information.
[0050] Similarly, locate the endpoint packet node Bag(t), construct the endpoint path chain upwards from this node, and record the packet node connection information;
[0051] All path segment expansions are performed under an encrypted index structure;
[0052] The server compares the starting path chain with the ending path chain, identifies the first intersection packet node, and uses it as the splicing anchor point, i.e., the lowest common ancestor (LCA).
[0053] The server uses LCA as the central hub to connect the starting path chain and the ending path chain to form a complete path. The path connection relationship is supported by the encrypted adjacency field in each packet node.
[0054] All successfully concatenated complete paths are added to the candidate set P under the ciphertext.
[0055] Preferably, step S3 involves calculating the fusion cost to obtain the path-level fusion cost ciphertext. Specifically, the cloud server performs a fusion cost function on each edge in the candidate path set P under the ciphertext, and completes the weighted calculation in the Paillier encryption domain to obtain the edge-level fusion cost ciphertext. The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. ;
[0056] The fusion cost function is defined as follows:
[0057] (6)
[0058] Where F(e) is the fusion cost of edge e; m is the total number of attribute dimensions of the edge; Let j be the value of the attribute of edge e; The j-th encrypted weight parameter set by the user in the query token; ∑ is the weighted sum of all attributes.
[0059] Since Paillier encryption supports addition and scalar multiplication, the homomorphic computation process is as follows:
[0060] The server executes the following for each edge:
[0061] (7)
[0062] in, Paillier homomorphic encryption is used to encrypt plaintext using the public key pk; the server performs scalar multiplication on each attribute value and weight, encrypts it, and then performs addition accumulation in the ciphertext field to obtain the edge-level fusion cost ciphertext. ;
[0063] The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. :
[0064] (8)
[0065] in, For path-level fusion cost ciphertext, Candidate paths;
[0066] The set of shortest paths under ciphertext is selected. ,include:
[0067] a. If the query token T is in hard constraint mode, i.e., with a constraint threshold, homomorphic comparison can be performed:
[0068] Determine if the path cost ciphertext satisfies:
[0069] (9)
[0070] This is used to filter out path segments that do not meet the fusion constraints, among which, This represents the maximum allowed fusion cost plaintext threshold set by the client user. Paillier ciphertext representing the cost of merging the shortest path sets.
[0071] b. If the query token T is in fusion optimization mode (i.e., without a constraint threshold), then the shortest path is identified through the minimum safe value protocol:
[0072] (10)
[0073] in, Paillier ciphertext representing the cost of merging the shortest path sets. Indicate candidate path Paillier ciphertext of fusion cost.
[0074] Preferably, the shortest path set under the ciphertext described in step S4 The path information includes:
[0075] Edge connectivity: The sequence of connections and encrypted identifiers for all edges in the path;
[0076] Edge attribute ciphertext: The encrypted attribute of each edge: [ ;
[0077] Total cost of the shortest path: ;
[0078] The verification materials mentioned in step S4 include:
[0079] Signature information for each edge ; Edge label hash value Hash(e); Verification auxiliary parameters: generator g, query token T random factor η.
[0080] Preferably, step S5 specifically includes:
[0081] S51, The proxy server receives the query response packet;
[0082] S52. For each edge e = (u, v) in the query response packet, extract the following material:
[0083] Edge label hash value: Hash(e) = H(u || v || attr(e));
[0084] Side signature value: ;
[0085] Pairing verification parameters: generator g; random factor η in query token T;
[0086] S53. For each edge e = (u, v) in the query response packet, repeat the pairing verification equation calculation:
[0087] (11)
[0088] If the equation is true, then the edge signature is valid and bound to the current query token, indicating that the edge was generated by the graph data owner's signature and the result has not been forged or replayed.
[0089] If all edges satisfy the binding validation equation, the path result is valid, and the proxy server will send the validated query response packet back to the client user; if any edge fails validation, the path result will be rejected, and a validation failure message will be displayed.
[0090] Preferably, in step S6, the client user uses the homomorphic encrypted private key in the authorization token ( Decrypt the total cost of the path and the attribute values of each edge to recover the plaintext data; then use the deterministic encryption key ( Decrypt the shortest path information.
[0091] In another aspect of the invention, an apparatus is also provided, comprising:
[0092] At least one processor; and
[0093] The memory stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the multi-attribute fusion shortest path verifiable query method as described above.
[0094] In another aspect of the invention, a machine-readable storage medium is also provided, which stores executable instructions that, when executed, cause the machine to perform the multi-attribute fusion shortest path verifiable query method as described above.
[0095] Compared with the prior art, the present invention has the following beneficial effects:
[0096] (1) This invention constructs a unified technical framework in the field of encrypted graph query that combines high efficiency, security and flexibility. Through the collaborative design of key mechanisms such as structured indexing, fusion encryption, path verification and attribute optimization, it not only breaks through the bottlenecks of existing technologies in terms of query efficiency and verification capabilities, but also realizes personalized path selection and lightweight deployment under multiple attribute constraints. It has broad application prospects and is suitable for various practical scenarios such as cloud data outsourcing, privacy-sensitive graph mining and trusted path query.
[0097] (2) This invention achieves efficient path query by constructing a cryptographic tree decomposition structure and introducing a query token positioning mechanism. This invention uses a cryptographic tree decomposition structure to organize graph data and combines it with a query token to quickly locate the packet nodes containing the start and end points. It also utilizes a least common ancestor (LCA) identification mechanism to achieve efficient path segment splicing. This design significantly improves query efficiency in large-scale cryptographic graph environments, reduces unnecessary traversal and computational overhead, and is suitable for applications with high real-time requirements.
[0098] (3) This invention achieves comprehensive privacy protection during the query process by integrating multiple encryption technologies. It integrates homomorphic encryption, symmetric encryption and deterministic encryption technologies to encrypt the graph structure, edge attributes and query intent, ensuring that the data is always in a ciphertext state throughout the query process, effectively preventing information leakage and improving the security and reliability of the system.
[0099] (4) This invention achieves the authenticity binding of path results by introducing a pairing verification mechanism that combines query tokens. This invention embeds a random factor into the query token and combines it with the pairing verification formula to achieve the binding authentication of path results and query requests, effectively preventing forgery and replay attacks, and ensuring the authenticity and non-repudiation of query results.
[0100] (5) By setting fusion weight parameters and performing attribute weighted calculations in the encrypted domain, multi-attribute fusion optimization is achieved. This invention allows users to flexibly set weight parameters for attributes such as distance, cost, and time according to their query preferences, and completes the fusion cost calculation in the encrypted state, meeting the personalized path selection needs in complex scenarios. At the same time, through structured encapsulation and encrypted transmission mechanisms, the integrity and transmission security of query results are further guaranteed, improving the practicality, reliability, and scalability of the system.
[0101] (6) Through modular design and lightweight computing processes, low-communication-overhead edge deployment capabilities are achieved. This invention adopts a modular index structure and lightweight computing processes, significantly compressing computing resources and communication burdens in key stages such as path construction, verification, and transmission. The system can run efficiently on resource-constrained edge devices without relying on high-performance servers or complex collaboration mechanisms, possessing good deployment flexibility and environmental adaptability, and is suitable for various practical application scenarios such as the Internet of Things, the Internet of Vehicles, and mobile terminals. Attached Figure Description
[0102] Figure 1 This is a schematic diagram of the method flow described in this invention;
[0103] Figure 2 This is a diagram illustrating the encryption structure of the method described in this invention.
[0104] Figure 3 This is a schematic diagram of the method path legality verification process described in this invention;
[0105] Figure 4 This is a system model diagram of the method described in this invention;
[0106] Figure 5 This is the original diagram structure of Embodiment 2 of the present invention;
[0107] Figure 6 This refers to the attribute information of the edges in the original graph of Embodiment 2 of the present invention;
[0108] Figure 7 This is the tree decomposition structure of the original diagram in Embodiment 2 of the present invention. Detailed Implementation
[0109] Example 1
[0110] This embodiment provides a method for verifying shortest path queries based on multi-attribute fusion, such as... Figure 1 The method includes:
[0111] S1. System Initialization Phase: The graph data owner generates a key and packages the key to generate an authorization token. Authorization token Distribute to client users, including the public key contained in the signing key. The data is sent to the proxy server. At the same time, the graph data owner performs tree decomposition structure construction on the original graph data, encrypts the information in the constructed tree decomposition structure, generates an encrypted index, and uploads the generated encrypted index to the cloud server.
[0112] In this invention, the system initialization phase is performed by the graph data owner, with the aim of providing necessary cryptographic support for subsequent query token generation and result verification.
[0113] Step S1 specifically includes:
[0114] S11. The graph data owner generates the following keys in sequence:
[0115] Homomorphic encryption key pairs ( The Paillier homomorphic encryption algorithm is used to generate a public key pk and a private key sk. The public key pk is used to encrypt the attribute values of edges in the graph, such as distance, cost, time and other attributes. The private key sk is used by the client user to decrypt the fused attribute values in the query results.
[0116] Symmetric encryption key ( Generate keys using symmetric encryption algorithms such as AES. It is used to encrypt packet node information in the graph to prevent the graph topology from being leaked on the server side;
[0117] Deterministic encryption key ( ): Used to perform deterministic encryption on vertex IDs in the graph, ensuring that the same vertex generates consistent ciphertext after encryption, in order to support position matching operations in query tokens; this key is generated by the graph data owner during the initialization phase and is used to construct queryable fields;
[0118] Signature key pair ( Generate signature key pairs using asymmetric encryption algorithms such as RSA: The private key used to verify the signature of the auxiliary information. The public and private keys used to verify the signature of auxiliary information. Used to sign the hash value of the edge, generating unforgeable verification information; public key Used by proxy servers to verify the legitimacy of signatures and ensure the reliability of query results.
[0119] S12. Package the above keys into a complete authorization token. Authorization token transmitted via secure channel Distribute to authorized client users for subsequent encrypted query token generation, path verification, and result decryption processing, and share the signing public key. Send to the proxy server:
[0120] Authorization Token , denoted as:
[0121] (1)
[0122] in, For authorization tokens, public key Constraint parameters or fusion cost parameters used in encrypted queries; private key Used to decrypt the fusion cost after homomorphic encryption; Used to perform deterministic encryption on the vertex ID field, ensuring consistency and supporting position matching; To verify the auxiliary information, namely the signature verification public key used by the edge, the client can perform the verification operation locally without contacting the graph data owner; It is a generator in the pairing signature system, used for calculating the pairing verification equation, and is a fundamental parameter in the verification process;
[0123] S13. The graph data owner uses a minimum degree elimination strategy to construct the tree decomposition index structure of the graph;
[0124] The graph data owner performs tree decomposition on the original graph data to build a structured index system to support subsequent encryption and path verification processes. The tree decomposition process employs a minimum degree elimination strategy, and the specific steps are as follows:
[0125] Elimination strategy selection: The minimum degree elimination strategy is adopted, which prioritizes the elimination of vertices with the smallest degree to reduce the number of fill edges and improve the compactness of the index.
[0126] Bag node construction: When a vertex v is eliminated, it is combined with its neighbor set N(v) to form a bag node, denoted as Bag(v). At the same time, the bag node records the vertex set and its related edge attribute values. If the neighbors are not yet connected, fill edges are added, and edge attributes are merged or derived according to preset rules to maintain path connectivity.
[0127] Record the vertex elimination order: Sort the corresponding bag nodes in the order of vertex elimination to provide a sequential basis for the subsequent construction of the tree decomposition structure;
[0128] Tree structure connection relationships: The connection relationship between bags is determined by their shared vertices; if two bags have a common vertex, they are connected by an edge; at the same time, to maintain the consistency of parent-child relationships, the following connection rules are defined when constructing the TreeIndex structure:
[0129] For a given bag(v), the bag(u) corresponding to the earliest eliminated vertex u in its neighbor set is set as its parent bag;
[0130] This connection method ensures that each vertex forms a connected subtree among all the bag nodes that contain it, satisfying the tree decomposition property;
[0131] Number structure output: The final tree decomposition structure output is a tree structure TreeIndex, which can be used for subsequent index encryption, path concatenation and verification.
[0132] S14. The graph data owner encrypts the information in the tree decomposition index structure constructed in step S13.
[0133] After the tree decomposition structure is constructed, the graph data owner encrypts the information within the resulting tree decomposition structure, such as... Figure 2 This is to ensure data privacy and provide basic support for subsequent verification processes. The main processing steps include the following:
[0134] Packet node encryption:
[0135] Using symmetric keys Perform AES symmetric encryption on each packet identifier to obtain This encryption ensures that the topology is unrecognizable on the cloud server side, protecting graphical privacy.
[0136] Vertex identity fields are encrypted for location matching:
[0137] Use deterministic encryption keys Encrypt the vertex IDs in the packet node sequentially to generate a matching field: .Will Embedded within the package node, it serves as a queryable matching field. Subsequent queries will use it within the token. , These fields can be matched directly without decryption.
[0138] Edge attribute encryption is used for fusion cost calculation:
[0139] The attribute values of each edge are encrypted using the Paillier homomorphic encryption public key pk: This encryption supports the computation of the path cost function in the ciphertext state, ensuring attribute privacy.
[0140] Edge verification information is generated for path validity verification:
[0141] The edge verification information generation includes the graph data owner generating signature materials and verification parameter distribution instructions for each edge;
[0142] To support path validity verification, the graph data owner generates signature material for each edge, including:
[0143] Edge label hash value: (2),
[0144] Where Hash(e) represents the hash value of the label of edge e. The attribute set representing edge e includes fields such as distance d, cost c, and time t, where u and v represent the two vertices connected by edge e, respectively. This is a concatenation symbol used to connect... , , To splice;
[0145] Signature result: (3),
[0146] The verification material is encapsulated in the verification index and bound to the edge ciphertext and packet node structure, wherein... Indicates using private key right The result of signing.
[0147] Verification parameter distribution instructions:
[0148] Signature verification public key In the pairing signature system, the generator g belongs to the group Provided for the proxy server to perform pairing equality verification:
[0149] (4),
[0150] Where g is a public parameter, selected and distributed to each entity by the graph data owner during the encryption phase. This represents a bilinear pairing operation, used to establish a verifiable mathematical relationship between two groups, ensuring consistency between the signature and the edge label hash value; this formula is used to verify the signature. Is it based on the corresponding public key? The corresponding private key was generated and has not been tampered with.
[0151] S15. The graph data owner encapsulates the above-mentioned encrypted information into an encrypted index and uploads the generated encrypted index to the cloud server through a secure channel.
[0152] The graph data owner encapsulates the aforementioned encrypted information into an encrypted index structure, including encrypted packet nodes, vertex identifier fields, edge attribute ciphertext, and edge verification information, and uploads it to the cloud server via a secure channel. This transmission process employs the TLS (True Sequencer) encryption protocol to ensure that the data is not leaked, tampered with, or replayed during transmission.
[0153] S2, Client users based on query requests and received authorization tokens The key in the query token T contains a random factor η and is used to generate a query token T, which is then sent to the cloud server.
[0154] After the index encryption is completed and uploaded to the cloud server, client users can generate a query token T based on the key in the authorization token for subsequent path queries and result verification. This stage aims to hide the query intent, including the start / endpoint / constraint values. Simultaneously, this scheme employs a binding authentication mechanism; the query token T contains a random factor η to ensure that the returned path result is bound to the current query request, preventing forgery and replay attacks. This mechanism achieves a strong binding relationship between the token and the result through the η parameter in the pairing verification equation, enhancing the credibility and security of the query results. The specific process is as follows:
[0155] S21. Location camouflage processing:
[0156] Client users use the deterministic encryption key in the authorization token Encrypt the starting point s and ending point t of the query path to generate matching fields. and This process avoids the server inferring the query location, thus protecting the privacy of the query location.
[0157] S22. Use Paillier encryption for constraint parameters or fusion weight parameters in the query request path;
[0158] Constraint parameters in the query request path, such as maximum cost Maximum time or fusion weight parameters It uses Paillier encryption, and the key is... The encrypted parameters can support constraint judgment and cost calculation on the server side, while avoiding the leakage of query preferences.
[0159] S23. Construct the random factor η required for the pairing equation and embed it into the query token T to verify the random factor binding:
[0160] The random factor η required to construct the pairing equation for subsequent verification is embedded in the query token T; this factor is used in subsequent pairing verification. The parameter in the middle acts as proof binding parameter to ensure that the path result cannot be forged.
[0161] S24. Generate query token T:
[0162] (5),
[0163] in It is an encrypted mapping of the starting point s; It is the encrypted mapping of the endpoint t; Enc(params) represents the encrypted constraints if it is a hard constraint mode, such as , If it is the fusion optimization mode: it includes the encrypted fusion weight value, such as ; It is a random factor generated by the client user and used for subsequent pairing verification binding.
[0164] S25. The client user sends the query token T to the cloud server.
[0165] The client user sends a query token T to the cloud server to trigger the path query and verification logic.
[0166] S3. The cloud server parses the received query token T, constructs a candidate path set P under the ciphertext based on the received encrypted index, and calculates the fusion cost to obtain the path-level fusion cost ciphertext. Select the set of shortest paths under the ciphertext. ;
[0167] The cloud server parses the received query token T as follows:
[0168] The server parses the encrypted fields in query token T: Start and End Points: The server uses the encrypted fields in query token T... , To match packet nodes in the encrypted index structure , That is, whether it is equal to the first node identifier stored in the packet node.
[0169] The step of constructing a candidate path set P under the ciphertext based on the received encrypted index specifically involves: the cloud server locating and expanding the starting path chain and the ending path chain based on the encrypted starting point and ending point identifiers in the query token T, and performing path splicing and constructing the candidate path set based on the lowest common ancestor identification.
[0170] Path generation: After receiving the query token T, the server initiates the path segment construction process based on the encrypted index in the tree decomposition structure.
[0171] Starting point path chain expansion: The server locates the starting point packet node Bag(s) based on the encrypted starting point identifier in the query token. Starting from this node, it expands layer by layer along the parent node direction of the tree structure to build the starting point path chain and records the packet node connection information.
[0172] Endpoint path chain expansion: Similarly, locate the endpoint packet node Bag(t), construct the endpoint path chain upwards from this node, and record the packet node connection information;
[0173] All path segment expansions are performed within an encrypted index structure, without the need to decrypt graph data.
[0174] Path concatenation and candidate path construction:
[0175] Least Common Ancestor (LCA) identification: The server compares the starting path chain with the ending path chain and identifies the first intersection packet node as the splicing anchor point, i.e., the Least Common Ancestor (LCA).
[0176] Path segment merging: The server uses LCA as the central hub to splice the starting path chain and the ending path chain to form a complete path. The path connection relationship is supported by the encrypted adjacency field in each packet node.
[0177] Candidate path set construction: All successfully spliced complete paths are added to the candidate set P under the ciphertext for use in subsequent fusion cost calculation and shortest path selection stages.
[0178] The path-level fusion cost ciphertext is obtained by calculating the fusion cost. The cloud server performs a fusion cost function on each edge in the candidate path set P under the ciphertext, and completes the weighted calculation in the Paillier encryption domain to obtain the edge-level fusion cost ciphertext. The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. ;
[0179] Specifically, the server performs a fusion cost calculation on the generated candidate path set to select the shortest path that meets the constraints. This process is performed in an encrypted state, without decrypting any edge attributes or weight parameters, ensuring data privacy.
[0180] The fusion cost function is defined as follows:
[0181] (6)
[0182] Where F(e) is the fusion cost of edge e; m is the total number of attribute dimensions of the edge; Let the j-th attribute value of edge e be such as distance, cost, time, risk level, energy consumption, etc. The j-th encrypted weight parameter set by the user in the query token; ∑ is the weighted sum of all attributes.
[0183] Since Paillier encryption supports addition and scalar multiplication, the homomorphic computation process is as follows:
[0184] The server executes the following for each edge:
[0185] (7)
[0186] in, Paillier homomorphic encryption is used to encrypt plaintext using the public key pk; the server performs scalar multiplication on each attribute value and weight, encrypts it, and then performs addition accumulation in the ciphertext field to obtain the edge-level fusion cost ciphertext. ;
[0187] The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. :
[0188] (8)
[0189] The set of shortest paths under ciphertext is selected. ,include:
[0190] a. If the query token T is in hard constraint mode, i.e., with an attached constraint threshold such as maximum cost. The server can perform homomorphic comparisons:
[0191] Determine if the path cost ciphertext satisfies:
[0192] (9),
[0193] This is used to filter out path segments that do not meet the fusion constraints, among which, This represents the maximum allowed fusion cost plaintext threshold set by the client user. Paillier ciphertext representing the cost of shortest path fusion.
[0194] b. If the query token T is in fusion optimization mode (i.e., without a constraint threshold), then based on the aforementioned fusion cost calculation, the system optimizes the candidate path set. Perform cryptographic cost evaluation and identify the shortest path using the minimum security protocol:
[0195] Each path The cost is the fusion cost ciphertext As calculated by formula (8), in order to identify the shortest path that satisfies the fusion constraint, the system further executes the Secure Minimum protocol, or SM protocol for short, to complete the minimum value identification operation in the Paillier encryption domain. Specifically, the cloud server performs the following minimum value comparison without decrypting any path cost plaintext:
[0196] (10)
[0197] in, Paillier ciphertext representing the cost of shortest path fusion. Indicate candidate path The Paillier ciphertext of the cost is used for fusion. This protocol ensures that the shortest path is determined without revealing any plaintext cost; the server only records the ciphertext of the minimum cost and its corresponding path identifier.
[0198] S4, the cloud server's set of shortest paths to the filtered ciphertext. The path information is constructed, and the verification materials are extracted. The constructed path information and the extracted verification materials are packaged into a query response package and submitted to the proxy server.
[0199] The cloud server provides the shortest path set under encrypted data. The path information is constructed, including the following:
[0200] Edge connectivity: The sequence of connections and encrypted identifiers for all edges in the path;
[0201] Edge attribute ciphertext: The encrypted attribute of each edge: ;
[0202] Total cost of the shortest path: ;
[0203] The verification materials include:
[0204] To support subsequent agent verification, the cloud server requires the following verification materials:
[0205] Signature information for each edge It is generated by the graph data owner using a private key to sign it;
[0206] The edge label hash value Hash(e) is used for pairing equality verification;
[0207] Verify auxiliary parameters: generator g, query token T for random factor η.
[0208] The cloud server will encapsulate the constructed shortest path structure (path information) and verification materials into a query response package and submit it to the proxy server to trigger the path validity verification process.
[0209] S5. The proxy server receives the query response packet and uses the random factor η and the signing public key. The pairing verification mechanism is used to verify the validity of the query response packet. If the verification passes, the proxy server sends the query response packet to the client user.
[0210] After the cloud server constructs the shortest path and sends the result back, the proxy server needs to verify the validity of the path result to ensure that each edge is signed by the graph data owner and bound to the current query token T. This stage uses a paired signature verification mechanism, and the verification process is as follows. Figure 3 This illustrates how, after receiving a query response packet, the proxy server performs edge-by-edge verification of the path results based on the pairing verification mechanism, and determines their legality and binding.
[0211] Specifically, the steps include the following:
[0212] S51, The proxy server receives the query response packet;
[0213] Includes path structure, Hash(e), g, and η;
[0214] S52. For each edge e = (u, v) in the query response packet, extract the following material:
[0215] Edge label hash value: Hash(e) = H(u || v || attr(e));
[0216] Side signature value: ;
[0217] Pairing verification parameter: generator g;
[0218] Query the random factor η in the token T.
[0219] S53. For each edge e = (u, v) in the query response packet, repeat the pairing verification equation calculation:
[0220] Because this scheme enables a binding authentication mechanism, the proxy server needs to use a random factor η and a signing public key. Perform the following pairing verification equation:
[0221] (11)
[0222] If the equation is true, then the edge signature is valid and bound to the current query token, indicating that the edge was generated by the graph data owner's signature and the result has not been forged or replayed.
[0223] The proxy server performs pairing verification on each edge in the path result in turn: if all edges satisfy the binding verification equation, the path result is valid and the result is returned to the user. The proxy server sends the verified query response packet back to the client user; if any edge fails verification, the path result is rejected and a verification failure message is displayed.
[0224] S6. The client user uses the key in the authorization token to locally decrypt and display the path information in the query response packet sent by the proxy server.
[0225] After the proxy server completes path validity verification, the client user uses the key in the authorization token to locally decrypt and display the query results. First, the client user uses the homomorphic encryption private key in the authorization token ( The total cost of the decryption path and the attribute values of each edge, such as distance, cost, and time, are used to recover the plaintext data. Then, a deterministic encryption key ( Decrypt the shortest path information. The entire decryption process is completed locally on the client side, and the key is only available to authorized client users, thus ensuring data security and privacy are not compromised.
[0226] Example 2
[0227] This example provides a multi-attribute fusion method for verifying shortest path queries, including graph data owners, client users, cloud servers, and proxy servers, such as... Figure 4 As shown; the graph data owner is the holder of the graph, whose main task is to send authorization tokens to client users and send public keys. The proxy server receives the data and constructs a tree decomposition structure based on the original graph structure information, encrypts it, and sends it to the cloud server. The client user's primary responsibility is to receive the authorization token and generate a query token T.
[0228]
[0229] The query token T is used to find the shortest path from the starting point A to the ending point D, and the fusion weight parameter is... The fourth parameter in T This random factor is used to construct the pairing equation in the subsequent verification process to prevent data forgery.
[0230] After generating a query token, the client user sends it to the cloud server to perform a shortest path query. The client then receives the encrypted path result, verified by the proxy server, and decrypts it to obtain the query result. The cloud server's main task is to receive and process the encrypted data, generate a path set, encapsulate the path result and path verification materials, and then send this data to the proxy server. The proxy server is responsible for verifying the path's legitimacy, ensuring that the cloud server has not tampered with the data. If the verification passes, the proxy server sends the final result to the client user, who then decrypts it to obtain the query result. The specific process described above is provided by [the relevant authority / organization]. Figure 1 As shown.
[0231] Step S1 specifically includes:
[0232] The data owner forms an authorization token. It is then sent to the client user via a secure channel, along with the signing public key. Distribute to the proxy server.
[0233]
[0234] The graph data owner performs a tree decomposition operation on the original graph data, and the original graph structure is as follows: Figure 5 As shown, the edge attribute information in the original graph is as follows: Figure 6 As shown. The tree decomposition process employs a minimum-degree elimination strategy and proceeds according to the following steps:
[0235] Node sorting and elimination: First, sort according to degree: D(1), S(2), B(2), A(2), C(3).
[0236] The vertex with the smallest degree is point D, so we first eliminate it to form a bag node Bag(D); the bag node Bag(D) contains node D and its adjacent node C, as well as the edge attribute DC. The edge attribute DC includes distance: 90, cost: 35, and time: 55; at this time, node D only has one adjacent node C and no edge needs to be added.
[0237] Degree Update and Subsequent Elimination: The node degrees are updated to: S(2), B(2), A(2), C(2). Then, nodes with a degree of 2 are randomly selected for elimination, for example, node C is eliminated, forming a bag node Bag(C). The bag node Bag(C) contains node C and its adjacent nodes B and S, as well as the edge attribute: distance. ,cost ,time :
[0238] CB (distance) 80, cost 30, Time :50), CS (distance) 150, cost 60, Time :90);
[0239] Add edge SB and sum the edge attributes: SB (distance) 230, cost 90, Time (140). Since there is only one way to reach SB at this point, the attributes are directly added without comparison. If there are two ways to reach SB, the attribute value with the smallest value is added.
[0240] The node degrees are updated to: S(2), B(2), A(2). Node A is eliminated sequentially according to the above steps until all nodes have been processed.
[0241] Tree structure connection relationships: Based on the elimination order (D, C, A, S, B) mentioned above, construct the tree structure connection relationships. In bag(D), the adjacent node of D is C, which is eliminated before D, so bag(C) is its parent node. The adjacent nodes of bag(C) are B and S. According to the elimination order, node S is eliminated before B, so bag(S) is the parent node of bag(C). Following the above principles, the final constructed tree structure diagram is as follows. Figure 7 As shown.
[0242] After completing the tree decomposition structure construction, the graph data owner encrypts the resulting package nodes and their connection relationships, as follows:
[0243] Packet node structure encryption: AES encryption is performed on the identifier and adjacency structure of each packet node using a symmetric key k1: Bag(D), identifier: , The same applies to others.
[0244] Vertex identity encryption for location matching: using a deterministic encryption key. Encrypt the vertex IDs in the packet node to generate a matching field: , , The same applies to others.
[0245] Edge attribute encryption is used for fusion cost calculation:
[0246] Encrypting edge attributes using Paillier homomorphic encryption public key pk: ; The same applies to others.
[0247] Edge verification information is generated for path validity verification:
[0248] Generate a hash and signature for each edge: , , , The same applies to others.
[0249] Verify parameter distribution: Verify auxiliary generator: g.
[0250] The data owner encapsulates the aforementioned encrypted information into an encrypted index and sends it to the cloud server.
[0251] Specifically, S2 includes:
[0252] S21. The client user uses the deterministic encryption key in the authorization token. Encrypt the vertex IDs of the starting point A and the ending point D to generate a position matching field: , .
[0253] S22. Use Paillier encryption to encrypt the fusion weights in the query request path;
[0254] The client user sets the fusion weight parameters as follows:
[0255] Distance weight: = 0.5, cost weight: = 1.0, Time weight: = 0.2, the above parameters are encrypted as follows:
[0256] S23. Construct the random factor η required for the pairing equation and embed it into the query token T;
[0257] The user generates a random factor η, which is used for subsequent pairing verification binding to ensure the correlation between the query token and the returned path result.
[0258] S24. Generate query token T:
[0259] Query token construction
[0260] S25. The token sending user sends the query token T to the cloud server, triggering the path query and verification process.
[0261] Specifically, S3 includes:
[0262] After receiving the query token T from the client user, the cloud server and the proxy server work together to calculate and verify the path. The specific process is as follows:
[0263] Encryption starting point in query token With the finish line marker Match the packet nodes in the encrypted index structure to confirm the starting packet node. The endpoint packet node is .
[0264] Candidate path generation
[0265] Path segment expansion:
[0266] Starting point path segment: from Extend along the parent node of the tree structure and record the path chain. .
[0267] End point path segment: From Expanding upwards, the path chain is .
[0268] Lowest Common Ancestor (LCA) Identification and Path Concatenation: LCA is... By piecing together the path segments, a complete path is formed: ;
[0269] Path edge identification and attribute extraction:
[0270] According to the path chain By analyzing the intersection vertices between the packet nodes, the following connecting edges were identified using the lowest ancestor node as the intermediate value:
[0271] <-> The intersection vertices in are , Therefore, there are two edges AS and AB at this time, and the attribute values of the corresponding edges are extracted; <-> The intersection vertices are Therefore, there exists an edge at this point. - , and extract the attribute values of the corresponding edges; <-> The intersection vertices in are , Therefore, there are two edges at this point. - and - And extract the attribute values of the corresponding edges.
[0272] The fusion weight parameter specified in the query token T is: = 0.5, = 1.0, = 0.2.
[0273] Calculation of the fusion cost for each edge:
[0274] The server performs a fusion cost function on each edge in the path. The weighted calculation is then performed within the Paillier cryptographic domain.
[0275] ;
[0276] ;
[0277] ;
[0278] ; ;
[0279] Path concatenation and total cost ciphertext calculation:
[0280] Known path chain Includes and Two paths:
[0281] It can be known Total cost:
[0282] ;
[0283] Total cost:
[0284] ;
[0285] Therefore at this time Minimize the total cost and add it to the shortest path cost set. Therefore, it is the shortest path.
[0286] S4, the cloud server identifies the set of shortest paths under the encrypted text. Then, the path information is constructed, and the verification materials are extracted. The constructed path information and the verification materials are packaged into a query response package and submitted to the proxy server.
[0287] Find the set of shortest paths under the ciphertext with the minimum total cost. Subsequently, the cloud server performs structured encapsulation of the path to form a complete query response, including path structure information, attribute ciphertext, verification materials, etc., as detailed below:
[0288] Shortest path set under ciphertext :{ };
[0289] Edge connectivity: , , ;
[0290] Edge attribute ciphertext: The encrypted attribute values for each edge, including distance, cost, and time.
[0291] :
[0292] ;
[0293] ;
[0294] ;
[0295] :
[0296] ;
[0297] ;
[0298] ;
[0299] :
[0300] ;
[0301] ;
[0302] ;
[0303] Total path cost ciphertext: The fusion cost ciphertext of the shortest path is... = ;
[0304] Verification materials:
[0305] The hash value and signature information of each edge label:
[0306] ;
[0307] Verify auxiliary parameters: query the random factor in token T: η, verify auxiliary generator: g.
[0308] The generated data is packaged and sent to the proxy server for subsequent verification.
[0309] S5. The proxy server receives the query response packet and uses the random factor η and the signing public key. The pairing verification mechanism is used to verify the validity of the query response packet. If the verification is successful, the proxy server returns the query response packet to the client user.
[0310] Specifically, the proxy server verifies the legitimacy of the path by extracting the verification materials sent by the cloud server and using the signing public key provided by the graph data owner. Perform pairing verification on each edge:
[0311] ;
[0312] ;
[0313] ;
[0314] If the above verification passes, it means that the edge signature is valid and bound to the current query. The verified query response packet is then securely sent back to the client user.
[0315] S6. After receiving the query response packet forwarded by the proxy server, the client user performs the following decryption operation: decrypts the ciphertext of the total path cost using the homomorphic encryption private key sk. The total cost plaintext is 285, along with the plaintext attribute information of each edge, obtained using the key. Decrypting the Shortest Path Set The final decryption path is: A, B, C, D.
[0316] Example 3
[0317] This embodiment also provides an apparatus, including:
[0318] At least one processor; and
[0319] The memory stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the multi-attribute fusion shortest path verifiable query method as described above.
[0320] In this embodiment, the electronic device may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile computing device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable computing device, consumer electronic device, etc.
[0321] Example 4
[0322] This embodiment also provides a machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the multi-attribute fusion shortest path verifiable query method as described above.
[0323] Specifically, a system or apparatus equipped with a readable storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer or processor of the system or apparatus can read and execute the instructions stored in the readable storage medium.
[0324] In this case, the program code read from the readable medium itself can perform the functions of any of the above embodiments, and therefore the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of this specification.
[0325] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.
[0326] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solutions of the present invention, and are not intended to limit the specific implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention should be included within the protection scope of the claims of the present invention.
Claims
1. A multi-attribute fusion shortest path verifiable query method, characterized in that, Comprise: S1. The graph data owner generates a key and packages the key to generate an authorization token. Authorization token Distribute to client users, including the signing public key contained in the key. The data is sent to the proxy server. At the same time, the graph data owner performs tree decomposition structure construction on the original graph data, encrypts the information in the constructed tree decomposition structure, generates an encrypted index, and uploads the generated encrypted index to the cloud server. S2, the client user generates a query token T containing a random factor η based on the query requirement and the received authorization token and sends the query token T to the cloud server; S3, the cloud server parses the received query token T, constructs a candidate path set P under the ciphertext according to the received encrypted index, and calculates the path-level fusion cost ciphertext by fusion cost calculation , from which the shortest path set under the ciphertext is screened out ; S4, the cloud server's set of shortest paths to the filtered ciphertext. The path information is constructed, and the verification materials are extracted. The constructed path information and the extracted verification materials are packaged into a query response package and submitted to the proxy server. S5, the proxy server receives the query response packet, uses the random factor η and the signature public key The pairing verification mechanism is performed to verify the legitimacy of the query response packet. After verification, the proxy server sends the query response packet to the client user. S6, the client user uses the key in the authorization token to locally decrypt and display the path information in the query response package sent by the proxy server; The query token T in step S2: (5), wherein is the encryption mapping of the start point s; is the encryption mapping of the end point t; Enc(params) then represents the encrypted constraints if it is in the hard constraint mode, or the encrypted fusion weight values if it is in the fusion optimization mode; is a random factor generated by the client user for the subsequent pairing verification binding; The path-level fusion cost ciphertext is obtained by performing the fusion cost calculation in step S3 The cloud server performs the fusion cost function on each edge in the candidate path set P under the ciphertext, and completes the weighted calculation in the Paillier encryption domain to obtain edge-level fusion cost ciphertext The edge-level fusion cost ciphertext in the obtained whole path is accumulated to obtain the path-level fusion cost ciphertext ; The fusion cost function is defined as follows: (6) where F(e) is the fusion cost value of edge e; m is the total number of attribute dimensions of the edge; is the jth attribute value of edge e, is the jth encryption weight parameter set by the user in the query token; ∑ is the weighted sum of all attributes; Step S5 is specifically: S51, the proxy server receives the query response package; S52, for each edge e = (u, v) in the query response package, extract the following materials: Edge label hash value: Hash(e) = H(u || v || attr(e)); Edge signature value: ; Pairing verification parameters: generator g; random factor η in the query token T; S53, for each edge e = (u, v) in the query response package, repeat the pairing verification equation calculation: (11) If the equation is established, the edge signature is legal and is bound with the current query token, indicating that the edge is generated by the graph data owner signature, and the result is not forged or replayed; If all edges satisfy the binding verification equation, the path result is legal, and the result is returned to the user, and the proxy server sends the query response package verified by the proxy server back to the client user; If any edge verification fails, the path result is rejected, and verification failure is prompted.
2. The verifiable querying method of claim 1, wherein, Step S1 specifically includes: S11, the graph data owner generates the following keys in turn: Homomorphic encryption key pairs ( ), symmetric encryption key ( ), deterministic encryption key ( ), Signature key pair ( In this process, the Paillier homomorphic encryption algorithm is used to generate the public key pk and the private key sk, and a symmetric encryption algorithm is used to generate the key. A signature key pair is generated using an asymmetric encryption algorithm. This represents the signature private key of the graph data owner. The signature public key representing the owner of the graph data; S12. Package the above keys into a complete authorization token. Authorization token transmitted via secure channel Distribute to client users with access rights, and sign the public key. Send the authorization token to the proxy server. Recorded as: (1) wherein, is an authorization token, is a generator in the pairing signature scheme; S13, the graph data owner constructs a tree decomposition index structure of the graph using the minimum degree elimination strategy; S14, the graph data owner encrypts the information in the tree decomposition index structure constructed in step S13; S15, the graph data owner encapsulates the encrypted information generated in step S14 as an encrypted index, and uploads the generated encrypted index to the cloud server.
3. The verifiable query method according to claim 2, wherein S13 is specifically: preferentially selecting the vertex with the smallest degree in the original graph data for elimination; when each vertex v is eliminated, it and its neighbor set N(v) form a bag node, denoted as Bag(v), and the vertex set and its related edge attributes in the bag node are recorded; if the neighbors are not connected, a padding edge is added, and the edge attributes are merged or derived according to the preset rules; the corresponding bag nodes are sorted in turn according to the elimination order of the vertices; if two bags have a common vertex, they are connected by an edge; at the same time, in order to maintain the consistency of the parent-child relationship, when constructing the tree structure TreeIndex, the following connection rules are defined: for a bag Bag(v), the bag Bag(u) corresponding to the vertex u in its neighbor set which is eliminated earliest is set as its parent bag; finally, the tree decomposition structure is output as a tree structure TreeIndex; The information encryption in step S14 includes package node encryption, vertex identity field encryption, edge attribute encryption and edge verification information generation, wherein the symmetric key is used for symmetric encryption for each package identity , and the deterministic encryption key is used for sequentially encrypting the vertex ID in the package node to generate a matchable field , and is embedded in the package node as a queryable matchable field; and the attribute value of each edge is encrypted using the Paillier homomorphic encryption public key pk . The edge verification information generation includes that the graph data owner generates signature materials and verification parameter distribution instructions for each edge: The signature material is specifically: Edge label hash value: (2), where Hash(e) represents the label hash value of edge e, attr(e) represents the attribute set of edge e, u and v represent two vertices connected by edge e, is a concatenation symbol used to concatenate , , ; Signature result: (3), The verification material is encapsulated into the verification index, and is bound to the edge ciphertext and the package node structure, wherein, represents the signature private key of the graph data owner, Hash(e) is the label hash value of the edge e, and Sign(e) represents the result obtained by signing Hash(e) using the private key of the graph data owner. The verification material distribution instruction is specifically: Signature verification public key The proxy server performs pairing equation verification with the generator g in the pairing signature system: (4), where g is a public parameter selected by the graph data owner at the encryption phase and distributed to each entity, represents a bilinear pair operation used to establish a verifiable mathematical relationship between two groups, ensuring consistency between the signature and the edge label hash value.
4. The verifiable querying method of claim 1, wherein, Step S2 is specifically: S21, the client user uses the deterministic encryption key in the authorization token The encryption is performed on the start s and end t of the query requirement path, generating a matching field With ; S22, use Paillier encryption for the constraint parameters or fusion weight parameters in the query demand path; S23, construct the random factor η required by the pairing equation and embed it in the query token T to verify the random factor binding; S24, generate the query token T; S25, the client user sends the query token T to the cloud server.
5. The verifiable querying method of claim 1, wherein, Step S3: constructing the candidate path set P under the ciphertext according to the received encrypted index: the cloud server locates the starting point path chain and the ending point path chain according to the encrypted starting point and ending point identification in the query token T, and performs path splicing and candidate path set construction based on the lowest common ancestor identification; Since Paillier encryption supports addition and scalar multiplication, the homomorphic calculation process is as follows: The server performs the following operations on each edge: (7) wherein, is a Paillier homomorphic encryption operation for encrypting plaintext using public key pk; the server performs scalar multiplication on each attribute value and weight, and then encrypts, and completes additive accumulation in the ciphertext domain to obtain edge-level fusion cost ciphertext ; The edge fusion cost in the whole path is accumulated to obtain path-level fusion cost ciphertext : (8); wherein, is a path-level fusion cost ciphertext, is a candidate path; Step S3 screens out the shortest path set under the ciphertext , comprising: a. If the query token T is in the hard constraint mode, i.e. with a constraint threshold, homomorphic comparison can be performed: Determine whether the path cost ciphertext satisfies: (9) to screen out path segments that do not satisfy the fusion constraint, wherein, represents a maximum allowed fusion cost plaintext threshold set by a client user, represents a Paillier ciphertext of the shortest path fusion cost; b. If the query token T is in the fusion optimization mode, i.e. without a constraint threshold, take the shortest path identified through the secure minimum value protocol: (10) wherein, Paillier ciphertexts representing shortest path fusion costs, candidate paths Paillier ciphertexts of fusion costs.
6. The verifiable querying method of claim 5, wherein, Step S3: constructing the candidate path set P according to the encrypted index in the tree decomposition structure, specifically: the server locates the starting point bag node Bag(s) according to the encrypted starting point identification in the query token, and expands from this node along the parent node direction of the tree structure layer by layer to construct the starting point path chain and record the bag node connection information; Locate the ending point bag node Bag(t), and construct the ending point path chain from this node upwards and record the bag node connection information; All path segment expansions are completed under the encrypted index structure; The server compares the starting point path chain and the ending point path chain to identify the first intersection bag node as the splicing anchor point, i.e. the lowest common ancestor LCA; The server splices the starting point path chain and the ending point path chain to form a complete path with LCA as the center, and the path connection relationship is supported by the encrypted adjacency field in each bag node. All successfully spliced complete paths are added to the candidate set P.
7. The verifiable querying method of claim 1, wherein, The set of shortest paths under the ciphertext described in step S4 Path information, including: Edge connection relationship: the connection sequence and encrypted identification of all edges in the path; Edge attribute ciphertext: the encrypted attribute of each edge: [ ; Shortest path total cost: ; The verification material of step S4 includes: signature information of each edge ; edge label hash value Hash(e); verification auxiliary parameters: generator g, random factor η in query token T.
8. A device for implementing a multi-attribute fusion shortest path verifiable query method, characterized in that, The device includes: At least one processor; and Memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the multi-attribute fusion shortest path verifiable query method of any one of claims 1-7.
9. A machine-readable storage medium having stored thereon executable instructions, the method comprising: The instructions, when executed, cause the machine to perform the multi-attribute fusion shortest path verifiable query method of any one of claims 1-7.
Citation Information
Patent Citations
Graph data constraint shortest path verification query method and system based on privacy protection
CN120165836A
Encrypted graph quality constraint shortest path query method and device based on tree decomposition and computer readable storage medium
CN119989410A