Graph data constraint shortest path verification query method and system based on privacy protection
Dynamic verification tokens are generated through homomorphic encryption and key segmentation models, combined with secure multi-party computing and bilinear mapping verification mechanisms, the problems of graph data privacy protection and path constraint verification in the existing technology are solved, and efficient and secure path query is achieved.
Patent Information
- Application Number
- CN202510645268.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-05-20
AI Technical Summary
While protecting the privacy of graph data, the prior art is difficult to effectively verify the dynamic matching of path constraints, resulting in error results; at the same time, there is a lack of a collaborative verification mechanism across nodes, so that malicious nodes can forge global shortest paths, and traditional solutions are difficult to cope with real-time changing path constraints.
The graph data is encrypted and segmented through a homomorphic encryption algorithm, and the encrypted graph structure characteristics are generated, and a dynamic verification token is generated using the key segmentation model. Combining a secure multi-party computing protocol and a bilinear mapping verification mechanism, path search and tampering defense are completed in the ciphertext state.
It realizes that on the premise of protecting the data privacy of the graph, accurately verify the path constraints, prevent malicious nodes from forging results, adapt to real-time changing path constraints, and enhances the system's anti-attack ability and traceability.
Smart Images

Figure CN120165836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method and system for verifying and querying constrained shortest paths of graph data based on privacy protection. Background Art
[0002] At present, with the rapid development of cloud computing and big data technologies, graph data from many fields such as social networks, biological proteins, financial risk control, and intelligent transportation has been widely used, and these graph data contain a large amount of sensitive information. With the increasing maturity of cloud computing technology, its powerful storage and high-efficiency computing capabilities have attracted graph data owners, including enterprises, research institutions, and government departments, to choose to outsource large-scale graph data to cloud servers. However, when the graph data is out of the direct control of the owner, there are concerns about data security. In addition, during the transmission and storage of data, it faces risks such as network attacks, malicious software intrusion, and internal personnel's illegal operations, which are likely to lead to the leakage of sensitive information.
[0003] The core of encrypted graph data constrained shortest path query is to quickly verify the optimality and compliance of query results while protecting the privacy of graph nodes and edge weights. In the prior art, homomorphic encryption is usually used to encrypt the graph data as a whole and then directly perform path search, or the encrypted data is simply split and distributed to multiple computing nodes for distributed processing. However, the former cannot effectively verify the dynamic matching of path constraint conditions due to fully ciphertext operations, and it is easy to generate incorrect results that deviate from the actual requirements. Although the latter can improve the computing efficiency, due to the lack of a cross-node collaborative verification mechanism, malicious nodes can forge the global shortest path by tampering with local computing results. In addition, traditional solutions rely on a static verification parameter generation mechanism, which is difficult to cope with real-time changing path constraint conditions, resulting in the inability to effectively bind the dynamic cost threshold or timeliness requirements to the privacy protection strategy of encrypted graph data. At the same time, the verification process lacks non-repudiation proof based on cryptographic primitives, enabling attackers to use man-in-the-middle attacks to forge false verification tags, resulting in systematic defects such as low credibility of query results, weak anti-tampering ability, and poor dynamic adaptability. Summary of the Invention
[0004] In view of this, an embodiment of the present invention provides a method for verifying and querying constrained shortest paths of graph data based on privacy protection. The technical solution of the embodiment of the present invention is realized as follows: On the one hand, the present invention provides a method for verifying and querying the constrained shortest path of graph data based on privacy protection. The method includes: obtaining a path query request sent by a user terminal, where the request includes a source node identifier, a target node identifier, and path constraint conditions; encrypting target graph data based on a homomorphic encryption algorithm to generate encrypted graph structure features, and dividing the encrypted graph structure features into a first encrypted sub-feature and a second encrypted sub-feature; calling a pre-trained key splitting model to match the path constraint conditions with a preset privacy policy to generate a verification token, where the verification token includes 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 computing, and outputting a candidate path ciphertext and a set of verification parameters; performing consistency verification on the set of verification parameters based on a bilinear mapping function, and if the verification passes, decrypting the candidate path ciphertext to generate a target shortest path that satisfies the path constraint conditions.
[0005] On the other hand, the present invention provides a computer system, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, the steps in the above method are implemented.
[0006] The method for verifying and querying the constrained shortest path of graph data based on privacy protection provided by the present invention obtains a query request from a user terminal containing a source node, a target node, and path constraint conditions, encrypts and divides target graph data using a homomorphic encryption algorithm to form a first encrypted sub-feature and a second encrypted sub-feature, generates a dynamic verification token that combines random parameters and a constraint hash value based on a key splitting model, performs ciphertext path search and zero-knowledge proof encapsulation between distributed computing nodes through a secure multi-party computing protocol, generates a candidate path ciphertext and a set of verification parameters, and decrypts to generate a target shortest path after performing cross-node computing consistency verification based on a bilinear mapping algorithm. This method retains the topological guiding ability and ciphertext security through encrypted graph structure segmentation, realizes the real-time binding of path constraint conditions and privacy policies using a dynamic verification token, combines a secure multi-party computing protocol and a bilinear mapping verification mechanism to complete double guarantees of path search and tampering prevention in the ciphertext state, effectively solves the core problems of high privacy leakage risk, unreliable verification results, and poor adaptability to dynamic constraints in traditional encrypted graph data queries, and at the same time strengthens the traceability of path operations and the system's anti-attack ability through a cross-domain audit mechanism and an exception tracing function, providing an integrated solution that takes into account privacy protection, result accuracy, and computing efficiency for high-security scenarios that rely on sensitive data.
[0007] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, rather than limiting the technical solution of the present invention. Description of the Drawings
[0008] The drawings herein are incorporated into the specification and form a part of this specification. These drawings illustrate embodiments consistent with the present invention and, together with the specification, are used to explain the technical solution of the present invention.
[0009] Figure 1 Schematic diagram of the implementation process of a privacy - protected graph data constrained shortest path verification query method provided by an embodiment of the present invention.
[0010] Figure 2 Schematic diagram of the hardware entity of a computer system provided by an embodiment of the present invention. Detailed Embodiments
[0011] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limitations on the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0012] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict. The terms "first / second / third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0013] An embodiment of the present invention provides a privacy - protected graph data constrained shortest path verification query method, which can be executed by a processor of a computer system. Among them, the computer system can refer to devices with data - processing capabilities such as servers, laptops, tablets, desktop computers, mobile devices (such as mobile phones, portable video players, personal digital assistants, dedicated messaging devices, portable game devices), etc.
[0014] Figure 1 Schematic diagram of the implementation process of a privacy - protected graph data constrained shortest path verification query method provided by an embodiment of the present invention, as Figure 1 shown, the method includes the following steps: Step S100: Obtain a path query request sent by the client. The request includes a source node identifier, a target node identifier, and path constraint conditions.
[0015] In the embodiments of the present invention, the client is, for example, a scheduling system of a logistics enterprise, which is responsible for initiating a path query request according to order information. The source node identifier refers to the unique identifier of the starting point of the path query. In the logistics scenario, it can be the number of the shipping warehouse, which can accurately locate the specific shipping location. The target node identifier is the unique identifier of the end point of the path query, such as the number of the distribution station corresponding to the receiving location, which clarifies the final position where the goods need to be delivered. The path constraint conditions are the restrictive requirements for the query path. In the logistics field, common path constraint conditions include a cost constraint value and a time constraint value. The cost constraint value can be the maximum transportation cost set by the enterprise for this delivery, for example, stipulating that the transportation cost cannot exceed a preset amount; the time constraint value can be the 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 specifically perform a path query in the logistics network to meet the business needs of the enterprise.
[0016] Step S200: Based on the homomorphic encryption algorithm, perform encryption processing on the target graph data to generate encrypted graph structure features, and divide the encrypted graph structure features into a first encrypted sub-feature and a second encrypted sub-feature.
[0017] The homomorphic encryption algorithm is an encryption algorithm that allows performing preset calculation operations on data in the ciphertext state without first decrypting the data, and the calculation result is consistent with the result of performing the same calculation on the plaintext after decryption. In the logistics scenario, the target graph data is the relevant data of the logistics network, which includes information such as each warehouse, distribution station, and the transportation routes between them. The encrypted graph structure features are the feature representations obtained by encrypting the target graph data. It not only includes the structural information of the graph data, such as the connection relationship between nodes, but also includes information such as the encrypted edge weights. Dividing the encrypted graph structure features into a first encrypted sub-feature and a second encrypted sub-feature is for subsequent distributed computing and secure multi-party computing, which can improve the computing efficiency and enhance the data security at the same time.
[0018] As an implementation manner, step S200 can be specifically implemented as the following steps: Step S210: Extract the node attribute set, edge connection relationship set, and edge weight set from the target graph data. Among them, 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 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.
[0019] In the logistics scenario, the unique identifier in the node attribute set is used to uniquely identify each node in the logistics network. For example, each warehouse and distribution site has its unique number. The type tag can represent the category of the node. In the logistics field, node types can be divided into shipping warehouses, transfer warehouses, distribution sites, etc. The edge connection relationship set clarifies the connection relationships between the nodes in the logistics network. The two endpoints of a transportation route can be determined through the start node identifier and the end node identifier. The edge weight set contains various attribute values of the edges, and these values are closely related to logistics transportation. For example, the distance value can represent the actual geographical distance between two sites, the cost value can represent the cost required to transport goods between these two sites, and the time consumption value can represent the time required for goods to be transported from one site to another. For example, in a logistics network containing multiple warehouses and distribution sites, the number of warehouse A is W001, and its type tag is "shipping warehouse"; the number of distribution site B is D002, and the type tag is "distribution site". If there is a transportation route from warehouse A to distribution site B, then the start node identifier of this edge is W001, the end node identifier is 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.
[0020] Step S220: Call the homomorphic encryption algorithm to encrypt each edge weight in the edge weight set item by item, generate an encrypted edge weight list, and retain the node attribute set and the edge connection relationship set in plaintext to form the plaintext graph structure description feature.
[0021] In the embodiment of the present invention, the homomorphic encryption algorithm encrypts each edge weight value in the edge weight set. In this way, even if the data is obtained during transmission or storage, the attacker cannot directly obtain the actual weight information of the edge, thereby protecting the sensitive data in the logistics network. The encrypted edge weight list is a list obtained by encrypting the edge weight set, and each element in it is an encrypted edge weight value. Retaining the node attribute set and the edge connection relationship set in plaintext is because this information is necessary for understanding the structure of the graph, and in many cases, they do not contain sensitive information. The formed plaintext graph structure description feature can help the subsequent calculation and query processes better understand the structure of the graph, while ensuring the security of sensitive information such as edge weights. For example, for the above transportation route from warehouse A to distribution site B, its edge weight values (distance 50 kilometers, cost 100 yuan, time 2 hours) will be encrypted by the homomorphic encryption algorithm to generate corresponding encrypted edge weight values and stored in the encrypted edge weight list. The numbers of warehouse A and distribution site B and their connection relationship will be retained in plaintext and constitute a part of the plaintext graph structure description feature.
[0022] Step S230: Associate and combine the encrypted edge weight list with the plaintext graph structure description features to generate an initial encrypted graph structure, where each edge in the initial encrypted graph structure corresponds one-to-one to the plaintext connection relationship through the encrypted edge weight.
[0023] Associating and combining the encrypted edge weight list with the plaintext graph structure description features is to construct a complete encrypted graph structure so that the encrypted edge weight of each edge can correspond to the corresponding plaintext connection relationship. In the logistics scenario, such an association and combination can ensure that when performing path queries, the encrypted edge weight information of each transportation route can be accurately obtained. For example, in the above logistics network, by associating the encrypted edge weight from warehouse A to distribution site B with their plaintext connection relationship (the start node identifier is W001 and the end node identifier is D002), this transportation route can be accurately represented in the initial encrypted graph structure. The initial encrypted graph structure provides a complete and secure data structure for subsequent calculations and queries.
[0024] Step S240: Add 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 divide the nodes in the perturbed encrypted graph structure into an odd node group and an even node group according to the parity of the identifiers.
[0025] The random mask generator is a tool for generating random numbers. In the embodiments of the present invention, it adds random noise interference to each encrypted edge weight in the initial encrypted graph structure. The purpose of doing this is to further enhance the security of the data. Even if an attacker obtains the encrypted edge weight information, it is difficult to obtain the true edge weight value due to the added random noise. The generated perturbed encrypted graph structure adds an additional layer of protection on the original encryption basis. 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 identifiers is to prepare for subsequent distributed calculations. For example, in a logistics network, if the numbers of warehouses and distribution sites are assigned according to a preset rule, then they can be divided into an odd node group and an even node group according to the parity of the numbers. Suppose the number of warehouse C is W003 (odd) and the number of distribution site D is D004 (even), then warehouse C will be divided into the odd node group and distribution site D will be divided into the even node group.
[0026] Step S250: Extract the perturbed encrypted edge weights of all associated edges from the odd node group to form a first encrypted sub-feature, and extract the perturbed encrypted edge weights of all associated edges from the even node group to form a second encrypted sub-feature, where the first encrypted sub-feature and the second encrypted sub-feature can be restored to the complete encrypted graph structure feature through a joint key.
[0027] In the embodiments of the present invention, the perturbed encrypted edge weights of all associated edges are extracted from the odd node group, and these weight values form the first encrypted sub-feature. Similarly, the perturbed encrypted edge weights of all associated edges are extracted from the even node group to form the second encrypted sub-feature. The combined key is a special key that can merge and restore the first encrypted sub-feature and the second encrypted sub-feature to obtain the complete encrypted graph structure feature. In the logistics scenario, this partitioning and extraction operation can distribute the data for storage and calculation, improving the calculation efficiency and data security. For example, the perturbed encrypted edge weights of the warehouses in the odd node group and the connected transportation routes are extracted to form the first encrypted sub-feature, and the perturbed encrypted edge weights of the distribution sites in the even node group and the relevant transportation routes are extracted to form the second encrypted sub-feature. When a complete path query is required, the combined key can be used to restore these two sub-features to the complete encrypted graph structure feature.
[0028] Step S300: Invoke the pre-trained key splitting model to match the path constraint conditions with the preset privacy policy to generate a verification token, where the verification token includes a first random parameter, a second random parameter, and a constraint hash value.
[0029] The pre-trained key splitting model is a model trained with a large amount of data. It can generate corresponding keys and random parameters according to the input path constraint conditions and the preset privacy policy. Its overall architecture can adopt a combination of a multi-layer perceptron (MLP) and a graph neural network (GNN). The model mainly consists of an input end, a hierarchical topology parsing network in the middle layer, and a key splitting logic network at the output end. At the input end, the dynamic constraint combination parameters and the time-series permission binding parameters are received. The dynamic constraint combination parameters are generated by associatively mapping the cost constraint range in the path constraint condition set with the node visibility rule corresponding to the privacy policy identifier, which integrates the information of the cost constraint and the node access rule. The time-series permission binding parameters are generated by binding the time constraint threshold with the edge weight decryption permission rule of the encrypted graph structure instance, which contains the information of the time constraint and the edge weight decryption permission. The hierarchical topology parsing network in the middle layer is one of the core parts of the key splitting model, and it can adopt a graph convolutional network (GCN) as the basic architecture. The graph convolutional network can effectively extract the node connection features and the edge weight distribution features of the encrypted graph structure instance. In the logistics scenario, the node connection features describe the connection relationships between various warehouses and distribution sites. For example, which warehouses are directly connected to which distribution sites by transportation routes; the edge weight distribution features reflect the weight distribution of these transportation routes, such as the distribution of distances, costs, and time consumptions of different routes. Specifically, the graph convolutional network propagates and aggregates the feature information of the nodes in the graph structure through multiple convolutional operations.
[0030] The path constraint conditions have been mentioned above and are the restrictive requirements for query paths, such as cost constraint values and time constraint values. The preset privacy policy is a series 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 for verifying the legality of the query and the accuracy of the result. It contains a first random parameter, a second random parameter, and a constraint hash value. The first random parameter and the second random parameter are used to obfuscate and encrypt the path constraint conditions to enhance data security. The constraint hash value is the value obtained by performing a hash operation on the path constraint conditions, which can be used to verify whether the path constraint conditions have been tampered with during the query process.
[0031] As an implementation manner, step S300 can be specifically implemented as the following steps: Step S310: Extract the cost constraint value and the time constraint value in the path constraint conditions, and obtain the node access rules, edge weight decryption rules, and random number generation strategy associated with the target graph data from the preset privacy policy.
[0032] In the logistics scenario, the cost constraint value and the time constraint value in the path constraint conditions are the restrictions of logistics enterprises on the transportation path. The node access rules obtained from the preset privacy policy are used to specify which nodes can be accessed. For example, some warehouses may only allow transport vehicles to enter due to security reasons. The edge weight decryption rules specify under what conditions the encrypted weights of the edges can be decrypted. For example, the encrypted weights can only be decrypted after meeting the preset identity verification and permission requirements. The random number generation strategy is used to generate the first random parameter and the second random parameter, and it can be a random number generation method based on a certain algorithm. For example, the cost constraint value may be that the transportation cost cannot exceed 500 yuan, and the time constraint value may be that the transportation time cannot exceed 3 days. The preset privacy policy may stipulate that only vehicles with preset permissions can access certain warehouse nodes, and the weights of the edges related to these nodes can be decrypted after verification.
[0033] Step S320: Based on the node access rules, perform a topological reachability check on the source node identifier and the target node identifier, filter out the set of intermediate nodes that meet the constraint conditions, and bind the hash digest of the set of intermediate nodes to the edge weight decryption rules to generate an edge permission binding identifier.
[0034] Topological reachability verification is to check whether the target node can be reached from the source node through a series of transportation routes in the logistics network. Verification based on node access rules can ensure that the queried path is legal. Filter out the set of intermediate nodes that meet the constraint conditions. These intermediate nodes are on the path from the source node to the target node and conform to the node access rules. The hash digest of the set of intermediate nodes is the value obtained by performing a hash operation on the set of intermediate nodes, which can be used to uniquely identify this set. Bind the hash digest of the set of intermediate nodes to the edge weight decryption rule, and the generated edge permission binding identifier can be used to control the decryption permission of the edge weight. For example, in a logistics network containing multiple warehouses and distribution sites, the source node is Warehouse E and the target node is Distribution Site F. Through topological reachability verification, filter out the set of intermediate nodes that meet the node access rules, such as Warehouse G and Transfer Station H. Calculate the hash digest of this set of intermediate nodes, and then bind it to the edge weight decryption rule to generate the edge permission binding identifier.
[0035] Step S330: Invoke the random number generation strategy to generate the first random parameter and the second random parameter, where the first random parameter is used to perform obfuscation encryption on the cost constraint value, and the second random parameter is used to perform obfuscation encryption on the time constraint value.
[0036] The random number generation strategy is a predefined algorithm or method that can generate random numbers. In the embodiment of the present invention, this strategy is invoked to generate the first random parameter and the second random parameter. The first random parameter is used to perform obfuscation encryption on the cost constraint value. By performing a certain operation (such as addition, multiplication, etc.) on the first random parameter and the cost constraint value, the cost constraint value can be encrypted, making it difficult for attackers to directly obtain the real cost constraint value. Similarly, the second random parameter is used to perform obfuscation encryption on the time constraint value to enhance the security of the time constraint value. For example, the random number generation strategy may be based on a pseudo-random number generator, and the generated first random parameter is 123 and the second random parameter is 456. Perform an addition operation on the first random parameter and the cost constraint value (such as 500 yuan) to obtain the obfuscation-encrypted cost constraint value.
[0037] Step S340: Input the cost constraint value and the first random parameter into the homomorphic encryption function to generate the first obfuscation-encrypted constraint value, and input the time constraint value and the second random parameter into the homomorphic encryption function to generate the second obfuscation-encrypted constraint value.
[0038] The homomorphic encryption function is a special encryption function that can perform calculations in the ciphertext state. Input the cost constraint value and the first random parameter into the homomorphic encryption function, and the function will perform an encryption operation on them to generate the first obfuscated encryption constraint value. Similarly, input the time constraint value and the second random parameter into the homomorphic encryption function to generate the second obfuscated encryption constraint value. This can protect the privacy of the cost constraint value and the time constraint value while enabling subsequent calculation operations. For example, the homomorphic encryption function may be based on a certain elliptic curve encryption algorithm. Input the cost constraint value of 500 yuan and the first random parameter of 123 into the function to generate the first obfuscated encryption constraint value.
[0039] 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 exclusive OR operation on the ciphertext constraint combination and the edge permission binding identifier to generate an initial verification ciphertext.
[0040] Concatenate the first obfuscated encryption constraint value and the second obfuscated encryption constraint value, that is, combine them to form a new ciphertext data, which contains the encrypted information of the cost constraint value and the time constraint value. Then perform an exclusive OR operation on the ciphertext constraint combination and the edge permission binding identifier. The exclusive OR operation is a logical operation that can encrypt and obfuscate two data. The generated initial verification ciphertext contains the path constraint conditions and the edge permission information, and has been encrypted to improve the security of the data. For example, the first obfuscated encryption constraint value is ABC, the second obfuscated encryption constraint value is DEF, and after concatenation, it forms the ciphertext constraint combination ABCDEF. The edge permission binding identifier is 123, and an exclusive OR operation is performed on ABCDEF and 123 to generate the initial verification ciphertext.
[0041] Step S360: Input the initial verification ciphertext into a preset hash chain structure for iterative compression to generate a constraint hash value, and dynamically bind the constraint hash value with the first random parameter and the second random parameter to generate a random parameter association sequence.
[0042] 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, which 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 this structure for multiple hash operations to generate a constrained hash value. Then, the constrained hash value is bound to the first random parameter 123 and the second random parameter 456 to generate a random parameter association sequence.
[0043] Step S370: Superimpose a timestamp on the random parameter association sequence and the hash digest of the intermediate node set to generate token base data with a timeliness label, and encapsulate the constraint relationship in the token base data through a zero-knowledge proof protocol to generate a verification token containing the first random parameter, the second random parameter, and the constrained hash value, where the decryption validity of the verification token is verified by both the edge permission binding identifier and the timeliness label.
[0044] Superimpose a timestamp on the random parameter association sequence and the hash digest of the intermediate node set. The timestamp is a numerical value representing time, which can add timeliness information to the data. The generated token base data with a timeliness label contains path constraint conditions, random parameters, intermediate node information, and time information. Encapsulate the constraint relationship in the token base data through a zero-knowledge proof protocol. The zero-knowledge proof protocol can prove the legality of the data without revealing the real data. The generated verification token contains the first random parameter, the second random parameter, and the constrained hash value, and its decryption validity is verified by both the edge permission binding identifier and the timeliness label. This means that the verification token can be decrypted and used only when both the edge permission requirement and the time validity requirement are met. For example, in a logistics scenario, the verification token can be used to verify the legality of a transportation path query, ensuring that the query and decryption operations can be performed only within the specified time and with the corresponding permissions.
[0045] Step S400: Send the first encrypted sub-feature and the verification token to the first computing node through a distributed protocol, and send the second encrypted sub-feature and the 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 a candidate path ciphertext and a set of verification parameters.
[0046] A distributed protocol is a protocol used for data transmission and communication between multiple computing nodes. In the embodiments of the present invention, it sends the first encrypted sub-feature and the verification token to the first computing node, and sends the second encrypted 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, and they can be different servers or computing devices. Secure multi-party computation is a method of performing calculations among multiple participants, which can complete the calculation tasks without revealing their respective data privacy. Trigger the first computing node and the second computing node to perform secure multi-party computation, and the two nodes will perform calculations based on the received data, and finally output the candidate path ciphertext and the set of verification parameters. The candidate path ciphertext is the encrypted possible transportation path information, and the set of verification parameters contains the parameters used to verify the legality and accuracy of the candidate path.
[0047] As an implementation manner, step S400 can be specifically implemented as the following steps: Step S410: The first computing node decrypts the first encrypted sub-feature based on the first sub-private key to generate the first decrypted sub-feature, extracts the first random parameter in the verification token, and superimposes the first decrypted sub-feature and the first random parameter to generate the first intermediate parameter.
[0048] The first sub-private key is the key used to decrypt the first encrypted sub-feature. The first computing node uses this key to decrypt the first encrypted sub-feature to obtain the first decrypted sub-feature. The first decrypted sub-feature contains the original weight information of the edges related to the odd node group (decrypted after encryption). Extract the first random parameter in the verification token. This random parameter is the parameter used to obfuscate and encrypt the cost constraint value before. Superimpose the first decrypted sub-feature and the first random parameter. The superimposing operation can be operations such as addition and multiplication to generate the first intermediate parameter. For example, the first sub-private key is a private key generated based on a certain asymmetric encryption algorithm. The first computing node uses this private key to decrypt the first encrypted sub-feature to obtain the first decrypted sub-feature. Extract the first random parameter 123 from the verification token, and perform an addition operation on the first decrypted sub-feature and 123 to generate the first intermediate parameter.
[0049] Step S420: The second computing node decrypts the second encrypted sub-feature based on the second sub-private key to generate the second decrypted sub-feature, extracts the second random parameter in the verification token, and superimposes the second decrypted sub-feature and the second random parameter to generate the second intermediate parameter.
[0050] Similar to the first computing node, the second computing node decrypts the second encrypted sub-feature using the second sub-private key to obtain the second decrypted sub-feature, which contains the original weight information of the edges related to the even node group. Extract the second random parameter in the verification token, which is the parameter used for obfuscating and encrypting the time constraint value. Superimpose the second decrypted sub-feature and the second random parameter to generate the second intermediate parameter. For example, the second sub-private key is also a private key generated based on the 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. Extract the second random parameter 456 from the verification token, and perform an addition operation on the second decrypted sub-feature and 456 to generate the second intermediate parameter.
[0051] Step S430: Accumulate the first intermediate parameter and the second intermediate parameter through a secure summation protocol to generate a global accumulation parameter, and compare the global accumulation parameter with the path constraint conditions to filter out a set of candidate paths that meet the path constraint conditions.
[0052] The secure summation protocol is a protocol for performing secure addition operations among multiple parties. It can complete the addition operation without revealing the privacy of their respective data. Accumulate the first intermediate parameter and the second intermediate parameter through this protocol to obtain the global accumulation parameter. The global accumulation parameter contains the comprehensive information of the edge weights in the entire logistics network. Compare the global accumulation parameter with the path constraint conditions. For example, compare the cost information in the global accumulation parameter with the cost constraint value, and compare the time information with the time constraint value to filter out a set of candidate paths that meet the path constraint conditions. For example, the secure summation protocol is based on the addition protocol of homomorphic encryption to accumulate the first intermediate parameter and the second intermediate parameter to obtain the global accumulation parameter. Suppose the cost constraint value is 500 yuan, and the cost information in the global accumulation parameter is 400 yuan, which meets the cost constraint condition, and this path may be filtered into the set of candidate paths.
[0053] Step S440: Invoke the zero-knowledge proof protocol to perform verifiable encapsulation on each candidate path in the set of candidate paths to generate path proof parameters, and combine the path proof parameters with the corresponding path ciphertext to generate a set of candidate path ciphertexts and verification parameters.
[0054] Zero - knowledge proof protocols can prove the legality and accuracy of candidate paths without revealing the true information of the candidate paths. Call this protocol to perform verifiable encapsulation on each candidate path in the candidate path set to generate path proof parameters. The path proof parameters can be used to verify whether the candidate paths meet the path constraint conditions and whether they are legal paths. Combine the path proof parameters with the corresponding path ciphertexts to generate a candidate path ciphertext and verification parameter set. 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, use the zero - knowledge proof protocol to generate path proof parameters, combine the parameters with the ciphertext of the path, and store them in the candidate path ciphertext and verification parameter set.
[0055] Step S500: Based on the bilinear mapping function, perform consistency verification on the verification parameter set. If the verification passes, decrypt the candidate path ciphertext to generate the target shortest path that meets the path constraint conditions.
[0056] The bilinear mapping function is a mathematical function that can perform consistency verification on the verification parameter set. The purpose of consistency verification is to check whether the parameters in the verification parameter set meet the expectations and whether they have been tampered with during the query process. If the verification passes, it indicates that the candidate path ciphertext and the verification parameter set are legal and accurate. At this time, the candidate path ciphertext can be decrypted. Decryption processing is to use the corresponding key to restore the candidate path ciphertext to plaintext path information. By screening and comparing the decrypted paths, the target shortest path that meets the path constraint conditions is finally generated. In the logistics scenario, the target shortest path may be the path with the lowest transportation cost and the shortest transportation time.
[0057] As an implementation method, in step S500, performing consistency verification on the verification parameter set based on the bilinear mapping function can be specifically implemented as the following steps: Step S510: Extract the first verification parameter and the second verification parameter from the verification parameter set. Among them, the first verification parameter is generated based on the local data of the first computing node, and the second verification parameter is generated based on the local data of the second computing node.
[0058] The first verification parameter is a parameter generated during the calculation and processing of the first computing node, which contains the verification information of the first computing node for the candidate path. The second verification parameter is generated at the second computing node and contains the verification information of the second computing node for the candidate path. Extract these two parameters 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 according to the first intermediate parameter and relevant calculation rules, and the second verification parameter is a value generated by the second computing node according to the second intermediate parameter.
[0059] Step S520: Input the first verification parameter and the second verification parameter into the bilinear mapping function to generate a first mapping result, and generate a second mapping result based on the constrained hash value in the verification token.
[0060] Input the first verification parameter and the second verification parameter into the bilinear mapping function, and the function will perform a mapping operation on these two parameters to generate a first mapping result. At the same time, based on the constrained hash value in the verification token, a second mapping result is generated through a preset calculation or mapping method. These two mapping results will be used for subsequent comparison and verification. For example, the bilinear mapping function is based on the elliptic curve bilinear mapping algorithm. Input the first verification parameter and the second verification parameter into the function to generate a first mapping result. According to the constrained hash value in the verification token, generate a second mapping result through a preset mapping rule.
[0061] 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.
[0062] The preset threshold is a similarity standard set in advance to determine whether the first mapping result and the second mapping result are similar. If the similarity between them exceeds the preset threshold, it means that the first verification parameter and the second verification parameter are consistent, the calculation process of the candidate path ciphertext has not been tampered with, and the data is reliable. For example, the preset threshold is 0.9. If the similarity between the first mapping result and the second mapping result reaches 0.95, exceeding the preset threshold, it is determined that the calculation process of the candidate path ciphertext has not been tampered with.
[0063] Step S540: If the similarity does not exceed the preset threshold, return a path invalid notification to the client and trigger the first computing node and the second computing node to re - execute the secure multi - party calculation.
[0064] If the similarity between the first mapping result and the second mapping result does not exceed the preset threshold, it means that the calculation process of the candidate path ciphertext may have been tampered with and the data is unreliable. At this time, return a path invalid notification to the client, informing the user that the queried path is invalid. At the same time, trigger the first computing node and the second computing node to re - execute the secure multi - party calculation, re - perform path query and verification to obtain reliable path information. For example, the preset threshold is 0.9, and the similarity between the first mapping result and the second mapping result is 0.8, which does not exceed the preset threshold. The system will return a path invalid notification to the client and restart the calculation process.
[0065] As an implementation manner, in step S500, decrypting the candidate path ciphertext to generate a target shortest path that satisfies the path constraint condition can be specifically implemented as the following steps: 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 sub-private key, and the second ciphertext segment is encrypted by the second computing node using the second sub-private key.
[0066] The candidate path ciphertext is the encrypted path information, which is divided into the first ciphertext segment and the second ciphertext segment. 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. This segmentation method can be decrypted using the corresponding private keys in the subsequent decryption process. For example, the candidate path ciphertext is a long encrypted string, which is divided into two parts according to the set rules, the first part is used as the first ciphertext segment, and the second part is used as the second ciphertext segment.
[0067] 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 with the second plaintext segment to generate a complete path plaintext.
[0068] The joint decryption protocol is a protocol for simultaneously decrypting the first ciphertext segment and the second ciphertext segment, which can ensure that the decryption process of the two ciphertext segments is carried out synchronously. The protocol is called to decrypt the first ciphertext segment and the second ciphertext segment to generate the first plaintext segment and the second plaintext segment respectively. Then the first plaintext segment and the second plaintext segment are merged to obtain the complete path plaintext information. For example, the joint decryption protocol may be based on a certain key sharing and collaborative decryption algorithm, and the protocol is used to decrypt the first ciphertext segment and the second ciphertext segment to obtain the first plaintext segment and the second plaintext segment, which are spliced together to generate the complete path plaintext.
[0069] Step S570: Filter the complete path plaintext based on the path constraint condition, remove 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.
[0070] Based on the previously obtained path constraints, such as cost constraints and time constraints, the complete path plain text is filtered. Paths that do not meet the preset requirements are eliminated, such as paths where the transportation cost exceeds the cost constraint value or the transportation time exceeds the time constraint value. Among the remaining paths that meet the conditions, 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 time does not exceed 3 days. Check the complete path plain text, eliminate the paths with a cost of more than 500 yuan or a time of more than 3 days, and select the path with the smallest total distance among the remaining paths as the target shortest path.
[0071] Step S580: Associatively store the target shortest path with the path proof parameter in the verification parameter set, and return a query response including the target shortest path and the associated proof to the client.
[0072] Associatively storing the target shortest path with the path proof parameter in the verification parameter set facilitates subsequent querying and verification. The path proof parameter can be used to prove the legality and accuracy of the target shortest path. Returning a query response including the target shortest path and the associated proof to the client allows the client to make subsequent logistics arrangements and decisions based on this information. For example, store the target shortest path and the corresponding path proof parameter in a database, and then return a query response to the scheduling system of a logistics enterprise. The scheduling system can arrange transportation vehicles and routes according to the target shortest path.
[0073] As an implementation manner, the key splitting model provided by the embodiments of the present invention is trained through the following steps: Step S301: Obtain a historical encrypted graph data set sample, where the sample includes multiple encrypted graph structure instances, a set of path constraint conditions corresponding to each instance, and a labeled set of legal node access paths, and each set of path constraint conditions includes a cost constraint range, a time constraint threshold, and an associated privacy policy identifier.
[0074] The historical encrypted graph data set sample is obtained from historical logistics network data and contains multiple encrypted graph structure instances. Each encrypted graph structure instance is a graph structure representation obtained by encrypting the logistics network. The set of path constraint conditions 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 limits of the transportation cost, and the time constraint threshold specifies the maximum allowable value of the transportation time. The associated privacy policy identifier is used to indicate the privacy policy followed by this instance. The labeled set of legal node access paths is a set obtained by labeling the legal node access paths in each instance and can be used to train the accuracy of the model. For example, the historical encrypted graph data set sample contains 100 encrypted graph structure instances. The cost constraint range in the set of path constraint conditions corresponding to each instance may be 300 - 500 yuan, the time constraint threshold may be 2 days, and the associated privacy policy identifier may be P001. The labeled set of legal node access paths records the legal transportation paths in this instance.
[0075] Step S302: Associatively map the cost constraint range in the set of path constraint conditions 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 time sequence permission parameters.
[0076] Associate and map the cost constraint range in the set of path constraint conditions with the node visibility rules corresponding to the privacy policy identifier. The node visibility rules specify which nodes can be accessed under what conditions. Through the association and mapping, generate dynamic constraint combination parameters, which integrate the information of cost constraints and node access rules. Bind the time constraint threshold to the edge weight decryption permission rule of the encrypted graph structure instance. The edge weight decryption permission rule specifies under what conditions the encrypted weight of the edge can be decrypted. The generated timing permission parameter contains the information of time constraints and edge weight decryption permissions. For example, the cost constraint range is 300 - 500 yuan, and the node visibility rules corresponding to the privacy policy identifier specify that only nodes with a cost between 400 - 500 yuan can be accessed. Through the association and mapping, generate dynamic constraint combination parameters. The time constraint threshold is 2 days, and the edge weight decryption permission rule of the encrypted graph structure instance specifies that the edge weight can only be decrypted when the time does not exceed 2 days. Bind them to generate the timing permission parameter.
[0077] Step S303: Input the dynamic constraint combination parameter and the timing permission binding 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 features and edge weight distribution features of the encrypted graph structure instance.
[0078] Input the dynamic constraint combination parameter and the timing permission binding parameter into the input end of the key splitting model, and the model starts to calculate. The hierarchical topology parsing network in the middle layer of the model is a network for parsing graph structures, which can extract the node connection features and edge weight distribution features of the encrypted graph structure instance. The node connection features describe the connection relationships between nodes in the graph, and the edge weight distribution features describe the distribution of edge weights in the graph. For example, the hierarchical topology parsing network may be based on a convolutional neural network (CNN) or a graph neural network (GNN), which can process the input parameters and extract the node connection features and edge weight distribution features of the encrypted graph structure instance.
[0079] Step S304: Perform cross-layer fusion on the 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 parameter, second sub-private key parameter, and random number generation strategy parameter.
[0080] Perform cross-layer fusion on the node connection features and edge weight distribution features. Cross-layer fusion is a method of combining and fusing features at different levels to generate a graph structure context vector. The graph structure context vector contains comprehensive information about the encrypted graph structure instance. Input the graph structure context vector into the key splitting logic network at the model output end. The key splitting logic network is a network used to generate keys and random number generation strategies, and it will output the predicted first sub-private key parameter, second sub-private key parameter, and random number generation strategy parameter according to the input graph structure context vector. For example, cross-layer fusion can fuse the node connection features and edge weight distribution features through methods such as concatenation and weighted summation to generate a graph structure context vector. The key splitting logic network may be based on a fully connected neural network, and it will output the predicted parameters according to the graph structure context vector.
[0081] Step S305: Perform partial decryption testing on the encrypted graph structure instance based on the first sub-private key parameter, obtain the plaintext segment of the candidate node access path, and compare the overlap degree with the labeled set of legal node access paths to calculate the path decryption accuracy rate.
[0082] Perform partial decryption testing on the encrypted graph structure instance based on the first sub-private key parameter. Partial decryption testing means decrypting only a part of the encrypted graph structure instance. Obtain the plaintext segment of the candidate node access path, which is the path information obtained after decryption. Compare the overlap degree of the plaintext segment with the labeled set of legal node access paths. The overlap degree comparison is to check the coincidence degree of the plaintext segment and the paths in the set of legal node access paths. Calculate the path decryption accuracy rate through the comparison. The path decryption accuracy rate reflects the accuracy of the first sub-private key parameter generated by the model. For example, use the first sub-private key parameter to decrypt a part of the encrypted graph structure instance to obtain the plaintext segment of the candidate node access path. Suppose there are 10 paths in the labeled set of legal node access paths, and the plaintext segment coincides with 8 of them, then the path decryption accuracy rate is 80%.
[0083] Step S306: Input the random number generation strategy parameter into the predefined verification network to generate simulated random confusion parameters, and inversely verify the matching degree of the simulated random confusion parameters with the set of path constraint conditions through homomorphic encryption to evaluate the strategy effectiveness score.
[0084] Input the random number generation strategy parameters into a predefined verification network. The predefined verification network is a network used to verify the random number generation strategy, which generates simulated random obfuscation parameters based on the input parameters. The simulated random obfuscation parameters are the random parameters simulated for actual applications. Use homomorphic encryption to inversely verify the matching degree between the simulated random obfuscation parameters and the set of path constraint conditions. Homomorphic encryption inverse verification is a method for verifying the parameter matching degree in the ciphertext state. Evaluate the policy effectiveness score, which reflects the effectiveness of the random number generation strategy. For example, the predefined verification network may be based on a neural network. Input the random number generation strategy parameters into the network to generate simulated random obfuscation parameters. Use the homomorphic encryption inverse verification method to verify the matching degree between the simulated random obfuscation parameters and the set of path constraint conditions, and evaluate the policy effectiveness score according to the matching degree.
[0085] Step S307: Perform a weighted sum of the path decryption accuracy rate and the policy effectiveness score to generate the main loss value of the model, and update the parameters of the hierarchical topology analysis network and the key splitting logic network based on the adaptive gradient algorithm until the main loss value converges to a preset threshold.
[0086] Perform a weighted sum of the path decryption accuracy rate and the policy effectiveness score. The weighted sum assigns different weights according to the importance of the path decryption accuracy rate and the policy effectiveness score, and then adds them to obtain the main loss value of the model. Update the parameters of the hierarchical topology analysis network and the key splitting logic network based on the adaptive gradient algorithm. The adaptive gradient algorithm can automatically adjust the update step size of the parameters according to the loss value of the model. Continuously update the parameters until the main loss value of the model converges to a preset threshold. The preset threshold is a pre-set loss value standard. When the main loss value reaches this threshold, it indicates that the model training has achieved a good effect. For example, the weight of the path decryption accuracy rate is 0.6, and the weight of the policy effectiveness score is 0.4. Perform a weighted sum of them to obtain the main loss value of the model. Use the adaptive gradient algorithm (such as the Adam algorithm) to update the parameters of the hierarchical topology analysis network and the key splitting logic network until the main loss value converges to the preset threshold of 0.1.
[0087] As an implementation manner, the method provided by the embodiment of the present invention may further include: Step S308: Input 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 an auxiliary verification network to generate the basic data block of the simulated verification token.
[0088] Input 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, which is a network used to generate the basic data block of the simulated verification token. It generates the basic data block of the simulated verification token according to the input parameters. This data block contains the basic information of the verification token, but further processing is required to become a complete verification token. For example, the auxiliary verification network may be based on a generative adversarial network (GAN), and it generates the basic data block of the simulated verification token according to the input parameters.
[0089] Step S309: Invoke the constrained hash value and the random parameter sequence of the true verification token in the historical query log, perform similarity modeling on the basic data block and the true token data, and calculate the locality-sensitive hashing difference degree.
[0090] Invoke the constrained hash value and the random parameter sequence of the true verification token in the historical query log, and the historical query log records the information of the true verification token used in the previous query process. Perform similarity modeling on the basic data block and the true token data. Similarity modeling is to compare the similarity degree between the basic data block and the true token data by a certain method. Calculate the locality-sensitive hashing difference degree. The locality-sensitive hashing difference degree is an index to measure the difference between two data, which can reflect the similarity degree between the basic data block and the true token data. For example, use methods such as cosine similarity to perform similarity modeling on the basic data block and the true token data, and calculate their locality-sensitive hashing difference degree.
[0091] Step S3010: Output the compensation parameter of the locality-sensitive hashing difference degree through the auxiliary verification network, and superimpose the compensation parameter onto the main loss value of the model to generate a joint optimization objective function.
[0092] Output the compensation parameter of the locality-sensitive hashing difference degree through the auxiliary verification network. The compensation parameter is a parameter used to compensate for the locality-sensitive hashing difference degree. Superimpose the compensation parameter onto the main loss value of the model to generate a joint optimization objective function. The joint optimization objective function combines the information of the main loss value of the model and the locality-sensitive hashing difference degree, and is used to further optimize the performance of the model. For example, the auxiliary verification network outputs the compensation parameter according to the locality-sensitive hashing difference degree, and adds this parameter to the main loss value of the model to generate a joint optimization objective function.
[0093] Step S3011: 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, where the path decryption accuracy rate is dominant in the initialization stage, and the locality-sensitive hashing difference degree is dominant in the convergence stage.
[0094] Dynamically adjust the weight ratio of the main loss value to the compensation parameter in the joint optimization objective function at each training stage of the key splitting model. In the initialization stage, the parameters of the model are still unstable. At this time, the path decryption accuracy is dominant, that is, a larger weight is assigned to the main loss value, and the path decryption ability of the model is mainly optimized. In the convergence stage, the performance of the model is already close to the optimal. At this time, the position-sensitive hashing difference degree is dominant, and a larger weight is assigned to the compensation parameter to further optimize the similarity between the simulated verification token generated by the model and the real token. For example, in the initialization stage, the weight of the main loss value is 0.8, and the weight of the compensation parameter is 0.2; in the convergence stage, the weight of the main loss value is 0.2, and the weight of the compensation parameter is 0.8.
[0095] Step S3012: Backpropagate the gradient of the joint optimization objective function to the connection layer of the hierarchical topology parsing network and the auxiliary verification network, and synchronously update the parameters of the key splitting model and the auxiliary verification network, so that the generation process of the first sub-private key parameter is associated with the legitimacy of the simulated verification token.
[0096] Backpropagate the gradient of the joint optimization objective function to the connection layer of the hierarchical topology parsing network and the auxiliary verification network. Gradient backpropagation is to transfer the gradient information of the joint optimization objective function to the parameters of the model for updating the parameters. Synchronously update the parameters of the key splitting model and the auxiliary verification network, so that the generation process of the first sub-private key parameter is associated with the legitimacy of the simulated verification token. This can ensure that the first sub-private key parameter generated by the model can generate a legal and effective simulated verification token. For example, use the backpropagation algorithm to backpropagate the gradient of the joint optimization objective function to the connection layer of the hierarchical topology parsing network and the auxiliary verification network, and update the parameters of the model so that the generation of the first sub-private key parameter is associated with the legitimacy of the simulated verification token.
[0097] As an implementation, 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: Step S600: Extract the real-time load status and link communication quality metrics of all nodes in the target shortest path, generate path performance evaluation parameters, and perform dynamic weight matching on the path performance evaluation parameters and the time threshold in the path constraint conditions to generate a priority routing policy.
[0098] Extract the real-time load status of all nodes and link communication quality metrics in the target shortest path. The real-time load status reflects the current workload of the nodes, and the link communication quality metrics reflect the stability and efficiency of communication between nodes. Generate path performance evaluation parameters, which integrate the load status of nodes and link communication quality information. Perform dynamic weight matching between the path performance evaluation parameters and the time threshold in the path constraint conditions. Dynamic weight matching assigns different weights according to the importance of the path performance evaluation parameters and the time threshold to generate a priority routing strategy. The priority routing strategy can be used to determine the preferred transportation routes in different situations. For example, in a logistics network, extract the real-time load status of each warehouse and distribution site in the target shortest path, such as the inventory level of the warehouse and the vehicle scheduling situation of the distribution site, as well as the link communication quality metrics between nodes, such as network latency and bandwidth. Generate path performance evaluation parameters, perform dynamic weight matching between these parameters and the time constraint threshold to generate a priority routing strategy. For example, in a time-critical situation, preferentially select routes with good link communication quality and low node load.
[0099] Step S700: Based on the priority routing strategy, locally adjust the node order in the target shortest path to generate a set of alternative optimized paths, and perform a correlation check between each path in the set of alternative optimized paths and the path proof parameters in the verification parameter set to filter out candidate optimized paths that meet the consistency conditions.
[0100] Based on the priority routing strategy, locally adjust the node order in the target shortest path. The local adjustment is to slightly adjust the node order without changing the overall structure of the path. Generate a set of alternative optimized paths, which contains multiple paths after adjustment. Perform a correlation check between each path in the set of alternative optimized paths and 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. Filter out candidate optimized paths that meet the consistency conditions. These paths not only meet the requirements of the priority routing strategy but also comply with the conditions of the verification parameters. For example, according to the priority routing strategy, adjust the order of certain warehouses and distribution sites in the target shortest path to generate a set of alternative optimized paths. Perform a correlation check between each path in the set and the path proof parameters to filter out candidate optimized paths that meet the consistency conditions.
[0101] Step S800: Input the candidate optimized paths into a pre-trained path stability prediction model, output the failure risk probability and delay fluctuation prediction values of each path, and perform dynamic association between the failure risk probability and the cost upper limit value in the path constraint conditions to generate a risk constraint adjustment parameter.
[0102] Input the candidate optimized path into a pre-trained path stability prediction model. The path stability prediction model is a model trained with a large amount of data, which can predict the failure risk probability and delay fluctuation prediction value of the path. The failure risk probability reflects the likelihood of the path having a failure, and the delay fluctuation prediction value reflects the fluctuation of the path transportation time. Dynamically associate the failure risk probability with the cost upper limit value in the path constraint conditions. The dynamic association is adjusted according to the relationship between the failure risk probability and the cost upper limit value to generate a risk constraint adjustment parameter. The risk constraint adjustment parameter can be used to further screen the paths to ensure that the selected paths meet the cost requirements and have a low failure risk. For example, the pre-trained path stability prediction model can be based on machine learning algorithms (such as decision trees, neural networks, etc.). Input the candidate optimized path into this model, and output the failure risk probability and delay fluctuation prediction value of each path. Dynamically associate the failure risk probability with the cost upper limit value to generate a risk constraint adjustment parameter. For example, the path stability prediction model can adopt an architecture that combines long short-term memory network (LSTM) and support vector machine (SVM).
[0103] Step S900: Perform a secondary screening on the candidate optimized paths based on the risk constraint adjustment parameter, eliminate the paths whose failure risk probability exceeds the preset threshold, generate a set of safe optimized paths, and determine the path with the smallest delay fluctuation prediction value in the set of safe optimized paths as the final optimized path.
[0104] Perform a secondary screening on the candidate optimized paths based on the risk constraint adjustment parameter. The secondary screening is to further screen the paths on the basis of the previous screening. Eliminate the paths whose failure risk probability exceeds the preset threshold. The preset threshold is a pre-set failure risk probability standard, and the paths exceeding this threshold are considered unsafe. Generate a set of safe optimized paths. The paths in this set meet the conditions of the priority routing policy and verification parameters and have a low failure risk. Determine the path with the smallest delay fluctuation prediction value in the set of safe optimized paths as the final optimized path. The final optimized path is the optimal path selected after comprehensively considering various factors. For example, the preset threshold is 0.2, eliminate the candidate optimized paths whose failure risk probability exceeds 0.2, and generate a set of safe optimized paths. Select the path with the smallest delay fluctuation prediction value in the set as the final optimized path.
[0105] Step S1000: Perform weighted fusion on the final optimized path and the target shortest path to generate a comprehensive optimal path, and synchronously update the node sequence of the comprehensive optimal path and the verification parameter to the verification token to form an enhanced verification token and path response result.
[0106] The final optimized path and the target shortest path are weighted and fused. Weighted fusion assigns different weights according to the importance of the final optimized path and the target shortest path and fuses them to generate a comprehensive optimal path, which combines the advantages of the final optimized path and the target shortest path. The node sequence of the comprehensive optimal path and the verification parameters are synchronously updated to the verification token. The updated verification token contains the latest path information and verification parameters, forming an enhanced verification token and a path response result. The enhanced verification token can improve the security and accuracy of path query and verification, and the path response result can be provided to the client for logistics arrangement 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, they are weighted and fused to generate a comprehensive optimal path. The node sequence of the comprehensive optimal path and the verification parameters are updated to the verification token, forming an enhanced verification token and a path response result.
[0107] As an implementation, after generating the comprehensive optimal path in step S1000, the method provided by the embodiment of the present invention further includes steps of cross-domain auditing and anomaly backtracking, specifically including: Step S1100: Record the node sequence of the comprehensive optimal path, the set of verification parameters, and the enhanced verification token in chronological order to the distributed audit chain to generate an immutable path operation log, where the path operation log includes the decryption operation timestamps of each node, the verification consistency tags, and the path weight change records.
[0108] The node sequence of the comprehensive optimal path, the set of verification parameters, and the enhanced verification token are recorded in chronological order to the distributed audit chain. The distributed audit chain is a distributed blockchain technology that can ensure the immutability of the recorded data, generating an immutable path operation log. The path operation log includes the decryption operation timestamps of each node, the verification consistency tags, and the path weight change records. The decryption operation timestamp records the time of the node decryption operation, the verification consistency tag records the consistency situation of the verification process, and the path weight change record records the change situation of the path weight. For example, using the distributed audit chain technology, the node sequence of the comprehensive optimal path, the set of verification parameters, and the enhanced verification token are recorded in chronological order to generate a path operation log, which includes the specific time of the decryption operation of each node, the tag indicating whether the verification process is consistent, and the change history of the path weight.
[0109] Step S1200: Extract the verification consistency tags and the path weight change records from the path operation log and input them into a pre-trained anomaly detection model to output potential abnormal operation segments and the associated set of risk node identifiers.
[0110] Extract the verification consistency tags and path weight change records from the path operation logs. These information can reflect the abnormal situations during the path query and verification processes. Input the extracted information into a pre-trained anomaly detection model. The anomaly detection model is a model trained with a large amount of data, which can identify potential abnormal operation segments and the associated set of risk node identifiers. The potential abnormal operation segments refer to the operation steps that may be abnormal, and the set of risk node identifiers refers to the identifiers of the nodes that may have risks. For example, the pre-trained anomaly detection model may be based on machine learning algorithms (such as support vector machines, clustering algorithms, etc.). Input the verification consistency tags and path weight change records into this model, and output the potential abnormal operation segments and the associated set of risk node identifiers.
[0111] Step S1300: Match the set of risk node identifiers with the set of node attributes in the target graph data, filter out the nodes with abnormal permissions or excessive decryption frequencies, generate a high-risk node list, and perform a correlation analysis between the high-risk node list and the potential abnormal operation segments to generate an anomaly traceability report.
[0112] Match the set of risk node identifiers with the set of node attributes in the target graph data. The set of node attributes contains various attribute information of the nodes, such as permission information, decryption frequency information, etc. Filter out the nodes with abnormal permissions or excessive decryption frequencies. Abnormal permissions mean that the access permissions of the nodes do not conform to the regulations, and excessive decryption frequency means that the decryption operations of the nodes are too frequent. Generate a high-risk node list, which contains the information of the nodes that may have risks. Perform a correlation analysis between the high-risk node list and the potential abnormal operation segments. The correlation analysis is to check the relationship between the high-risk nodes and the potential abnormal operations. Generate an anomaly traceability report, which can help find the source and cause of the abnormal operations. For example, compare the set of risk node identifiers with the set of node attributes in the target graph data, filter out the nodes with abnormal permissions or excessive decryption frequencies, and generate a high-risk node list. Perform a correlation analysis on the high-risk node list and the potential abnormal operation segments to generate an anomaly traceability report, which indicates that the abnormal operation may be caused by incorrect permission settings or excessive decryption operations of a certain node.
[0113] Step S1400: Trigger the dynamic key update mechanism based on the anomaly traceability report, re-partition the global private key to generate the updated first sub-private key and second sub-private key, and dynamically bind the updated sub-private keys with the random parameters in the verification token to generate a replacement verification token with enhanced timeliness.
[0114] Trigger a dynamic key update mechanism based on the anomaly traceability report. The dynamic key update mechanism is a mechanism for updating keys. It can update keys in a timely manner when anomalies are detected, improving the security of the system. Re-partition the global private key to generate an updated first sub-private key and a second sub-private key. Dynamically bind the updated sub-private keys with the random parameters 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 time and with corresponding permissions. For example, according to the anomaly traceability report, if it is found that there are permission anomalies in a certain node, trigger the dynamic key update mechanism, re-partition the global private key to generate an updated first sub-private key and a second sub-private key. Bind the updated sub-private keys with the random parameters in the verification token to generate a replacement verification token with enhanced timeliness.
[0115] 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 the access permissions of the high-risk nodes in the comprehensive optimal path based on the reset permissions to generate a secure isolation path response result.
[0116] Distribute the replacement verification token and the high-risk node list to the first computing node and the second computing node. The first computing node and the second computing node are the nodes participating in the calculation and verification. Trigger node operations, and the nodes will perform corresponding operations according to the received replacement verification token and high-risk node list. Freeze the access permissions of the high-risk nodes in the comprehensive optimal path based on the reset permissions. Freezing the access permissions means prohibiting access operations to the high-risk nodes. Generate a secure isolation path response result, which can ensure the security of the path and prevent the further spread of anomalies. For example, send the replacement verification token and the high-risk node list to the first computing node and the second computing node, and the nodes freeze the access permissions of the high-risk nodes in the comprehensive optimal path according to this information to generate a secure isolation path response result.
[0117] Step S1600: Correlate and store the secure isolation path response result with the path operation log, and synchronize the audit data to the computing nodes in other domains through the cross-chain consensus protocol to form a globally consistent audit trace network and an anomaly defense linkage mechanism.
[0118] Associate and store the security isolation path response result with the path operation log. The associated storage can facilitate subsequent querying and analysis. Synchronize the audit data to the computing nodes in other domains through a cross-chain consensus protocol, which is a protocol for data synchronization and sharing between different blockchains. Form a globally consistent audit tracking network and an anomaly defense linkage mechanism. The globally consistent audit tracking network can track and audit the operations of the entire logistics network, and the anomaly defense linkage mechanism can take timely measures for defense when anomalies are detected. For example, store the security isolation path response result and the path operation log in a database, and synchronize the audit data to the computing nodes in other domains through a cross-chain consensus protocol to form a globally consistent audit tracking network and an anomaly defense linkage mechanism. When an anomaly is detected in a certain domain, other domains can respond in a timely manner and jointly conduct defense.
[0119] As an implementation manner, the method provided by the embodiments of the present invention further includes a dynamic adjustment mechanism during the distributed protocol execution phase, which can be specifically implemented as the following steps: Step S1700: Real-time monitor the load status of the first computing node and the second computing node. If the computing delay of any node exceeds the threshold, migrate some computing tasks to the standby computing node.
[0120] Real-time monitor the load status of the first computing node and the second computing node. The load status reflects the working load of the node. If the computing delay of any node exceeds the threshold, which is a pre-set computing delay standard, it indicates that the working load of this node is too large and may affect the computing efficiency. Migrate some computing tasks to the standby computing node, which is a pre-set node for sharing computing tasks. For example, real-time monitor load metrics such as the CPU usage rate and memory usage rate of the first computing node and the second computing node. If the computing delay of the first computing node exceeds the pre-set threshold (such as 100 milliseconds), migrate some computing tasks (such as the calculation of certain edge weights) to the standby computing node to improve the computing efficiency.
[0121] Step S1800: When a malicious attack behavior is detected, trigger the key update process, generate a new global private key and re-segment it into a new first sub-private key and a new second sub-private key, and at the same time invalidate the original verification token.
[0122] When a malicious attack behavior is detected, the malicious attack behavior may include data tampering, brute force cracking and other behaviors. Trigger the key update process. The key update process is a mechanism for updating keys. It can update the keys in a timely manner when a malicious attack is discovered, improving the security of the system. Generate a new global private key and re-segment it into a new first sub-private key and a second sub-private key. At the same time, invalidate the original verification token. Invalidating the original verification token can prevent attackers from using the old verification token for illegal operations. For example, through the intrusion detection system, it is detected that there is a malicious attack behavior attempting to tamper with path data, triggering the key update process, generating a new global private key, re-segmenting it into a new first sub-private key and a second sub-private key, and invalidating the original verification token.
[0123] Step S1900: Dynamically adjust the number of iterations of the secure multi-party computation according to the complexity of the path constraint conditions. If the constraint conditions involve multi-dimensional indicators, increase the number of verification rounds of the zero-knowledge proof protocol.
[0124] Dynamically adjust the number of iterations of the secure multi-party computation according to the complexity of the path constraint conditions. The complexity of the path constraint conditions can be measured according to factors such as the number and type of constraint conditions. If the constraint conditions involve multi-dimensional indicators, such as constraints in multiple dimensions such as cost, time, and transportation capacity, increase the number of verification rounds of the zero-knowledge proof protocol. Increasing the number of verification rounds can improve the accuracy and security of the query results. For example, if the path constraint conditions only include cost constraints, the number of iterations of the secure multi-party computation can be set to 5 times; if the path constraint conditions include not only cost constraints but also multi-dimensional indicators such as time constraints and transportation capacity constraints, increase the number of verification rounds of the zero-knowledge proof protocol and increase the number of iterations to 8 times.
[0125] Step S2000: After the target shortest path is generated, erase the temporary decryption data in the first computing node and the second computing node to ensure no persistent storage risk.
[0126] After the target shortest path is generated, there may be temporary decryption data in the first computing node and the second computing node. These data are temporarily stored during the calculation process. However, if they are not erased in time, there may be a persistent storage risk, resulting in data leakage. Erasing the temporary decryption data in the first computing node and the second computing node can ensure the security of the data. For example, after the target shortest path is generated, the first computing node and the second node will automatically clear the temporary decryption data generated during the calculation process, such as the decrypted edge weight information, intermediate calculation results, etc. In this way, even if the computing node is attacked, the attacker cannot obtain these sensitive temporary data, thus ensuring the security and privacy of the data during the entire path query process.
[0127] As an implementation, the method provided by the embodiments of the present invention further includes the traceability and auditing functions of query results, which may specifically include the following steps: Step S2100: Record the verification parameter set, candidate path ciphertext, and target shortest path of each query request into the blockchain to generate an immutable audit log.
[0128] The blockchain is a decentralized distributed ledger technology with characteristics such as immutability and traceability. Recording the verification parameter set, candidate path ciphertext, and target shortest path of each query request into the blockchain, these data will be connected in sequence in the form of blocks according to the time order. The verification parameter set contains important parameters for verifying the legality of the query and the accuracy of the result; the candidate path ciphertext is the encrypted possible transportation path information; the target shortest path is the final result that meets the path constraint conditions. By recording these data into the blockchain, the generated audit log has the characteristic of immutability, and any attempt to modify the data will be detected by the consensus mechanism of the blockchain, thus ensuring the integrity and authenticity of the data. For example, in the logistics path query scenario, the verification parameters, candidate paths, and the finally determined target shortest path involved in each query will be recorded on the blockchain, forming a clear and reliable audit record for subsequent query and traceability.
[0129] Step S2200: Regularly check the audit log through a smart contract. If it is found that there is a conflict between the verification parameter set and the historical records in the blockchain, trigger an exception alarm and freeze the operation permissions of the relevant computing nodes.
[0130] A smart contract is an automatically executed computer program that can check and process the data on the blockchain according to preset rules. In the embodiments of the present invention, the smart contract will regularly check the audit log and compare the consistency of the verification parameter set of the current query with the historical records in the blockchain. If it is found that there is a conflict between the verification parameter set and the historical records, this may mean that there are abnormal situations during the query process, such as data tampering, malicious attacks, etc. At this time, the smart contract will trigger an exception alarm to notify the relevant management personnel. At the same time, in order to prevent the abnormal situation from further expanding, the operation permissions of the relevant computing nodes will be frozen, suspending their participation in subsequent computing and query tasks until the problem is solved. For example, the smart contract can be set to check the audit log once a day. When it is found that the verification parameters of a certain query are significantly different from the parameters of similar queries in history, an alarm will be immediately triggered and the operation permissions of the computing nodes involved in this query will be frozen.
[0131] Step S2300: Provide an audit interface for the user side, allowing it to query the historical operation records based on the time range or path identifier and verify the authenticity of the records.
[0132] To facilitate the user side to query and verify historical operation records, the system provides an audit interface for the user side. Users can use this interface to query relevant historical operation records according to the time range or path identifier. The time range query allows users to view all query records within a certain set time period. For example, users can query all logistics path query information within a certain day; the path identifier query allows users to conduct a detailed historical record query for a specific path and understand the query situation of this path at different times. At the same time, users can also utilize the characteristics of the blockchain to verify the authenticity of the records. Since the data on the blockchain cannot be tampered with, users can confirm whether the records have been modified by comparing the hash values of the records. For example, the management personnel of a logistics enterprise can, through the audit interface, query the transportation path query records of a certain batch of goods within a certain time period and verify the authenticity of these records for supervision and management of the transportation process.
[0133] Step S2400: In the cross-domain query scenario, synchronize the audit logs of different domains through the cross-chain protocol to ensure the transparency and traceability of global query behavior.
[0134] In the cross-domain query scenario, different domains may have their own independent blockchain networks and audit logs. To achieve the transparency and traceability of global query behavior, it is necessary to synchronize the audit logs of different domains through the cross-chain protocol. The cross-chain protocol is a technology used to achieve data interaction and sharing between different blockchains. It can integrate the audit logs of different domains, enabling users to view and trace all query records on a unified platform. In this way, regardless of which domain the query operation is performed in, it can be comprehensively recorded and tracked, improving the security and credibility of the entire system. For example, in a cross-domain logistics query scenario involving multiple logistics enterprises and different regions, synchronize the audit logs of each enterprise and region through the cross-chain protocol, so that the query behavior of the entire logistics network can be clearly traced and supervised, ensuring the transparency and security of the logistics transportation process.
[0135] In summary, the method for verifying and querying the constrained shortest path of graph data based on privacy protection provided by the present invention realizes accurate, secure, and efficient path query through a series of steps and technical means while ensuring the privacy of graph data. Starting from obtaining the user's query request, through processes such as encryption processing of the target graph data, key splitting, secure multi-party computing, and verification and validation, the target shortest path that meets the path constraint conditions is finally generated. At the same time, it also includes functions such as 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 applied to multiple fields such as logistics, social networks, and bioinformatics, providing an effective solution for graph data processing and query in these fields, effectively protecting data privacy, improving query efficiency and accuracy, and promoting the development and application of related fields.
[0136] Figure 2 The following is a schematic diagram of the hardware entity of a computer system provided by an embodiment of the present invention. As Figure 2 shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002. Among them, the memory 1002 stores a computer program that can run on the processor 1001, and when the processor 1001 executes the program, it implements the steps in the method of any of the above embodiments.
[0137] The memory 1002 stores a computer program that can run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001, and can also cache data to be processed or already processed by the processor 1001 and each module in the computer system 1000 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0138] When the processor 1001 executes the program, it implements the steps of the method for verifying and querying the constrained shortest path of graph data based on privacy protection as described in any of the above. The processor 1001 generally controls the overall operation of the computer system 1000.
[0139] An embodiment of the present invention provides a computer storage medium. The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for verifying and querying the constrained shortest path of graph data based on privacy protection as described in any of the above embodiments.
[0140] In 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 illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed components can be through some interfaces. The indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.
[0141] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] In addition, each functional unit in the embodiments of the present invention can be all integrated in a processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0143] As described above, it is only the implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A privacy-preserving graph data constrained shortest path verification query method, characterized in that: The method comprises: Acquire a path query request sent by a user terminal, wherein the request includes a source node identifier, a target node identifier, and a path constraint condition; Encrypt the target graph data based on a 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; Calling 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 through a distributed protocol, and sending the second encryption 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 computing, and outputting a candidate path ciphertext and a verification parameter set; The verification parameter set is checked for consistency based on a bilinear mapping function. If the check passes, the candidate path ciphertext is decrypted to generate a target shortest path that meets 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 condition 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 encrypt the cost constraint value, and the second random parameter is used to encrypt the time constraint value; Input the cost constraint value and the first random parameter into a homomorphic encryption function to generate a first obfuscated encryption constraint value, and input 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 authority binding identifier to generate an initial verification ciphertext; 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 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 double-verified by the edge authority binding identifier and the timeliness label.
3. The method according to claim 2, characterized in that The sending of the first encryption sub-feature and the verification token to the first computing node through a distributed protocol, and the sending of the second encryption sub-feature and the verification token to the second computing node, triggering the first computing node and the second computing node to perform secure multi-party computing, and outputting the candidate path ciphertext and the verification parameter set includes: The first computing node decrypts the first encryption sub-feature based on the first sub-private key to generate a first decryption sub-feature, extracts the first random parameter in the verification token, and superimposes the first decryption sub-feature with 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 in the verification token, and superimposes the second decrypted sub-feature with 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 condition to screen out a set of candidate paths that meet the path constraint condition; The zero-knowledge proof protocol is called 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 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; Calling 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 with 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 the 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 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.
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 data set, the sample comprising a plurality of encrypted graph structure instances, a set of path constraints corresponding to each instance, and a set of annotated legal node access paths, wherein each set of path constraints comprises a cost constraint range, a time constraint threshold, and an associated privacy policy identifier; Associatively mapping the cost constraint range in the path constraint condition set with the node visibility rule corresponding to the privacy policy identifier to generate a dynamic constraint combination parameter, and binding the time constraint threshold with the edge weight decryption permission rule of the encrypted graph structure instance to generate a timing permission parameter; Input the dynamic constraint combination parameter and the time-series permission binding parameter into the input end of the key splitting model, and call the hierarchical topology parsing network of 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 feature and the edge weight distribution feature 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 parameter, second sub-private key parameter and random number generation strategy parameter; Perform a partial decryption test on the encrypted graph structure instance based on the first sub-private key parameter, 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 weightedly 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: Input 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; Calling the constraint hash value and random parameter sequence of the real verification token in the historical query log, performing similarity modeling on the basic data block and the real token data, and calculating the position-sensitive hash difference; Outputting the compensation parameter of the position-sensitive hash difference through the auxiliary verification network, and superimposing the compensation parameter into 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 in 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 fed 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 item by item, 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 feature 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 node group to form a first encrypted sub-feature, and the perturbed encrypted edge weights of all associated edges are extracted from the even 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, generating path performance evaluation parameters, and dynamically weight matching the path performance evaluation parameters with the time threshold in the path constraint conditions to generate a priority routing strategy; Based on the priority routing strategy, the node order in the target shortest path is locally adjusted to generate a set of candidate optimization paths, and each path in the set of candidate optimization paths is verified for relevance with the path proof parameters in the verification parameter set to screen out candidate optimization paths that meet consistency conditions; The candidate optimization paths are input into a pre-trained path stability prediction model, the failure risk probability and delay fluctuation prediction value of each path are output, and the failure risk probability is dynamically associated with the cost upper limit value in the path constraint condition to generate a risk constraint adjustment parameter; Based on the risk constraint adjustment parameter, the candidate optimization paths are screened twice, paths whose failure risk probability exceeds a preset threshold are eliminated, a safe optimization path set is generated, and the path with the smallest delay fluctuation prediction value in the safe optimization path set is determined 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 executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Picture file encryption and decryption method and system based on content-associated secret key
CN105743906A
Graph encryption shortest path query method and system supporting k disordered nodes
CN114707012A
Method for addition homomorphic encryption and password accumulator calculation
CN115021890A
Shortest path acceleration method and device for large-scale graph data
CN117370613A
Path planning method, application and device based on knowledge and data combination
CN117808180A
Cited By
Data security method and system based on privacy calculation and multifunctional encryption
CN120454974A
Cross-mechanism security sharing encryption method for medical case data
CN120785633A
Multi-attribute fusion shortest path verifiable query method and device
CN121000374A
A multi-attribute fusion shortest path verifiable query method and device
CN121000374B
Privacy protection type ciphertext query and encryption execution method
CN121151135A