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 efficiency and verification capability in encrypted graph queries are solved, realizing efficient and secure multi-attribute path queries, which are 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
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Existing technologies suffer from low query efficiency and insufficient verification capabilities in encrypted graph queries. In particular, they lack an effective mechanism for multi-attribute fusion optimization and result verification, which poses a risk 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, combined with the encrypted tree decomposition structure and multi-attribute fusion cost calculation, efficient path segment splicing and verifiability of results are achieved.
It enables efficient, secure, and reliable multi-attribute 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 and privacy-sensitive graph mining.
Smart Images

Figure CN121000374A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of electric digital data processing, and particularly relates to a multi-attribute fusion shortest path verifiable query method and device. BACKGROUND
[0002] With the rapid development of cloud computing and large-scale graph data outsourcing, more and more application scenarios need to perform graph structure analysis and path query operations on third-party servers. Typical applications include traffic navigation, social recommendation, medical referral and supply chain optimization. Such graph data usually involves sensitive information such as user location, relationship network and medical records. Once leaked, it may cause serious privacy risks. Therefore, how to protect the privacy of graph structure, edge attribute and user query intention while ensuring query efficiency has become a key problem to be solved in the field of graph query.
[0003] Existing shortest path index methods such as Dijkstra algorithm, 2-Hop Labeling and Contraction Hierarchies all rely on plaintext graph structure and full graph visibility, and are difficult to be directly applied to encrypted graph environment. The current few schemes supporting encrypted graph query mostly adopt label propagation or redundant path storage strategy, lack systematic index mechanism, not only the query efficiency is limited, but also it is difficult to realize shortest path calculation under multi-dimensional attribute constraints such as distance, time, cost, etc. In addition, the existing methods generally lack result verifiable mechanism, the client cannot confirm the correctness and shortestness of the returned path, and there is a security risk of being forged, tampered or replayed.
[0004] The Chinese patent document CN120165836A discloses a privacy protection-based graph data constraint shortest path verification query method and system, which acquires a path query request sent by a user end, performs encryption processing on target graph data, generates encrypted graph structure features and splits them into first and second encrypted sub-features, calls a pre-trained key splitting model to match path constraint conditions with a preset privacy policy, generates a verification token, sends the first encrypted sub-feature and the verification token to a first computing node and the second encrypted sub-feature and the verification token to a second computing node, triggers the first and second computing nodes to perform secure multi-party computation, outputs candidate path ciphertext and a verification parameter set, performs consistency checking, and if the checking passes, performs decryption processing to generate a target shortest path satisfying the path constraint conditions. However, the scheme still has the following deficiencies: the verification token generation depends on a pre-trained model, has poor flexibility and is difficult to adapt to diversified constraint requirements; the path verification process is complex, requires multi-node collaborative computation, has large communication overhead and is difficult to deploy in an edge environment; lacks a structured index mechanism, has low path construction efficiency and is difficult to support fast query and individual optimization; and the verification mode is not bound to the query token, which has the risk of forgery and replay attack.
[0005] In summary, although some existing schemes have respectively realized path query, result verification or attribute constraint functions in an encrypted graph environment, there are still deficiencies in query efficiency and verification capability, especially in multi-attribute fusion optimization capability, and an effective mechanism has not been formed, and a unified and efficient solution framework has not been formed. In view of the deficiencies of the prior art in efficiency, security and flexibility in encrypted graph query, the present application provides a multi-attribute fusion shortest path verifiable query method and device, which has the advantages of lightweight structure, efficient computation, reliable verification and flexible optimization. SUMMARY
[0006] The present application aims to overcome at least one of the above-mentioned deficiencies of the prior art, and provides a multi-attribute fusion shortest path verifiable query method, which constructs a compact encrypted index structure to support efficient splicing of path segments, and designs a pairing verification mechanism to realize the verifiability of the results, so as to complete the secure, efficient and reliable query of the multi-attribute constraint path without revealing the graph structure and query intention.
[0007] The present application also discloses a device loaded with the multi-attribute fusion shortest path verifiable query method.
[0008] The detailed technical solutions of the present application are as follows: A multi-attribute fusion shortest path verifiable query method, comprising: S1, a graph data owner generates a key and packs the key to generate an authorization token S2, the authorization token is sent to a user terminal 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, 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. 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. ; 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 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. 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.
[0009] Preferably, step S1 specifically includes: S11. The graph data owner first generates the following keys in sequence: 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; 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: (1) 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; S13. The graph data owner uses a minimum degree elimination strategy to construct the tree decomposition index structure of the graph; 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 into an encrypted index and uploads the generated encrypted index to the cloud server.
[0010] 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.
[0011] 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 Embedding in the package node as a queryable matching field; encrypt the attribute value of each edge using Paillier homomorphic encryption public key pk: ; The edge verification information generation includes that the graph data owner generates signature material and verification parameter distribution instruction for each edge: The signature material is specifically: Edge label hash value: (2), Wherein Hash(e) represents the label hash value of the edge e, attr(e) represents the attribute set of the edge e, u and v respectively represent two vertices connected by the edge e, is a concatenation symbol, used to splice , , ; Signature result: (3), The verification material is encapsulated into the verification index and bound to the edge ciphertext and the package node structure, wherein, Indicates 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 ; The verification material distribution instruction is specifically: Signature verification public key And the generator g in the pairing signature system are used by the proxy server to perform pairing equation verification: (4), Wherein g is a public parameter, which is selected by the graph data owner in the encryption stage and distributed to each entity, Indicates a bilinear pair operation, which is used to establish a verifiable mathematical relationship between two groups, and ensure the consistency between the signature and the edge label hash value.
[0012] Preferably, step S2 is specifically: S21, the client user uses the deterministic encryption key in the authorization token To encrypt the starting point s and the ending point t of the query requirement path, and generate a matching field And ; S22, using Paillier encryption for the constraint parameter or fusion weight parameter in the query requirement path; S23, construct the random factor η required by the pairing equation, and embed it into the query token T to bind the verification random factor; S24, generate the query token T: (5), wherein is the encryption mapping of the start point s; is the encryption mapping of the end point t; Enc(params) represents the encrypted constraint if it is a hard constraint mode, or the encrypted fusion weight value if it is a fusion optimization mode; is a random factor generated by the client user, which is used for subsequent pairing verification binding; S25, the client user sends the query token T to the cloud server.
[0013] Preferably, the cloud server parses the received query token T in step S3, specifically: the server parses the encrypted field in the query token T: Start and end points: the server uses , to match the bag node in the encrypted index structure , , that is, whether it is equal to the first node identifier stored in the bag node.
[0014] Preferably, step S3 constructs a candidate path set P under ciphertext according to the received encrypted index, specifically: the cloud server locates the start point path chain and the end point path chain according to the encrypted start point and end point identifier in the query token T, and performs path splicing and candidate path set construction based on the lowest common ancestor identification.
[0015] Further preferably, step S3 constructs a candidate path set P under ciphertext according to the encrypted index in the tree decomposition structure, specifically: The server locates the start bag node Bag(s) according to the encrypted start point identifier in the query token, and expands layer by layer along the parent node direction of the tree structure from this node to construct the start point path chain, and records the bag node connection information; Similarly, the end bag node Bag(t) is located, and the end point path chain is constructed from this node upwards, and the bag node connection information is recorded; All path segment expansions are completed under the encrypted index structure; The server compares the start point path chain with the end point path chain, identifies the first intersection bag node as the splicing anchor point, that is, the lowest common ancestor LCA; The server splices the start point path chain and the end point path chain to form a complete path with LCA as the center, and the path connection relationship is supported by the encrypted adjacent field in each bag node; All successfully spliced complete paths are added to the candidate set P under ciphertext.
[0016] Preferably, step S3 performs fusion cost calculation to obtain 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. ; The fusion cost function is defined as follows: (6) 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.
[0017] Since Paillier encryption supports addition and scalar multiplication, the homomorphic computation process is as follows: The server executes the following for each edge: (7) 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. ; The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. : (8) in, For path-level fusion cost ciphertext, Candidate paths; The set of shortest paths under ciphertext is selected. ,include: a. If the query token T is in hard constraint mode, i.e., with a constraint threshold, homomorphic comparison can be performed: Determine if the path cost ciphertext satisfies: (9) 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.
[0018] b. If the query token T is in the fusion optimization mode, i.e. without constraint threshold, the shortest path is identified by the secure minimum protocol: (10) wherein, represents the Paillier ciphertext of the fusion cost of the shortest path set, represents the candidate path fusion cost of the Paillier ciphertext.
[0019] Preferably, the path information of the shortest path set in step S4 under the ciphertext includes: edge connection relationship: connection sequence of all edges in the path and encrypted identification; edge attribute ciphertext: encrypted attribute of each edge: ; total cost of the shortest path: ; The verification material in step S4 includes: signature information of each edge ; edge label hash value Hash(e); verification auxiliary parameters: generator g, random factor η in the query token T.
[0020] Preferably, step S5 is specifically: S51, the proxy server receives the query response packet; S52, for each edge e = (u, v) in the query response packet, extract the following material: 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 packet, repeat the pairing verification equation calculation: (11) If the equation is established, the edge signature is legal and bound to 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 proxy server sends the verified query response packet back to the client user; if any edge verification fails, the path result is rejected, and the verification failure is prompted.
[0021] Preferably, in step S6, the client user uses the homomorphic encryption private key in the authorization token ( ) decrypt the total cost of the path and the attribute value of each edge, and restore the plaintext data; and ) decrypt the shortest path information.
[0022] In another aspect of the present application, there is also provided an apparatus comprising: at least one processor; and a 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 as described above.
[0023] In another aspect of the present application, there is also provided 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.
[0024] Compared with the prior art, the present application has the following beneficial effects: (1) The present application constructs a unified technical framework with high efficiency, security and flexibility in the field of encrypted graph query. Through the collaborative design of key mechanisms such as structured indexing, fusion encryption, path verification and attribute optimization, not only does it break through the bottleneck of the prior art in terms of query efficiency and verification ability, but also it realizes personalized path selection and lightweight deployment under multi-attribute constraints, has a wide application prospect, and is suitable for various practical scenarios such as cloud data outsourcing, privacy-sensitive graph mining, and trusted path query.
[0025] (2) The present application realizes efficient path query by constructing an encrypted tree decomposition structure and introducing a query token positioning mechanism. The present application organizes graph data using an encrypted tree decomposition structure, quickly locates the package nodes where the starting point and the ending point are located in combination with the query token, and realizes efficient splicing of path segments using the lowest common ancestor identification mechanism. This design significantly improves the query efficiency in a large-scale encrypted graph environment, reduces unnecessary traversal and calculation overhead, and is suitable for application scenarios with high real-time requirements.
[0026] (3) The present application realizes comprehensive privacy protection during the query process by fusing multiple encryption technologies. By fusing homomorphic encryption, symmetric encryption and deterministic encryption technologies, the graph structure, edge attributes and query intent are encrypted, ensuring that the data is always in a ciphertext state during the entire query process, effectively preventing information leakage, and improving the security and credibility of the system.
[0027] (4) The pairing verification mechanism combined with the query token is introduced to realize the authenticity binding of the path result. The random factor is embedded in the query token, and the pairing verification formula is combined to realize the binding authentication of the path result and the query request, effectively prevent the forgery and replay attack, and guarantee the authenticity and non-repudiation of the query result.
[0028] (5) The multi-attribute fusion optimization is realized by setting the fusion weight parameter and performing attribute weighted calculation in the ciphertext domain. The method supports users to flexibly set the weight parameters of distance, cost, time and other attributes according to the query preference, and completes the fusion cost calculation in the ciphertext state, meets the personalized path selection demand in complex scenes. At the same time, through the structured encapsulation and encrypted transmission mechanism, the integrity and transmission safety of the query result are further guaranteed, and the practicability, reliability and scalability of the system are improved.
[0029] (6) The low-communication-overhead edge deployment capability is realized by modular design and lightweight calculation process. The modular index structure and lightweight calculation process are adopted, and the calculation resources and communication burden are significantly compressed in the key links of path construction, verification and transmission. The system can efficiently run on the edge device with limited resources, without relying on high-performance servers or complex coordination mechanism, and has good deployment flexibility and environmental adaptability, and is suitable for various practical application scenes such as Internet of Things, Internet of Vehicles and mobile terminals. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 The method flowchart of the present application is shown in the figure; Figure 2 The encryption structure diagram of the method of the present application is shown in the figure; Figure 3 The path legality verification flowchart of the method of the present application is shown in the figure; Figure 4 The system model diagram of the method of the present application is shown in the figure; Figure 5 The original graph structure of embodiment 2 of the present application is shown in the figure; Figure 6 The attribute information of the edge in the original graph of embodiment 2 of the present application is shown in the figure; Figure 7 The tree decomposition structure of the original graph of embodiment 2 of the present application is shown in the figure. DETAILED DESCRIPTION
[0031] Embodiment 1 The present embodiment provides a multi-attribute fusion shortest path verifiable query method, as shown in Figure 1 , the method comprises: S1, system initialization stage: the graph data owner generates a key, and packs the key to generate an authorization token The authorization token is distributed to the client user, and the public key contained in the signature key is sent to the proxy server; at the same time, the graph data owner performs tree decomposition structure construction on the original graph data, and encrypts the information in the tree decomposition structure formed after construction to generate an encrypted index, and uploads the generated encrypted index to the cloud server. In the present application, the system initialization stage is performed by the graph data owner, and the purpose is to provide necessary encryption support for subsequent query token generation and result verification.
[0032] Step S1 specifically includes: S11, the graph data owner generates the following keys in sequence: Homomorphic encryption key pair (pk, sk): the public key pk is used to encrypt the attribute values of the edges in the graph, such as distance, cost, time, etc. The private key sk is used to decrypt the fused attribute values in the query results. Symmetric encryption key (k): a symmetric encryption algorithm such as AES is used to generate a key k, which is used to encrypt the package node information in the graph to prevent the graph topology from being leaked on the server side. Deterministic encryption key (id): used to perform deterministic encryption on the vertex IDs in the graph to ensure that the same vertex generates consistent ciphertext after encryption, supporting location matching operations in the query token; the key is generated by the graph data owner in the initialization stage and used to construct the queryable field. Signature key pair (sigpk, sigsk): a non-symmetric encryption algorithm such as RSA is used to generate a signature key pair: The signature verification private key sigsk is used to verify the auxiliary information. The signature verification public key sigpk is used to verify the auxiliary information. The private key sigsk is used to sign the hash value of the edge to generate non-forgery verification information. The public key sigpk is used by the proxy server to verify the legality of the signature to ensure the credibility of the query results.
[0033] S12, the above keys are packaged to form a complete authorization token , which is distributed to the client user with access rights through a secure channel, and is used for subsequent encrypted query token generation, path verification and result decryption processing, and the signature public key is sent to the proxy server: The authorization token is denoted as: (1) wherein, is an authorization token, a public key is used to encrypt the constraint parameters or fusion cost parameters in the query; a private key is used to decrypt the homomorphic encryption of the fusion cost; is used to perform deterministic encryption on the vertex ID field, ensure consistency and support location matching; is a signature verification public key used by the verification auxiliary information, i.e., edges, and the client can perform verification locally without contacting the graph data owner; is a generator in the pairing signature system, used for pairing verification equation calculation, and is the basic parameter of the verification process; S13, the graph data owner constructs a tree decomposition index structure of the graph using the minimum degree elimination strategy; The graph data owner performs a tree decomposition operation on the original graph data, aiming to construct a structured index system to support subsequent encryption processing and path verification processes. The tree decomposition process uses the minimum degree elimination strategy, and the specific steps are as follows: Elimination strategy selection: the minimum degree elimination strategy is used, which preferentially selects the vertex with the smallest degree for elimination, to reduce the number of padding edges and improve the compactness of the index.
[0034] Bag node construction: 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 attribute values are recorded in the bag node; if the neighbors are not connected, padding edges are added, and edge attributes are merged or derived according to the pre-set rules to maintain path connectivity; Record the order of vertex elimination: the corresponding bag nodes are sorted in the order of vertex elimination, providing a sequence basis for the subsequent construction of the tree decomposition structure; Tree structure connection relationship: 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 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 that is eliminated earliest is set as its parent bag; This connection method ensures that each vertex forms a connected sub-tree between all bag nodes containing it, satisfying the tree decomposition property; Number structure output: the final tree decomposition structure is output as a tree structure TreeIndex, which can be used for subsequent index encryption, path splicing, and verification.
[0035] S14, the graph data owner encrypts the information in the tree decomposition index structure constructed in step S13; After the tree decomposition structure is completed, the graph data owner encrypts the information in the formed tree decomposition structure, such as Figure 2 , to protect data privacy and provide a basis for subsequent verification processes. The main processing steps include the following: Package node encryption: A symmetric key is used to perform AES symmetric encryption on each package identifier to obtain This encryption ensures that the topology structure is not identifiable on the cloud server side, protecting the privacy of the graph.
[0036] Vertex identity field encryption, used for position matching: A deterministic encryption key is used to sequentially encrypt the vertex ID in the package node to generate a matchable field: . The is embedded in the package node as a queryable matching field. The , in the subsequent query token can be directly matched with these fields without decryption.
[0037] Edge attribute encryption, used for fusion cost calculation: The attribute value of each edge is encrypted using the Paillier homomorphic encryption public key pk: This encryption supports the calculation of the path cost function in the ciphertext state, ensuring attribute privacy.
[0038] Edge verification information generation, used for path legality verification: The edge verification information generation includes the graph data owner generating signature materials and verification parameter distribution instructions for each edge; To support path legality verification, the graph data owner generates signature materials for each edge, including: Edge label hash value: (2), where Hash(e) represents the label hash value of edge e, represents the attribute set of edge e, including distance d, cost c, and time t fields, and u and v represent the 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 bound to the edge ciphertext and package node structure, where represents the result obtained by signing with the private key .
[0039] Verification parameter distribution description: Signature verification public key The generator g in the pairing signature system belongs to the group For the proxy server to perform pairing equation verification: (4), Where g is a public parameter selected and distributed by the graph data owner in the encryption phase to each entity, Indicates a bilinear pair operation, which is 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 Corresponding public key Corresponding private key generation, and has not been tampered with.
[0040] S15, the graph data owner encapsulates the above encryption information into an encryption index, and uploads the generated encryption index to the cloud server through a secure channel.
[0041] The graph data owner encapsulates the above encryption information into an encryption index structure, including an encryption package node, a vertex identification field, edge attribute ciphertext, and edge verification information, and uploads it to the cloud server through a secure channel. The transmission process uses the encryption communication protocol TLS to ensure that the data is not leaked, tampered with, or replayed during transmission.
[0042] S2, the client user generates a query token T containing a random factor η based on the query requirement and the received authorization token The key in the query token T is sent to the cloud server; After the index encryption is completed and uploaded to the cloud server, the client user can generate a query token T based on the key in the authorization token, which is used for subsequent path query and result verification. This phase aims to hide the query intention including the starting point / endpoint / constraint value, while this scheme uses a binding authentication mechanism, which contains a random factor η in the query token T, ensuring that the returned path result is bound to the current query request, preventing forgery and replay attacks. This mechanism realizes the strong binding relationship between the token and the result through the η parameter in the pairing verification equation, improving the credibility and security of the query result. The specific process is as follows: S21, location camouflage processing: The client user uses the deterministic encryption key in the authorization token Encrypt the starting point s and the ending point t of the query requirement path to generate matching fields And ; this process avoids server inference of query location, ensuring query location privacy.
[0043] S22, Paillier encryption is used for constraint parameters or fusion weight parameters in query demand path; Paillier encryption is used for constraint parameters such as maximum cost , maximum time , or fusion weight parameters in query demand path, with key ; the encrypted parameters can support constraint judgment and cost calculation on the server side, while avoiding the leakage of query preferences.
[0044] S23, construct the random factor η required for pairing equation and embed it in the query token T to verify the binding of the random factor: The random factor η required for pairing equation is constructed for subsequent verification steps and embedded in the query token T; the factor acts as a proof binding parameter in subsequent pairing verification , ensuring that the path result cannot be forged.
[0045] S24, generate query token T: (5), where is the encrypted mapping of the starting point s; is the encrypted mapping of the end point t; Enc(params) represents the encrypted constraints if it is a hard constraint mode, such as , , or the encrypted fusion weight value if it is a fusion optimization mode, such as ; is a random factor generated by the client user for subsequent pairing verification binding.
[0046] S25, the client user sends the query token T to the cloud server.
[0047] The client user sends the query token T to the cloud server to trigger path query and verification logic.
[0048] S3, the cloud server parses the received query token T, constructs a candidate path set P under ciphertext according to the received encrypted index, and calculates the path-level fusion cost ciphertext from which the shortest path set under ciphertext is screened out; The cloud server parses the received query token T, which is specifically: The server parses the encrypted fields in the query token T: starting point and end point: the server uses , in the query token T to match the package nodes in the encrypted index structure , , i.e. whether it is equal to the first node identifier stored in the bag node.
[0049] The candidate path set P under ciphertext is constructed according to the received encrypted index, specifically: the cloud server performs the starting point path chain and the ending point path chain expansion according to the encrypted starting point and the ending point identifier positioning in the query token T, and performs path splicing and candidate path set construction based on the lowest common ancestor identification.
[0050] Path generation: after the server receives the query token T, the path segment construction process is started according to the encrypted index in the tree decomposition structure: Starting point path chain expansion: the server locates the starting point bag node Bag(s) according to the encrypted starting point identifier 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; Ending point path chain expansion: similarly, the ending point bag node Bag(t) is located, and the ending point path chain is constructed from this node upwards to record the bag node connection information; All path segment expansions are completed under the encrypted index structure without decrypting the graph data.
[0051] Path splicing and candidate path construction: Lowest common ancestor identification: 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; Path segment merging: 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; Candidate path set construction: all successfully spliced complete paths are added to the candidate set P under ciphertext, which is used for subsequent fusion cost calculation and shortest path selection stage.
[0052] The path-level fusion cost ciphertext is obtained by performing fusion cost calculation on the candidate path set P under ciphertext : the cloud server performs fusion cost function on each edge in the candidate path set P under ciphertext, and completes weighted calculation in the Paillier encryption domain to obtain the edge-level fusion cost ciphertext , and the edge-level fusion cost ciphertext of the entire path is accumulated to obtain the path-level fusion cost ciphertext . Specifically, the server performs fusion cost calculation on the generated candidate path set to select the shortest path that meets the constraint condition. This process is performed in an encrypted state without decrypting any edge attribute or weight parameter, ensuring data privacy.
[0053] The fusion cost function is defined as follows: (6) 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.
[0054] Since Paillier encryption supports addition and scalar multiplication, the homomorphic computation process is as follows: The server executes the following for each edge: (7) 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. ; The edge-level fusion cost ciphertext obtained for the entire path The accumulation yields the path-level fusion cost ciphertext. : (8) The set of shortest paths under ciphertext is selected. ,include: 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: Determine if the path cost ciphertext satisfies: (9), 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.
[0055] 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: Each path The cost is the fusion cost ciphertext has been calculated by formula (8), in order to identify the shortest path meeting the fusion constraint condition, the system further executes the secure minimum value protocol, namely SM protocol, 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: (10) wherein, represents the Paillier ciphertext of the shortest path fusion cost, represents the Paillier ciphertext of the candidate path fusion cost. The protocol ensures that the judgment of the shortest path is completed without revealing any cost plaintext; the server only records the minimum value ciphertext and its corresponding path identifier.
[0056] S4, the cloud server constructs the path information of the shortest path set under the ciphertext , and extracts the verification material, encapsulates the constructed path information and the extracted verification material into a query response package, and submits it to the proxy server; The cloud server constructs the path information of the shortest path set under the ciphertext , including the following contents: Edge connection relationship: connection sequence and encrypted identifier of all edges in the path; Edge attribute ciphertext: encrypted attribute of each edge: ; Shortest path total cost: ; The verification material includes: To support subsequent proxy verification, the cloud server attaches the following verification materials: Signature information of each edge , signed by the private key of the graph data owner; Edge label hash value Hash(e), used for pairing equation verification; Verification auxiliary parameters: generator g and random factor η in the query token T.
[0057] The cloud server encapsulates the constructed shortest path structure, i.e. path information, and the verification material into a query response package, and submits it to the proxy server, triggering the path legality verification process.
[0058] S5, the proxy server receives the query response package, uses the random factor η and the signature public key to perform pairing verification mechanism to verify the legality of the query response package, and if the verification is passed, the proxy server sends the query response package to the client user; 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.
[0059] Specifically, the steps include the following: S51, The proxy server receives the query response packet; Includes path structure, Hash(e), g, and η; S52. For each edge e = (u, v) in the query response packet, extract the following material: Edge label hash value: Hash(e) = H(u || v || attr(e)); Side signature value: ; Pairing verification parameter: generator g; Query the random factor η in the token T.
[0060] S53. For each edge e = (u, v) in the query response packet, repeat the pairing verification equation calculation: 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: (11) 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.
[0061] 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.
[0062] 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.
[0063] After the proxy server completes the path legality verification, the client user uses the key in the authorization token to locally decrypt and display the query result. First, the client user uses the homomorphic encryption private key in the authorization token ( ) to decrypt the path total cost and the attribute values of each edge such as distance, cost, and time to restore the plaintext data. Then, the shortest path information is decrypted by the deterministic encryption key ( ). The entire decryption process is completed locally on the client, and the key is only used by the authorized client user, thereby ensuring data security and privacy from being leaked.
[0064] Embodiment 2 The present example provides a multi-attribute fusion shortest path verifiable query method, including a graph data owner, a client user, a cloud server, and a proxy server, as shown in Figure 4 The graph data owner is the holder of the graph, and its main task is to send an authorization token to the client user and send a public key to the proxy server, and to construct a tree decomposition structure according to the original structure information of the graph for encryption processing and sending to the cloud server. The main responsibility of the client user is to receive the authorization token and generate a query token T:
[0065] Among them, the query token T is used to find the shortest path from the starting point A to the ending point D, the fusion weight parameter is , and the fourth parameter in T is a random factor required for constructing a pairing equation in the subsequent verification link to prevent data forgery.
[0066] After generating the query token, the client user sends it to the cloud server for shortest path query and finally receives the ciphertext path result after the proxy server verifies the legality to decrypt and obtain the query result. The main task of the cloud server is to receive and process the ciphertext data, generate a path set, encapsulate the path result and path verification materials, and then send these data to the proxy server. The proxy server is responsible for verifying the legality of the path to ensure that the data has not been tampered with by the cloud server. If the verification is passed, the proxy server sends the final result to the client user, which decrypts it to obtain the query result. The above specific process is shown in Figure 1 .
[0067] Step S1 specifically includes: The graph data owner forms an authorization token and sends it to the client user through a secure channel, and distributes the signature public key to the proxy server.
[0068]
[0069] The tree decomposition operation is performed on the original graph data by the graph data owner, and the original graph structure is as shown in Figure 5 The edge attribute information in the original graph is as shown in Figure 6 The tree decomposition process adopts the minimum degree elimination strategy and is performed according to the following steps: Node sorting and elimination: first, sorting according to the degree: D(1), S(2), B(2), A(2), C(3).
[0070] The vertex with the minimum degree is the D point, so the elimination is performed first to form the bag node Bag(D); the bag node Bag(D) contains the node D and its adjacent node C, and the edge attribute D-C, which includes the distance: 90, the cost: 35, and the time: 55; at this time, the node D has only one adjacent node C and does not need to add an edge.
[0071] Degree update and subsequent elimination: the node degree is updated to: S(2), B(2), A(2), C(2). Then, the node with a degree of 2 is randomly selected for elimination, for example, the C point is eliminated to form the bag node Bag(C). The bag node Bag(C) contains the node C and its adjacent nodes B and S, and the edge attribute: distance , cost , time : C-B (distance : 80, cost : 30, time : 50), C-S (distance : 150, cost : 60, time : 90); The edge S-B is added, and the edge attributes are added: S-B (distance : 230, cost : 90, time : 140). Because there is only one way to reach S-B at this time, the attributes are directly added, and no comparison is needed, if there are two ways to reach, the minimum edge attribute value is taken for addition.
[0072] The node degree is updated to: S(2), B(2), A(2). The A node is eliminated in turn according to the above steps until all nodes are processed.
[0073] Tree structure connection relationship: according to the above elimination order (D, C, A, S, B), the tree structure connection relationship is constructed. In the bag Bag(D), the adjacent node of D is C, which is eliminated earlier than D, so the bag Bag(C) is the parent node of it. The adjacent nodes in the bag Bag(C) are B and S, and S node is eliminated earlier than B node according to the elimination order, so the bag Bag(S) is the parent node of the bag Bag(C). According to the above principle, the finally constructed tree structure diagram is shown in Figure 7 .
[0074] After completing the construction of the tree decomposition structure, the graph data owner encrypts the formed bag node and its connection relationship, as follows: Bag node structure encryption: use the symmetric key k1 to perform AES encryption on the identification and adjacent structure of each bag node: Bag(D), identification: , , and so on.
[0075] Vertex identity encryption, used for position matching: use the deterministic encryption key to encrypt the vertex ID in the bag node to generate a matchable field: , , , and so on.
[0076] Edge attribute encryption, used for fusion cost calculation: Use the Paillier homomorphic encryption public key pk to encrypt the edge attribute: ; , and so on.
[0077] Edge verification information generation, used for path legality verification: Generate a hash and a signature for each edge: , , , , and so on.
[0078] Verification parameter distribution: verification auxiliary generation element g.
[0079] The graph data owner encapsulates the above encryption information into an encrypted index and sends it to the cloud server.
[0080] Specifically, the S2 specifically includes: S21, the client user uses the deterministic encryption key in the authorization token to encrypt the vertex ID of the starting point A and the ending point D to generate a position matching field: , .
[0081] S22, use Paillier encryption for the fusion weight in the query demand path; The client user sets the fusion weight parameters as: Distance weight: = 0.5, cost weight: = 1.0, time weight: = 0.2, and the above parameters are encrypted as:
[0082] S23, construct the random factor η required for the pairing equation and embed it in the query token T; The user generates a random factor η for subsequent pairing verification binding to ensure the association between the query token and the returned path result.
[0083] S24, generate the query token T: Query token construction
[0084] S25, the token is sent to the cloud server by the user, triggering the path query and verification process.
[0085] Specifically, the S3 specifically includes: After receiving the query token T sent by the client user, the cloud server and the proxy server cooperate to complete the path calculation and verification, and the specific process is as follows: The encrypted starting point in the query token Matches the package node in the encrypted index structure, and confirms that the starting package node is , and the ending package node is . .
[0086] Candidate path generation Path segment expansion: Starting path segment: from Expand along the parent node direction of the tree structure, and record the path chain .
[0087] Ending path segment: from Expand upwards, and the path chain is .
[0088] Lowest common ancestor identification and path splicing: the lowest common ancestor LCA is , and the complete path is formed by splicing the path segments: ; Path edge identification and attribute extraction: According to the path chain , the intersection vertex between the package nodes is analyzed, and the following connection edges are identified with the lowest ancestor node as the intermediate value: <- The intersection vertex in , , so there are two edges A-S and A-B at this time, and the attribute values of the corresponding edges are extracted; <- The intersection vertex in , so there is an edge - at this time, and the attribute values of the corresponding edge are extracted; <- The intersection vertex in , , so there are two edges - and - at this time, and the attribute values of the corresponding edges are extracted.
[0089] The fusion weight parameters specified in the token T are: = 0.5, = 1.0, = 0.2.
[0090] The fusion cost of each edge is calculated: The server performs the fusion cost function on each edge in the path and completes the weighted calculation in the Paillier encryption domain: ; ; ; ; ; Path splicing and total cost ciphertext calculation: It can be seen that the path chain contains two paths: and : It can be seen that the total cost of : ; The total cost of ; Therefore, the total cost of is the smallest at this time and is placed in the shortest path cost set , so it is the shortest path.
[0091] S4, the cloud server identifies the shortest path set under the ciphertext After that, its path information is constructed, and the verification material is extracted, and the constructed path information and the verification material are uniformly packaged as a query response package and submitted to the proxy server. After identifying the shortest path set under the ciphertext with the minimum total cost After that, the cloud server structurally packages the path to form a complete query response content, including path structure information, attribute ciphertext, and verification material, etc., as follows: Shortest path set under the ciphertext : { }; Edge connection relationship: , , ; Edge attribute ciphertext: encrypted attribute value of each edge, including distance, cost, and time: : ; ; ; : ; ; ; : ; ; ; Path total cost ciphertext: the fusion cost ciphertext of the shortest path is = ; Verification material: Label hash value and signature information of each edge: ; ;
[0092] Verification auxiliary parameter: random factor η in the query token T, and verification auxiliary generator g.
[0093] The above generated data is packaged and sent to the proxy server for subsequent verification work.
[0094] S5, the proxy server receives the query response packet and uses the random factor η and the signature public key The pairing verification mechanism is performed to verify the legitimacy of the query response packet. If the verification is passed, the proxy server returns the query response packet to the client user. Specifically, the proxy server verifies the path legitimacy: extracts the verification material sent by the cloud server, uses the signature public key provided by the graph data owner The pairing verification is performed on each edge: ; ; ; If the above verification is passed, it means that the edge signature is legitimate and bound to the current query. The query response packet that passes the verification is securely sent back to the client user.
[0095] S6, after the client user receives the query response packet forwarded by the proxy server, the following decryption operations are performed: using the homomorphic encryption private key sk to decrypt the ciphertext of the path total cost The total cost plaintext is 285, and the plaintext attribute information of each edge is obtained at the same time using the key Decrypt the shortest path set The final decryption path result is: A, B, C, D.
[0096] Embodiment 3 The embodiment also provides an apparatus, comprising: At least one processor; and A 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 as described above.
[0097] In this embodiment, the electronic device can include but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronics devices, and the like.
[0098] Embodiment 4 The 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.
[0099] Specifically, a system or apparatus equipped with a readable storage medium on which software program codes implementing the functions of any of the above embodiments are stored can be provided, and a computer or processor of the system or apparatus is caused to read and execute the instructions stored in the readable storage medium.
[0100] In this case, the program codes read from the readable medium can implement the functions of any of the above embodiments by themselves, and thus the machine readable codes and the readable storage medium storing the machine readable codes constitute a part of the present specification.
[0101] Embodiments of the readable storage medium include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, DVD-RWs), magnetic tapes, non-volatile memory cards and ROMs. Alternatively, the program codes can be downloaded from a server computer or a cloud over a communication network.
[0102] Obviously, the above embodiments of the present application are merely examples for clearly illustrating the technical solutions of the present application, and are not intended to limit the specific embodiments of the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the claims of the present application.
Claims
1. A verifiable query method for shortest path fusion based on multiple attributes, characterized in that, include: 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, based on the query request and the received authorization token. 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. 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. ; 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 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. Once the verification is successful, 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 packet sent by the proxy server.
2. The verifiable query method according to claim 1, characterized in that, Step S1 specifically includes: S11. The graph data owner generates the following keys in sequence: 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 to the proxy server, authorization token Recorded as: (1) in, For authorization tokens, For generators in the pairing signature system; S13. The graph data owner uses a minimum degree elimination strategy to construct the tree decomposition index structure of the graph; 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 into an encrypted index and uploads the generated encrypted index to the cloud server.
3. The verifiable query method according to claim 2, characterized in that, Step S13 specifically involves: prioritizing the elimination of vertices with the lowest 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 consistency in 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. 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: ; The edge verification information generation includes the distribution instructions from the graph data owner for generating signature materials and verification parameters for each edge: The signature material specifically refers to: Edge label hash value: (2), 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; Signature result: (3), 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); The specific instructions for distributing the verification materials are as follows: Signature verification public key The generator `g` in the pairing signature system is used by the proxy server to perform pairing equality verification: (4), 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.
4. The verifiable query method according to claim 1, characterized in that, Step S2 is as follows: 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 ; S22. Use Paillier encryption for constraint parameters or fusion weight parameters in the query request path; S23. Construct the random factor η required for the pairing equation and embed it into the query token T to verify the random factor binding; S24. Generate query token T: (5), 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; S25. The client user sends the query token T to the cloud server.
5. The verifiable query method according to claim 1, characterized in that, Step S3 describes constructing a candidate path set P under the ciphertext based on the received encrypted index: The cloud server locates and expands the starting path chain and the ending path chain according to the encrypted starting point and ending point identifiers in the query token T, and performs path splicing and candidate path set construction based on the lowest common ancestor identification. Step S3 involves calculating the fusion cost to obtain the path-level fusion cost ciphertext. 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. ; The fusion cost function is defined as follows: (6) 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 attribute value of edge e. The j-th encryption weight parameter set by the user in the query token; ∑ is the weighted sum of all attributes; Since Paillier encryption supports addition and scalar multiplication, the homomorphic computation process is as follows: The server executes the following for each edge: (7) 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. ; The fusion cost is accumulated for each edge along the entire path to obtain the path-level fusion cost ciphertext. : (8); in, For path-level fusion cost ciphertext, Candidate paths; Step S3 involves filtering out the set of shortest paths under the ciphertext. ,include: a. If the query token T is in hard constraint mode, i.e., with a constraint threshold, homomorphic comparison can be performed: Determine if the path cost ciphertext satisfies: (9) 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; b. If the query token T is in fusion optimization mode (i.e., without a constraint threshold), then the shortest path identified through the minimum security protocol is used: (10) in, Paillier ciphertext representing the cost of shortest path fusion. Indicate candidate path Paillier ciphertext of fusion cost.
6. The verifiable query method according to claim 5, characterized in that, Step S3 describes constructing a candidate path set P based on the encrypted index in the tree decomposition structure. Specifically, the server locates the starting packet node Bag(s) based on the encrypted starting point identifier in the query token. Starting from this node, the server expands layer by layer along the direction of the parent node of the tree structure to construct the starting path chain and records the packet node connection information. Locate the endpoint packet node Bag(t), construct the endpoint path chain upwards from this node, and record the packet node connection information; All path segment expansions are performed under an encrypted index structure; 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). 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. All successfully assembled complete paths are added to the candidate set P.
7. The verifiable query method according to claim 1, characterized in that, The shortest path set under ciphertext described in step S4 The path information includes: Edge connectivity: The sequence of connections and encrypted identifiers for all edges in the path; Edge attribute ciphertext: The encrypted attribute of each edge: [ ; Total cost of the shortest path: ; The verification materials mentioned in step S4 include: Signature information for each edge ; Edge label hash value Hash(e); Verification auxiliary parameters: generator g, query token T random factor η.
8. The verifiable query method according to claim 1, characterized in that, Step S5 is as follows: S51, The proxy server receives the query response packet; S52. For each edge e = (u, v) in the query response packet, extract the following material: Edge label hash value: Hash(e) = H(u || v || attr(e)); Side signature value: ; Pairing verification parameters: generator g; random factor η in query token T; S53. For each edge e = (u, v) in the query response packet, repeat the pairing verification equation calculation: (11) 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. If all edges satisfy the binding validation equation, the path result is valid and the result is returned to the user. The proxy server will send the validated query response packet back to the client user. If verification fails on either side, the result of that path is rejected, and a verification failure message is displayed.
9. An apparatus, characterized in that, The device includes: At least one processor; and A memory that 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 in any one of claims 1-8.
10. A machine-readable storage medium storing executable instructions, characterized in that, When the instruction is executed, it causes the machine to perform the multi-attribute fusion shortest path verifiable query method as described in any one of claims 1-8.
Citation Information
Patent Citations
Graph encryption shortest path query method and system supporting k disordered nodes
CN114707012A
Efficient lightweight cross-domain authentication method for Internet of Vehicles based on homomorphic encryption
CN118138215A
Quality constraint shortest path query method and device for encrypted graph and computer readable storage medium
CN118410067A
Multi-modal hyperspectral image classification method and system
CN119888333A
Encrypted graph quality constraint shortest path query method and device based on tree decomposition and computer readable storage medium
CN119989410A
