Quantum key relay routing calculation method and system
By constructing a quantum key distribution network topology graph and generating an indexed subgraph, and combining it with a path planning algorithm, the adaptiveness problem of routing computation in quantum key distribution networks is solved, enabling fast and efficient routing computation and key management, and improving the network's adaptability and management efficiency.
Patent Information
- Application Number
- PCT/CN2024/117308
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-23
- Filing Date
- 2024-09-06
- Publication Date
- 2026-01-29
AI Technical Summary
In existing quantum key distribution networks, the routing calculation method fails to adaptively update devices, resulting in cumbersome network deployment, the inability to automatically discover devices and allow them to join the network, and the need for each node to manually configure keys. Changes in network status lead to large-scale routing changes, affecting network performance.
By collecting quantum device status and link information, a network topology map is constructed. The key generation rate and the number of concurrent relays are integrated to generate an index subgraph. Then, a path planning algorithm is used to perform a heuristic search to calculate the optimal routing path.
It enables fast and efficient routing computation in quantum cryptography networks, reduces key waste during relay processes, lowers the amount of network management information, and improves network adaptability and management information reuse rate.
Smart Images

Figure CN2024117308_29012026_PF_FP_ABST
Abstract
Description
Quantum key relay routing calculation method and system
[0001] Cross-reference to Related Applications
[0002] This application claims priority to the Chinese patent application No. 202410985643.X, filed on July 23, 2024, and entitled "Quantum Key Relay Routing Calculation Method and System", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of quantum communication, in particular to a quantum key relay routing calculation method and system. BACKGROUND
[0004] Quantum cryptography technology based on quantum key distribution (QKD) protocol is one of the future industries that has developed rapidly in recent years. Unlike traditional cryptography based on mathematics, quantum cryptography is based on quantum mechanics and uses quantum physical properties to ensure the security of symmetric key distribution and uses the distributed quantum key to protect data with cryptography.
[0005] The network for generating and distributing quantum keys and providing quantum cryptography services externally is called a quantum cryptography network, which integrates a quantum key distribution network mainly composed of optical paths and quantum key distribution devices (i.e., QKD devices) and a quantum key management network mainly composed of classical communication links and quantum key management devices. Due to the limitation of the maximum effective distance of key generation between QKD devices, many QKD devices do not have direct quantum links and cannot achieve direct distribution of quantum keys, but rely on the quantum key management network to achieve relay transmission of quantum keys. Considering the difficulty and cost of network deployment, the quantum key distribution network is generally not a fully connected graph, so it is necessary to select appropriate quantum relay links, i.e., quantum key relay routes, in the quantum key relay process.
[0006] In the related art, the entire network topology is generally manually established by default by an administrator, and cannot be updated adaptively. In addition, although the related art has both a central management node that aggregates the topology and calculates the route and each relay node that discovers the adjacency and calculates the route by itself, neither method considers the availability in actual network deployment when calculating the route, which may have deficiencies in engineering applications. Because the existing method is cumbersome to network, it cannot automatically discover devices when entering the network, automatically access the network, and each device needs to be manually configured. A pair of keys needs to be pre-configured for all devices that need to be connected. Each node needs to deploy a switch, and the connection lines include but are not limited to: KM (Key Management) and QKD*n, KM and KM*n, KM and network management system, etc. In the existing route calculation method, the method of each node calculating by itself requires the KM node to save and maintain a large amount of route information, and network state changes will cause large-scale KM route changes, causing flooding effects.
[0007] SUMMARY
[0008] The technical problem to be solved by the present application is how to propose a practical and efficient quantum cryptography network route calculation method to ensure that the optimal route can be quickly calculated when a key relay request occurs and the real-time concurrency of the business is taken into account.
[0009] The present application solves the above technical problems by the following technical means:
[0010] The present application proposes a quantum key relay route calculation method, which comprises:
[0011] Collecting the device states and link information of each quantum device in the quantum key network and constructing a network topology graph;
[0012] Fusing the link key generation rate, the key management KM node state and the number of concurrent relays, deleting useless KM nodes from the network topology graph to obtain an index subgraph;
[0013] Using a path planning algorithm to perform heuristic search on the index subgraph to calculate the best route path.
[0014] In some embodiments of the present application, collecting the device states and link information of each quantum device in the quantum key network and constructing a network topology graph comprises:
[0015] Sending a hello packet to a directly connected neighbor node to confirm the connection relationship, and using a data structure to store the connection state of the current quantum key network;
[0016] After each KM device successfully enters the network, receiving the reporting information sent by the KM device that has successfully entered the network, the reporting information including device state, adjacent device information and link information;
[0017] The network connection state stored in the data structure is gradually improved according to each KM device that successfully accesses the network, until all the adjacent device information uploaded by the KM device exists in the data structure for storing the network connection state;
[0018] The quantum key generation rate reported by the QKD device that successfully accesses the network is received in a timely manner, and the quantum key generation rate, the key pool capacity and the network connection state in the data structure are stored correspondingly to generate a network topology graph, wherein the network topology graph is a weighted undirected graph, the nodes in the weighted undirected graph are each quantum device in the quantum key network, and the edges are connection states.
[0019] In some embodiments of the present application, the key pool capacity is obtained by the KM device that successfully accesses the network in a timely manner after successfully obtaining the quantum key from the QKD device.
[0020] In some embodiments of the present application, the link key generation rate, the KM node state and the number of concurrent relays are fused, and the useless KM nodes are deleted from the network topology graph to obtain an index subgraph, including:
[0021] The KM nodes with normal states in the network topology graph are respectively split into a set number of virtual nodes, and the available key amount of each virtual node is calculated based on the remaining amount of the key pool of each virtual node, the average key generation rate of the adjacent nodes of the virtual node within a past time period T and the key relay task being undertaken by the virtual node.
[0022] It is judged whether the available key amount of a virtual node exceeds the application key amount of this time key relay within a coming time period;
[0023] If the available key amount of a virtual node exceeds the application key amount of this time key relay within a coming time period, the virtual node is retained.
[0024] If the available key amount of a virtual node does not exceed the application key amount of this time key relay within a coming time period, the virtual node is deleted.
[0025] If there are still virtual nodes under the KM nodes with normal states that have not been deleted, all the virtual nodes under each KM node are respectively reduced to one node to obtain an index subgraph.
[0026] In some embodiments of the present application, the KM nodes with normal states in the network topology graph are respectively split into a set number of virtual nodes, and the available key amount of each virtual node is calculated based on the remaining amount of the key pool of each virtual node, the average key generation rate of the adjacent nodes of the virtual node within a past time period T and the key relay task being undertaken by the virtual node, including:
[0027] copying the network topology graph to obtain an index graph;
[0028] deleting the KM nodes in the index graph in a fault state, splitting the KM nodes in a normal state into a set number of virtual nodes, and calculating the available key amount of each virtual node based on the key pool remaining amount of each virtual node, the average key generation rate of the virtual node and adjacent nodes within a past time period T, and the key relay task being undertaken by the virtual node as:
[0029] wherein Q avaliable-k is the available key amount of the kth virtual node, Q remaining-k is the key pool remaining amount of the kth virtual node, Rate is the average key generation rate of the kth virtual node and adjacent nodes within a past time period T, Apply i is the key relay task being undertaken by the kth virtual node, 0 < i < m, and m is the number of relay tasks undertaken by the virtual node.
[0030] In some embodiments of the present application, a path planning algorithm is used to perform a heuristic search on the index subgraph, to calculate the best routing path, including:
[0031] adding the starting node in the index subgraph to an open list;
[0032] adding the adjacent nodes reachable by the starting node to the open list, setting the starting node as the parent node of the adjacent nodes, and calculating the cost of the adjacent nodes from the starting node as the cost of the parent node from the starting node plus 1;
[0033] removing the starting node from the open list and adding it to a closed list;
[0034] traversing each node in the open list as a current node, calculating the priority of each node in the open list according to the cost of the current node from the starting node and the cost of the current node from the target node, and removing the node with the highest priority from the open list and adding it to the closed list;
[0035] searching for the adjacent nodes of the node added to the closed list, skipping if the adjacent node is in the closed list, or calculating the cost of the adjacent node from the starting node;
[0036] repeating the step of calculating the priority of each node in the open list until the target node is added to the open list;
[0037] The parent node is traced from the target node step by step until the starting node is reached, and the best routing path is obtained.
[0038] In some embodiments of the present application, the cost of the current node to the starting node is the number of nodes on the way from the starting node to the current node, and the cost of the current node to the target node is the number of nodes on the way from the current node to the target node.
[0039] In some embodiments of the present application, the calculation formula of the cost of the current node to the target node is:
[0040] In the formula, h(j) is the cost of the current node j to the target node, Lng j is the longitude of the current node j, Lat j is the latitude of the current node j, Lng is the longitude of the target node, Lat is the latitude of the target node, and δ is the kilometer, represents the upward rounding.
[0041] In some embodiments of the present application, the priority calculation formula of each node is:
[0042] f(n)=g(n)+h(n)
[0043] In the formula, f(n) represents the comprehensive priority of the node n; g(n) is the cost of the node n to the starting node; and h(n) is the estimated cost of the node n to the target node.
[0044] In some embodiments of the present application, the method further comprises:
[0045] When there are multiple nodes with the same priority in the open list, a node is randomly selected from the multiple nodes with the same priority, and the node is removed from the open list and added to the close list.
[0046] In some embodiments of the present application, the adjacent node of the node added to the close list is searched, and if the adjacent node is in the close list, it is skipped, otherwise the cost of the adjacent node to the starting node is calculated, comprising:
[0047] The adjacent node of the node added to the close list is searched, and it is judged whether the adjacent node of the node newly added to the close list is in the close list;
[0048] If the adjacent node of the node newly added to the close list is in the close list, it is skipped.
[0049] If the adjacent node of the node newly added into the close list is not in the close list, it is judged whether the adjacent node of the node newly added into the close list is in the open list;
[0050] If the adjacent node of the node newly added into the close list is not in the open list, the adjacent node is added into the open list, the node newly added into the close list is set as the parent node of the adjacent node, and the cost of the adjacent node from the starting node in the new path is calculated as the cost of the parent node from the starting node plus 1;
[0051] If the adjacent node of the node newly added into the close list is in the open list, the cost of the adjacent node from the starting node in the new path is calculated as the cost of the parent node from the starting node plus 1, and is compared with the cost of the adjacent node from the starting node in the previous path;
[0052] Based on the comparison result, if the previous path is better, no operation is performed, and if the new path is better, the parent node of the adjacent node is set as the node newly added into the close list.
[0053] In some embodiments of the present application, the present application further provides a quantum key relay routing calculation system, the system comprising:
[0054] a network topology graph construction module, configured to collect device states and link information of quantum devices in a quantum key network and construct a network topology graph;
[0055] an index subgraph generation module, configured to fuse link key generation rates, KM node states and the number of concurrent relays, delete useless KM nodes from the network topology graph, and obtain an index subgraph;
[0056] a best routing path calculation module, configured to perform heuristic search on the index subgraph by using a path planning algorithm and calculate a best routing path.
[0057] In some embodiments of the present application, the present application further provides a computer readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the quantum key relay routing calculation method.
[0058] The present application has the following advantages:
[0059] (1) The application firstly collects the device states and link information of each quantum device and constructs a network topology graph, and generates an index subgraph on the basis of the network topology graph. The generation mode of the index subgraph increases the consideration of the link key generation rate and the number of concurrent relays, and also considers the node state and the like, which can effectively avoid the problem of no key available for relay due to excessive relay concurrency of the core KM node; finally, the heuristic function is used to actively find a path consistent with the direction of the target node on the index subgraph to determine the optimal routing path. The quantum key relay routing calculation method proposed is a practical and efficient quantum cryptography network routing calculation method, which can quickly calculate the optimal route when a key relay request occurs and also takes into account the real-time concurrency of the business.
[0060] (2) The application dynamically changes the network topology according to the real-time uploaded KM adjacency relationship, which helps the network relay to select the optimal path.
[0061] (3) The application actively finds a path consistent with the direction of the destination node through the heuristic function, and the optimal path is the path with the least number of nodes passed through, which can effectively reduce the waste of relay keys in the relay process.
[0062] (4) The application improves the multiplexing rate of management information by fusing network control and network management, reduces the amount of management information transmitted in the network, reduces the load of the management and control system, and is conducive to practical implementation.
[0063] Additional aspects and advantages of the application will be partially given in the following description, partially will become obvious from the following description, or will be understood by practicing the application. BRIEF DESCRIPTION OF DRAWINGS
[0064] Fig. 1 is a flowchart of a quantum key relay routing calculation method according to an embodiment of the application;
[0065] Fig. 2 is a network topology graph generation flowchart according to an embodiment of the application;
[0066] Fig. 3 is an original network topology graph constructed according to an embodiment of the application;
[0067] Fig. 4 is a virtual node splitting schematic diagram according to an embodiment of the application;
[0068] Fig. 5 is a topology graph obtained by deleting available nodes from Fig. 4 according to an embodiment of the application;
[0069] Fig. 6 is an index subgraph converted from Fig. 5 according to an embodiment of the application;
[0070] Fig. 7 is a principle diagram of calculating a routing path using a path planning algorithm according to an embodiment of the application;
[0071] FIG. 8 is a schematic diagram of a structure of a quantum key relay routing calculation system according to an embodiment of the present application;
[0072] FIG. 9 is a schematic diagram of a quantum key distribution network architecture realized by integrating network control and network management according to an embodiment of the present application. DETAILED DESCRIPTION
[0073] In order to make the objects, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in a clear and complete manner with reference to the embodiments of the present application. Obviously, the described embodiments are only some, but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0074] As shown in FIG. 1, a quantum key relay routing calculation method is provided according to an embodiment of the present application, and the method comprises the following steps:
[0075] S10, collecting device states and link information of quantum devices in a quantum key network and constructing a network topology graph;
[0076] It should be noted that in the present embodiment, the device states and link information of key management (KM) devices and QKD devices in the quantum key network are collected, and the device states and link states can be collected in an incremental form. Each KM device only maintains the information of devices adjacent to it and the information of links directly connected to it, and does not maintain the whole network topology and routing.
[0077] It should be understood that the devices adjacent to the KM device include, but are not limited to, a quantum key network distribution controller (QKDNC), other KM devices, QKD devices, and service systems.
[0078] S20, fusing a link key generation rate, a KM node state, and a number of concurrent relays, deleting useless KM nodes from the network topology graph, and obtaining an index subgraph;
[0079] It should be noted that in the present embodiment, it is considered that in an actual quantum key distribution network, key relays between multiple different nodes can occur simultaneously. When a new relay routing calculation is performed, the key consumption generated by the ongoing key relays and the concurrent capability of the KM nodes repeatedly appearing in the relay links should be estimated. A link key generation rate, a node state, and a number of concurrent relays are fused, and an index subgraph is generated from the network topology graph, which is used for the calculation of the routing path.
[0080] S30, performing heuristic search on the index subgraph by using a path planning algorithm to calculate an optimal routing path.
[0081] The quantum key relay routing calculation method provided in the embodiment can be applied to a quantum key distribution device, and an index subgraph is generated on the basis of a network topology graph, the generation mode of the index subgraph increases the consideration of the link key generation rate and the number of concurrent relays, and also considers the node state and the like, so that the problem of no key available for relay caused by excessive relay concurrency of the core KM node can be effectively avoided; finally, the path consistent with the direction of the target node is actively found on the index subgraph by using a heuristic function, and the optimal routing path is determined; the scheme can ensure that the optimal route can be quickly calculated when a key relay request occurs, and the real-time concurrency of the service is also considered.
[0082] In some embodiments of the present application, in order to manage conveniently and reduce the amount of network control messages as much as possible, the present embodiment fuses the network element for implementing the QKD network control function and the network element for implementing the QKD network management function based on the design of the architecture and the division of the network elements in the currently popular quantum secure communication network function architecture, to form a quantum key network distribution controller (QKDNC), which can collect the device state and link state to draw the network topology by using the network element for implementing the QKD network management function.
[0083] In this network architecture, the newly connected device (including the KM device and the QKD device) applies for network connection to the QKDNC, and the KM device successfully connected to the network reports the device information and the link state to the QKDNC, which is used for both the topology drawing of the quantum key network and the reuse of the network device management. The fusion of the network control and the network management improves the reuse rate of the management information, reduces the amount of management information transmitted in the network, reduces the load of the control system, and is beneficial to the actual deployment and implementation.
[0084] In some embodiments of the present application, after obtaining the device state and link information of each quantum device in the quantum key network, the network topology graph is constructed, and the construction steps are as follows:
[0085] S11, a hello packet is sent to a directly connected neighbor node to confirm the connection relationship, and a data structure is used to store the connection state of the current quantum key network;
[0086] Specifically, the QKDNC sends a hello packet to a neighbor node to confirm the connection relationship, and a data structure is used to store the connection state of the current quantum key network, wherein the data structure can be an adjacency list, an adjacency matrix, an adjacency multilist or the like, and the stored network connection state includes but is not limited to the adjacency relationship, the device type and the like, which is not limited in the present embodiment.
[0087] S12, after each KM device successfully accesses the network, receiving the report information sent by the KM device that successfully accesses the network, the report information including device state, adjacent device information and link information;
[0088] Specifically, the KM device that accesses the network sends a hello packet to its neighbor node after successfully accessing the network to confirm the connection relationship, and records the adjacent relationship, device type and other information, so that the QKDNC receives the report information sent by the KM device that successfully accesses the network.
[0089] It should be noted that the neighbor node of the embodiment includes but is not limited to QKDNC, other KM devices, QKD devices, business systems, etc., and the embodiment is not limited specifically.
[0090] S13, gradually perfecting the network connection state stored in the data structure according to each KM device that successfully accesses the network, until all adjacent device information uploaded by the KM device exists in the data structure storing the network connection state;
[0091] Specifically, the KM device reports the information to the QKDNC when it collects the information each time and finds that the collected information is different from the information reported to the QKDNC last time; the QKDNC searches the recently received report information in the data structure storing the network connection state, and if the information is not searched, the data structure content is supplemented and perfected; when the adjacent relationship, device type and other information received by the QKDNC are the same as the stored connection information, the data structure storing the network connection state is not modified.
[0092] S14, receiving the quantum key generation rate reported by the QKD device that successfully accesses the network at a time, and storing the quantum key generation rate, the key pool capacity and the network connection state in the data structure, generating a network topology graph, wherein the network topology graph is a weighted undirected graph, the nodes in the weighted undirected graph are each quantum device in the quantum key network, and the edges are connection states.
[0093] Specifically, the QKD device that accesses the network counts the key generation rate after successfully establishing a quantum key distribution link with the QKD device adjacent thereto and generating a quantum key, and the QKD device reports the quantum key generation rate to the QKDNC once every specific time interval; the KM device that accesses the network checks the key pool capacity at a time after successfully obtaining the quantum key from the QKD device and reports it to the QKDNC.
[0094] It should be noted that, as shown in FIG. 2, the QKDNC initially only knows the existence and device state of the KM device directly connected thereto, and gradually improves the network topology until all the adjacent device information uploaded by the KM device exists in the topology, and the QKDNC corresponds and stores the received key generation rate and key pool capacity to the stored connection relationship, to form a weighted undirected graph as shown in FIG. 3, wherein the nodes of the graph are the quantum devices in the network, and the edges are the connection states. The node here refers to a physical machine room, and one KM device and one or more QKD devices are provided in the same node.
[0095] The scheme provided in the embodiment is convenient for networking, reduces the number of links of each node and the overall number of links in the network, and all devices are automatically connected to the QKDNC for networking, which can dynamically adapt to the off-network and on-network of the devices.
[0096] In some embodiments of the present application, the KM device reports a message that the relay is completed to the QKDNC after performing the key relay operation of the target KM device for itself once.
[0097] In some embodiments of the present application, when an abnormal alarm occurs in the KM device or the QKD device, the alarm information is reported to the QKDNC.
[0098] In some embodiments of the present application, step S20: deleting useless KM nodes from the network topology graph to obtain an index subgraph, by fusing the link key generation rate, the KM node state and the number of concurrent relays, specifically comprising the following steps:
[0099] S21, splitting the KM nodes with normal states in the network topology graph into a set number of virtual nodes respectively, and calculating the available key amount of each virtual node based on the remaining amount of keys in the key pool of each virtual node, the average key generation rate of the virtual node and the adjacent nodes within a past time period T, and the key relay task being undertaken by the virtual node;
[0100] S22, judging whether the available key amount of a virtual node exceeds the application key amount of the current key relay within a coming time period, if the available key amount of a virtual node exceeds the application key amount of the current key relay within a coming time period, performing step S23, and if the available key amount of a virtual node does not exceed the application key amount of the current key relay within a coming time period, performing step S24;
[0101] S23, retaining the virtual node;
[0102] S24, deleting the virtual node;
[0103] S25, if there are still virtual nodes under the normal KM nodes which have not been deleted, then all the virtual nodes under each KM node are reduced to one node respectively to obtain an index subgraph.
[0104] In some embodiments of the present application, step S21: the normal KM nodes in the network topology graph are respectively split into a set number of virtual nodes, and the available key amount of each virtual node is calculated based on the key pool remaining amount of the virtual node, the average key generation rate of the virtual node and adjacent nodes in the past time period T, and the key relay task being undertaken by the virtual node, specifically including the following steps:
[0105] S211, the network topology graph is copied to obtain an index graph;
[0106] It should be noted that, considering that there may be multiple concurrent path calculations between different nodes, it is not possible to process on the original network topology graph, and if it is processed on the original network topology graph, only one routing calculation can be performed, and the next routing calculation cannot be performed, therefore, the network topology graph is copied in this embodiment, and operations are performed on the copied index graph.
[0107] S212, for any KM node, assuming that keys are generated between the node and k adjacent nodes, the node maintains k key pools and k key links, the KM nodes in the fault state in the index graph are deleted, when the state of the KM node is normal, the normal KM node is split into a set number of virtual nodes to obtain the network topology graph with virtual nodes split as shown in FIG. 4, and the available key amount of each virtual node is calculated based on the key pool remaining amount of the virtual node, the average key generation rate of the virtual node and adjacent nodes in the past time period T, and the key relay task being undertaken by the virtual node as follows:
[0108] In the formula, Q avaliable-k is the available key amount of the kth virtual node, Q remaining-k is the key pool remaining amount of the kth virtual node, Rate is the average key generation rate of the kth virtual node and adjacent nodes in the past time period T, Apply i is the key relay task being undertaken by the kth virtual node, 0<i<m, and m is the number of relay tasks undertaken by the virtual node.
[0109] For example, after the virtual nodes are split, the available key amount of each virtual node is calculated, the key amount of the node after 3 minutes is calculated according to the key generation rate on the current link, the virtual nodes which are not available or have insufficient key amount are deleted, the deletion result is shown in FIG. 5, and the index subgraph is shown in FIG. 6.
[0110] It should be noted that, considering that in an actual quantum key distribution network, key relaying between multiple different nodes may occur at the same time, when performing new relay routing calculation, the key consumption generated by the ongoing key relaying and the concurrency capability of the KM node repeatedly appearing in the relay link should be estimated, and the link key generation rate, the node state, and the number of concurrent relaying are fused to generate an index subgraph from the connection graph. The index subgraph generation method increases the consideration of the link key generation rate and the number of concurrent relaying, and also considers the node state exception and the like. On the basis of the index subgraph, the current routing is generated, which can effectively avoid the problem of no key available for relay due to too large concurrency of the core KM node relay.
[0111] In some embodiments of the present application, step S30: using a path planning algorithm to perform heuristic search on the index subgraph to calculate the optimal routing path, specifically including the following steps:
[0112] S31, add the starting node A in the index subgraph to the open list;
[0113] It should be noted that the starting node is the node that proposes the demand.
[0114] S32, add the adjacent nodes reachable by the starting node A to the open list, set the starting node A as the parent node of the adjacent nodes reachable, and calculate the cost of the adjacent nodes reachable from the starting node as the cost of the parent node from the starting node plus 1;
[0115] It should be noted that from the starting node A, A is added to an open list, and the cost g(n) of the starting node from the starting point, i.e. the starting node itself, is recorded as 0.
[0116] Specifically, the nodes adjacent to the starting node A are searched, then the reachable nodes among the adjacent nodes are added to the open list, the starting node A is set as the parent node of the reachable nodes, and the cost of the reachable nodes from the starting node is set as g(n) of the parent node plus 1.
[0117] S33, remove the starting node A from the open list and add it to the close list;
[0118] S34, traverse each node in the open list as a current node respectively, calculate the priority of each node in the open list according to the cost of the current node from the starting node and the cost of the current node from the target node, and remove the node with the highest priority from the open list and add it to the close list;
[0119] S35, search the adjacent node of the node added into the close list, if the adjacent node is in the close list, skip, otherwise, calculate the cost of the adjacent node from the starting node;
[0120] S36, repeat the above steps S34-S35 until the target node is added into the open list;
[0121] S37, track the parent node from the target node step by step until the starting node is reached to obtain the best routing path.
[0122] In some embodiments of the present application, the cost of the current node from the starting node is the number of nodes on the way from the starting node to the current node, and the cost of the current node from the target node is the number of nodes on the way from the current node to the target node.
[0123] It should be noted that in quantum key relay, the fewer the number of nodes passed through, the less the amount of keys consumed by relay, and the lower the time delay generated, so in the present embodiment, the number of nodes passed through is used to judge the node priority. The number of nodes passed through from the starting node to the current node is recorded, and the number of nodes passed through from the current node to the target node is estimated, and the search range is the index subgraph.
[0124] In some embodiments of the present application, the calculation formula of the cost of the current node from the target node is:
[0125] In the formula, h(j) is the cost of the current node j from the target node, Lng j is the longitude of the current node j, Lat j is the latitude of the current node j, Lng is the longitude of the target node, Lat is the latitude of the target node, and δ is kilometers, represents rounding up.
[0126] The present embodiment selects the spherical model as the earth model based on the formula of the secant, takes the equatorial radius as the reference, calculates the spherical distance between two coordinates, and estimates the number of nodes passed through from the current node to the target node with an average of δ kilometers, and the value of δ is determined by the specific network deployment.
[0127] In some embodiments of the present application, the priority calculation formula of each node is:
[0128] f(n)=g(n)+h(n)
[0129] In the formula, f(n) represents the comprehensive priority of node n; g(n) is the cost of node n from the starting node; and h(n) is the estimated cost of node n from the target node.
[0130] It should be noted that in the route calculation, since the quantum network is a two-dimensional weighted undirected non-connected graph, there is no obstruction in the graph, and a heuristic algorithm is suitable, and the path planning algorithm A* is selected for heuristic search in the embodiment, and a heuristic function is used to calculate the priority of each node, wherein the smaller the f(n) value is, the smaller the cost consumed is, the shorter the path is, and the higher the comprehensive priority of the node is.
[0131] In some embodiments of the application, the embodiment selects a node B with the smallest f value from the open list, removes it from the open list, and adds it to the close list; if there are multiple nodes with the same comprehensive priority value, a node is randomly selected from them, removed from the open list, and added to the close list.
[0132] In some embodiments of the application, step S35: retrieving the adjacent nodes of the node added to the close list, skipping if the adjacent node is in the close list, otherwise calculating the cost of the adjacent node from the starting node, specifically comprising the following steps:
[0133] S351, retrieve the adjacent nodes of the node added to the close list, and determine whether the adjacent node newly added to the close list is in the close list, if the adjacent node newly added to the close list is in the close list, skip, if the adjacent node newly added to the close list is not in the close list, execute step S352;
[0134] S352, determine whether the adjacent node newly added to the close list is in the open list, if the adjacent node newly added to the close list is not in the open list, execute step S353, if the adjacent node newly added to the close list is in the open list, execute step S354;
[0135] S353, add the adjacent node to the open list, and set the adjacent node newly added to the close list as the parent node of the adjacent node, and calculate the cost of the adjacent node from the starting node as the cost of the parent node from the starting node plus 1;
[0136] S354, calculate the cost of the adjacent node from the starting node in the new path as the cost of the parent node of the adjacent node from the starting node plus 1, and compare it with the cost of the adjacent node from the starting node when passing through the previous path;
[0137] S355, based on the comparison result, if the previous path is better, no operation is performed, and if the new path is better, the parent node of the adjacent node is set to the node newly added to the close list.
[0138] Specifically, if the adjacent node of the node X newly added to the close list is not in the close list and not in the open list, the adjacent node is added to the open list, the node X is set as the parent node of the adjacent node, and the g value of the adjacent node is set as the g value of the parent node + 1; if the adjacent node is already in the open list, the g value of the adjacent node in the new path is calculated as the g value of the parent node X + 1, and the g value of the adjacent node in the previous path is compared, if the previous path is better, no operation is performed, and if the new path is better, the parent node of the node is set to the node X, and the g value of the adjacent node is replaced by the g value of the node in the new path.
[0139] As shown in FIG. 7, the embodiment actively searches for a path consistent with the direction of the destination node by using the heuristic function, takes the path with the least number of nodes passed through as the optimal path, and can effectively reduce the amount of relay key wasted in the relay process.
[0140] In some embodiments of the present application, as shown in FIG. 8, an embodiment of the present application provides a quantum key relay routing calculation system, which comprises:
[0141] A network topology graph construction module 10 is configured to collect device states and link information of quantum devices in a quantum key network and construct a network topology graph;
[0142] An index subgraph generation module 20 is configured to fuse link key generation rate, key management (KM) node state and concurrent relay quantity, delete useless KM nodes from the network topology graph, and obtain an index subgraph;
[0143] A best routing path calculation module 30 is configured to perform heuristic search on the index subgraph by using a path planning algorithm and calculate a best routing path.
[0144] The embodiment generates an index subgraph based on the generated network topology graph, and the index subgraph generation manner takes into account the link key generation rate and the concurrent relay quantity, and also considers node state abnormalities and the like, which can effectively avoid the problem of no key available for relay due to excessive concurrent relay quantity of core KM nodes.
[0145] Specifically, the quantum key relay routing calculation system proposed in the embodiment can be implemented by integrating network control and network management. As shown in FIG. 9, a quantum key distribution network architecture is provided. In the embodiment, the quantum key relay demand currently generated is initiated by KM-1, and the purpose is to establish 300 bytes of quantum keys shared between KM-1 and KM-9. The QKDNC splits the nodes in the generated network topology graph into virtual nodes. After splitting the virtual nodes, the available key amount of each virtual node is calculated. The key stock of the node after 3 minutes is calculated according to the key generation rate on the current link. The virtual nodes that are unavailable or have insufficient key amount are deleted. An index subgraph is generated. Based on the index subgraph, the best routing calculation is performed.
[0146] In some embodiments of the present application, the network topology graph construction module 10 comprises:
[0147] An information storage module is configured to send a hello packet to a directly connected neighbor node to confirm a connection relationship, and store the connection state of the current quantum key network by using a data structure.
[0148] An information receiving module is configured to receive the reporting information sent by the KM device after the KM device successfully enters the network. The reporting information includes device state, adjacent device information and link information.
[0149] An information updating module is configured to gradually improve the network connection state stored in the data structure according to the KM devices that have successfully entered the network, until all the adjacent device information uploaded by the KM devices exists in the data structure storing the network connection state.
[0150] A topology graph generation module is configured to receive the quantum key generation rate reported by the QKD device that has successfully entered the network at a regular time, and store the quantum key generation rate, the key pool capacity and the network connection state in the data structure correspondingly, and generate a network topology graph. The network topology graph is a weighted undirected graph. The nodes in the weighted undirected graph are quantum devices in the quantum key network, and the edges are connection states.
[0151] In some embodiments of the present application, the index subgraph generation module specifically comprises:
[0152] A node splitting unit is configured to split the KM nodes with normal states in the network topology graph into a set number of virtual nodes respectively, and calculate the available key amount of each virtual node based on the remaining amount of the key pool of each virtual node, the average key generation rate of the virtual node and adjacent nodes within a past time period T, and the key relay task currently undertaken by the virtual node.
[0153] A key amount judgment unit is configured to judge whether the available key amount of a virtual node exceeds the application key amount of the current key relay in a coming time period.
[0154] a node operation unit, configured to retain the virtual node when the key amount judgment module outputs a result of yes, and configured to delete the virtual node when the key amount judgment module outputs a result of no;
[0155] an index subgraph generation unit, configured to, when there is still a virtual node under a KM node in a normal state which has not been deleted, shrink all virtual nodes under each KM node into one node respectively to obtain an index subgraph.
[0156] In some embodiments of the present application, the node splitting unit is specifically configured to perform the following steps:
[0157] copying the network topology graph to obtain an index graph;
[0158] deleting the KM nodes in a fault state in the index graph, splitting the KM nodes in a normal state into a set number of virtual nodes, and calculating the available key amount of each virtual node based on the key pool residual amount of the virtual node, the average key generation rate of the virtual node and adjacent nodes within a past time period T, and the key relay task being undertaken by the virtual node.
[0159] In the formula, Q avaliable-k is the available key amount of the kth virtual node, Q remaining-k is the key pool residual amount of the kth virtual node, Rate is the average key generation rate of the kth virtual node and adjacent nodes within a past time period T, Apply i is the key relay task being undertaken by the kth virtual node, 0<i<m, and m is the number of relay tasks undertaken by the virtual node.
[0160] In some embodiments of the present application, the optimal routing path calculation module is specifically configured to perform the following steps:
[0161] adding a starting node in the index subgraph into an open list;
[0162] adding an adjacent node reachable by the starting node into the open list, setting the starting node as a parent node of the adjacent node reachable by the starting node, and calculating a cost of the adjacent node reachable by the starting node from the starting node as a cost of the parent node from the starting node plus 1;
[0163] removing the starting node from the open list and adding the starting node into a close list;
[0164] Each node in the open list is taken as a current node respectively, and the priority of each node in the open list is calculated according to the cost of the current node to the starting node and the cost of the current node to the target node, and the node with the highest priority is removed from the open list and added to the close list;
[0165] The adjacent node of the node added to the close list is searched, and if the adjacent node is in the close list, it is skipped, otherwise the cost of the adjacent node to the starting node is calculated;
[0166] The above step of calculating the priority of each node in the open list is repeated until the target node is added to the open list;
[0167] The parent node is tracked from the target node step by step until the starting node is reached, and the best routing path is obtained.
[0168] In some embodiments of the present application, the formula for calculating the cost of the current node to the target node is:
[0169] In the formula, h(j) is the cost of the current node j to the target node, Lng j is the longitude of the current node j, Lat j is the latitude of the current node j, Lng is the longitude of the target node, Lat is the latitude of the target node, and δ is the number of kilometers, represents the upward rounding.
[0170] In some embodiments of the present application, the priority calculation formula of each node is:
[0171] f(n) = g(n) + h(n)
[0172] In the formula, f(n) represents the comprehensive priority of node n; g(n) is the cost of node n to the starting node; and h(n) is the estimated cost of node n to the target node.
[0173] It should be noted that other embodiments of the quantum key relay routing calculation system or implementation methods of the present application can refer to the above method embodiments, which will not be repeated here.
[0174] In some embodiments of the present application, an embodiment of the present application further proposes a computer readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the quantum key relay routing calculation method of the above-mentioned embodiments.
[0175] It is to be appreciated that the logical and / or steps represented in the flow diagrams, or otherwise described herein, can be considered as a list of executable instructions for implementing logic functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions, or a combination thereof. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can specifically include the following: an electronic connection having one or more wires (electronic apparatus), a portable computer diskette (magnetic apparatus), a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash memory), an optical fiber, and a portable Compact Disc Read-Only Memory (CD-ROM). In addition, the computer-readable medium can even be paper or other suitable medium upon which the program can be printed, as the program can be electronically obtained, for example, by
[0176] It is to be understood that portions of the present application can be implemented with hardware, software, firmware, or a combination thereof. In the above embodiments, a number of steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and as in another embodiment, any of the following technologies, known in the art, or a combination thereof, can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field-programmable gate arrays (FPGA), and the like.
[0177] In the description of the application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. In the description of the application, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0178] In some embodiments of the application, the terms "first", "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.
[0179] Although the embodiments of the application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the application.
Claims
1. A quantum key relay routing computation method, characterized by, The method comprises: collecting device states and link information of quantum devices in a quantum key network and constructing a network topology graph; fusing link key generation rate, key management (KM) node state and number of concurrent relays, deleting useless KM nodes from the network topology graph to obtain an index subgraph; performing heuristic search on the index subgraph by using a path planning algorithm to calculate an optimal routing path, specifically comprising: adding a starting node in the index subgraph to an open list; adding reachable adjacent nodes of the starting node to the open list, setting the starting node as a parent node of the reachable adjacent nodes, and calculating a cost of the reachable adjacent nodes from the starting node as a cost of the parent node from the starting node plus 1; removing the starting node from the open list and adding it to a closed list; traversing each node in the open list as a current node, calculating a priority of each node in the open list according to a cost of the current node from the starting node and a cost of the current node from a target node, and removing a node with the highest priority from the open list and adding it to the closed list; searching adjacent nodes of the node added to the closed list, skipping if the adjacent node is in the closed list, or calculating a cost of the adjacent node from the starting node; repeating the step of calculating the priority of each node in the open list until the target node is added to the open list; tracking parent nodes from the target node step by step until the starting node is reached to obtain the optimal routing path. 2.The quantum key relay routing computation method according to claim 1, wherein, The collecting device states and link information of quantum devices in a quantum key network and constructing a network topology graph comprises: sending a hello packet to a directly connected neighbor node to confirm a connection relationship, and storing a connection state of a current quantum key network by using a data structure; after each KM device successfully enters a network, receiving report information sent by the KM device successfully entering the network, the report information comprising device state, adjacent device information and link information; gradually improving the network connection state stored in the data structure according to each KM device successfully entering the network until all adjacent device information uploaded by the KM device exists in the data structure storing the network connection state; timely receiving quantum key generation rate reported by the QKD device successfully entering the network, and storing the quantum key generation rate, key pool capacity and network connection state in the data structure, to generate the network topology graph, wherein the network topology graph is a weighted undirected graph, nodes in the weighted undirected graph are quantum devices in a quantum key network, and edges are connection states.
3. The quantum key relay routing calculation method according to claim 1, characterized in that, The key pool capacity is obtained by the KM device successfully entering the network by periodically checking after successfully obtaining quantum keys from the QKD device.
4. The quantum key relay routing calculation method according to claim 1, characterized in that, The fusing link key generation rate, KM node state and number of concurrent relays, deleting useless KM nodes from the network topology graph to obtain an index subgraph comprises: splitting the KM nodes in the network topology graph in normal state into a set number of virtual nodes respectively, and calculating the available key amount of each virtual node based on the remaining amount of key pool of each virtual node, the average key generation rate of the virtual node and adjacent nodes in a past time period T, and the key relay task being undertaken by the virtual node; judging whether the available key amount of a virtual node exceeds the application key amount of the current key relay in a coming time period; if the available key amount of a virtual node exceeds the application key amount of the current key relay in a coming time period, retaining the virtual node; if the available key amount of a virtual node does not exceed the application key amount of the current key relay, deleting the virtual node; if there are still virtual nodes under the KM nodes in normal state which are not deleted, shrinking all the virtual nodes under each KM node into one node respectively to obtain the index subgraph. 5.The quantum key relay routing computation method according to claim 4, wherein, The splitting the KM nodes in the network topology graph in normal state into a set number of virtual nodes, and calculating the available key amount of each virtual node based on the remaining amount of key pool of each virtual node, the average key generation rate of the virtual node and adjacent nodes in a past time period T, and the key relay task being undertaken by the virtual node, comprises: copying the network topology graph to obtain an index graph; deleting the KM nodes in the index graph that are in a failure state, and splitting the KM nodes that are in a normal state into a set number of virtual nodes, and calculating the available key amount of each virtual node based on the remaining amount of the key pool of each virtual node, the average key generation rate of the virtual node and the adjacent nodes within a past time period T, and the key relay task that the virtual node is undertaking, as: wherein Q avaliable-k is the available key amount of the kth virtual node, Q remaining-k is the remaining key pool amount of the kth virtual node, Rate is the average key generation rate of the kth virtual node and its adjacent nodes in the past time period T, Apply i is the key relay task that the kth virtual node is undertaking, 0 < i < m, and m is the number of relay tasks undertaken by the virtual node.
6. The quantum key relay routing calculation method according to claim 1, wherein, the cost of the current node to the starting node is the number of nodes on the way from the starting node to the current node, and the cost of the current node to the target node is the number of nodes on the way from the current node to the target node. 7.The quantum key relay routing computation method according to claim 1, wherein, The priority calculation formula of each node is: f(n)=g(n)+h(n) In the formula, f(n) represents the comprehensive priority of node n; g(n) is the cost of node n to the starting node; and h(n) is the estimated cost of node n to the target node. 8.The quantum key relay routing computation method according to claim 1, wherein, The method further comprises: when there are multiple nodes with the same priority in the open list, randomly selecting one node from the multiple nodes with the same priority, removing the node from the open list, and adding the node to the close list. 9.The quantum key relay routing computation method according to claim 1, wherein, The method further comprises: searching for the adjacent nodes of the node added to the close list, and if the adjacent node is in the close list, skipping the adjacent node, otherwise calculating the cost of the adjacent node to the starting node, comprising: searching for the adjacent nodes of the node added to the close list, and judging whether the adjacent node of the node newly added to the close list is in the close list; if the adjacent node of the node newly added to the close list is in the close list, skipping the adjacent node; if the adjacent node of the node newly added to the close list is not in the close list, judging whether the adjacent node of the node newly added to the close list is in the open list; If the adjacent node of the node newly added to the close list is not in the open list, the adjacent node is added to the open list, and the node newly added to the close list is set as the parent node of the adjacent node, and the cost of the adjacent node from the starting node is calculated as the cost of the parent node from the starting node plus 1; If the adjacent node of the node newly added to the close list is in the open list, the cost of the adjacent node from the starting node in the new path is calculated as the cost of the parent node of the adjacent node from the starting node plus 1, and is compared with the cost of the adjacent node from the starting node in the previous path; Based on the comparison result, if the previous path is better, no operation is performed, and if the new path is better, the parent node of the adjacent node is set as the node newly added to the close list.
10. A quantum key relay routing computation system, characterized by, The system comprises: a network topology graph construction module configured to collect device states and link information of quantum devices in a quantum key network and construct a network topology graph; an index subgraph generation module configured to fuse link key generation rates, key management (KM) node states and numbers of concurrent relays, delete useless KM nodes from the network topology graph, and obtain an index subgraph; a best routing path calculation module configured to perform heuristic search on the index subgraph by using a path planning algorithm and calculate a best routing path; the best routing path calculation module is configured to perform the following steps: add a starting node in the index subgraph to an open list; add reachable adjacent nodes of the starting node to the open list, set the starting node as parent nodes of the reachable adjacent nodes, and calculate costs of the reachable adjacent nodes from the starting node as costs of the parent nodes from the starting node plus 1; remove the starting node from the open list and add the starting node to a close list; traverse each node in the open list as a current node, calculate priorities of the nodes in the open list according to costs of the nodes from the starting node and costs of the nodes from a target node, and remove a node with the highest priority from the open list and add the node to the close list; search for adjacent nodes of a node added to the close list, and if the adjacent nodes are in the close list, skip the step, otherwise, calculate costs of the adjacent nodes from the starting node; repeat the step of calculating the priorities of the nodes in the open list until the target node is added to the open list; trace parent nodes from the target node step by step until the starting node is reached, and obtain the best routing path.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the quantum key relay routing calculation method according to any one of claims 1-9.
Citation Information
Patent Citations
Quantum cryptography network dynamic routing method
CN103001875A
Quantum key distribution routing method based on OSPF protocol
CN115460129A
Quantum key relay routing calculation method and system
CN118523913A
System and method for cost-efficient and economical consumption of keys in a quantum key distribution platform
EP3993311A1