Privacy-preserving graph data constrained shortest path verification query method and system
By performing homomorphic encryption segmentation and secure multi-party calculations on graph data, combining the key segmentation model and bilinear mapping function, the privacy leakage and unreliable verification results of graph data query in cloud computing is solved, and high security and efficient path query is achieved.
Patent Information
- Application Number
- CN202510645268.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The prior art has problems in encrypted graph data query with high privacy risks, unreliable verification results and poor dynamic constraint adaptability. Especially in cloud computing environments, graph data owners find it difficult to effectively protect sensitive information and the verification process lacks a cross-node collaboration mechanism.
The graph data is segmented using homomorphic encryption algorithm to generate the first and second cryptographic sub features, and a verification token is generated through the key segmentation model, combining secure multi-party calculations and bilinear mapping functions for cross-node consistency verification, ensuring the real-time binding of path constraints and privacy policies, and realizing the security and accuracy of path search.
It realizes privacy protection of graph data in a cloud computing environment, ensures the accuracy and computing efficiency of query results, enhances the system's attack resistance and traceability, and provides a solution that takes into account privacy protection and result reliability.
Smart Images

Figure CN120165836B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for verifying and querying the shortest path of graph data constraints based on privacy protection. Background Art
[0002] With the rapid development of cloud computing and big data technologies, graph data from a wide range of fields, including social networks, biological proteins, financial risk control, and intelligent transportation, has gained widespread application. This graph data contains a wealth of sensitive information. As cloud computing technology matures, its powerful storage and efficient computing capabilities are attracting graph data owners, including enterprises, research institutions, and government departments, to outsource large-scale graph data to cloud servers. However, since graph data is no longer under the direct control of its owners, data security concerns arise. Furthermore, data transmission and storage are subject to risks such as cyberattacks, malware intrusion, and internal personnel misconduct, which can easily lead to the leakage of sensitive information.
[0003] The core of the encrypted graph data constrained shortest path query is to quickly verify the optimality and compliance of the query results while protecting the privacy of graph nodes and edge weights. Existing techniques typically use homomorphic encryption to encrypt the graph data as a whole before directly executing the path search, or simply split the encrypted data across multiple computing nodes for distributed processing. However, the former, due to its fully encrypted operations, cannot effectively verify the dynamic compatibility of path constraints, easily producing erroneous results that deviate from actual requirements. The latter, while capable of improving computational efficiency, lacks a cross-node collaborative verification mechanism, allowing malicious nodes to forge global shortest paths by tampering with local computation results. Furthermore, traditional solutions rely on static verification parameter generation mechanisms, making it difficult to cope with real-time changes in path constraints. This results in dynamic cost thresholds or timeliness requirements being unable to be effectively bound to the privacy protection strategy of encrypted graph data. Furthermore, the verification process lacks non-repudiation proof based on cryptographic primitives, allowing attackers to forge false verification labels through man-in-the-middle attacks, resulting in systemic flaws such as low query result credibility, weak anti-tampering capabilities, and poor dynamic adaptability. Summary of the Invention
[0004] In view of this, an embodiment of the present invention provides a privacy-preserving graph data constrained shortest path verification query method. The technical solution of the embodiment of the present invention is implemented as follows:
[0005] On the one hand, the present invention provides a graph data constrained shortest path verification query method based on privacy protection, the method comprising: obtaining a path query request sent by a user terminal, the request including a source node identifier, a target node identifier, and a path constraint condition; encrypting the target graph data based on a homomorphic encryption algorithm to generate an encrypted graph structure feature, and dividing the encrypted graph structure feature into a first encrypted sub-feature and a second encrypted sub-feature; calling a pre-trained key splitting model, matching the path constraint condition with a preset privacy policy, and generating a verification token, the verification token including a first random parameter, a second random parameter, and a constraint hash value; sending the first encrypted sub-feature and the verification token to a first computing node through a distributed protocol, and sending the second encrypted sub-feature and the verification token to a second computing node, triggering the first computing node and the second computing node to perform secure multi-party computation, and outputting a candidate path ciphertext and a verification parameter set; performing consistency verification on the verification parameter set based on a bilinear mapping function, and if the verification passes, decrypting the candidate path ciphertext to generate a target shortest path that meets the path constraint condition.
[0006] On the other hand, the present invention provides a computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps of the above method when executing the program.
[0007] The privacy-preserving graph data constrained shortest path verification query method provided by the present invention obtains a query request from the user end containing a source node, a target node and path constraints, adopts a homomorphic encryption algorithm to encrypt and split the target graph data to form a first encrypted sub-feature and a second encrypted sub-feature, and generates a dynamic verification token based on a key splitting model that integrates random parameters and constraint hash values. Through a secure multi-party computing protocol, ciphertext path search and zero-knowledge proof encapsulation are performed between distributed computing nodes to generate candidate path ciphertexts and verification parameter sets. Based on a bilinear mapping algorithm, cross-node calculation consistency verification is implemented and then decrypted to generate the target shortest path. This method retains topology guidance capabilities and ciphertext security through encrypted graph structure segmentation, uses dynamic verification tokens to achieve real-time binding of path constraints and privacy policies, and combines secure multi-party computing protocols with bilinear mapping verification mechanisms to achieve dual guarantees of path search and tampering defense in the ciphertext state. It effectively solves the core problems of high privacy leakage risk, unreliable verification results and poor adaptability of dynamic constraints in traditional encrypted graph data queries. At the same time, it enhances the traceability of path operations and the system's anti-attack capabilities through cross-domain audit mechanisms and anomaly tracing functions, providing an integrated solution that balances privacy protection, result accuracy and computational efficiency for high-security scenarios that rely on sensitive data.
[0008] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present invention and, together with the specification, are used to explain the technical solutions of the present invention.
[0010] Figure 1 A schematic diagram of the implementation flow of a privacy-preserving graph data constrained shortest path verification query method provided in an embodiment of the present invention.
[0011] Figure 2 A schematic diagram of a hardware entity of a computer system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0013] In the following description, references to "some embodiments" describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. The terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the specific order or sequence of "first / second / third" may be interchanged where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0014] An embodiment of the present invention provides a privacy-preserving method for verifying the shortest path constraint in graph data. The method can be executed by a processor of a computer system. The computer system can refer to a server, laptop, tablet, desktop computer, mobile device (e.g., mobile phone, portable video player, personal digital assistant, dedicated messaging device, portable gaming device), or other device with data processing capabilities.
[0015] Figure 1 A schematic diagram of the implementation process of a privacy-preserving graph data constraint shortest path verification query method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes the following steps:
[0016] Step S100: Acquire a path query request sent by a user terminal, the request including a source node identifier, a target node identifier, and path constraints.
[0017] In an embodiment of the present invention, the user end is, for example, a scheduling system of a logistics company, which is responsible for initiating a path query request based on order information. The source node identifier refers to a unique identifier of the starting point of the path query. In a logistics scenario, it can be the number of the shipping warehouse, which can accurately locate the specific shipping location. The target node identifier is a unique identifier of the end point of the path query, such as the distribution site number corresponding to the delivery address, which clarifies the final location to which the goods need to be delivered. The path constraint condition is a restriction requirement on the query path. In the field of logistics, common path constraints include cost constraint values and time constraint values. The cost constraint value can be the maximum transportation cost set by the enterprise for this delivery, such as stipulating that the transportation fee cannot exceed a preset amount; the time constraint value can be a requirement that the goods be delivered within a specified time, such as the goods must be delivered to the destination within two days. By obtaining this information, the system can conduct targeted path queries in the logistics network to meet the business needs of the enterprise.
[0018] Step S200: Encrypt the target graph data based on the homomorphic encryption algorithm to generate an encrypted graph structure feature, and divide the encrypted graph structure feature into a first encrypted sub-feature and a second encrypted sub-feature.
[0019] Homomorphic encryption is an encryption algorithm that allows for pre-defined computational operations to be performed on data in a ciphertext state without first decrypting the data. The decrypted computational results are consistent with those of the same computation on the plaintext. In logistics scenarios, the target graph data is the relevant data of the logistics network, which contains information such as individual warehouses, distribution sites, and the transportation routes between them. The encrypted graph structure feature is a feature representation obtained by encrypting the target graph data. It not only contains the structural information of the graph data, such as the connection relationships between nodes, but also includes information such as encrypted edge weights. The encrypted graph structure feature is divided into a primary encrypted sub-feature and a secondary encrypted sub-feature to facilitate subsequent distributed computing and secure multi-party computing. This improves computing efficiency while enhancing data security.
[0020] As an implementation manner, step S200 may be specifically implemented as the following steps:
[0021] Step S210: Extract the node attribute set, edge connection relationship set and edge weight set in the target graph data, wherein the node attribute set includes the unique identifier and type label of each node, the edge connection relationship set includes the starting node identifier and the ending node identifier of each edge, and the edge weight set includes the distance value, cost value and time consumption value corresponding to each edge.
[0022] In logistics scenarios, the unique identifier in the node attribute set uniquely identifies each node in the logistics network. For example, each warehouse and distribution station has a unique number. The type label indicates the node's category. In the logistics field, node types can be categorized as shipping warehouses, transit warehouses, distribution stations, and so on. The edge connection relationship set specifies the connections between nodes in the logistics network. The start and end node identifiers can be used to identify the two endpoints of a transportation route. The edge weight set contains various edge attribute values that are closely related to logistics transportation. For example, the distance value can represent the actual geographical distance between two stations, the cost value can represent the cost of transporting goods between the two stations, and the time consumption value can represent the time required to transport goods from one station to another. For example, in a logistics network consisting of multiple warehouses and distribution stations, warehouse A is numbered W001 and has a type label of "shipping warehouse"; distribution station B is numbered D002 and has a type label of "distribution station." If there is a transportation route from warehouse A to distribution site B, the starting node of this edge is identified as W001, the ending node is identified as D002, the distance value of the edge may be 50 kilometers, the cost value may be 100 yuan, and the time consumption value may be 2 hours.
[0023] Step S220: Call the homomorphic encryption algorithm to encrypt each edge weight in the edge weight set one by one, generate an encrypted edge weight list, and retain the node attribute set and the edge connection relationship set in plain text to form a plain text graph structure description feature.
[0024] In an embodiment of the present invention, a homomorphic encryption algorithm encrypts each edge weight value in the edge weight set. This prevents attackers from directly accessing the actual edge weight information, even if the data is accessed during transmission or storage, thereby protecting sensitive data in the logistics network. The encrypted edge weight list is an encrypted list of the edge weight set, where each element is an encrypted edge weight value. The node attribute set and edge connection relationship set are retained in plain text because this information is necessary for understanding the graph structure and, in many cases, does not contain sensitive information. The resulting plaintext graph structure description can help subsequent computations and queries better understand the graph structure while ensuring the security of sensitive information such as edge weights. For example, for the aforementioned transportation route from warehouse A to distribution station B, its edge weight values (distance 50 kilometers, cost 100 yuan, time 2 hours) are encrypted by the homomorphic encryption algorithm to generate corresponding encrypted edge weight values, which are stored in the encrypted edge weight list. The numbers of warehouse A and distribution station B, as well as the connection relationship between them, are retained in plain text, forming part of the plaintext graph structure description.
[0025] Step S230: Associating and combining the encrypted edge weight list with the plaintext graph structure description features to generate an initial encrypted graph structure, wherein each edge in the initial encrypted graph structure corresponds one-to-one to the plaintext connection relationship through the encrypted edge weight.
[0026] The purpose of associating the encrypted edge weight list with the plaintext graph structure description is to construct a complete encrypted graph structure, ensuring that the encrypted edge weight of each edge corresponds to the corresponding plaintext connection relationship. In logistics scenarios, this association ensures that the encrypted edge weight information for each transportation route can be accurately obtained when performing route queries. For example, in the above logistics network, by associating the encrypted edge weight from warehouse A to distribution station B with the plaintext connection relationship between them (the starting node is identified as W001 and the ending node is identified as D002), this transportation route can be accurately represented in the initial encrypted graph structure. This initial encrypted graph structure provides a complete and secure data structure for subsequent calculations and queries.
[0027] Step S240: adding random noise interference to each encrypted edge weight in the initial encrypted graph structure based on the random mask generator to generate a perturbed encrypted graph structure, and dividing the nodes in the perturbed encrypted graph structure into odd node groups and even node groups according to the parity of the identifiers.
[0028] A random mask generator is a tool used to generate random numbers. In this embodiment of the present invention, it adds random noise to each encrypted edge weight in the initial encrypted graph structure. This is done to further enhance data security. Even if an attacker obtains the encrypted edge weight information, the added random noise makes it difficult to retrieve the true edge weight value. The resulting perturbed encrypted graph structure provides an additional layer of protection on top of the existing encryption. Nodes in the perturbed encrypted graph structure are divided into odd and even node groups based on the parity of their identifiers to prepare for subsequent distributed computing. For example, in a logistics network, if warehouse and distribution site numbers are assigned according to a preset rule, they can be divided into odd and even node groups based on the parity of their numbers. Assuming that warehouse C is numbered W003 (odd) and distribution site D is numbered D004 (even), warehouse C would be assigned to the odd node group, and distribution site D would be assigned to the even node group.
[0029] Step S250: extract the perturbed encrypted edge weights of all associated edges from the odd-numbered node group to form a first encrypted sub-feature, and extract the perturbed encrypted edge weights of all associated edges from the even-numbered node group to form a second encrypted sub-feature, wherein the first encrypted sub-feature and the second encrypted sub-feature can be restored to a complete encrypted graph structure feature through a joint key.
[0030] In an embodiment of the present invention, the perturbed encrypted edge weights of all associated edges are extracted from the odd-numbered node group, and these weight values constitute the first encrypted sub-feature. Similarly, the perturbed encrypted edge weights of all associated edges are extracted from the even-numbered node group to form the second encrypted sub-feature. The joint key is a special key that can merge and restore the first encrypted sub-feature and the second encrypted sub-feature to obtain a complete encrypted graph structure feature. In a logistics scenario, this division and extraction operation can perform distributed storage and calculation of data, improving computing efficiency and data security. For example, the perturbed encrypted edge weights of the warehouse in the odd-numbered node group and the transportation routes connected to it will be extracted to form the first encrypted sub-feature, and the perturbed encrypted edge weights of the distribution site and the related transportation routes in the even-numbered node group will be extracted to form the second encrypted sub-feature. When a complete path query is required, the joint key can be used to restore these two sub-features to a complete encrypted graph structure feature.
[0031] Step S300: calling a pre-trained key splitting model, matching the path constraint condition with the preset privacy policy, and generating a verification token, which includes a first random parameter, a second random parameter, and a constraint hash value.
[0032] The pre-trained key splitting model is trained on a large amount of data. It generates corresponding keys and random parameters based on input path constraints and a pre-set privacy policy. Its overall architecture can be achieved by combining a multi-layer perceptron (MLP) with a graph neural network (GNN). The model primarily consists of an input layer, a hierarchical topology parsing network in the middle layer, and a key splitting logic network at the output layer. The input layer receives dynamic constraint combination parameters and temporal permission binding parameters. The dynamic constraint combination parameters are generated by mapping the cost constraint range in the path constraint set with the node visibility rules corresponding to the privacy policy identifier. They combine information about cost constraints and node access rules. The temporal permission binding parameters are generated by binding the time constraint threshold to the edge weight decryption permission rules of the encrypted graph structure instance. They contain information about both time constraints and edge weight decryption permissions. The hierarchical topology parsing network in the middle layer is a core component of the key splitting model and can be based on a graph convolutional network (GCN). GCNs effectively extract node connectivity features and edge weight distribution features from encrypted graph structure instances. In logistics scenarios, node connectivity features describe the connections between warehouses and distribution sites, such as which warehouses have direct transportation routes to which distribution sites. Edge weight distribution features reflect the weight distribution of these transportation routes, such as the distance, cost, and time consumption of different routes. Specifically, graph convolutional networks propagate and aggregate node feature information within the graph structure through multi-layer convolution operations.
[0033] As mentioned earlier, path constraints are restrictions on the query path, such as cost and time constraints. The pre-set privacy policy is a set of rules set to protect data privacy, such as which nodes can be accessed and which edge weights can be decrypted. The verification token is an important credential used to verify the legitimacy of the query and the accuracy of the results. It contains a first random parameter, a second random parameter, and a constraint hash value. The first and second random parameters are used to obfuscate and encrypt the path constraints, increasing data security. The constraint hash value is the value obtained by hashing the path constraints. It can be used to verify whether the path constraints have been tampered with during the query process.
[0034] As an implementation manner, step S300 may be specifically implemented as the following steps:
[0035] Step S310: extract the cost constraint value and time constraint value in the path constraint condition, and obtain the node access rule, edge weight decryption rule and random number generation strategy associated with the target graph data from the preset privacy policy.
[0036] In logistics scenarios, the cost and time constraints in path constraints represent restrictions imposed by logistics companies on transportation routes. Node access rules, derived from a pre-set privacy policy, specify which nodes can be accessed. For example, certain warehouses may only allow transport vehicles to enter for security reasons. Edge weight decryption rules specify the conditions under which the encrypted edge weights can be decrypted, such as only after meeting pre-set authentication and permission requirements. The random number generation strategy, used to generate the first and second random parameters, can be a random number generation method based on a specific algorithm. For example, a cost constraint might require that transportation costs cannot exceed 500 yuan, while a time constraint might require that transportation time cannot exceed 3 days. The pre-set privacy policy might stipulate that only vehicles with pre-set permissions can access certain warehouse nodes, and that the weights of the edges associated with these nodes can only be decrypted after verification.
[0037] Step S320: Perform topological reachability check on the source node identifier and the target node identifier based on the node access rule, filter out the set of intermediate nodes that meet the constraint conditions, and bind the hash summary of the intermediate node set with the edge weight decryption rule to generate an edge authority binding identifier.
[0038] Topological reachability checks examine whether a destination node can be reached from a source node via a series of transportation routes in a logistics network. Verification based on node access rules ensures that the query path is legal. A set of intermediate nodes that meet the constraints is selected. These intermediate nodes are located on the path from the source node to the destination node and comply with the node access rules. The hash digest of the intermediate node set is the value obtained by hashing the set of intermediate nodes and can be used to uniquely identify the set. The hash digest of the intermediate node set is bound to the edge weight decryption rule to generate an edge permission binding identifier, which can be used to control decryption permissions for edge weights. For example, in a logistics network consisting of multiple warehouses and distribution stations, the source node is warehouse E and the destination node is distribution station F. Topological reachability checks select a set of intermediate nodes that meet the node access rules, such as warehouse G and transit station H. A hash digest is calculated for this set of intermediate nodes and then bound to the edge weight decryption rule to generate an edge permission binding identifier.
[0039] Step S330: calling a random number generation strategy to generate a first random parameter and a second random parameter, wherein the first random parameter is used to obfuscate and encrypt the cost constraint value, and the second random parameter is used to obfuscate and encrypt the time constraint value.
[0040] A random number generation strategy is a predefined algorithm or method that generates random numbers. In an embodiment of the present invention, this strategy is invoked to generate a first random parameter and a second random parameter. The first random parameter is used to obfuscate and encrypt the cost constraint value. By performing a certain operation (such as addition or multiplication) on the first random parameter and the cost constraint value, the cost constraint value can be encrypted, making it difficult for an attacker to directly obtain the true cost constraint value. Similarly, the second random parameter is used to obfuscate and encrypt the time constraint value, thereby enhancing the security of the time constraint value. For example, the random number generation strategy may be based on a pseudo-random number generator, generating a first random parameter of 123 and a second random parameter of 456. The first random parameter is added to the cost constraint value (such as 500 yuan) to obtain the obfuscated and encrypted cost constraint value.
[0041] Step S340: Input the cost constraint value and the first random parameter into the homomorphic encryption function to generate a first obfuscated encryption constraint value, and input the time constraint value and the second random parameter into the homomorphic encryption function to generate a second obfuscated encryption constraint value.
[0042] A homomorphic encryption function is a special encryption function that can perform calculations in a ciphertext state. The cost constraint and a first random parameter are input into the homomorphic encryption function, and the function performs an encryption operation on them to generate a first obfuscated encrypted constraint value. Similarly, the time constraint and a second random parameter are input into the homomorphic encryption function to generate a second obfuscated encrypted constraint value. This protects the privacy of the cost and time constraint values while allowing subsequent calculations to be performed. For example, a homomorphic encryption function might be based on an elliptic curve cryptography algorithm. A cost constraint of 500 yuan and a first random parameter of 123 are input into the function to generate the first obfuscated encrypted constraint value.
[0043] Step S350: concatenate the first obfuscated encryption constraint value and the second obfuscated encryption constraint value to form a ciphertext constraint combination, and perform an XOR operation on the ciphertext constraint combination and the edge authority binding identifier to generate an initial verification ciphertext.
[0044] The first obfuscated encrypted constraint value and the second obfuscated encrypted constraint value are concatenated, that is, they are combined together to form a new ciphertext data. This ciphertext data contains the encrypted information of the cost constraint value and the time constraint value. The ciphertext constraint combination is then XORed with the edge permission binding identifier. XOR is a logical operation that can encrypt and obfuscate two data. The generated initial verification ciphertext contains the path constraint conditions and edge permission information and is encrypted to improve data security. For example, the first obfuscated encrypted constraint value is ABC and the second obfuscated encrypted constraint value is DEF. After concatenation, the ciphertext constraint combination ABCDEF is formed. The edge permission binding identifier is 123. ABCDEF is XORed with 123 to generate the initial verification ciphertext.
[0045] Step S360: Input the initial verification ciphertext into a preset hash chain structure for iterative compression to generate a constrained hash value, and dynamically bind the constrained hash value to the first random parameter and the second random parameter to generate a random parameter association sequence.
[0046] The preset hash chain structure is a structure used for hash operations. It can perform multiple hash operations on the input data to achieve iterative compression. The initial verification ciphertext is input into the hash chain structure, and a constrained hash value is generated after multiple hash operations. The constrained hash value is a summary representation of the initial verification ciphertext and can be used to verify whether the data has been tampered with during the query process. The constrained hash value is dynamically bound to the first random parameter and the second random parameter. The generated random parameter association sequence contains the encrypted information of the path constraint conditions and the random parameter information, providing important data for the subsequent verification process. For example, the preset hash chain structure may be based on the SHA-256 hash algorithm. The initial verification ciphertext is input into the structure and multiple hash operations are performed to generate a constrained hash value. The constrained hash value is then bound to the first random parameter 123 and the second random parameter 456 to generate a random parameter association sequence.
[0047] Step S370: Timestamp the random parameter association sequence and the hash summary of the intermediate node set to generate token basic data with a timeliness label, and encapsulate the constraint relationship in the token basic data through the zero-knowledge proof protocol to generate a verification token containing the first random parameter, the second random parameter and the constraint hash value, wherein the decryption validity of the verification token is double-verified by the edge permission binding identifier and the timeliness label.
[0048] The random parameter association sequence is timestamped with the hash digest of the intermediate node set. A timestamp is a numerical value representing time, which adds timeliness information to the data. The resulting token base data with a timeliness tag contains path constraints, random parameters, intermediate node information, and time information. The constraints in the token base data are encapsulated using a zero-knowledge proof protocol, which can prove the legitimacy of the data without revealing the actual data. The generated verification token contains the first random parameter, the second random parameter, and the constraint hash value. Its decrypted validity is dual-verified using the edge permission binding identifier and the timeliness tag. This means that the verification token can only be decrypted and used if both the edge permission requirements and the time validity requirements are met. For example, in logistics scenarios, the verification token can be used to verify the legitimacy of transportation route queries, ensuring that queries and decryption operations are only possible within the specified time and with the corresponding permissions.
[0049] Step S400: Send the first encryption sub-feature and verification token to the first computing node through a distributed protocol, and send the second encryption sub-feature and verification token to the second computing node, triggering the first computing node and the second computing node to perform secure multi-party computing and output the candidate path ciphertext and verification parameter set.
[0050] A distributed protocol is a protocol for data transmission and communication between multiple computing nodes. In an embodiment of the present invention, it sends the first encryption sub-feature and the verification token to the first computing node, and sends the second encryption sub-feature and the verification token to the second computing node. The first computing node and the second computing node are two nodes participating in the calculation, which can be different servers or computing devices. Secure multi-party computing is a method for performing calculations between multiple participants, which can complete computing tasks without leaking the privacy of each party's data. Trigger the first computing node and the second computing node to perform secure multi-party computing. The two nodes will perform calculations based on the received data and finally output the candidate path ciphertext and the verification parameter set. The candidate path ciphertext is the encrypted possible transportation path information, and the verification parameter set contains parameters for verifying the legitimacy and accuracy of the candidate path.
[0051] As an implementation manner, step S400 may be specifically implemented as the following steps:
[0052] Step S410: The first computing node decrypts the first encrypted sub-feature based on the first sub-private key to generate a first decrypted sub-feature, extracts a first random parameter from the verification token, and superimposes the first decrypted sub-feature and the first random parameter to generate a first intermediate parameter.
[0053] The first sub-private key is used to decrypt the first encrypted sub-feature. The first compute node uses this key to decrypt the first encrypted sub-feature, obtaining the first decrypted sub-feature. The first decrypted sub-feature contains the original weight information of the edges associated with the odd-numbered node group (encrypted and then decrypted). The first random parameter is extracted from the verification token. This random parameter is the parameter previously used to obfuscate the cost constraint value. The first decrypted sub-feature is superimposed with the first random parameter (the superposition operation can be addition, multiplication, or other operations) to generate a first intermediate parameter. For example, the first sub-private key can be a private key generated based on an asymmetric encryption algorithm. The first compute node uses this private key to decrypt the first encrypted sub-feature, obtaining the first decrypted sub-feature. The first random parameter 123 is extracted from the verification token, and the first decrypted sub-feature is added to 123 to generate the first intermediate parameter.
[0054] Step S420: The second computing node decrypts the second encrypted sub-feature based on the second sub-private key to generate a second decrypted sub-feature, extracts the second random parameter from the verification token, and superimposes the second decrypted sub-feature with the second random parameter to generate a second intermediate parameter.
[0055] Similar to the first computing node, the second computing node uses the second child private key to decrypt the second encrypted sub-feature to obtain the second decrypted sub-feature, which contains the original weight information of the edges related to the even-numbered node group. The second random parameter in the verification token is extracted. This random parameter is used to obfuscate and encrypt the time constraint value. The second decrypted sub-feature is superimposed with the second random parameter to generate a second intermediate parameter. For example, the second child private key is also a private key generated based on an asymmetric encryption algorithm. The second computing node uses this private key to decrypt the second encrypted sub-feature to obtain the second decrypted sub-feature. The second random parameter 456 is extracted from the verification token, and the second decrypted sub-feature is added to 456 to generate the second intermediate parameter.
[0056] Step S430: Accumulate the first intermediate parameter and the second intermediate parameter through the secure summation protocol to generate a global accumulated parameter, and compare the global accumulated parameter with the path constraint to screen out a set of candidate paths that meet the path constraint.
[0057] The secure summation protocol is a protocol for performing secure addition operations between multiple participants. It can complete the addition operation without leaking the privacy of each party's data. This protocol accumulates the first and second intermediate parameters to obtain a global cumulative parameter. The global cumulative parameter contains comprehensive information about the edge weights in the entire logistics network. The global cumulative parameter is compared with the path constraints. For example, the cost information in the global cumulative parameter is compared with the cost constraint value, and the time information is compared with the time constraint value. This allows the set of candidate paths that meet the path constraints to be screened. For example, the secure summation protocol, based on a homomorphically encrypted addition protocol, accumulates the first and second intermediate parameters to obtain a global cumulative parameter. Assuming the cost constraint value is 500 yuan and the cost information in the global cumulative parameter is 400 yuan, this path satisfies the cost constraint and may be selected as a candidate path.
[0058] Step S440: Call the zero-knowledge proof protocol to perform verifiability encapsulation on each candidate path in the candidate path set, generate path proof parameters, and combine the path proof parameters with the corresponding path ciphertext to generate a candidate path ciphertext and verification parameter set.
[0059] The zero-knowledge proof protocol can prove the legitimacy and accuracy of candidate paths without revealing their true information. This protocol is called to perform verifiability encapsulation on each candidate path in the candidate path set, generating path proof parameters. These path proof parameters can be used to verify whether the candidate path satisfies path constraints and is a valid path. The path proof parameters are combined with the corresponding path ciphertext to generate a set of candidate path ciphertexts and verification parameters. This set contains the encrypted candidate path information and the parameters used to verify these paths. For example, for a path in the candidate path set, a path proof parameter is generated using the zero-knowledge proof protocol, combined with the path ciphertext, and stored in the candidate path ciphertext and verification parameter set.
[0060] Step S500: performing consistency check on the verification parameter set based on a bilinear mapping function. If the check passes, decrypting the candidate path ciphertext to generate a target shortest path that meets the path constraint conditions.
[0061] The bilinear mapping function is a mathematical function that performs a consistency check on a set of verification parameters. This consistency check verifies that the parameters in the set meet expectations and have not been tampered with during the query process. If the check passes, the candidate path ciphertext and the set of verification parameters are valid and accurate, and the candidate path ciphertext can then be decrypted. Decryption uses the corresponding key to convert the candidate path ciphertext into plaintext path information. The decrypted paths are then screened and compared to generate the target shortest path that satisfies the path constraints. In logistics scenarios, the target shortest path may be the one with the lowest transportation cost and shortest transportation time.
[0062] As an implementation manner, in step S500, consistency checking of the verification parameter set based on the bilinear mapping function can be specifically implemented as follows:
[0063] Step S510: extracting a first verification parameter and a second verification parameter from the verification parameter set, wherein the first verification parameter is generated based on local data of the first computing node, and the second verification parameter is generated based on local data of the second computing node.
[0064] The first verification parameter is a parameter generated during the calculation and processing process at the first computing node. It contains the first computing node's verification information for the candidate path. The second verification parameter is generated at the second computing node and contains the second computing node's verification information for the candidate path. These two parameters are extracted from the verification parameter set for subsequent consistency verification. For example, the first verification parameter may be a value generated by the first computing node based on the first intermediate parameter and related calculation rules, while the second verification parameter is a value generated by the second computing node based on the second intermediate parameter.
[0065] Step S520: Input the first verification parameter and the second verification parameter into a bilinear mapping function to generate a first mapping result, and generate a second mapping result based on the constraint hash value in the verification token.
[0066] The first and second verification parameters are input into a bilinear mapping function, which performs a mapping operation on the two parameters to generate a first mapping result. Simultaneously, a second mapping result is generated using a preset calculation or mapping method based on the constraint hash value in the verification token. These two mapping results are used for subsequent comparison and verification. For example, the bilinear mapping function is based on an elliptic curve bilinear mapping algorithm. The first and second verification parameters are input into the function to generate a first mapping result. Based on the constraint hash value in the verification token, a second mapping result is generated using a preset mapping rule.
[0067] Step S530: If the similarity between the first mapping result and the second mapping result exceeds a preset threshold, it is determined that the calculation process of the candidate path ciphertext has not been tampered with.
[0068] The preset threshold is a pre-set similarity standard used to determine whether the first and second mapping results are similar. If the similarity between them exceeds the preset threshold, it indicates that the first and second verification parameters are consistent, the calculation process of the candidate path ciphertext has not been tampered with, and the data is reliable. For example, if the preset threshold is 0.9, if the similarity between the first and second mapping results reaches 0.95, exceeding the preset threshold, the calculation process of the candidate path ciphertext has not been tampered with.
[0069] Step S540: If the similarity does not exceed the preset threshold, a path invalidation notification is returned to the user terminal, and the first computing node and the second computing node are triggered to re-execute the secure multi-party computation.
[0070] If the similarity between the first and second mapping results does not exceed the preset threshold, the calculation process of the candidate path ciphertext may have been tampered with, and the data is unreliable. In this case, a path invalidation notification is returned to the user, informing the user that the searched path is invalid. Simultaneously, the first and second computing nodes are triggered to re-execute secure multi-party computation, re-querying and verifying the path to obtain reliable path information. For example, if the preset threshold is 0.9 and the similarity between the first and second mapping results is 0.8, which does not exceed the preset threshold, the system will return a path invalidation notification to the user and restart the calculation process.
[0071] As an implementation method, in step S500, decrypting the candidate path ciphertext to generate the target shortest path that meets the path constraint conditions can be specifically implemented as follows:
[0072] Step S550: Split the candidate path ciphertext into a first ciphertext segment and a second ciphertext segment, wherein the first ciphertext segment is encrypted by the first computing node using the first child private key, and the second ciphertext segment is encrypted by the second computing node using the second child private key.
[0073] The candidate path ciphertext is the encrypted path information, which is split into a first ciphertext segment and a second ciphertext segment. The first ciphertext segment is encrypted by the first computing node using the first child private key, while the second ciphertext segment is encrypted by the second computing node using the second child private key. This segmentation allows for subsequent decryption using the corresponding private key. For example, if the candidate path ciphertext is a long encrypted string, it can be split into two parts according to a predefined rule, with the first part serving as the first ciphertext segment and the second as the second ciphertext segment.
[0074] Step S560: Call the joint decryption protocol to synchronously decrypt the first ciphertext segment and the second ciphertext segment to generate the first plaintext segment and the second plaintext segment, and merge the first plaintext segment and the second plaintext segment to generate a complete path plaintext.
[0075] A joint decryption protocol is a protocol used to simultaneously decrypt the first and second ciphertext segments, ensuring that the decryption process for the two ciphertext segments is synchronized. The protocol is invoked to decrypt the first and second ciphertext segments, generating the first and second plaintext segments, respectively. The first and second plaintext segments are then merged to obtain the complete path plaintext information. For example, the joint decryption protocol may be based on a key sharing and collaborative decryption algorithm. This protocol is used to decrypt the first and second ciphertext segments, generating the first and second plaintext segments, which are then concatenated to generate the complete path plaintext.
[0076] Step S570: Filter the complete path plaintext based on the path constraint condition, eliminate the paths that do not meet the preset requirements, and determine the path with the smallest total distance among the remaining paths as the target shortest path.
[0077] Based on previously acquired path constraints, such as cost and time constraints, the complete path plaintext is filtered. Paths that do not meet the preset requirements are eliminated, such as those where the transportation cost exceeds the cost constraint or the transportation time exceeds the time constraint. Among the remaining paths that meet the requirements, the total distance of each path is calculated, and the path with the smallest total distance is determined as the target shortest path. For example, the path constraints are that the cost does not exceed 500 yuan and the transportation time does not exceed 3 days. The complete path plaintext is checked, and paths with a cost exceeding 500 yuan or a transportation time exceeding 3 days are eliminated. Among the remaining paths, the path with the smallest total distance is selected as the target shortest path.
[0078] Step S580: The target shortest path is associated with the path proof parameters in the verification parameter set and stored, and a query response including the target shortest path and the associated proof is returned to the user terminal.
[0079] The target shortest path is associated and stored with the path proof parameters in the verification parameter set to facilitate subsequent queries and verification. The path proof parameters can be used to verify the legitimacy and accuracy of the target shortest path. A query response containing the target shortest path and the associated proof is returned to the user, who can use this information to make subsequent logistics arrangements and decisions. For example, the target shortest path and the corresponding path proof parameters are stored in a database, and the query response is returned to the logistics company's scheduling system. The scheduling system can then arrange transportation vehicles and routes based on the target shortest path.
[0080] As an implementation method, the key splitting model provided in the embodiment of the present invention is trained by the following steps:
[0081] Step S301: Obtain a sample of a historical encrypted graph dataset, the sample including multiple encrypted graph structure instances, a set of path constraints corresponding to each instance, and a set of marked legal node access paths, wherein each path constraint set includes a cost constraint range, a time constraint threshold, and an associated privacy policy identifier.
[0082] The sample historical encrypted graph dataset is obtained from historical logistics network data and contains multiple encrypted graph instances. Each encrypted graph instance is an encrypted representation of the logistics network. The path constraint set corresponding to each instance includes a cost constraint range, a time constraint threshold, and an associated privacy policy identifier. The cost constraint range specifies the upper and lower bounds of transportation costs, while the time constraint threshold specifies the maximum allowable transportation time. The associated privacy policy identifier indicates the privacy policy followed by the instance. The set of annotated legal node access paths is a set of annotated legal node access paths in each instance and can be used to train the model. For example, the sample historical encrypted graph dataset contains 100 encrypted graph instances. The path constraint set corresponding to each instance may have a cost constraint range of 300-500 yuan, a time constraint threshold of 2 days, and an associated privacy policy identifier of P001. The set of annotated legal node access paths records the legal transportation paths in that instance.
[0083] Step S302: Associate and map the cost constraint range in the path constraint condition set with the node visibility rule corresponding to the privacy policy identifier to generate dynamic constraint combination parameters, and bind the time constraint threshold with the edge weight decryption permission rule of the encrypted graph structure instance to generate timing permission parameters.
[0084] The cost constraint range in the path constraint set is mapped to the node visibility rule corresponding to the privacy policy identifier. The node visibility rule specifies which nodes can be accessed under what conditions. This mapping generates a dynamic constraint combination parameter, which combines information from the cost constraint and the node access rule. The time constraint threshold is bound to the edge weight decryption permission rule of the encrypted graph structure instance. The edge weight decryption permission rule specifies the conditions under which the encrypted edge weights can be decrypted. The generated temporal permission parameter contains information about both the time constraint and the edge weight decryption permission. For example, if the cost constraint range is 300-500 yuan, the node visibility rule corresponding to the privacy policy identifier specifies that only nodes with a cost between 400-500 yuan can be accessed. This mapping generates the dynamic constraint combination parameter. If the time constraint threshold is 2 days, the edge weight decryption permission rule of the encrypted graph structure instance specifies that edge weights can only be decrypted if the time is no more than 2 days old. These two parameters are bound together to generate the temporal permission parameter.
[0085] Step S303: Input the dynamic constraint combination parameters and the temporal permission binding parameters into the input end of the key splitting model, and call the hierarchical topology parsing network in the middle layer of the model to extract the node connection characteristics and edge weight distribution characteristics of the encrypted graph structure instance.
[0086] The dynamic constraint combination parameters and the time-series permission binding parameters are input to the key splitting model's input port, and the model begins its calculations. The hierarchical topology parsing network in the model's middle layer is a network used to parse graph structures. It can extract node connectivity features and edge weight distribution features of encrypted graph instances. Node connectivity features describe the connections between nodes in the graph, while edge weight distribution features describe the distribution of edge weights within the graph. For example, the hierarchical topology parsing network might be based on a convolutional neural network (CNN) or a graph neural network (GNN). It processes the input parameters and extracts node connectivity features and edge weight distribution features of encrypted graph instances.
[0087] Step S304: Cross-layer fusion of node connection features and edge weight distribution features to generate a graph structure context vector, and input the graph structure context vector into the key splitting logic network at the output end of the model to output the predicted first sub-private key parameters, second sub-private key parameters and random number generation strategy parameters.
[0088] Cross-layer fusion is performed on node connectivity features and edge weight distribution features. Cross-layer fusion is a method that combines and fuses features from different layers to generate a graph context vector. The graph context vector contains comprehensive information about the encrypted graph instance. The graph context vector is input into the key splitting logic network at the model output. The key splitting logic network is used to generate keys and random number generation strategies. It outputs predicted first and second child private key parameters and random number generation strategy parameters based on the input graph context vector. For example, cross-layer fusion can fuse node connectivity features and edge weight distribution features through concatenation, weighted summation, or other methods to generate a graph context vector. The key splitting logic network may be based on a fully connected neural network and outputs predicted parameters based on the graph context vector.
[0089] Step S305: Perform a partial decryption test on the encrypted graph structure instance based on the first sub-private key parameter, obtain the plaintext fragment of the candidate node access path, compare the overlap with the marked legal node access path set, and calculate the path decryption accuracy.
[0090] A partial decryption test is performed on the encrypted graph structure instance based on the first child private key parameter. The partial decryption test refers to decrypting only a portion of the encrypted graph structure instance. Obtain a plaintext segment of the candidate node access path. This segment is the path information obtained after decryption. Perform an overlap comparison between the plaintext segment and the set of annotated legal node access paths. The overlap comparison is to check the degree of overlap between the plaintext segment and the paths in the set of legal node access paths. The path decryption accuracy is calculated by comparison. The path decryption accuracy reflects the accuracy of the first child private key parameter generated by the model. For example, use the first child private key parameter to decrypt part of the encrypted graph structure instance to obtain a plaintext segment of the candidate node access path. Assuming that there are 10 paths in the set of annotated legal node access paths, and the plaintext segment overlaps with 8 of them, then the path decryption accuracy is 80%.
[0091] Step S306: Input the random number generation strategy parameters into the predefined verification network to generate simulated random obfuscation parameters, and reversely verify the matching degree between the simulated random obfuscation parameters and the path constraint condition set through homomorphic encryption to evaluate the strategy effectiveness score.
[0092] The random number generation strategy parameters are input into a predefined verification network. This network is used to verify the random number generation strategy and generates simulated random obfuscation parameters based on the input parameters. These simulated random obfuscation parameters simulate random parameters used in real-world applications. The matching degree between the simulated random obfuscation parameters and the set of path constraints is verified using homomorphic encryption reverse verification. Homomorphic encryption reverse verification is a method for verifying parameter matching in a ciphertext state. A strategy effectiveness score is evaluated, which reflects the effectiveness of the random number generation strategy. For example, the predefined verification network may be based on a neural network. The random number generation strategy parameters are input into this network to generate simulated random obfuscation parameters. Using homomorphic encryption reverse verification methods, the matching degree between the simulated random obfuscation parameters and the set of path constraints is verified, and the strategy effectiveness score is evaluated based on the matching degree.
[0093] Step S307: perform a weighted summation of the path decryption accuracy and the strategy effectiveness score to generate the model main loss value, and update the parameters of the hierarchical topology parsing network and the key splitting logic network based on the adaptive gradient algorithm until the main loss value converges to the preset threshold.
[0094] The path decryption accuracy and the policy effectiveness score are weighted together to form the model's main loss. The weighted sum assigns different weights to each score based on their importance, and then they are added together to form the model's main loss. The parameters of the hierarchical topology parsing network and the key splitting logic network are updated using an adaptive gradient algorithm. This algorithm automatically adjusts the parameter update step size based on the model's loss. Parameters are continuously updated until the model's main loss converges to a preset threshold. This threshold is a pre-set loss standard. When the main loss reaches this threshold, the model training has achieved good results. For example, the path decryption accuracy is weighted 0.6, and the policy effectiveness score is weighted 0.4. These weighted sums are used to form the model's main loss. An adaptive gradient algorithm (such as the Adam algorithm) is used to update the parameters of the hierarchical topology parsing network and the key splitting logic network until the main loss converges to a preset threshold of 0.1.
[0095] As an implementation manner, the method provided in the embodiment of the present invention may further include:
[0096] Step S308: The first sub-private key parameter, the second sub-private key parameter and the random number generation strategy parameter output by the key splitting logic are input into the auxiliary verification network to generate a basic data block for simulating the verification token.
[0097] The first and second child private key parameters, along with the random number generation strategy parameters, output by the key splitting logic are fed into an auxiliary verification network. This network is used to generate the basic data blocks for a simulated verification token. Based on the input parameters, the auxiliary verification network generates the basic data blocks for a simulated verification token. This data block contains the basic information for the verification token but requires further processing to become a complete verification token. For example, the auxiliary verification network might be based on a generative adversarial network (GAN), which generates the basic data blocks for a simulated verification token based on the input parameters.
[0098] Step S309: call the constraint hash value and random parameter sequence of the real verification token in the historical query log, perform similarity modeling on the basic data block and the real token data, and calculate the position-sensitive hash difference.
[0099] The constrained hash value and random parameter sequence of the real verification token in the historical query log are retrieved. The historical query log records the information of the real verification token used in previous queries. Similarity modeling is performed between the base data block and the real token data. Similarity modeling compares the similarity between the base data block and the real token data using some method. The position-sensitive hash difference is calculated. The position-sensitive hash difference is a metric that measures the difference between two data sets and reflects the similarity between the base data block and the real token data. For example, methods such as cosine similarity are used to perform similarity modeling between the base data block and the real token data and calculate their position-sensitive hash difference.
[0100] Step S3010: Output the compensation parameters of the position-sensitive hash difference through the auxiliary verification network, and add the compensation parameters to the main loss value of the model to generate a joint optimization objective function.
[0101] The auxiliary verification network outputs a compensation parameter for the position-sensitive hashing discrepancy. This parameter is used to compensate for the position-sensitive hashing discrepancy. This compensation parameter is added to the model's main loss to generate a joint optimization objective function. This joint optimization objective function combines information from the model's main loss and position-sensitive hashing discrepancy to further optimize model performance. For example, the auxiliary verification network outputs a compensation parameter based on the position-sensitive hashing discrepancy, which is then added to the model's main loss to generate the joint optimization objective function.
[0102] Step S3011: Dynamically adjust the weight ratio of the main loss value and the compensation parameter in the joint optimization objective function in each training stage of the key splitting model, where the path decryption accuracy is dominant in the initialization stage and the position-sensitive hash difference is dominant in the convergence stage.
[0103] The weight ratio of the main loss value and the compensation parameter in the joint optimization objective function is dynamically adjusted during each training stage of the key splitting model. During the initialization stage, the model parameters are still unstable. At this time, the path decryption accuracy is dominant, that is, the main loss value is assigned a larger weight, and the model's path decryption ability is optimized. During the convergence stage, the model performance is close to optimal. At this time, the localization-sensitive hash difference is dominant, and the compensation parameter is assigned a larger weight to further optimize the similarity between the simulated verification tokens generated by the model and the real tokens. For example, during the initialization stage, the main loss value has a weight of 0.8, and the compensation parameter has a weight of 0.2; during the convergence stage, the main loss value has a weight of 0.2, and the compensation parameter has a weight of 0.8.
[0104] Step S3012: The gradient of the joint optimization objective function is passed back to the connection layer of the hierarchical topology parsing network and the auxiliary verification network, and the parameters of the key splitting model and the auxiliary verification network are synchronously updated, so that the generation process of the first sub-private key parameters is associated with the legitimacy of the simulated verification token.
[0105] The gradient of the joint optimization objective function is propagated back to the connection layer between the hierarchical topology parsing network and the auxiliary verification network. Gradient propagation is the process of passing the gradient information of the joint optimization objective function to the model parameters for parameter update. The parameters of the key splitting model and the auxiliary verification network are synchronously updated so that the generation process of the first child private key parameters is associated with the legitimacy of the simulation verification token. This ensures that the first child private key parameters generated by the model can generate a legal and valid simulation verification token. For example, a backpropagation algorithm is used to propagate the gradient of the joint optimization objective function back to the connection layer between the hierarchical topology parsing network and the auxiliary verification network, and the model parameters are updated so that the generation of the first child private key parameters is associated with the legitimacy of the simulation verification token.
[0106] As an implementation manner, after generating the target shortest path that meets the path constraint conditions in step S500, the method provided by the embodiment of the present invention may further include the following steps:
[0107] Step S600: extract the real-time load status and link communication quality indicators of all nodes in the target shortest path, generate path performance evaluation parameters, and dynamically weight the path performance evaluation parameters with the time threshold in the path constraint conditions to generate a priority routing strategy.
[0108] The real-time load status and link communication quality indicators of all nodes along the target shortest path are extracted. The real-time load status reflects the current workload of the nodes, while the link communication quality indicators reflect the stability and efficiency of communication between nodes. A path performance evaluation parameter is generated, which integrates the node load status and link communication quality information. The path performance evaluation parameter is dynamically weighted against the time threshold in the path constraint. Dynamic weight matching assigns different weights based on the importance of the path performance evaluation parameter and the time threshold to generate a priority routing strategy. Priority routing strategies can be used to determine which transportation routes should be preferred in different situations. For example, in a logistics network, the real-time load status of each warehouse and distribution station along the target shortest path is extracted, such as the warehouse's cargo storage capacity and the distribution station's vehicle scheduling status, as well as link communication quality indicators between nodes, such as network latency and bandwidth. The path performance evaluation parameter is generated and dynamically weighted against the time constraint threshold to generate a priority routing strategy. For example, under time constraints, routes with good link communication quality and low node load are preferred.
[0109] Step S700: Locally adjust the node order in the target shortest path based on the priority routing strategy to generate a set of alternative optimization paths, and perform correlation verification on each path in the set of alternative optimization paths with the path proof parameters in the verification parameter set to screen out candidate optimization paths that meet the consistency conditions.
[0110] Based on the priority routing strategy, the order of nodes in the target shortest path is partially adjusted. Local adjustment means fine-tuning the order of nodes without changing the overall structure of the path. A set of alternative optimization paths is generated, which contains multiple adjusted paths. Each path in the set of alternative optimization paths is checked for correlation with the path proof parameters in the verification parameter set. The correlation check is to check whether the path meets the conditions specified by the verification parameters. Candidate optimization paths that meet the consistency conditions are screened out. These paths meet both the requirements of the priority routing strategy and the conditions of the verification parameters. For example, according to the priority routing strategy, the order of certain warehouses and distribution sites in the target shortest path is adjusted to generate a set of alternative optimization paths. Each path in the set is checked for correlation with the path proof parameters to screen out candidate optimization paths that meet the consistency conditions.
[0111] Step S800: Input the candidate optimization paths into the pre-trained path stability prediction model, output the failure risk probability and delay fluctuation prediction value of each path, and dynamically associate the failure risk probability with the cost upper limit value in the path constraint condition to generate risk constraint adjustment parameters.
[0112] Candidate optimized paths are input into a pre-trained path stability prediction model. This model, trained with extensive data, predicts the failure risk probability and delay fluctuation of each path. The failure risk probability reflects the likelihood of a failure on the path, while the delay fluctuation reflects the fluctuation in the path's transit time. The failure risk probability is dynamically associated with the cost ceiling in the path constraints. This dynamic association is adjusted based on the relationship between the failure risk probability and the cost ceiling to generate risk constraint adjustment parameters. These risk constraint adjustment parameters can be used to further screen paths, ensuring that the selected path meets cost requirements while also having a low failure risk. For example, the pre-trained path stability prediction model can be based on a machine learning algorithm (such as a decision tree or neural network). Candidate optimized paths are input into the model, which outputs the failure risk probability and delay fluctuation prediction for each path. The failure risk probability is dynamically associated with the cost ceiling to generate the risk constraint adjustment parameters. For example, the path stability prediction model can employ an architecture that combines a long short-term memory network (LSTM) with a support vector machine (SVM).
[0113] Step S900: Perform secondary screening of candidate optimization paths based on risk constraint adjustment parameters, eliminate paths whose failure risk probability exceeds a preset threshold, generate a set of safe optimization paths, and determine the path with the smallest delay fluctuation prediction value in the set of safe optimization paths as the final optimization path.
[0114] Based on the risk constraint adjustment parameters, the candidate optimization paths are screened a second time. The second screening is to further screen the paths based on the previous screening. Paths whose failure risk probability exceeds the preset threshold are eliminated. The preset threshold is a pre-set failure risk probability standard. Paths that exceed this threshold are considered unsafe. A set of safe optimization paths is generated. The paths in this set not only meet the conditions of the priority routing strategy and verification parameters, but also have a lower failure risk. The path with the smallest predicted delay fluctuation value in the safe optimization path set is determined as the final optimization path. The final optimization path is the optimal path selected after comprehensive consideration of various factors. For example, the preset threshold is 0.2, and the candidate optimization paths with a failure risk probability exceeding 0.2 are eliminated to generate a set of safe optimization paths. The path with the smallest predicted delay fluctuation value in the set is selected as the final optimization path.
[0115] Step S1000: Perform weighted fusion of the final optimized path and the target shortest path to generate a comprehensive optimal path, and synchronously update the node sequence and verification parameters of the comprehensive optimal path to the verification token to form an enhanced verification token and path response result.
[0116] The final optimized path and the target shortest path are weighted together. Weighted fusion involves assigning different weights to the final optimized path and the target shortest path based on their importance, and then fusing them together. This generates a composite optimal path that combines the advantages of both the final optimized path and the target shortest path. The node sequence and verification parameters of the composite optimal path are synchronously updated in the verification token. The updated verification token contains the latest path information and verification parameters. This results in an enhanced verification token and path response. This enhanced verification token improves the security and accuracy of path query and verification. The path response can be provided to the user for logistics planning and decision-making. For example, if the weight of the final optimized path is 0.6 and the weight of the target shortest path is 0.4, these are weightedly fused to generate a composite optimal path. The node sequence and verification parameters of the composite optimal path are updated in the verification token, forming an enhanced verification token and path response.
[0117] As an implementation method, after generating the comprehensive optimal path in step S1000, the method provided by the embodiment of the present invention further includes the steps of cross-domain auditing and exception backtracking, specifically including:
[0118] Step S1100: Record the node sequence, verification parameter set and enhanced verification token of the comprehensive optimal path in chronological order in the distributed audit chain to generate an unalterable path operation log, where the path operation log contains the decryption operation timestamp, verification consistency label and path weight change record of each node.
[0119] The node sequence, verification parameter set, and enhanced verification token of the optimal path are recorded in chronological order in a distributed audit chain. The distributed audit chain is a distributed blockchain technology that ensures that the recorded data cannot be tampered with. An unalterable path operation log is generated, which contains the decryption operation timestamp, verification consistency label, and path weight change record for each node. The decryption operation timestamp records the time of the node decryption operation, the verification consistency label records the consistency of the verification process, and the path weight change record records the changes in the path weight. For example, using distributed audit chain technology, the node sequence, verification parameter set, and enhanced verification token of the optimal path are recorded in chronological order to generate a path operation log, which contains the specific time of each node's decryption operation, a label indicating whether the verification process is consistent, and the change history of the path weight.
[0120] Step S1200: extract verification consistency labels and path weight change records from the path operation log, input them into the pre-trained anomaly detection model, and output potential abnormal operation fragments and associated risk node identification sets.
[0121] Verification consistency labels and path weight change records are extracted from path operation logs. This information can reflect anomalies during the path query and verification process. The extracted information is input into a pre-trained anomaly detection model. The anomaly detection model is a model trained with a large amount of data. It can identify potential abnormal operation fragments and associated risk node identification sets. Potential abnormal operation fragments refer to operation steps that may be abnormal, and risk node identification sets refer to the identification of nodes that may be risky. For example, the pre-trained anomaly detection model may be based on a machine learning algorithm (such as a support vector machine, clustering algorithm, etc.). Verification consistency labels and path weight change records are input into the model, and the model outputs potential abnormal operation fragments and associated risk node identification sets.
[0122] Step S1300: Match the risk node identification set with the node attribute set in the target graph data, filter out nodes with abnormal permissions or excessive decryption frequency, generate a list of high-risk nodes, and perform correlation analysis on the high-risk node list with potential abnormal operation fragments to generate an abnormal tracing report.
[0123] The risk node identifier set is matched against the node attribute set in the target graph data. The node attribute set contains various node attribute information, such as permissions and decryption frequency. Nodes with abnormal permissions or excessive decryption frequencies are screened out. Permission abnormalities refer to nodes with access permissions that do not comply with regulations, while excessive decryption frequencies refer to nodes with excessively frequent decryption operations. A high-risk node list is generated, containing information about potentially risky nodes. Correlation analysis is performed between the high-risk node list and potential abnormal operation fragments. Correlation analysis examines the relationship between high-risk nodes and potential abnormal operations. Anomaly tracing reports are generated to help identify the source and cause of abnormal operations. For example, the risk node identifier set is compared against the node attribute set in the target graph data to screen out nodes with abnormal permissions or excessive decryption frequencies, generating a high-risk node list. Correlation analysis is performed between the high-risk node list and potential abnormal operation fragments to generate an anomaly tracing report, which indicates that the abnormal operation may be caused by incorrect node permissions or excessively frequent decryption operations.
[0124] Step S1400: Based on the abnormal tracing report, the dynamic key update mechanism is triggered to re-split the global private key, generate updated first sub-private key and second sub-private key, and dynamically bind the updated sub-private key to the random parameter in the verification token to generate a replacement verification token with enhanced timeliness.
[0125] The dynamic key update mechanism is triggered based on anomaly tracing reports. This mechanism is used to update keys. It can promptly update keys when anomalies are discovered, improving system security. The global private key is repartitioned to generate updated first and second child private keys. The updated child private key is dynamically bound to a random parameter in the verification token to generate a replacement verification token with enhanced timeliness. The enhanced timeliness of the replacement verification token ensures that it can only be used within a specified timeframe and with the corresponding permissions. For example, if a permission anomaly is discovered on a node based on an anomaly tracing report, the dynamic key update mechanism is triggered, repartitioning the global private key to generate updated first and second child private keys. The updated child private key is then bound to a random parameter in the verification token to generate a replacement verification token with enhanced timeliness.
[0126] Step S1500: Distribute the replacement verification token and the high-risk node list to the first computing node and the second computing node, trigger node operations, and freeze access rights to high-risk nodes in the comprehensive optimal path based on the reset permissions to generate a secure isolation path response result.
[0127] The replacement verification token and the list of high-risk nodes are distributed to the first computing node and the second computing node. The first computing node and the second computing node are nodes participating in calculation and verification. The node operation is triggered, and the node will perform corresponding operations based on the received replacement verification token and the list of high-risk nodes. Based on the reset permissions, the access rights of the high-risk nodes in the comprehensive optimal path are frozen. The access right freezing means prohibiting access operations to high-risk nodes. A safe isolation path response result is generated, which can ensure the security of the path and avoid further spread of abnormal situations. For example, the replacement verification token and the list of high-risk nodes are sent to the first computing node and the second computing node. The nodes freeze the access rights of the high-risk nodes in the comprehensive optimal path based on this information and generate a safe isolation path response result.
[0128] Step S1600: The security isolation path response result is associated with the path operation log and stored, and the audit data is synchronized to the computing nodes of other domains through the cross-chain consensus protocol to form a globally consistent audit tracking network and abnormal defense linkage mechanism.
[0129] The security isolation path response results and path operation logs are stored in association with each other. This association facilitates subsequent query and analysis. Audit data is synchronized to computing nodes in other domains through a cross-chain consensus protocol, a protocol used for data synchronization and sharing between different blockchains. This creates a globally consistent audit tracking network and anomaly defense linkage mechanism. This globally consistent audit tracking network can track and audit operations across the entire logistics network, and the anomaly defense linkage mechanism can take timely defensive measures when anomalies are discovered. For example, the security isolation path response results and path operation logs are stored in a database, and the audit data is synchronized to computing nodes in other domains through a cross-chain consensus protocol. This creates a globally consistent audit tracking network and anomaly defense linkage mechanism. When an anomaly is discovered in one domain, other domains can respond promptly and jointly implement defenses.
[0130] As an implementation method, the method provided in the embodiment of the present invention also includes a dynamic adjustment mechanism during the distributed protocol execution phase, which can be specifically implemented as follows:
[0131] Step S1700: monitor the load status of the first computing node and the second computing node in real time. If the computing delay of any node exceeds a threshold, migrate part of the computing tasks to the backup computing node.
[0132] Monitor the load status of the first computing node and the second computing node in real time. The load status reflects the workload of the node. If the computing delay of any node exceeds the threshold, which is a pre-set computing delay standard, it means that the workload of the node is too large, which may affect the computing efficiency. Migrate some computing tasks to the backup computing node, which is a pre-set node for sharing computing tasks. For example, monitor the CPU usage, memory usage and other load indicators of the first computing node and the second computing node in real time. If the computing delay of the first computing node exceeds the preset threshold (such as 100 milliseconds), migrate some computing tasks (such as the calculation of certain edge weights) to the backup computing node to improve computing efficiency.
[0133] Step S1800: When a malicious attack is detected, the key update process is triggered to generate a new global private key and split it into a new first sub-private key and a new second sub-private key, and the original verification token is abolished.
[0134] When a malicious attack is detected, which may include data tampering, brute force cracking, and other behaviors, the key update process is triggered. The key update process is a mechanism for updating keys. It can promptly update keys when a malicious attack is discovered, thereby improving system security. A new global private key is generated and re-split into a new first sub-private key and a new second sub-private key. At the same time, the original verification token is revoked. Revoking the original verification token can prevent attackers from using the old verification token for illegal operations. For example, if a malicious attack attempt to tamper with path data is detected by the intrusion detection system, the key update process is triggered, a new global private key is generated, it is re-split into a new first sub-private key and a new second sub-private key, and the original verification token is revoked.
[0135] Step S1900: Dynamically adjust the number of iterations of secure multi-party computing according to the complexity of the path constraints. If the constraints involve multi-dimensional indicators, increase the verification rounds of the zero-knowledge proof protocol.
[0136] The number of secure multi-party computation iterations is dynamically adjusted based on the complexity of the path constraints. The complexity of path constraints can be measured based on factors such as the number and type of constraints. If the constraints involve multiple dimensions, such as cost, time, and transportation capacity, the number of verification rounds of the zero-knowledge proof protocol is increased. Increasing the number of verification rounds can improve the accuracy and security of query results. For example, if the path constraints only include cost constraints, the number of secure multi-party computation iterations can be set to 5. If the path constraints include multiple dimensions such as cost constraints, time constraints, and transportation capacity constraints, the number of verification rounds of the zero-knowledge proof protocol is increased to 8.
[0137] Step S2000: After the target shortest path is generated, the temporary decrypted data in the first computing node and the second computing node are erased to ensure that there is no persistent storage risk.
[0138] After the target shortest path is generated, temporary decrypted data may exist in the first and second computing nodes. This data is temporarily stored during the calculation process, but if it is not erased in time, there may be a risk of persistent storage, leading to data leakage. Erasing the temporary decrypted data in the first and second computing nodes can ensure data security. For example, after the target shortest path is generated, the first and second computing nodes will automatically clear the temporary decrypted data generated during the calculation process, such as decrypted edge weight information, intermediate calculation results, etc. In this way, even if the computing node is attacked, the attacker cannot obtain this sensitive temporary data, thereby ensuring the security and privacy of the data during the entire path query process.
[0139] As an implementation method, the method provided in the embodiment of the present invention also includes traceability and auditing functions of the query results, and specifically may include the following steps:
[0140] Step S2100: Record the verification parameter set, candidate path ciphertext and target shortest path of each query request into the blockchain to generate an unalterable audit log.
[0141] Blockchain is a decentralized distributed ledger technology characterized by immutability and traceability. Each query request's verification parameter set, candidate path ciphertext, and target shortest path are recorded in the blockchain. This data is linked chronologically in blocks. The verification parameter set contains important parameters used to verify the query's legitimacy and the accuracy of the result; the candidate path ciphertext is encrypted information about possible transportation routes; and the target shortest path is the final result that satisfies the path constraints. By recording this data in the blockchain, the generated audit log is immutable. Any attempt to modify the data will be detected by the blockchain's consensus mechanism, thus ensuring data integrity and authenticity. For example, in a logistics route query scenario, the verification parameters, candidate paths, and the final target shortest path involved in each query are recorded on the blockchain, forming a clear and reliable audit record that facilitates subsequent query and traceability.
[0142] Step S2200: The audit log is regularly checked through the smart contract. If a conflict is found between the verification parameter set and the historical records in the blockchain, an abnormal alarm is triggered and the operation permissions of the relevant computing nodes are frozen.
[0143] A smart contract is an automatically executed computer program that checks and processes data on the blockchain according to preset rules. In an embodiment of the present invention, the smart contract regularly checks the audit log, comparing the verification parameter set of the current query with the historical records in the blockchain. If a conflict is found between the verification parameter set and the historical records, this may indicate an anomaly in the query process, such as data tampering or a malicious attack. In this case, the smart contract triggers an anomaly alarm and notifies the relevant management personnel. At the same time, to prevent the anomaly from escalating, the operating permissions of the relevant computing nodes are frozen, suspending their participation in subsequent computing and query tasks until the problem is resolved. For example, the smart contract can be set to check the audit log once a day. If the verification parameters of a query are significantly different from those of similar historical queries, an alarm is immediately triggered and the operating permissions of the computing nodes involved in the query are frozen.
[0144] Step S2300: Provide an audit interface for the user terminal, allowing it to query historical operation records based on a time range or path identifier and verify the authenticity of the records.
[0145] To facilitate user-side querying and verification of historical operation records, the system provides an audit interface. Users can use this interface to query relevant historical operation records based on a time range or route identifier. Time range queries allow users to view all query records within a specified time period, for example, all logistics route query information for a given day. Route identifier queries allow users to perform detailed historical queries on a specific route, analyzing query status at different times. Furthermore, users can leverage the blockchain's unique nature to verify the authenticity of records. Because blockchain data is immutable, users can verify whether records have been modified by comparing hash values. For example, logistics company managers can use the audit interface to query route query records for a specific shipment within a specific time period and verify their authenticity, enabling oversight and management of the transportation process.
[0146] Step S2400: In a cross-domain query scenario, the audit logs of different domains are synchronized through a cross-chain protocol to ensure the transparency and traceability of global query behavior.
[0147] In cross-domain query scenarios, different domains may have independent blockchain networks and audit logs. To ensure global transparency and traceability of query behavior, the audit logs of different domains need to be synchronized through a cross-chain protocol. A cross-chain protocol is a technology used to enable data exchange and sharing between different blockchains. It integrates audit logs from different domains, allowing users to view and trace all query records on a unified platform. This allows query operations to be fully recorded and tracked regardless of the domain, enhancing the security and reliability of the entire system. For example, in a cross-domain logistics query scenario involving multiple logistics companies and different regions, synchronizing the audit logs of each company and region through a cross-chain protocol allows query behavior across the entire logistics network to be clearly traced and monitored, ensuring transparency and security in the logistics and transportation process.
[0148] In summary, the privacy-protected graph data constrained shortest path verification query method provided by the present invention realizes accurate, secure, and efficient path query under the premise of ensuring the privacy of graph data through a series of steps and technical means. Starting from obtaining the user query request, after the encryption processing of the target graph data, key splitting, secure multi-party calculation, verification and verification and other processes, the target shortest path that meets the path constraint conditions is finally generated. At the same time, it also includes the training of the key splitting model, path optimization, cross-domain auditing, dynamic adjustment, and traceability and auditing of query results, forming a complete graph data query system with high security and reliability. This method can be widely used in multiple fields such as logistics, social networks, bioinformatics, etc., and provides an effective solution for graph data processing and query in these fields. It can effectively protect data privacy, improve query efficiency and accuracy, and promote the development and application of related fields.
[0149] Figure 2 A hardware entity diagram of a computer system provided by an embodiment of the present invention is as follows Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and when the processor 1001 executes the program, the steps in the method of any of the above embodiments are implemented.
[0150] The memory 1002 stores computer programs that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and various modules in the computer system 1000 (for example, image data, audio data, voice communication data, and video communication data). It can be implemented through flash memory (FLASH) or random access memory (RAM).
[0151] When the processor 1001 executes the program, it implements the steps of any of the above-mentioned privacy-preserving graph data constrained shortest path verification query methods. The processor 1001 generally controls the overall operation of the computer system 1000.
[0152] An embodiment of the present invention provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the privacy-protected graph data constrained shortest path verification query method of any of the above embodiments.
[0153] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0154] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0155] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0156] The above description is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A privacy-preserving graph data constrained shortest path verification query method, characterized by: The method comprises: Acquire a path query request sent by a user terminal, wherein the path query request includes a source node identifier, a target node identifier, and a path constraint condition; Encrypting the target graph data based on a homomorphic encryption algorithm to generate an encrypted graph structure feature, and dividing the encrypted graph structure feature into a first encrypted sub-feature and a second encrypted sub-feature; Invoking a pre-trained key splitting model, matching the path constraint condition with a preset privacy policy, and generating a verification token, wherein the verification token includes a first random parameter, a second random parameter, and a constraint hash value; Sending the first encryption sub-feature and the verification token to a first computing node and the second encryption sub-feature and the verification token to a second computing node through a distributed protocol, triggering the first computing node and the second computing node to perform secure multi-party computation and output candidate path ciphertexts and a set of verification parameters; The verification parameter set is subjected to consistency check based on a bilinear mapping function. If the check passes, the candidate path ciphertext is decrypted to generate a target shortest path that satisfies the path constraint condition.
2. The method according to claim 1, characterized in that The calling of the pre-trained key splitting model, matching the path constraint with the preset privacy policy, and generating a verification token includes: Extracting the cost constraint value and the time constraint value in the path constraint condition, and obtaining the node access rule, edge weight decryption rule and random number generation strategy associated with the target graph data from the preset privacy policy; Performing a topological reachability check on the source node identifier and the target node identifier based on the node access rule, screening out a set of intermediate nodes that meet the constraint conditions, and binding the hash summary of the intermediate node set with the edge weight decryption rule to generate an edge authority binding identifier; Calling the random number generation strategy to generate a first random parameter and a second random parameter, wherein the first random parameter is used to obfuscate and encrypt the cost constraint value, and the second random parameter is used to obfuscate and encrypt the time constraint value; Inputting the cost constraint value and the first random parameter into a homomorphic encryption function to generate a first obfuscated encryption constraint value, and inputting the time constraint value and the second random parameter into a homomorphic encryption function to generate a second obfuscated encryption constraint value; Concatenate the first obfuscated encrypted constraint value and the second obfuscated encrypted constraint value to form a ciphertext constraint combination, and perform an XOR operation on the ciphertext constraint combination and the edge permission binding identifier to generate an initial verification ciphertext; Inputting the initial verification ciphertext into a preset hash chain structure for iterative compression to generate a constrained hash value, and dynamically binding the constrained hash value with the first random parameter and the second random parameter to generate a random parameter association sequence; The random parameter association sequence and the hash summary of the intermediate node set are timestamped to generate token basic data with a timeliness label, and the constraint relationship in the token basic data is encapsulated through a zero-knowledge proof protocol to generate a verification token containing the first random parameter, the second random parameter and the constraint hash value, wherein the decryption validity of the verification token is doubly verified by the edge authority binding identifier and the timeliness label.
3. The method according to claim 2, characterized in that The step of sending the first encryption sub-feature and the verification token to a first computing node and the second encryption sub-feature and the verification token to a second computing node through a distributed protocol, triggering the first computing node and the second computing node to perform secure multi-party computation, and outputting a candidate path ciphertext and a verification parameter set includes: The first computing node decrypts the first encrypted sub-feature based on the first sub-private key to generate a first decrypted sub-feature, extracts the first random parameter from the verification token, and superimposes the first decrypted sub-feature and the first random parameter to generate a first intermediate parameter; The second computing node decrypts the second encrypted sub-feature based on the second sub-private key to generate a second decrypted sub-feature, extracts the second random parameter from the verification token, and superimposes the second decrypted sub-feature and the second random parameter to generate a second intermediate parameter; Accumulating the first intermediate parameter and the second intermediate parameter through a secure summation protocol to generate a global accumulated parameter, and comparing the global accumulated parameter with the path constraint to screen out a set of candidate paths that meet the path constraint; Calling the zero-knowledge proof protocol to perform verifiability encapsulation on each candidate path in the candidate path set, generating path proof parameters, and combining the path proof parameters with the corresponding path ciphertext to generate the candidate path ciphertext and the verification parameter set.
4. The method according to claim 3, characterized in that The performing consistency check on the verification parameter set based on a bilinear mapping function includes: Extracting a first verification parameter and a second verification parameter from the verification parameter set, wherein the first verification parameter is generated based on local data of the first computing node, and the second verification parameter is generated based on local data of the second computing node; Inputting the first verification parameter and the second verification parameter into a bilinear mapping function to generate a first mapping result, and generating a second mapping result based on the constraint hash value in the verification token; If the similarity between the first mapping result and the second mapping result exceeds a preset threshold, it is determined that the calculation process of the candidate path ciphertext has not been tampered with; If the similarity does not exceed the preset threshold, a path invalidation notification is returned to the user terminal, and the first computing node and the second computing node are triggered to re-execute the secure multi-party computation.
5. The method according to claim 4, characterized in that The decrypting the candidate path ciphertext to generate a target shortest path that satisfies the path constraint condition includes: Splitting the candidate path ciphertext into a first ciphertext segment and a second ciphertext segment, wherein the first ciphertext segment is encrypted by the first computing node using the first child private key, and the second ciphertext segment is encrypted by the second computing node using the second child private key; Invoking a joint decryption protocol to synchronously decrypt the first ciphertext segment and the second ciphertext segment to generate a first plaintext segment and a second plaintext segment, and merging the first plaintext segment and the second plaintext segment to generate a complete path plaintext; Filtering the complete path plaintext based on the path constraint condition, eliminating paths that do not meet preset requirements, and determining the path with the smallest total distance among the remaining paths as the target shortest path; The target shortest path is associated with the path proof parameter in the verification parameter set and stored, and a query response including the target shortest path and the associated proof is returned to the user terminal.
6. The method according to claim 2, characterized in that The key splitting model is trained by the following steps: Obtain a sample of a historical encrypted graph dataset, the sample comprising multiple encrypted graph structure instances, a set of path constraints corresponding to each instance, and a set of annotated legal node access paths, wherein each path constraint set comprises a cost constraint range, a time constraint threshold, and an associated privacy policy identifier; The cost constraint range in the path constraint condition set is associated and mapped with the node visibility rule corresponding to the privacy policy identifier to generate a dynamic constraint combination parameter, and the time constraint threshold is bound to the edge weight decryption permission rule of the encrypted graph structure instance to generate a timing permission parameter; wherein the node visibility rule specifies which nodes can be accessed under what conditions; Input the dynamic constraint combination parameter and the time sequence permission parameter into the input end of the key splitting model, and call the hierarchical topology parsing network in the middle layer of the model to extract the node connection characteristics and edge weight distribution characteristics of the encrypted graph structure instance; Cross-layer fusion of the node connection features and the edge weight distribution features to generate a graph structure context vector, and input the graph structure context vector into the key splitting logic network at the output end of the model to output the predicted first sub-private key parameters, second sub-private key parameters, and random number generation strategy parameters; Perform a partial decryption test on the encrypted graph structure instance based on the first sub-private key parameter to obtain a plaintext segment of the candidate node access path, compare the overlap with the marked legal node access path set, and calculate the path decryption accuracy; Input the random number generation strategy parameters into a predefined verification network to generate simulated random obfuscation parameters, and reversely verify the matching degree between the simulated random obfuscation parameters and the path constraint condition set through homomorphic encryption to evaluate the strategy effectiveness score; The path decryption accuracy and the strategy effectiveness score are weighted and summed to generate the model main loss value, and the parameters of the hierarchical topology parsing network and the key splitting logic network are updated based on the adaptive gradient algorithm until the main loss value converges to a preset threshold.
7. The method according to claim 6, characterized in that The method further comprises: Inputting the first sub-private key parameter, the second sub-private key parameter and the random number generation strategy parameter output by the key splitting logic into the auxiliary verification network to generate a basic data block for simulating a verification token; Call the constraint hash value and random parameter sequence of the real verification token in the historical query log, perform similarity modeling on the basic data block and the real token data, and calculate the position-sensitive hash difference; Outputting a compensation parameter of the position-sensitive hash difference through the auxiliary verification network, and adding the compensation parameter to the main loss value of the model to generate a joint optimization objective function; Dynamically adjust the weight ratio of the main loss value and the compensation parameter in the joint optimization objective function during each training stage of the key splitting model, wherein the path decryption accuracy is dominant in the initialization stage and the position-sensitive hash difference is dominant in the convergence stage; The gradient of the joint optimization objective function is passed back to the connection layer of the hierarchical topology parsing network and the auxiliary verification network, and the parameters of the key splitting model and the auxiliary verification network are synchronously updated, so that the generation process of the first sub-private key parameters is associated with the legitimacy of the simulated verification token.
8. The method according to claim 1, characterized in that The method of encrypting the target graph data based on the homomorphic encryption algorithm to generate an encrypted graph structure feature, and dividing the encrypted graph structure feature into a first encrypted sub-feature and a second encrypted sub-feature, includes: Extracting a node attribute set, an edge connection relationship set, and an edge weight set from the target graph data, wherein the node attribute set includes a unique identifier and a type label of each node, the edge connection relationship set includes a start node identifier and an end node identifier of each edge, and the edge weight set includes a distance value, a cost value, and a time consumption value corresponding to each edge; Calling a homomorphic encryption algorithm to encrypt each edge weight in the edge weight set one by one, generating an encrypted edge weight list, and retaining the node attribute set and the edge connection relationship set in plain text to form a plain text graph structure description feature; Associating and combining the encrypted edge weight list with the plaintext graph structure description features to generate an initial encrypted graph structure, wherein each edge in the initial encrypted graph structure corresponds one-to-one to a plaintext connection relationship through an encrypted edge weight; Adding random noise interference to each encrypted edge weight in the initial encrypted graph structure based on a random mask generator to generate a perturbed encrypted graph structure, and dividing the nodes in the perturbed encrypted graph structure into an odd node group and an even node group according to the parity of the identifier; The perturbed encrypted edge weights of all associated edges are extracted from the odd-numbered node group to form a first encrypted sub-feature, and the perturbed encrypted edge weights of all associated edges are extracted from the even-numbered node group to form a second encrypted sub-feature, wherein the first encrypted sub-feature and the second encrypted sub-feature can be restored to a complete encrypted graph structure feature through a joint key.
9. The method according to claim 5, characterized in that After generating the target shortest path that satisfies the path constraint condition, the method further includes: Extracting the real-time load status and link communication quality indicators of all nodes in the target shortest path to generate path performance evaluation parameters, and dynamically weighting the path performance evaluation parameters with the time thresholds in the path constraints to generate a priority routing strategy; Locally adjusting the order of nodes in the target shortest path based on the priority routing strategy to generate a set of candidate optimization paths, and performing a correlation check on each path in the set of candidate optimization paths with the path proof parameters in the verification parameter set to screen out candidate optimization paths that meet consistency conditions; Input the candidate optimized paths into a pre-trained path stability prediction model, output the failure risk probability and delay fluctuation prediction value of each path, and dynamically associate the failure risk probability with the cost upper limit value in the path constraint condition to generate a risk constraint adjustment parameter; Performing a secondary screening of the candidate optimization paths based on the risk constraint adjustment parameter, eliminating paths whose failure risk probability exceeds a preset threshold, generating a set of safe optimization paths, and determining the path with the smallest delay fluctuation prediction value in the set of safe optimization paths as the final optimization path; The final optimized path and the target shortest path are weightedly fused to generate a comprehensive optimal path, and the node sequence and verification parameters of the comprehensive optimal path are synchronously updated to the verification token to form an enhanced verification token and path response result.
10. A computer system comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Graph encryption shortest path query method and system supporting k disordered nodes
CN114707012A
Method for addition homomorphic encryption and password accumulator calculation
CN115021890A