Quantum key routing path determination method and device, electronic equipment and medium
By applying the Spider Bee optimization algorithm in the quantum key distribution network and optimizing the routing path, the limitations of traditional networks in routing selection and resource allocation are solved, and network performance and communication security are improved.
Patent Information
- Application Number
- CN202411560850.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional quantum key distribution networks have limitations in routing and resource allocation, and are difficult to adapt to dynamically changing network conditions and user needs, resulting in network congestion and communication security difficult to ensure.
The spider bee optimization algorithm is used to initially generate the initial spider bee population based on the network topology structure, and the optimal spider bee is obtained through iterative optimization, thereby determining the quantum key routing path to improve the bandwidth utilization and performance of the network, enhance routing flexibility, and ensure communication security and service quality.
By optimizing routing strategies, the bandwidth utilization and performance of quantum key distribution networks are improved, routing flexibility is enhanced, communication security and service quality are ensured, and dynamically changing network conditions and user needs are adapted to dynamically changing network conditions and user needs.
Smart Images

Figure CN119602943A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum communication technology, and in particular to a method, device, electronic device and medium for determining a quantum key routing path. Background Art
[0002] With the rapid development of quantum communication technology, quantum key distribution (QKD) has attracted widespread attention as an efficient means of confidential communication. QKD uses the principles of quantum mechanics to allow both parties to share keys securely over an insecure channel, thereby ensuring the security of communication.
[0003] Traditional QKD networks have limitations in routing selection and resource allocation, and are difficult to adapt to dynamically changing network conditions and user needs. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, device, electronic device and medium for determining a quantum key routing path to improve the bandwidth utilization and performance of a quantum key distribution network, enhance routing flexibility, and ensure communication security and service quality.
[0005] In a first aspect, an embodiment of the present application provides a method for determining a quantum key routing path, comprising:
[0006] Obtaining service quality parameters of multiple QKD nodes in a quantum key distribution QKD network;
[0007] Establishing a network topology structure of the QKD network according to the multiple QKD nodes;
[0008] Based on the network topology, an initial spider bee population is initialized and generated, wherein the initial spider bee population includes: a plurality of initial spider bees, each initial spider bee corresponds to a random QKD node group;
[0009] Using a spider bee optimization algorithm, based on the network topology structure, iterate each of the initial spider bees to obtain an iterative spider bee;
[0010] Calculating the quality of service parameters of each initial spider bee according to the quality of service parameters of the random QKD node group, and calculating the quality of service parameters of the iterative spider bee according to the quality of service parameters of the iterative QKD node group;
[0011] Determining an optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee;
[0012] According to the target QKD node group corresponding to the optimal spider bee, a quantum key routing path is generated for key negotiation.
[0013] In an optional implementation manner, determining the optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee includes:
[0014] Determining a first preset number of first spider bees from the multiple initial spider bees and the iterative spider bees as a first spider bee population according to the service quality parameter of each initial spider bee and the service quality parameter of the iterative spider bee;
[0015] Using a spider bee optimization algorithm, based on the network topology, iterate each first spider bee in the first spider bee population to obtain a new iterative spider bee;
[0016] According to the service quality parameter of each first spider bee and the service quality parameter of the new iterative spider bee, determining a second preset number of second spider bees from the first preset number of first spider bees and the new iterative spider bees as a second spider bee population until a preset maximum number of iterations is reached, and determining the spider bee population when the preset maximum number of iterations is reached as the target spider bee population;
[0017] The optimal spider bee is determined from the target spider bee population according to the service quality parameters of each spider bee in the target spider bee population.
[0018] In an optional implementation, the use of the spider bee optimization algorithm, based on the network topology, iterating each of the initial spider bees to obtain an iterative spider bee, includes:
[0019] Determining whether each of the initial spider bees performs hunting behavior or mating behavior;
[0020] If each of the initial spider bees performs mating behavior, generating male spider bees according to each of the initial spider bees and based on the network topology structure;
[0021] According to the preset crossover probability, a uniform crossover algorithm is executed on each of the initial spider bees and the male spider bee to obtain the iterative spider bee.
[0022] In an optional implementation, the use of the spider bee optimization algorithm, based on the network topology, iterating each of the initial spider bees to obtain an iterative spider bee, includes:
[0023] If each of the initial spider bees performs a hunting behavior, determining whether each of the initial spider bees performs a hunting behavior or a nesting behavior under the hunting behavior;
[0024] If each of the initial spider bees executes the hunting behavior and the hunting is successful, then based on the network topology structure, a preset random exploration algorithm is used to iterate each of the initial spider bees to generate the iterative spider bee.
[0025] In an optional implementation, the method of using a spider bee optimization algorithm to iterate each initial spider bee based on the network topology to obtain an iterative spider bee further includes:
[0026] If each of the initial spider bees executes the hunting behavior but fails, a preset random avoidance algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
[0027] In an optional implementation, the method of using a spider bee optimization algorithm to iterate each initial spider bee based on the network topology to obtain an iterative spider bee further includes:
[0028] If each of the initial spider bees performs the nest-building behavior, a preset random area nest-building algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
[0029] In an optional implementation, the quality of service parameter includes at least one of the following parameters:
[0030] Throughput, quantum key response delay, quantum key response delay variation, quantum key transmission error rate, quantum key transmission loss rate, service time availability parameters, service recovery time.
[0031] In a second aspect, an embodiment of the present application further provides a device for determining a quantum key routing path, including:
[0032] An acquisition module, used to obtain service quality parameters of multiple QKD nodes in a quantum key distribution QKD network;
[0033] A processing module, configured to establish a network topology structure of the QKD network according to the plurality of QKD nodes;
[0034] The processing module is further used to initialize and generate an initial spider bee population based on the network topology structure, wherein the initial spider bee population includes: a plurality of initial spider bees, each initial spider bee corresponding to a random QKD node group;
[0035] The processing module is further used to adopt a spider bee optimization algorithm to iterate each initial spider bee based on the network topology structure to obtain an iterative spider bee;
[0036] The processing module is further used to calculate the service quality parameters of each initial spider bee according to the service quality parameters of the random QKD node group, and calculate the service quality parameters of the iterative spider bee according to the service quality parameters of the iterative QKD node group;
[0037] A determination module, configured to determine an optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee;
[0038] The processing module is also used to generate a quantum key routing path for key negotiation according to the target QKD node group corresponding to the optimal spider bee.
[0039] In an optional implementation manner, the determining module is specifically configured to:
[0040] Determining a first preset number of first spider bees from the multiple initial spider bees and the iterative spider bees as a first spider bee population according to the service quality parameter of each initial spider bee and the service quality parameter of the iterative spider bee;
[0041] Using a spider bee optimization algorithm, based on the network topology, iterate each first spider bee in the first spider bee population to obtain a new iterative spider bee;
[0042] According to the service quality parameter of each first spider bee and the service quality parameter of the new iterative spider bee, determining a second preset number of second spider bees from the first preset number of first spider bees and the new iterative spider bees as a second spider bee population until a preset maximum number of iterations is reached, and determining the spider bee population when the preset maximum number of iterations is reached as the target spider bee population;
[0043] The optimal spider bee is determined from the target spider bee population according to the service quality parameters of each spider bee in the target spider bee population.
[0044] In an optional implementation manner, the processing module is specifically used to:
[0045] Determining whether each of the initial spider bees performs hunting behavior or mating behavior;
[0046] If each of the initial spider bees performs mating behavior, generating male spider bees according to each of the initial spider bees and based on the network topology structure;
[0047] According to the preset crossover probability, a uniform crossover algorithm is executed on each of the initial spider bees and the male spider bee to obtain the iterative spider bee.
[0048] In an optional implementation manner, the processing module is specifically used to:
[0049] If each of the initial spider bees performs a hunting behavior, determining whether each of the initial spider bees performs a hunting behavior or a nesting behavior under the hunting behavior;
[0050] If each of the initial spider bees executes the hunting behavior and the hunting is successful, then based on the network topology structure, a preset random exploration algorithm is used to iterate each of the initial spider bees to generate the iterative spider bee.
[0051] In an optional implementation manner, the processing module is specifically used to:
[0052] If each of the initial spider bees executes the hunting behavior but fails, a preset random avoidance algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
[0053] In an optional implementation manner, the processing module is specifically used to:
[0054] If each of the initial spider bees performs the nest-building behavior, a preset random area nest-building algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
[0055] In an optional implementation, the quality of service parameter includes at least one of the following parameters:
[0056] Throughput, quantum key response delay, quantum key response delay variation, quantum key transmission error rate, quantum key transmission loss rate, service time availability parameters, service recovery time.
[0057] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to execute any one of the methods described in the first aspect.
[0058] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspects is executed.
[0059] The present application provides a method, device, electronic device and medium for determining a quantum key routing path, the method comprising: initializing and generating an initial spider bee population based on a network topology structure, using a spider bee optimization algorithm, iterating each initial spider bee based on the network topology structure to obtain an iterative spider bee, calculating the service quality parameters of each initial spider bee according to the service quality parameters of a random QKD node group corresponding to each initial spider bee, calculating the service quality parameters of the iterative spider bee according to the service quality parameters of the iterative QKD node group corresponding to the iterative spider bee, determining the optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee, and generating a quantum key routing path for key negotiation according to the target QKD node group corresponding to the optimal spider bee. This improves the bandwidth utilization and performance of the quantum key distribution network, enhances routing flexibility, and ensures communication security and service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 1 ;
[0062] Figure 2 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 2 ;
[0063] Figure 3 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 3 ;
[0064] Figure 4 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 4 ;
[0065] Figure 5 A schematic diagram of a specific process of determining a quantum key routing path provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of the structure of a device for determining a quantum key routing path provided in an embodiment of the present application;
[0067] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0069] Before introducing the technical solution of this application, the professional terms involved are first explained:
[0070] Spiderwasp optimizer (SWO) algorithm: An emerging heuristic optimization algorithm that simulates the predation, nesting and reproduction behaviors of spider wasps in nature. SWO is widely used in various optimization problems due to its simplicity, efficiency and powerful global search capability.
[0071] The general process of the spider bee optimization algorithm is to simulate the process of spider bees catching spiders in nature. The main process of the spider bee's life is divided into two stages, which are carried out alternately. One is hunting and the other is mating. Mating behavior is mainly to leave new spider bees and maintain the number of races. Hunting behavior includes hunting and nesting. There are two situations in hunting, one is to successfully capture prey, and the other is to fail to capture and stay away from the prey. There are two situations in nesting. One is that the spider bee enters the best nesting area, indicating that it can hunt in this area. The other is that if the best area is not found, it will randomly find an area to nest.
[0072] Quantum key distribution (QKD): uses the properties of quantum mechanics to ensure communication security.
[0073] Quantum key distribution network: By flexibly building temporary quantum channels at different QKD nodes and directly generating point-to-point quantum keys, multi-user, long-distance key distribution is achieved. In the process of quantum key distribution, the basic idea of the QKD network based on trusted relays is to use the one-time pad (OTP) algorithm to realize the key transmission between non-adjacent nodes on the quantum key routing path, and distribute the obtained shared key to users. This process is called the "hop-by-hop" encryption mechanism.
[0074] Quality of Service (QoS): 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.
[0075] Cryptographic Application (CA): refers to a software program or system that uses quantum keys (QKD keys) for encryption to protect data security and privacy.
[0076] Traditional QKD networks have limitations in routing selection and resource allocation, and are difficult to adapt to dynamically changing network conditions and user needs, leading to network congestion. Dynamically changing network conditions can be understood as a QKD node in the quantum key distribution network being unable to provide keys, or a QKD node being congested due to large forwarding volume.
[0077] Based on this, the present application provides a method for determining a quantum key routing path based on a spider bee optimization algorithm. Based on the spider bee optimization algorithm and combined with quality of service parameters, the routing strategy is optimized to improve the bandwidth utilization and performance of the quantum key distribution network, enhance routing flexibility, and ensure communication security and service quality.
[0078] Figure 1 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 1 The execution entity of this embodiment can be a quantum key distribution QKD controller.
[0079] like Figure 1 As shown, the method may include:
[0080] S101. Obtain service quality parameters of multiple QKD nodes in a quantum key distribution QKD network.
[0081] The quantum key distribution network includes multiple QKD nodes, and the service quality parameters of the QKD nodes are used to indicate the service capabilities of the QKD nodes.
[0082] Among them, the quantum key distribution controller can collect the node configuration and interface information of multiple QKD nodes, and based on the node configuration and interface information, use the southbound interface of the quantum key distribution controller to establish a communication connection with each QKD node respectively, that is, the quantum key distribution controller and the QKD node actively establish communication through the southbound interface, wherein the node configuration may include the Internet Protocol Address (IP address), mask, node type, physical address (MAC address), etc., and the interface information may include interface status, interface name, VLAN information, etc.
[0083] The first implementation method: Each QKD node calculates the service quality parameters and sends the service quality parameters to the quantum key distribution controller. In other words, the quantum key distribution controller communicates with each QKD node in the quantum key distribution network through the southbound interface and collects the service quality parameters collected by the QKD node through the southbound interface.
[0084] The second implementation method: The quantum key distribution controller obtains the service quality parameters of each QKD node in the quantum key distribution network through calculation.
[0085] In an optional implementation manner, the quality of service parameter includes at least one of the following parameters:
[0086] Throughput, quantum key response delay, quantum key response delay variation, quantum key transmission error rate, quantum key transmission loss rate, service time availability parameters, service recovery time.
[0087] Among them, throughput (TPT) refers to the number of quantum keys (KSA-key) successfully received in a specified time interval divided by the time interval (or the number of KSA-keys successfully received in the service seconds).
[0088] Quantum key response delay: KSA-key response delay (KKRD) refers to the time point t when the KSA-key request is sent from CA-A (encryption application A) after the quantum key distribution controller issues a KSA-key request A The time t when CA-B (encryption application B) receives the requested KSA-key B The time difference between B >t A ).
[0089] Quantum key response delay variation: KSA-key response delay variation (KKRDV) refers to the observation of KSA-key request sending events and KSA-key receiving events between CA-A and CA-B, describing the difference between actual KSA-key receiving events and KKRDV. m(A,B) (median of all KKRDs) for each group.
[0090] Quantum key transmission error rate: also known as KSA-key delivery error rate (KSA-key Delivery Error Ratio, KKDER), refers to the ratio of the number of erroneous KSA-keys to the number of successfully received KSA-keys plus the number of erroneous KSA-keys.
[0091] Quantum key delivery loss rate: also known as KSA-key delivery loss rate (KSA-key Delivery Loss Ratio, KKDLR), refers to the ratio of the number of lost KSA-keys to the number of successfully received KSA-keys plus the number of lost KSA-keys.
[0092] Service time availability parameter: Availability (AVL), refers to the available status of quality service, divides the total planned service time into available and unavailable time periods, and specifies the availability percentage and unavailability percentage of quantum key distribution accordingly.
[0093] Service Restoration Time (SRT): refers to the time from when a QKD node is interrupted to when it is re-provisioned.
[0094] The throughput is expressed as:
[0095]
[0096] N KSA-keys Refers to the number of quantum keys (KSA-key) successfully received within a time interval T, where the time interval T can be a preset collection period.
[0097] The QKD node can collect the throughput according to the preset collection period, and regularly send the throughput to the quantum key distribution controller according to the preset sending period. Therefore, the preset collection period T is less than the preset sending period T. timing , in order to reflect the real-time nature of QKD nodes in real time and increase the effectiveness and reliability of QKD nodes in the quantum key distribution network.
[0098] The quantum key response delay (KSA-key response delay) is expressed as:
[0099] KKR A,B,n =t B,n -t A,n
[0100] For the nth quantum key (KSA-key) distribution request, t A,n is the time when encryption application A (CA-A) sends a quantum key distribution request, t B,n is the time when the encryption application B (CA-B) receives the distributed quantum key (KSA-key).
[0101] It is worth noting that encryption application A and encryption application B are deployed on the quantum key request device. For the QKD node, within the preset collection period, the quantum key request device sends the nth quantum key distribution request to the quantum key distribution controller, and the quantum key distribution controller selects the quantum key routing path where the QKD node is located to negotiate a quantum key and returns it to the quantum key request device. The difference between the time when the quantum key request device receives the distributed quantum key and the time when the quantum key distribution request is sent is used as the quantum key delay response of the QKD node.
[0102] The quantum key response delay variation (KSA-key response delay variation) is expressed as:
[0103] KKDV n =KKRD A,B,n -KKRD m(A,B)
[0104] KKR A,B.n represents the actual response delay of the nth quantum key, KKRD m(A,B) It is the value in the middle after all quantum key response delays (KKRD) between CA-A and CA-B are sorted.
[0105] The quantum key transmission error rate (KSA-key transmission error rate) is expressed as:
[0106]
[0107] N error is the number of incorrect quantum keys transmitted by QKD nodes, N success is the number of quantum keys successfully received by the QKD node.
[0108] It is worth noting that when key negotiation is performed using the quantum key routing path where the QKD node is located, the QKD node will transmit quantum keys between adjacent QKD nodes, so there are quantum keys with transmission errors and quantum keys that are successfully received.
[0109] The quantum key transmission loss rate (KSA-key transmission loss rate) is expressed as:
[0110]
[0111] N lose is the number of quantum keys lost by the QKD node during key negotiation, N success It is the number of quantum keys successfully received by the QKD node during the key negotiation process.
[0112] The service time can be expressed as:
[0113]
[0114] T available is the service time of the QKD node within the total planned service time, T schedule is the total planned service time, T schedule For example, it can be one week, with the time unit being seconds, to increase the accuracy of the service time available parameters.
[0115] It is worth noting that the QKD node may be shut down and unable to provide services after shutdown, that is, service interruption. Therefore, T available It can be the time that the QKD node is in the power-on state within the total planned service time.
[0116] The service recovery time is expressed as:
[0117] SRT=t supply -t interrupt SRT=t supply -t interrupt
[0118] t supply is the time it takes for the QKD node to resume service, t interrupt is the time during which the QKD node's service is interrupted.
[0119] It is worth noting that t interrupt That is, the time that the QKD node is in the shutdown state during the total planned service time, t supply That is, the time between the service interruption and service restoration of the QKD node.
[0120] It is understandable that when calculating the above-mentioned service quality parameters, the time interval T can be used as the calculation period, or different calculation periods can be used for calculation, and this embodiment does not specifically limit this. Taking the quantum key response delay as an example, if the time interval T is used as the calculation period, then within the time interval T, for the nth quantum key (KSA-key) distribution request, the calculation t B,n -t A,nAs quantum key responses are delayed.
[0121] S102. Establish a network topology structure of a QKD network based on multiple QKD nodes.
[0122] Identify the connection relationship between multiple QKD nodes to perform network topology discovery, wherein the connection relationship is used to indicate whether a communication connection is established between two QKD nodes, and establish a network topology structure of the QKD network based on the connection relationship between the multiple QKD nodes, wherein two QKD nodes that establish a communication connection in the network topology structure have an interconnection relationship, and a quantum key distribution controller and each QKD node have an interconnection relationship, that is, the quantum key distribution controller and each QKD node establish a communication connection.
[0123] S103. Initialize and generate an initial spider bee population based on the network topology.
[0124] Based on the network topology structure, an initial spider bee population is initialized and generated, wherein the initial spider bee population includes: multiple initial spider bees, each initial spider bee corresponds to a random QKD node group, a random QKD node group is a QKD node group composed of QKD nodes randomly selected from multiple QKD nodes, and adjacent QKD nodes in a random QKD node group have an interconnected relationship, that is, the random solutions generated in the spider bee optimization algorithm are all route reachable.
[0125] In an optional implementation, the QKD node is encoded in the form of a node identifier (Identity document, ID), a set of solutions is randomly generated, and then the solutions are encoded into initial spider bees, that is, each initial spider bee is a set of solutions, and a set of solutions represents a random QKD node group. A set of solutions can be expressed as:
[0126]
[0127] Where h is the total number of multiple QKD nodes in the quantum key distribution network.
[0128] It is worth noting that the expression of any solution in the randomly generated search space is as follows:
[0129]
[0130] t represents the generation index, i.e., the number of iterations, i represents the identity of the spider bee in the population (i = 1, 2…N), represents the upper bound, represents the lower bound, represents a random vector between [0,1], and N represents the population size of spider bees.
[0131] Among them, the upper bound of the initial parameter given in advance and the lower bound To ensure that the search range does not exceed the predetermined upper and lower bounds.
[0132] S104, using the spider bee optimization algorithm, based on the network topology structure, iterating each initial spider bee to obtain an iterative spider bee.
[0133] Based on the network topology, the spider bee optimization algorithm is used to iterate each initial spider bee to obtain an iterative spider bee, wherein each initial spider bee corresponds to an iterative spider bee, and an iterative spider bee corresponds to an iterative QKD node group. An iterative QKD node group is obtained by iteratively updating the QKD nodes in the random QKD node group, wherein iteratively updating the QKD nodes in the random QKD node group can be understood as deleting or updating the QKD nodes in the random QKD node group to other QKD nodes or updating the order of the QKD nodes, etc. Among them, adjacent QKD nodes in an iterative QKD node group have an interconnected relationship.
[0134] S105. Calculate the service quality parameters of each initial spider bee according to the service quality parameters of the random QKD node group, and calculate the service quality parameters of the iterative spider bee according to the service quality parameters of the iterative QKD node group corresponding to the iterative spider bee.
[0135] The random QKD node group includes: a QKD node randomly selected from a plurality of QKD nodes, and the service quality parameters of the random QKD node group include: a service quality parameter of the randomly selected QKD node.
[0136] According to the service quality parameters of the QKD nodes in the random QKD node group, the service quality parameters of each initial spider bee are calculated, wherein the service quality parameters of the initial spider bee can be understood as the fitness of the initial spider bee, which can be expressed as:
[0137] Qos=w TPT ·f TPT (TPT)-w KKRD ·f KKRD (KKRD)-w KKRDV
[0138] ·f KKRDV (KKRDV)-w KKDER ·f KKEDR (KKEDR)-w KKDLR
[0139] ·f KKDLR (KKDLR)-w AVL ·f AVL (AVL)-w SRT ·f SRT(SRT)
[0140] Among them, Qos is the service quality parameter of the initial spider bee, w TPT 、w KKRD 、w KKRDV 、w KKDER 、w KKDLR 、w AVL 、w SRT They are respectively the weight of throughput, the weight of quantum key response delay, the weight of quantum key response delay variation, the weight of quantum key transmission error rate, the weight of quantum key transmission loss rate, the weight of service time available parameter, and the weight of service recovery time, wherein the weight of each parameter is a pre-set parameter, and this embodiment does not specifically limit this.
[0141]
[0142] Where i is the ID of the QKD node in the random QKD node group, T is the throughput of QKD node i in the random QKD node group, and T MAX is the maximum theoretical throughput of the QKD nodes in the random QKD node group, k1 is a positive adjustment parameter that controls the steepness of the curve, θ is a parameter between 0 and 1, indicating the throughput ratio threshold that begins to significantly affect the quality of service, min{f i (TPT) is the f of all QKD nodes in the random QKD node group i The minimum value in (TPT), T MAX and θ are pre-set parameters.
[0143]
[0144] Where i is the ID of the QKD node in the random QKD node group, n is the number of QKD nodes in the random QKD node group, KKRD is the quantum key response delay of QKD node i in the random QKD node group, k2 is a positive adjustment parameter that controls the steepness of the curve, and λ is the center position of the delay. Both k2 and λ are pre-set parameters, and λ can be set to the average value of KKRD.
[0145]
[0146] Where i is the ID of the QKD node in the random QKD node group, k3 is a positive adjustment parameter that controls the steepness of the curve, KKRDV is the quantum key response delay change of QKD node i in the random QKD node group, max{f i (KKRDV) is the f of all QKD nodes in the random QKD node group i The maximum value in (KKRDV), k3 is a preset parameter.
[0147]
[0148] Among them, i is the ID of the QKD node in the random QKD node group, n is the number of QKD nodes in the random QKD node group, and KKDER is the quantum key transmission error rate of QKD node i in the random QKD node group.
[0149]
[0150] Among them, i is the ID of the QKD node in the random QKD node group, n is the number of QKD nodes in the random QKD node group, and KKDLR is the quantum key transmission loss rate of QKD node i in the random QKD node group.
[0151]
[0152] Among them, i is the ID of the QKD node in the random QKD node group, n is the number of QKD nodes in the random QKD node group, and AVL is the service time availability parameter of QKD node i in the random QKD node group.
[0153]
[0154] Where i is the ID of the QKD node in the random QKD node group, k4 is a positive adjustment parameter that controls the steepness of the curve, SRT is the service recovery time of QKD node i in the random QKD node group, max{f i (SRT) is the f of all QKD nodes in the random QKD node group i The maximum value in (SRT), k4 is a preset parameter.
[0155] Similarly, iterating the service quality parameters of the QKD node group includes: iterating the service quality parameters of the QKD nodes in the QKD node group, and calculating the service quality parameters of the iterative spider bee according to the service quality parameters of the QKD nodes in the iterative QKD node group. The specific calculation process is similar to the calculation process of the service quality parameters of the initial spider bee, and is not particularly limited here.
[0156] S106. Determine the optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee.
[0157] According to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee, the spider bee with the largest service quality parameter is determined as the optimal spider bee from multiple initial spider bees and iterative spider bees.
[0158] S107. Generate a quantum key routing path for key negotiation based on the target QKD node group corresponding to the optimal spider bee.
[0159] The QKD node group corresponding to the optimal spider bee is the target QKD node group, and the routing path formed by the QKD nodes in the target QKD node group is used as the quantum key routing path. The quantum key routing path includes: the QKD nodes in the target QKD node group.
[0160] For example, the target QKD node group is represented as:
[0161]
[0162] Then the quantum key routing path is x1→x2→x4→x5.
[0163] Among them, the quantum key routing path is used to perform key negotiation to obtain the quantum key. The one-time pad algorithm can be used to realize the key transmission between non-adjacent nodes, and the obtained shared key is distributed to the user. The specific key negotiation process can be referred to the relevant description of the prior art, and this embodiment does not specifically limit this.
[0164] In this embodiment, by adopting the spider bee optimization algorithm to simulate the spider bee's hunting behavior, the optimal solution is found to determine the quantum cryptography routing path, thereby optimizing the routing strategy, improving the bandwidth utilization and performance of the quantum key distribution network, enhancing routing flexibility, and ensuring communication security and service quality.
[0165] Figure 2 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 2 In an optional implementation, the above step S106, determining the optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee, may include:
[0166] S201. Determine a first preset number of first spider bees from a plurality of initial spider bees and iterative spider bees as a first spider bee population according to a service quality parameter of each initial spider bee and a service quality parameter of an iterative spider bee.
[0167] The first spider bee is a first preset number of spider bees determined from multiple initial spider bees and iterative spider bees, and the first preset number is a preset spider bee population size.
[0168] According to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee, a first preset number of spider bees ranked before the service quality parameters are determined from multiple initial spider bees and iterative spider bees as first spider bees, and based on the first preset number of first spider bees, a first spider bee population is generated, the first spider bee population includes: a first preset number of first spider bees, that is, the population size of the first spider bee population is the first preset number.
[0169] It is worth noting that the multiple initial spider bees and iterative spider bees are sorted in descending order of the service quality parameters, and the spider bees that rank first by a preset number are taken as the first spider bees.
[0170] S202. Using a spider bee optimization algorithm, based on the network topology, iterate each first spider bee in the first spider bee population to obtain a new iterative spider bee.
[0171] A spider bee optimization algorithm is adopted to iterate each spider bee in the first spider bee population based on the network topology to obtain a new iterative spider bee, wherein a new iterative spider bee corresponds to a new iterative QKD node group, and the service quality parameters of the new iterative spider bee are calculated according to the service quality parameters of the QKD nodes in the new iterative QKD node group. The specific calculation process is similar to the calculation process of the service quality parameters of the initial spider bee mentioned above and is not specifically limited here.
[0172] S203. According to the service quality parameters of each first spider bee and the service quality parameters of the new iterative spider bee, determine a second preset number of second spider bees from a first preset number of first spider bees and the new iterative spider bees as a second spider bee population until a preset maximum number of iterations is reached, and determine the spider bee population when the preset maximum number of iterations is reached as the target spider bee population.
[0173] The second spider bee is a second preset number of spider bees determined from a first preset number of first spider bees and new iterative spider bees, and the second preset number is obtained by updating the first preset number.
[0174] According to the service quality parameter of each first spider bee and the service quality parameter of the new iterative spider bee, the spider bees with the second preset number of service quality parameters ranked top among the first preset number of first spider bees and the new iterative spider bees are determined as second spider bees, and a second spider bee population is generated according to the second preset number of second spider bees, wherein the second spider bee population includes: the second preset number of second spider bees, that is, the population size of the second spider bee population is the second preset number N ′ .
[0175] It is worth noting that the first preset number of first spider bees and new iterative spider bees are sorted in descending order of the service quality parameters, and the spider bees ranked before the second preset number are used as the second spider bees.
[0176] In an optional implementation, in the above step S104, after each initial spider bee is iterated based on the network topology structure by using the spider bee optimization algorithm to obtain the iterative spider bee, the method may further include:
[0177] Updated Spider Bee population size.
[0178] Among them, the updated spider bee population size is a second preset number, that is, after each iteration, the current spider bee population size needs to be updated so that in the next iteration process, the second spider bees of the second preset number can be selected to continue the iteration.
[0179] The update expression of spider bee population size is expressed as:
[0180] N ′ =N min +(NN min )×k
[0181] Among them, N min is the preset minimum number of spider bee population, N is the current spider bee population size, N ′ is the updated spider bee population size, iter is the current number of iterations, which can be 1, 2, 3, etc. Max_iter is the preset maximum number of iterations.
[0182] Substituting the first preset number as N and iter=1 into the above expression, we get the second preset number N ′ .
[0183] The spider bee optimization algorithm is used to repeat the iterative process based on the network topology until the preset maximum number of iterations is reached, and the spider bee population when the preset maximum number of iterations is reached is determined as the target spider bee population, that is, the optimal spider bee population is found.
[0184] S204. Determine the optimal spider bee from the target spider bee population according to the service quality parameters of each spider bee in the target spider bee population.
[0185] The target spider bee population includes multiple spider bees. According to the service quality parameters of each spider bee in the target spider bee population, the spider bee with the largest service quality parameter is selected from the target spider bee population as the optimal spider bee.
[0186] In this embodiment, based on the spider bee optimization algorithm and combined with service quality parameters, through efficient global search and local development strategies, it is possible to quickly identify and optimize routing paths in the network, significantly improving data transmission efficiency and network stability.
[0187] Figure 3 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 3 ,like Figure 3 As shown, in an optional implementation, in the above step S104, the spider bee optimization algorithm is used to iterate each initial spider bee based on the network topology structure to obtain an iterative spider bee, which may include:
[0188] S301, determining whether each initial spider bee performs hunting behavior or mating behavior.
[0189] The trade-off probability TR between hunting and mating and the random number r1 are preset. If r1<TR, each initial spider bee is determined to perform hunting behavior. If r1≥TR, each initial spider bee is determined to perform mating behavior, wherein r1 is a random number selected from [0,1].
[0190] S302: If each initial spider bee performs mating behavior, a male spider bee is generated according to each initial spider bee based on the network topology.
[0191] If it is determined that each initial spider bee is to perform mating behavior, a male spider bee is generated according to each initial spider bee based on the network topology structure. The male spider bee corresponds to a QKD node group, and adjacent QKD nodes in the QKD node group have an interconnected relationship.
[0192] Among them, mating behavior refers to the mating of male and female spider wasps to produce offspring, and the gender of the spider wasp offspring is determined by the size of the host. Each new egg represents a new potential option.
[0193] A male spider bee can be represented as:
[0194]
[0195] in, It's a male spider wasp. is the initial spider bee, β and β1 are two numbers randomly generated according to the normal distribution, e is an exponential constant, l∈(-2,1) and is randomly generated, and The expression is as follows:
[0196]
[0197] Where i≠a≠b≠c, They represent initial spider bees randomly selected from the initial spider bee population, a, b, and c represent the identifiers of the randomly selected initial spider bees in the initial spider bee population, Represents the initial spider bee They represent the service quality parameters of the initial spider bee, Represents the initial spider bee Quality of service parameters.
[0198] S303. According to a preset crossover probability, a uniform crossover algorithm is executed on each initial spider bee and the male spider bee to obtain an iterative spider bee.
[0199] Among them, the initial spider bee is a female spider bee, the preset crossover probability is CR, and the preset crossover probability is CR. The uniform crossover algorithm is executed on each initial spider bee and the male spider bee to obtain the iterative spider bee.
[0200] Iterative spider bee is represented as:
[0201]
[0202] Among them, Crossover is a uniform crossover algorithm with a crossover probability of CR. and They represent male spider bees (i.e. initial spider bees) and female spider bees respectively.
[0203] In this embodiment, based on the spider bee optimization algorithm, through efficient global search and local development strategies, spider bee iteration can be performed quickly, which is convenient for subsequent rapid identification and optimization of routing paths in the network, and significantly improves data transmission efficiency and network stability.
[0204] Figure 4 Schematic diagram of the process of determining the quantum key routing path provided in the embodiment of the present application Figure 4 ,like Figure 4 As shown, in an optional implementation, in the above step S104, the spider bee optimization algorithm is used to iterate each initial spider bee based on the network topology structure to obtain an iterative spider bee, which may also include:
[0205] S304: If each initial spider bee performs hunting behavior, determine whether each initial spider bee performs hunting behavior or nesting behavior under the hunting behavior.
[0206] If r1<TR, it is determined that each initial spider bee performs hunting behavior, and then according to the identification of each initial spider bee in the initial spider bee population, the size of the spider bee population and the current number of iterations, it is determined whether each initial spider bee performs hunting behavior or nesting behavior under the hunting behavior.
[0207] As an example, each initial spider bee is identified as i in the initial spider bee population, and the size of the spider bee population is N. If i<N×k, then each initial spider bee is determined to perform hunting behavior under hunting behavior; if i≥N×k, then each initial spider bee is determined to perform nesting behavior under hunting behavior.
[0208] in, iter is the current number of iterations, which can be 1, 2, 3, etc. Max_iter is the preset maximum number of iterations.
[0209] S305. If each initial spider bee performs hunting behavior and the hunting is successful, then based on the network topology structure, a preset random exploration algorithm is used to iterate each initial spider bee to generate an iterative spider bee.
[0210] After determining that each initial spider bee performs hunting behavior, further judge whether the hunting is successful or unsuccessful. If p<k, it is determined that each initial spider bee has successfully hunted, indicating that the initial spider bee has explored a certain area and hunted. The spider bee explores the area in two step sizes. Based on the network topology, a preset random exploration algorithm is used to iterate each initial spider bee to generate an iterative spider bee, where p is a random number randomly selected from [0,1].
[0211] Among them, the initial spider bee explores the area in two ways, and the iterative spider bee can be expressed as:
[0212]
[0213] in, It is an iterative spider bee, It is the initial spider bee. They represent the initial spider bees randomly selected from the initial spider bee population, a, b, and c represent the identifications of the randomly selected initial spider bees in the initial spider bee population, and r3 and r4 are random numbers randomly selected from [0,1].
[0214] μ1=|rn|*r1,μ2=B*cos(2πl), And r1∈(0,1),l∈(-2,1),rn~N(0,1) are randomly generated, and B is the preset search strength.
[0215] In an optional embodiment, in the above step S104, using the spider bee optimization algorithm, based on the network topology structure, iterating each initial spider bee to obtain an iterative spider bee, may include:
[0216] S306. If each initial spider bee performs hunting behavior but fails, a preset random stay-away algorithm is used to iterate each initial spider bee based on the network topology structure to generate an iterative spider bee.
[0217] When it is determined that each initial spider bee performs hunting behavior, if p≥k, it is determined that each initial spider bee fails in hunting, and a preset random stay-away algorithm is used to iterate each initial spider bee based on the network topology to generate an iterative spider bee.
[0218] If the hunting fails, the initial spider bee can move away from the prey in two steps, and the iterative spider bee can be expressed as:
[0219]
[0220] in, It is an iterative spider bee, It is the initial spider bee. is a random vector between [0,1], is a random vector generated from a normal distribution between -k and k.
[0221]
[0222]
[0223] 6 is a random number between [0,1], iter is the current iteration number, and Max_iter is the maximum iteration number.
[0224] In an optional embodiment, in the above step S104, using the spider bee optimization algorithm, based on the network topology structure, iterating each initial spider bee to obtain an iterative spider bee, may include:
[0225] S307: If each initial spider bee performs nest-building behavior, a preset random area nest-building algorithm is used to iterate each initial spider bee based on the network topology structure to generate an iterative spider bee.
[0226] If i ≥ N × k, the nesting behavior of each initial spider bee under the hunting behavior is determined, and a preset random nesting algorithm is used to iterate each initial spider bee based on the network topology to generate an iterative spider bee.
[0227] After the spider is caught by the initial spider bee, it will be dragged into the nest, so it is necessary to determine where the initial spider bee builds its nest. There are two ways of nesting behavior, one is to find the best nesting area, and the other is to not find the best nesting area and randomly enter other areas.
[0228] Among them, the optimal nesting area corresponds to the case where r3 < r4, and other areas correspond to the cases outside r3 < r4. The iterative spider wasp can be expressed as:
[0229]
[0230] Among them, is the iterative spider wasp, is the initial spider wasp, and γ is the number generated by Levy. represents the spider wasp that is the best up to the current time (i.e., the current optimal solution). Levy is a random walk model that simulates the foraging behavior of organisms.
[0231] In this embodiment, based on the spider wasp optimization algorithm, through an efficient global search and local development strategy, the spider wasp iteration can be carried out quickly, which is convenient for quickly identifying and optimizing the routing path in the network subsequently, and significantly improving the data transmission efficiency and network stability.
[0232] On the basis of the above embodiment, the quantum key distribution process of the present application will be described below in combination with a specific embodiment.
[0233] Figure 5 is a schematic diagram of a specific quantum key distribution process provided by an embodiment of the present application. As Figure 5 shown, it includes the following steps:
[0234] Step 1: Input the quality of service parameters of the QKD node.
[0235] Step 2: Generate an initial spider wasp population.
[0236] Step 3: Find the optimal spider wasp population for the current iteration.
[0237] In the process of finding the optimal spider wasp, if r1 < TR, then perform the hunting behavior; otherwise, perform the mating behavior to generate an iterative spider wasp.
[0238] If i < N × k, then perform the hunting behavior of the prey-catching behavior; otherwise, perform the hunting behavior of the nesting behavior.
[0239] In the prey-catching behavior, if p < k, then the prey-catching is successful, and the prey is killed, and an iterative spider wasp is explored and generated; otherwise, stay away from the prey and stay away from generating an iterative spider wasp.
[0240] In the nesting behavior, if r3 < r4, then generate an iterative spider wasp based on the optimal nesting area; otherwise, randomly enter other areas to generate an iterative spider wasp.
[0241] Step 4: Update the optimal spider wasp population.
[0242] Step 5: Update the size of the spider wasp population.
[0243] Step 6: Determine whether the preset maximum number of iterations has been reached.
[0244] If yes, then output the optimal spider bee; if no, then return to step 3 and continue execution.
[0245] In this solution, the dynamic resource allocation capability of the Spider Bee optimization algorithm enables it to adjust routing strategies according to real-time network status and user needs, ensuring the priority of key services while improving the security and adaptability of the network. In addition, the Spider Bee optimization algorithm enhances the response speed and accuracy of the user network by reducing factors such as transmission delay, error rate, and packet loss rate, thereby effectively improving the network's availability and service quality, meeting the requirements of different service level agreements (SLAs), and providing a highly efficient, stable, and secure routing optimization solution for quantum key distribution controllers.
[0246] Figure 6 This is a schematic diagram of the structure of a device for determining a quantum key routing path provided in an embodiment of the present application, which can be integrated in a quantum key distribution controller.
[0247] like Figure 6 As shown, the device may include:
[0248] An acquisition module 501 is used to obtain service quality parameters of multiple QKD nodes in a quantum key distribution network;
[0249] A processing module 502 is used to establish a network topology structure of a QKD network according to multiple QKD nodes;
[0250] The processing module 502 is further used to initialize and generate an initial spider bee population based on the network topology structure, where the initial spider bee population includes: a plurality of initial spider bees, each initial spider bee corresponding to a random QKD node group;
[0251] The processing module 502 is further used to adopt a spider bee optimization algorithm to iterate each initial spider bee based on the network topology structure to obtain an iterated spider bee;
[0252] The processing module 502 is further used to calculate the service quality parameters of each initial spider bee according to the service quality parameters of the random QKD node group, and calculate the service quality parameters of the iterative spider bee according to the service quality parameters of the iterative QKD node group corresponding to the iterative spider bee;
[0253] A determination module 503, configured to determine an optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee;
[0254] The processing module 502 is also used to generate a quantum key routing path for key negotiation according to the target QKD node group corresponding to the optimal spider bee.
[0255] In an optional implementation manner, the determination module 503 is specifically configured to:
[0256] According to the service quality parameter of each initial spider bee and the service quality parameter of the iterative spider bee, determining a first preset number of first spider bees from the multiple initial spider bees and the iterative spider bees as a first spider bee population;
[0257] Using a spider bee optimization algorithm, based on the network topology, iterate each first spider bee in the first spider bee population to obtain a new iterative spider bee;
[0258] According to the service quality parameter of each first spider bee and the service quality parameter of the new iterative spider bee, determining a second preset number of second spider bees from a first preset number of first spider bees and the new iterative spider bees as a second spider bee population until a preset maximum number of iterations is reached, and determining the spider bee population when the preset maximum number of iterations is reached as the target spider bee population;
[0259] According to the service quality parameters of each spider bee in the target spider bee population, the optimal spider bee is determined from the target spider bee population.
[0260] In an optional implementation, the processing module 502 is specifically configured to:
[0261] Determine whether each initial spider bee performs hunting behavior or mating behavior;
[0262] If each initial spider bee performs mating behavior, a male spider bee is generated based on the network topology according to each initial spider bee;
[0263] According to the preset crossover probability, the uniform crossover algorithm of each initial spider bee and the male spider bee is executed to obtain the iterative spider bee.
[0264] In an optional implementation, the processing module 502 is specifically configured to:
[0265] If each initial spider bee performs hunting behavior, determine whether each initial spider bee performs hunting behavior or nesting behavior under the hunting behavior;
[0266] If each initial spider bee performs hunting behavior and succeeds, then based on the network topology, a preset random exploration algorithm is used to iterate each initial spider bee to generate an iterative spider bee.
[0267] In an optional implementation, the processing module 502 is specifically configured to:
[0268] If each initial spider bee performs hunting behavior but fails, a preset random stay-away algorithm is used to iterate each initial spider bee based on the network topology to generate an iterative spider bee.
[0269] In an optional implementation, the processing module 502 is specifically configured to:
[0270] If each initial spider bee performs nesting behavior, a preset random area nesting algorithm is used to iterate each initial spider bee based on the network topology to generate an iterative spider bee.
[0271] In an optional implementation manner, the quality of service parameter includes at least one of the following parameters:
[0272] Throughput, quantum key response delay, quantum key response delay variation, quantum key transmission error rate, quantum key transmission loss rate, service time availability parameters, service recovery time.
[0273] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0274] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The above-mentioned quantum key distribution controller can be deployed in the electronic device.
[0275] like Figure 7 As shown, the device includes: a processor 601, a memory 602 and a bus 603. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus 603, and the processor 601 executes the machine-readable instructions to perform the above method.
[0276] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is executed.
[0277] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0278] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0279] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0280] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0281] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0282] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0283] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for determining a quantum key routing path, characterized in that: include: Obtaining service quality parameters of multiple QKD nodes in a quantum key distribution QKD network; Establishing a network topology structure of the QKD network according to the plurality of QKD nodes; Based on the network topology, an initial spider bee population is initialized and generated, wherein the initial spider bee population includes: a plurality of initial spider bees, each initial spider bee corresponds to a random QKD node group; Using a spider bee optimization algorithm, based on the network topology structure, iterate each of the initial spider bees to obtain an iterative spider bee; Calculating the quality of service parameters of each initial spider bee according to the quality of service parameters of the random QKD node group, and calculating the quality of service parameters of the iterative spider bee according to the quality of service parameters of the iterative QKD node group corresponding to the iterative spider bee; Determining an optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee; According to the target QKD node group corresponding to the optimal spider bee, a quantum key routing path is generated for key negotiation.
2. The method according to claim 1, characterized in that: The determining the optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee comprises: Determining a first preset number of first spider bees from the multiple initial spider bees and the iterative spider bees as a first spider bee population according to the service quality parameter of each initial spider bee and the service quality parameter of the iterative spider bee; Using a spider bee optimization algorithm, based on the network topology, iterate each first spider bee in the first spider bee population to obtain a new iterative spider bee; According to the service quality parameter of each first spider bee and the service quality parameter of the new iterative spider bee, determining a second preset number of second spider bees from the first preset number of first spider bees and the new iterative spider bees as a second spider bee population until a preset maximum number of iterations is reached, and determining the spider bee population when the preset maximum number of iterations is reached as the target spider bee population; The optimal spider bee is determined from the target spider bee population according to the service quality parameters of each spider bee in the target spider bee population.
3. The method according to claim 1, characterized in that The method adopts the spider bee optimization algorithm, based on the network topology structure, to iterate each initial spider bee to obtain an iterative spider bee, including: Determining whether each of the initial spider bees performs hunting behavior or mating behavior; If each of the initial spider bees performs mating behavior, generating male spider bees according to each of the initial spider bees and based on the network topology structure; According to the preset crossover probability, a uniform crossover algorithm is executed on each of the initial spider bees and the male spider bee to obtain the iterative spider bee.
4. The method according to claim 3, characterized in that The method adopts the spider bee optimization algorithm, based on the network topology structure, to iterate each initial spider bee to obtain an iterative spider bee, including: If each of the initial spider bees performs a hunting behavior, determining whether each of the initial spider bees performs a hunting behavior or a nesting behavior under the hunting behavior; If each of the initial spider bees executes the hunting behavior and the hunting is successful, then based on the network topology structure, a preset random exploration algorithm is used to iterate each of the initial spider bees to generate the iterative spider bee.
5. The method according to claim 4, characterized in that The method further comprises: adopting a spider bee optimization algorithm, iterating each initial spider bee based on the network topology structure to obtain an iterative spider bee, and further comprising: If each of the initial spider bees executes the hunting behavior but fails, a preset random avoidance algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
6. The method according to claim 4, characterized in that The method further comprises: adopting a spider bee optimization algorithm, iterating each initial spider bee based on the network topology structure to obtain an iterative spider bee, and further comprising: If each of the initial spider bees performs the nest-building behavior, a preset random area nest-building algorithm is used to iterate each of the initial spider bees based on the network topology to generate the iterative spider bee.
7. The method according to claim 1, characterized in that The service quality parameter includes at least one of the following parameters: Throughput, quantum key response delay, quantum key response delay variation, quantum key transmission error rate, quantum key transmission loss rate, service time availability parameters, service recovery time.
8. A device for determining a quantum key routing path, characterized in that: include: An acquisition module, used to obtain service quality parameters of multiple QKD nodes in a quantum key distribution QKD network; A processing module, configured to establish a network topology structure of the QKD network according to the plurality of QKD nodes; The processing module is further used to initialize and generate an initial spider bee population based on the network topology structure, wherein the initial spider bee population includes: a plurality of initial spider bees, each initial spider bee corresponding to a random QKD node group; The processing module is further used to adopt a spider bee optimization algorithm to iterate each initial spider bee based on the network topology structure to obtain an iterative spider bee; The processing module is further used to calculate the service quality parameters of each initial spider bee according to the service quality parameters of the random QKD node group, and calculate the service quality parameters of the iterative spider bee according to the service quality parameters of the iterative QKD node group; A determination module, configured to determine an optimal spider bee according to the service quality parameters of each initial spider bee and the service quality parameters of the iterative spider bee; The processing module is also used to generate a quantum key routing path for key negotiation according to the target QKD node group corresponding to the optimal spider bee.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Quantum cryptography network dynamic routing method
CN103001875A
Key service routing method and system of quantum satellite network
CN116707617A
Model hyper-parameter determination method, target detection method, device, equipment and medium
CN118536537A
Quantum key distribution routing method and device, equipment and medium
CN118869570A
Cited By
Robot communication method and device based on multi-network communication
CN121098896A