Network routing method and device, computer equipment, readable storage medium and program product
By obtaining and utilizing the network parameter information of multiple candidate quantum relay nodes, building constraints and objective functions, and using particle swarm optimization algorithm to determine the next hop node for quantum communication key distribution in QKD network, solving the problem of undetermined optimal path caused by a single measurement standard in traditional technology, and achieving an efficient and optimized key distribution path.
Patent Information
- Application Number
- CN202411995640.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-25
AI Technical Summary
In traditional QKD networks, quantum communication keys are used only as the criterion for measuring network state, resulting in the determination of not the optimal transmission path, and the measurement criteria are relatively single.
By obtaining the network parameter information of candidate quantum relay nodes, including the quantum communication key distribution delay, consumption rate, bandwidth and residual quantum communication key quantity, constraint conditions and objective functions are constructed, and the next hop node for quantum communication key distribution is determined using particle swarm optimization algorithm.
The consideration of multi-dimensional influencing factors is achieved. By minimizing the objective function, the quantum key distribution path is optimized, and the optimal quantum communication key distribution path is selected to ensure the key distribution quality.
Smart Images

Figure CN119696780A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of routing in communication networks, and in particular to a network routing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] The quantum secure communication network based on quantum key distribution (QKD) technology provides long-distance, networked key services for multiple users. With the continuous development of QKD technology, the QKD network based on trusted node relay is considered to be a practical and feasible QKD network (quantum key distribution network, QKDN) networking method at this stage.
[0003] In traditional technology, the network topology state is measured by considering the changes in the amount of quantum communication keys between the relay nodes of the QKD network, that is, taking the quantum communication key amount of the node as an influencing factor, setting a centralized network routing for the relay nodes of the entire QKD key network, and determining the quantum communication key transmission path.
[0004] However, in traditional technology, only the quantum communication key quantity is used as a standard to measure the network status and determine the quantum communication key transmission path. The measurement standard is relatively simple and the determined transmission path is not the optimal one. Summary of the invention
[0005] Based on this, it is necessary to provide a network routing method, apparatus, computer device, computer readable storage medium and computer program product to address the above technical issues.
[0006] In a first aspect, the present application provides a network routing method, comprising:
[0007] Acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0008] Constructing constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount;
[0009] Taking minimization of the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined from the multiple candidate quantum relay nodes in combination with the constraint conditions.
[0010] In one embodiment, the step of minimizing the objective function as the optimization goal and determining the next hop node for quantum communication key distribution among the plurality of candidate quantum relay nodes in combination with the constraint condition includes:
[0011] Generate a particle swarm for quantum communication key distribution by using a particle swarm optimization algorithm, wherein each particle in the particle swarm includes a quantum communication key distribution strategy between a current node and a target node corresponding to the particle; each quantum communication key distribution strategy includes a particle position, the objective function and the constraint condition;
[0012] Taking minimizing the objective function as the optimization goal and combining the constraint conditions, an optimal distribution strategy of the quantum communication key corresponding to the current node is determined, and a next hop node corresponding to the current node is determined based on the optimal distribution strategy.
[0013] In one embodiment, before generating a particle swarm for quantum communication key transmission by a particle swarm optimization algorithm, the method further includes:
[0014] Initialize routing table entries;
[0015] Adjacent nodes use a key distribution protocol to negotiate and store a local shared key; the local shared key is used to encrypt and transmit the quantum communication key.
[0016] In one embodiment, the method of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by minimizing the objective function as the optimization goal and combining the constraint condition includes:
[0017] Determine the speed and position of the particle corresponding to the current node;
[0018] The speed and position of the particle are initialized, and the objective function is used as the fitness function, and minimizing the fitness function is used as the optimization goal in combination with the constraint condition to determine the optimal distribution strategy of the quantum communication key corresponding to the current node.
[0019] In one embodiment, the method of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by minimizing the objective function as the optimization goal and combining the constraint condition includes:
[0020] When the network state changes, the speed, particle position and quantum communication key distribution strategy of the particle corresponding to the current node are updated;
[0021] Compare the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and update the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result, and update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm;
[0022] The quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position is selected as the optimal distribution strategy for the current node.
[0023] In one embodiment, the updating of the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result, and the updating of the global optimal objective function value and the global optimal particle position corresponding to the particle swarm, include:
[0024] If the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, the local optimal objective function value and the local optimal particle position corresponding to the current node are updated, and the corresponding global optimal objective function value and the global optimal particle position in the particle swarm are updated.
[0025] In one embodiment, the constraining conditions and the objective function are constructed based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount, including:
[0026] Obtaining preset constraint thresholds corresponding to quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0027] Based on the preset constraint thresholds, construct each constraint condition;
[0028] A weighted calculation is performed based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, the remaining quantum communication key amount, and the corresponding preset constraint thresholds to obtain an objective function.
[0029] In a second aspect, the present application further provides a network routing device, the device comprising:
[0030] An acquisition module is used to acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount;
[0031] A construction module, used to construct constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount;
[0032] A determination module is used to determine a next hop node for quantum communication key transmission from the multiple candidate quantum relay nodes by taking minimization of the objective function as an optimization goal and combining the constraint conditions.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0035] Constructing constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount;
[0036] Taking minimization of the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined from the multiple candidate quantum relay nodes in combination with the constraint conditions.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0038] Acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0039] Constructing constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount;
[0040] Taking minimization of the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined from the multiple candidate quantum relay nodes in combination with the constraint conditions.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0043] Constructing constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount;
[0044] Taking minimization of the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined from the multiple candidate quantum relay nodes in combination with the constraint conditions.
[0045] The above-mentioned network routing method, device, computer equipment, computer-readable storage medium and computer program product obtain network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount; based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount, construct constraints and objective functions; minimize the objective function as the optimization goal, and determine the next hop node of quantum communication key distribution among the multiple candidate quantum relay nodes in combination with the constraints. This method is used to construct an objective function by considering multi-dimensional influencing factors through quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount, and minimize the objective function as the optimization goal, combined with constraints, to achieve multi-objective optimization of the quantum key distribution network, and select the optimal quantum communication key distribution path to ensure the distribution quality of quantum communication keys. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is a flow chart of a network routing method in one embodiment;
[0048] Figure 2 A schematic diagram of a process of calculating the next hop node using a particle swarm optimization algorithm in one embodiment;
[0049] Figure 3 A schematic diagram of a process for negotiating a local shared key and a quantum communication key relay step in one embodiment;
[0050] Figure 4 A schematic diagram of a flow chart of a method for determining an optimal distribution strategy for a quantum communication key corresponding to a current node in one embodiment;
[0051] Figure 5 A schematic diagram of a flow chart of the steps of updating the optimal distribution strategy of the current node in one embodiment;
[0052] Figure 6 A schematic diagram of a process for updating a particle swarm global optimal objective function value and a global optimal particle position in one embodiment;
[0053] Figure 7 A schematic diagram of a flow chart of steps for constructing constraint conditions and objective functions in one embodiment;
[0054] Figure 8 A specific example flow chart of a network routing method is provided in one embodiment;
[0055] Fig. 9 is a structural block diagram of a network routing device in one embodiment;
[0056] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] Before introducing the specific embodiments of the present invention, the professional terms involved in the present invention are explained first:
[0059] QKD (Quantum Key Distribution) uses the properties of quantum mechanics to ensure communication security. QKD enables both parties in communication to generate and share a random, secure key to encrypt and decrypt messages.
[0060] QoS (Quality of Service) refers to a network's ability to use various basic technologies to provide better service capabilities for specified network communications. It is a network security mechanism and a technology used to solve problems such as network delays and congestion.
[0061] Particle Swarm Optimization (PSO), also known as Particle Swarm Optimization or Particle Swarm Optimization, can effectively search for problems with a large solution space and find candidate solutions without knowing too much information about the problem.
[0062] The networking mode of quantum key distribution network based on trusted relay adopts a hybrid network architecture of building classical communication network and quantum secure communication network. The routing strategy designed based on the classical communication network architecture cannot adapt well to the characteristics of quantum secure communication network. It is necessary to comprehensively consider factors such as quantum communication key distribution delay, quantum communication key consumption rate, network resources and changes in network topology. Therefore, the present invention proposes a network routing method, which realizes dynamic routing selection of communication data between relay nodes according to the main influencing factors of network topology state such as quantum communication key distribution delay, path quantum communication key consumption rate, network resources and remaining quantum communication key amount in the network, so as to ensure data security communication while improving the service efficiency of quantum communication keys, balancing network load and meeting the performance requirements of quantum key distribution network.
[0063] In one embodiment, Figure 1 As shown, a network routing method is provided. In this embodiment, the method is applied to a node in a trusted relay QKD network, and the terminal of the node is used as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0064] Step 102: Obtain network parameter information of multiple candidate quantum relay nodes.
[0065] Among them, network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount.
[0066] In practice, when communicating in a quantum secure communication network (also known as a quantum key distribution network), it is necessary to pre-distribute quantum communication keys, that is, between the sender and the receiver, it is necessary to pre-distribute quantum communication keys, and use the One-Time Password (OTP) algorithm to achieve the key transmission between nodes in the trusted relay QKD network, and distribute the obtained shared key to the receiving terminal. After the quantum communication key distribution is completed, the sender and the receiver transmit communication data, and perform "hop-by-hop encryption" based on the pre-distributed quantum communication key to achieve secure communication of data. Therefore, when the terminal at the sender distributes quantum communication keys, it is necessary to pre-plan the distribution path of the quantum communication key. Therefore, when the quantum communication key distribution is performed in the trusted relay QKD network, starting from the sender's node, relay transmission is performed through multiple relay networks, and the quantum communication key is transmitted hop by hop until it is transmitted to the communication receiving end in the QKD network. In the process of hop-by-hop transmission, the terminal where the current node is located is based on the routing information of the QKD network topology to determine multiple candidate quantum relay nodes that can be used as the next hop node corresponding to the current node. In this way, the current node obtains the network parameter information of multiple candidate quantum relay nodes in the current trusted relay QKD network.
[0067] Specifically, define the QKD network model: represents the trusted relay QKD network topology, where V is the set of nodes in the network, ; E is the set of links between nodes in the network, , l ij It represents the path between the quantum communication key distributed from node i to node j through the next hop. It can be considered that the nodes in the network and Link The distribution path that constitutes quantum communication keys.
[0068] Define the quantum communication key distribution model: Represented as the set of all quantum communication keys that need to be distributed in the trusted relay QKD network, including quantum communication keys, specifically, Indicates whether the quantum communication key k passes through path l ij To distribute, is a 0-1 variable, represents the quantum communication key selection path l ij To distribute, Indicates that the quantum communication key does not choose path l ij To distribute; definition A quantum communication key distribution strategy.
[0069] Among them, the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount. These network parameters are used to describe the current trusted relay QKD network topology state and are the main influencing factors of the network topology state of the trusted relay QKD network. This embodiment does not limit the types of collected network parameters.
[0070] Step 104, constructing constraint conditions and objective functions based on quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount.
[0071] In the implementation, the terminal pre-stores the distribution delay threshold (using ), the path consumption rate threshold required by network quality of service (QoS) (expressed in ) and the bandwidth threshold required by the network quality of service (QoS) (denoted by ). In this way, based on the pre-requirements in the QKD network service quality, the terminal constructs the constraints of the three indicators of quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key quantity at the current network moment as the thresholds of the three parameters required in the network service quality, so as to constrain the network status during the quantum communication key distribution process. Among them, the quantum communication key distribution delay is an indicator to measure the quality of service (QoS) of the QKD network. Since this indicator can be perceived by users, it is very important in the QoS parameters.
[0072] In this way, after determining the constraints, the terminal constructs an objective function (which can also be called a cost function) based on the thresholds of each network parameter information in the constraints and the actual network parameters under the current network topology state. The objective function is used to determine whether the quantum communication key distribution path currently determined by the network routing algorithm meets the QoS requirements.
[0073] Step 106, taking minimizing the objective function as the optimization goal, and combining the constraint conditions to determine the next hop node for quantum communication key distribution from multiple candidate quantum relay nodes.
[0074] In implementation, the smaller the objective function is, the closer the network parameter information corresponding to the current quantum communication key distribution path is to the requirements of QoS. Therefore, the terminal takes minimizing the objective function as the optimization goal, combines the constraints corresponding to the network parameter information, and calculates the relay path (i.e., the distribution path of the quantum communication key) in the QKD network through the particle swarm optimization algorithm. By determining the relay path, the next hop node for quantum communication key distribution corresponding to the current node in the optimal relay path is determined among the multiple candidate quantum relay nodes corresponding to the current node, so as to distribute the quantum communication key to the next hop node and realize the one-hop transmission of the quantum communication key.
[0075] The above network routing method constructs the objective function by considering multi-dimensional influencing factors such as quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount, and takes minimizing the objective function as the optimization goal. Combined with constraint conditions, it realizes multi-objective optimization of the quantum key distribution network and selects the optimal quantum communication key distribution path to ensure the distribution quality of quantum communication keys.
[0076] In an exemplary embodiment, in the process of minimizing the objective function and solving the next hop node corresponding to the current node, the next hop node is calculated by using a particle swarm optimization algorithm, such as Figure 2 As shown, the specific processing process of step 106 includes the following steps 202 to 204. Among them:
[0077] Step 202: Generate a particle swarm for quantum communication key transmission through a particle swarm optimization algorithm.
[0078] In the implementation, the terminal of the current node generates a particle swarm for quantum communication key transmission through the particle swarm optimization algorithm. Each particle in the particle swarm represents a distribution strategy, which corresponds to a state in which all global quantum communication keys have been distributed. The distribution strategy represents one of the possibilities of quantum communication key distribution. The entire particle swarm represents all the possibilities of the distribution of all quantum communication keys to be distributed.
[0079] Specifically, the current node generates a particle swarm consisting of N particles, expressed as , where a particle P n The distribution strategy that contains all quantum communication keys is expressed as .
[0080] Step 204, taking minimizing the objective function as the optimization goal and combining the constraint conditions, determine the optimal distribution strategy of the quantum communication key corresponding to the current node, and determine the next hop node corresponding to the current node based on the optimal distribution strategy.
[0081] In the implementation, the terminal of each node participating in the calculation performs the calculation of the particle swarm optimization algorithm, takes minimizing the objective function as the optimization goal, and initializes and updates the optimal solution corresponding to each particle in the particle swarm in combination with the constraint conditions, until the terminal determines the optimal distribution strategy of the quantum communication key corresponding to the current node. After determining the optimal distribution strategy of the quantum communication key corresponding to the current node, the optimal distribution strategy contains a state in which all global quantum communication keys have been distributed, and then the terminal can determine the next hop node corresponding to the current node based on the optimal distribution strategy.
[0082] In this embodiment, a particle swarm optimization algorithm is used to dynamically select the routing for the distribution of quantum communication keys in a trusted relay QKD network, the encryption and decryption capabilities of each node are efficiently utilized, and a distributed algorithm is used to balance the network load.
[0083] In an exemplary embodiment, since the distribution of quantum communication keys requires "hop-by-hop encryption", such as Figure 3 As shown, before step 202, the method further includes:
[0084] Step 302: Initialize routing table entries.
[0085] In implementation, the routing information of the QKD network is maintained in the terminal in advance, and before distributing the quantum communication key, the terminal first initializes the routing table entry.
[0086] Step 304: Adjacent nodes negotiate a local shared key using a key distribution protocol and store the key.
[0087] Among them, the local shared key is used to encrypt and transmit the quantum communication key.
[0088] In implementation, after initializing the routing table entry, the terminal uses the key distribution protocol to negotiate a local shared key between adjacent nodes of the QKD network based on the routing information in the routing table entry, and stores it between adjacent nodes. The local shared key is used to encrypt the quantum communication key, for example, the terminal at the sending end is named Alice, and the terminal at the receiving end is named Bob. Assume that the relay path of the quantum communication key using the routing algorithm based on particle swarm optimization is:
[0089] Alice—>node(1)—>node(2)—>…—>node(i)—>…—>Bob.
[0090] When distributing quantum communication keys in the relay path, the process of each local shared key encrypting the quantum communication key hop by hop is as follows:
[0091] 1. Alice and her neighboring nodes first negotiate a shared key K1 based on the key distribution protocol;
[0092] 2. After the dynamic quantum communication key distribution path is selected based on the particle swarm optimization routing algorithm, assuming that the selected path is the above relay path, the routing information is transmitted hop by hop, that is, the quantum communication key K needs to be distributed between Alice and node (1). c , use the shared key K1 to encrypt the quantum communication key K c Encrypt and get K c ⊕K1.
[0093] 3. Node(1) and node(2) share the key K1. Node(2) receives K1 from node(1). c ⊕K1, first use the shared key K1 to decrypt to get K c , that is, execute K c ⊕K1⊕K1 operation;
[0094] 4. The key is transmitted along the relay path in sequence. During the transmission process, the relay node first decrypts and then encrypts, repeating the similar process of step 3 above;
[0095] 5. K c Encrypt and pass to the next node for decryption until Bob gets K c After that, the whole process ends. At this point, Alice and Bob both obtain the quantum communication key K c .
[0096] In this embodiment, the quantum communication key distribution of the hybrid network architecture is optimized based on the particle swarm optimization algorithm. After the relay path is determined, the quantum communication key is encrypted based on the local shared key, thereby ensuring the security of the quantum communication key distribution.
[0097] In one embodiment, if Figure 4 As shown, in step 204, the specific processing process of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by taking the minimization objective function as the optimization goal and combining the constraint conditions includes:
[0098] Step 402, determining the velocity and particle position of the particle corresponding to the current node.
[0099] In implementation, the terminal determines the speed and position of the particle corresponding to the current node. For example, taking particle l as the particle corresponding to the current node, the current speed of particle l with respect to the quantum communication key K is and the current position is .
[0100] Step 404, the particle speed and particle position are initialized, and the objective function is used as the fitness function, and minimizing the fitness function is used as the optimization target set constraint condition to determine the optimal distribution strategy of the quantum communication key corresponding to the current node.
[0101] In the implementation, the terminal initializes the particle speed and particle position. Specifically, based on The random numbers generated by the function realize the initialization of the particle speed and particle position. The initialization formula of the particle speed and particle position is as follows:
[0102] (1)
[0103] Then, the terminal starts with The objective function is the fitness function, which determines whether the path searched by the current particle (i.e., particle l) meets the QoS requirements, and takes minimizing the fitness function as the optimization target set constraint to determine the optimal distribution strategy of the quantum communication key corresponding to the current node, that is, the terminal uses the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and the remaining quantum communication key amount as measurement parameters. For the quantum communication key K, the objective function of the current corresponding distribution strategy of particle l is defined as Furthermore, the terminal determines the optimal distribution strategy of the quantum communication key corresponding to the current node by minimizing the objective function as the optimization goal.
[0104] In this embodiment, the optimization goal is to minimize the objective function, and the optimal distribution strategy of the quantum communication key corresponding to the current node is determined in combination with the constraint conditions, and the next hop node corresponding to the current node is determined based on the optimal distribution strategy to achieve efficient distribution of the quantum communication key.
[0105] In one embodiment, if Figure 5 As shown, in step 204, the specific processing process of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by taking the minimization objective function as the optimization goal and combining the constraint conditions includes:
[0106] Step 501, when the network state changes, the speed, particle position and quantum communication key distribution strategy of the particle corresponding to the current node are updated.
[0107] In implementation, when the network status changes, the particle swarm optimization algorithm needs to be executed and updated in time to ensure the accuracy of the calculation results. Therefore, the terminal updates the speed, particle position and quantum communication key distribution strategy of the particle corresponding to the current node. Specifically:
[0108] ①Select the largest current position in the particle swarm The corresponding next-hop node sends out particles;
[0109] ② Update the velocity of particle l and location .
[0110] speed The update is shown in the following formula (2):
[0111] (2)
[0112] in, Indicates the velocity of the particle before updating, Indicates the updated velocity of the particle; is the inertia weight, which indicates the degree to which the particle retains its own velocity; r1 and r2 are both random numbers between 0 and 1, which are used to simulate fluctuations in group behavior in nature; c1 and c2 are learning factors, where c1 indicates the weight of the particle learning from the individual optimal position, and c2 indicates the weight of the particle learning from the global optimal particle.
[0113] Current location The update is shown in the following formula (3):
[0114] (3)
[0115] in, represents the position of the particle before updating, Indicates the updated position of the particle.
[0116] In this way, based on the updated particle speed and particle position, the updated quantum communication key distribution strategy is determined.
[0117] Step 502, compare the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and update the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result, and update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm.
[0118] During implementation, the terminal compares the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and updates the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result. Then, the terminal updates the corresponding global optimal objective function value and the global optimal particle position in the particle swarm based on the comparison result.
[0119] Step 503, selecting the quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position as the optimal distribution strategy for the current node.
[0120] In implementation, the terminal selects the quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position as the optimal distribution strategy for the current node.
[0121] In this embodiment, based on the particle swarm optimization algorithm, minimizing the objective function is used as the optimization goal, combined with constraint conditions, to achieve multi-objective optimization of the quantum key distribution network, and select the optimal quantum communication key distribution path to ensure the distribution quality of the quantum communication key.
[0122] In one embodiment, if Figure 6 As shown, in step 502, based on the comparison result, the local optimal objective function value and the local optimal particle position corresponding to the current node are updated, and the global optimal objective function value and the global optimal particle position corresponding to the particle swarm are updated. The specific processing process includes:
[0123] Step 601: If the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, the local optimal objective function value and the local optimal particle position corresponding to the current node are updated, and the corresponding global optimal objective function value and the global optimal particle position in the particle swarm are updated.
[0124] In implementation, if the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, that is, Less than or equal to , the terminal updates the local optimal objective function value and the local optimal particle position corresponding to the current node, and updates the corresponding global optimal objective function value and the global optimal particle position in the particle swarm.
[0125] Specifically: the objective function value of the current quantum communication key distribution strategy corresponding to particle l and the historical optimal objective function value of particle l Compare and update the optimal objective function value of particle l according to the comparison result and the optimal particle position And the global optimal target value and the global optimal position ;
[0126] if Less than or equal to , then the objective function value of the current quantum communication key distribution strategy searched by particle l is less than or equal to the objective function value of the quantum communication key distribution strategy obtained by the historical optimal position of particle l, then the objective function value of quantum communication key distribution through the quantum communication key distribution strategy corresponding to the particle position is smaller;
[0127] Update the optimal objective function value of particle l to and optimal location , that is, the optimal cost function value of particle l Update to the objective function value of the current quantum communication key distribution strategy searched by particle l , the optimal position of particle l Update to the current position of particle l ;
[0128] By further comparison, if Less than or equal to , that is, the objective function value of the current quantum communication key distribution strategy found by particle l is less than or equal to the objective function value of the quantum communication key distribution strategy obtained by the global historical optimal position. Then, the smaller the objective function value of quantum communication key distribution by the quantum communication key distribution strategy corresponding to the particle position, the better it can meet the distribution requirements;
[0129] Update the global optimal cost function value corresponding to each quantum communication key distribution strategy and the global optimal position , that is, to change the corresponding global optimal cost value to the objective function value of the quantum communication key distribution strategy of particle l , change the global optimal position corresponding to each quantum communication key distribution strategy to the current position corresponding to particle l .
[0130] In this embodiment, based on the particle swarm optimization algorithm, minimizing the objective function is used as the optimization goal, combined with constraint conditions, to achieve multi-objective optimization of the quantum communication key distribution network, and select the optimal quantum communication key distribution path to ensure the distribution quality of the quantum communication key.
[0131] In one of the optional embodiments, if the objective function value in the updated quantum communication key distribution strategy is greater than the historical objective function value, that is, Greater than , then the historical objective function value is less than the objective function value of the quantum communication key distribution strategy found by particle l, and the quantum communication key distribution strategy corresponding to the historical objective function value can better meet the QoS requirements. At this time, the global optimal objective function value is retained. and the global optimal position is .
[0132] Furthermore, if Greater than , that is, the historical objective function value is less than the objective function value of the quantum communication key distribution strategy selected by the current path found by particle l. The quantum communication key distribution strategy of the historical record can better meet the QoS requirements. At this time, the optimal objective function value of particle l is and the optimal position is And the global optimal cost function value is and the global optimal position is .
[0133] After initialization and updating of the particle swarm optimization algorithm, the particle swarm optimization algorithm will obtain the distribution strategy of each quantum communication key K and select the globally optimal distribution strategy to distribute the quantum communication key.
[0134] In order to prevent the particle from searching endlessly, we define T max The parameter represents the maximum number of iterations, which has a direct impact on whether the particle swarm algorithm can search for the optimal solution. max If the parameter is set too small, the particle swarm optimization algorithm will easily fall into the local optimum during execution and cannot be effectively solved. At this time, the algorithm will continue to search locally until the number of iterations is completed. If T max If the parameter is set too high, it will easily cause excessive resource consumption. You can set the effective number of iterations reasonably according to business needs.
[0135] In one embodiment, in the above step 104, when considering the constraint parameters of the network routing, the distribution delay, the path quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount are comprehensively considered according to the quantum communication key and the network characteristics as the constraint conditions, and the path of quantum communication key distribution is calculated. Figure 7 As shown, the specific processing process of step 104 includes:
[0136] Step 702, obtaining preset constraint thresholds corresponding to quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount.
[0137] In the implementation, the terminal obtains the preset constraint threshold corresponding to the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount, that is, the distribution delay threshold corresponding to the quantum communication key distribution delay , path consumption rate threshold corresponding to quantum communication key consumption rate And the bandwidth threshold corresponding to the bandwidth and the remaining quantum communication key amount wait.
[0138] Step 704: construct each constraint condition based on each preset constraint threshold.
[0139] In implementation, the terminal constructs each constraint condition based on each preset constraint threshold.
[0140] Specifically: Quantum communication key distribution delay: It is an indicator to measure the quality of QKD network service. Since this indicator can be perceived by users, it is very important in QoS parameters. Define each quantum communication key k, through a distribution strategy Distribution delay of the connected path , as shown in the following formula (4):
[0141] (4)
[0142] in, It represents the time consumed by the quantum communication key through all connected paths of the distribution strategy during the distribution process; Indicates whether the quantum communication key k passes through path l ij to distribute; Indicates the size of the quantum communication key; represents the bandwidth capacity from node i to node j; represents the transmission delay from node i to node j; represents the random deviation in the QKD network.
[0143] Quantum communication key distribution delay measurement parameters (constraints): Quantum communication key k is distributed through the strategy The maximum delay in the connected paths is less than or equal to the distribution delay required by QoS. , as shown in the following formula (5):
[0144] (5)
[0145] Path quantum communication key consumption rate: Combined with the different types of encryption requirements of the trusted relay QKD network, the key distribution is optimized according to its different QoS network requirements, so that the QKD network can better provide different types of encrypted communication services. Define the path l from node i to node j ij Path quantum communication key consumption rate , as shown in formula (6):
[0146] (6)
[0147] in, Indicates that through path l ij The total capacity of quantum communication keys, It means that the distributed quantum communication key capacity accounts for the entire path l ij The ratio of the total capacity is accumulated to obtain the quantum communication key consumption rate on the distribution path. .
[0148] Path quantum communication key consumption rate measurement parameter (constraint condition): The maximum value of the path consumption rate of all quantum communication keys from node i to node j is less than or equal to the path consumption rate required by QoS , as shown in the following formula (7):
[0149] (7)
[0150] Bandwidth: refers to the amount of data transmitted per unit time. Network bandwidth is usually the most basic and important parameter for measuring QoS parameters. The larger the bandwidth, the higher the data rate transmitted per unit time; the smaller the bandwidth, the lower the data rate transmitted per unit time.
[0151] Bandwidth metric parameter (constraint): the remaining bandwidth capacity of the path from node i to node j for all quantum communication keys Not less than the bandwidth required by QoS , as shown in the following formula (8):
[0152] (8)
[0153] Remaining quantum communication key quantity (constraint): defined as the remaining available quantum communication key quantity in the relay node key resource pool, which is a key indicator affecting the connectivity of the relay route. It can be expressed as K rest , the remaining quantum communication key quantity must meet the following conditions:
[0154] (9)
[0155] In summary, all constraints for searching for the optimal distribution strategy of quantum communication keys based on the particle swarm optimization algorithm in the network routing method in this embodiment include:
[0156] (10)
[0157] in , , is the preset constraint threshold in the preset constraint condition.
[0158] Step 706, performing weighted calculation based on the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount and corresponding preset constraint thresholds to obtain the objective function.
[0159] In the implementation, the terminal performs weighted calculation based on the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, remaining quantum communication key amount and corresponding preset constraint thresholds to obtain the objective function. Specifically, the specific form of the objective function is shown in the following formula:
[0160] (11)
[0161] Among them, the weighting factor They represent the weights of quantum communication key distribution delay, path quantum communication key consumption rate and remaining bandwidth capacity in QoS respectively. The optimization goal is to minimize the objective function According to the different requirements of quantum communication key distribution delay, quantum communication key consumption rate on the path and available bandwidth in the trusted relay QKD network, the These three weight coefficients meet the needs of various types of quantum communication key distribution and select a suitable distribution strategy for each quantum communication key k, namely, the distribution strategy , in order to improve the applicability of the routing distribution algorithm and minimize the cost of quantum communication key distribution.
[0162] In one specific exemplary embodiment, Figure 8 As shown, an example process of a network routing method based on a particle swarm optimization algorithm is provided, and the example process includes:
[0163] Step 801, the particle swarm algorithm is initialized to determine the particle swarm size, the initial position of each particle, and the initial velocity of each particle.
[0164] Step 802, each node in the trusted relay QKD network initializes routing state information.
[0165] Step 803, calculate the objective function value of the current particle.
[0166] Step 804, if the objective function value of the current objective function is less than or equal to the individual's historical optimal objective function value, execute step 805, if the objective function value of the current objective function is greater than the individual's historical optimal objective function value, execute step 806.
[0167] Step 805: Update the optimal objective function value and optimal position of the current particle.
[0168] Step 806, retaining the historical optimal objective function value and optimal position of the current particle.
[0169] Step 807, if the objective function value of the currently obtained objective function is less than or equal to the global historical optimal objective function value, execute step 808, if the objective function value of the currently obtained objective function is greater than the global historical optimal objective function value, execute step 809.
[0170] Step 808, updating the global optimal objective function and the global optimal position.
[0171] Step 809, retaining the global historical optimal objective function value and the global historical optimal position.
[0172] Step 810, selecting the path corresponding to the largest global optimal position to distribute quantum communication keys.
[0173] Step 811, determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, execute step 812; if the maximum number of iterations has not been reached, execute step 803.
[0174] Step 813, output the optimal quantum communication key distribution strategy.
[0175] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0176] Based on the same inventive concept, the embodiment of the present application also provides a network routing device for implementing the network routing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more network routing device embodiments provided below can refer to the limitations on the network routing method above, and will not be repeated here.
[0177] In an exemplary embodiment, Fig. 9 As shown, a network routing device 900 is provided, including: an acquisition module 910, a construction module 920 and a determination module 930, wherein:
[0178] An acquisition module 910 is used to acquire network parameter information of multiple candidate quantum relay nodes, where the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0179] A construction module 920 is used to construct constraint conditions and an objective function based on quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0180] The determination module 930 is used to determine the next hop node for quantum communication key transmission from multiple candidate quantum relay nodes by taking minimization of the objective function as the optimization goal and combining the constraint conditions.
[0181] In one embodiment, the determination module 930 is specifically used to generate a particle swarm for quantum communication key transmission by a particle swarm optimization algorithm, wherein each particle in the particle swarm includes a quantum communication key distribution strategy between a current node and a target node corresponding to the particle; each quantum communication key distribution strategy includes a particle position, an objective function, and a constraint condition;
[0182] Taking minimizing the objective function as the optimization goal and combining the constraints, the optimal distribution strategy of the quantum communication key corresponding to the current node is determined, and the next hop node corresponding to the current node is determined based on the optimal distribution strategy.
[0183] In one embodiment, the apparatus 900 further includes:
[0184] Initialization module, used to initialize routing table items;
[0185] The negotiation module is used to negotiate and store local shared keys between adjacent nodes using the key distribution protocol; the shared keys are used to encrypt and transmit quantum communication keys.
[0186] In one embodiment, the determination module 930 is specifically used to determine the velocity and particle position of the particle corresponding to the current node;
[0187] The particle speed and particle position are initialized, and the objective function is used as the fitness function. The minimization of the fitness function is used as the optimization goal and combined with the constraints to determine the optimal distribution strategy of the quantum communication key corresponding to the current node.
[0188] In one embodiment, the determination module 930 is specifically used to update the speed, particle position and quantum communication key distribution strategy of the particle corresponding to the current node when the network state changes;
[0189] Compare the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and based on the comparison result, update the local optimal objective function value and the local optimal particle position corresponding to the current node, and update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm;
[0190] The quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position is selected as the optimal distribution strategy for the current node.
[0191] In one embodiment, the determination module 930 is specifically used to update the local optimal objective function value and the local optimal particle position corresponding to the current node if the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, and to update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm.
[0192] In one embodiment, the construction module 920 is specifically used to obtain preset constraint thresholds corresponding to the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount;
[0193] Based on each preset constraint threshold, construct each constraint condition;
[0194] The objective function is obtained by weighted calculation based on the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, remaining quantum communication key amount and corresponding preset constraint thresholds.
[0195] Each module in the above network routing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0196] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a network routing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0197] Those skilled in the art will understand that Fig.10The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0198] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0199] Obtaining network parameter information of multiple candidate quantum relay nodes, the network parameter information including quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount;
[0200] Based on quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount, construct constraint conditions and objective functions;
[0201] Taking minimizing the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined among multiple candidate quantum relay nodes in combination with constraints.
[0202] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0203] Through the particle swarm optimization algorithm, a particle swarm for quantum communication key transmission is generated. Each particle in the particle swarm contains the quantum communication key distribution strategy between the current node and the target node corresponding to the particle; each quantum communication key distribution strategy contains the particle position, objective function and constraint conditions;
[0204] Taking minimizing the objective function as the optimization goal and combining the constraints, the optimal distribution strategy of the quantum communication key corresponding to the current node is determined, and the next hop node corresponding to the current node is determined based on the optimal distribution strategy.
[0205] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0206] Initialize routing table entries;
[0207] Adjacent nodes use a key distribution protocol to negotiate and store local shared keys; the shared keys are used to encrypt and transmit quantum communication keys.
[0208] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0209] Determine the speed and position of the particle corresponding to the current node;
[0210] The particle speed and particle position are initialized, and the objective function is used as the fitness function. The minimization of the fitness function is used as the optimization goal and combined with the constraints to determine the optimal distribution strategy of the quantum communication key corresponding to the current node.
[0211] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0212] When the network state changes, the particle speed, particle position and quantum communication key distribution strategy corresponding to the current node are updated;
[0213] Compare the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and based on the comparison result, update the local optimal objective function value and the local optimal particle position corresponding to the current node, and update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm;
[0214] The quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position is selected as the optimal distribution strategy for the current node.
[0215] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0216] If the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, the local optimal objective function value and the local optimal particle position corresponding to the current node are updated, and the corresponding global optimal objective function value and the global optimal particle position in the particle swarm are updated.
[0217] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0218] Obtaining preset constraint thresholds corresponding to quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount;
[0219] Based on each preset constraint threshold, construct each constraint condition;
[0220] The objective function is obtained by weighted calculation based on the quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, remaining quantum communication key amount and corresponding preset constraint thresholds.
[0221] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0222] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0223] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0224] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0225] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0226] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A network routing method, characterized in that: The method comprises: Acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount; Constructing constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, and the remaining quantum communication key amount; Taking minimization of the objective function as the optimization goal, the next hop node for quantum communication key distribution is determined from the multiple candidate quantum relay nodes in combination with the constraint conditions.
2. The method according to claim 1, characterized in that The step of taking minimization of the objective function as the optimization goal and determining the next hop node for quantum communication key distribution from the plurality of candidate quantum relay nodes in combination with the constraint condition comprises: Generate a particle swarm for quantum communication key distribution by using a particle swarm optimization algorithm, wherein each particle in the particle swarm includes a quantum communication key distribution strategy between a current node and a target node corresponding to the particle; each quantum communication key distribution strategy includes a particle position, the objective function and the constraint condition; Taking minimizing the objective function as the optimization goal and combining the constraint conditions, an optimal distribution strategy of the quantum communication key corresponding to the current node is determined, and a next hop node corresponding to the current node is determined based on the optimal distribution strategy.
3. The method according to claim 2, characterized in that Before generating a particle swarm for quantum communication key transmission by using a particle swarm optimization algorithm, the method further includes: Initialize routing table entries; Adjacent nodes use a key distribution protocol to negotiate and store a local shared key; the local shared key is used to encrypt and transmit the quantum communication key.
4. The method according to claim 2, characterized in that: The step of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by minimizing the objective function as the optimization goal and combining the constraint conditions includes: Determine the speed and position of the particle corresponding to the current node; The speed and position of the particle are initialized, and the objective function is used as the fitness function, and minimizing the fitness function is used as the optimization goal in combination with the constraint condition to determine the optimal distribution strategy of the quantum communication key corresponding to the current node.
5. The method according to claim 2, characterized in that: The step of determining the optimal distribution strategy of the quantum communication key corresponding to the current node by minimizing the objective function as the optimization goal and combining the constraint conditions includes: When the network state changes, the speed, particle position and quantum communication key distribution strategy of the particle corresponding to the current node are updated; Compare the objective function value in the updated quantum communication key distribution strategy with the historical objective function value, and update the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result, and update the corresponding global optimal objective function value and the global optimal particle position in the particle swarm; The quantum communication key distribution strategy consisting of the updated global optimal objective function value and the global optimal position is selected as the optimal distribution strategy for the current node.
6. The method according to claim 5, characterized in that The updating of the local optimal objective function value and the local optimal particle position corresponding to the current node based on the comparison result, and the updating of the global optimal objective function value and the global optimal particle position corresponding to the particle swarm, comprises: If the objective function value in the updated quantum communication key distribution strategy is less than or equal to the historical objective function value, the local optimal objective function value and the local optimal particle position corresponding to the current node are updated, and the corresponding global optimal objective function value and the global optimal particle position in the particle swarm are updated.
7. The method according to claim 1, characterized in that The constructing of constraint conditions and objective functions based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount includes: Obtaining preset constraint thresholds corresponding to quantum communication key distribution delay, quantum communication key consumption rate, bandwidth, and remaining quantum communication key amount; Based on the preset constraint thresholds, construct each constraint condition; A weighted calculation is performed based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth, the remaining quantum communication key amount, and the corresponding preset constraint thresholds to obtain an objective function.
8. A network routing device, characterized in that: The device comprises: An acquisition module is used to acquire network parameter information of multiple candidate quantum relay nodes, wherein the network parameter information includes quantum communication key distribution delay, quantum communication key consumption rate, bandwidth and remaining quantum communication key amount; A construction module, used to construct constraint conditions and an objective function based on the quantum communication key distribution delay, the quantum communication key consumption rate, the bandwidth and the remaining quantum communication key amount; A determination module is used to determine the next hop node for quantum communication key distribution among the multiple candidate quantum relay nodes by taking minimization of the objective function as the optimization goal and combining the constraint conditions.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Multi-node secure communication method and system based on quantum key distribution
CN120128524A