Dynamic optimization method and system for quantum key distribution network, terminal and storage medium

By using a graph neural network dynamic model to process quantum channel state information in real time, the instability problem of quantum key distribution networks in dynamic environments is solved, the key rate and system efficiency are improved, and dynamic optimization of quantum key distribution networks is realized.

CN121907443APending Publication Date: 2026-04-21深圳开鸿数字产业发展有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511995530.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing quantum key distribution networks are unstable in dynamic environments, leading to high quantum error rates and reduced key rates. Furthermore, existing methods lack deep integration across quantum hardware and operating systems, making them unable to respond to channel jitter in real time and exhibiting poor protocol compatibility.

Method used

A graph neural network dynamic model is used to process quantum channel state information in real time. By acquiring features such as quantum bit error rate, key generation rate and Euclidean distance between nodes, a graph neural network dynamic model is constructed to determine the link selection probability and generate key injection instructions, thereby realizing the dynamic optimization of the quantum key distribution network.

Benefits of technology

It enables real-time optimization in dynamic environments, improves key rate, reduces configuration complexity, enhances system efficiency and security, and supports millisecond-level key updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907443A_ABST
    Figure CN121907443A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum key distribution network dynamic optimization method and system, a terminal and a storage medium. The method comprises the following steps: obtaining quantum channel state information in a quantum network; constructing a graph neural network dynamic model, and inputting the quantum channel state information into the graph neural network dynamic model to obtain link selection probabilities corresponding to a plurality of links; determining a key injection instruction according to the plurality of link selection probabilities; and generating an execution result according to the key injection instruction. According to the method, real-time optimization under channel jitter can be realized, and the key distribution efficiency is improved, so that the key rate can be improved, and the system efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet security technology, and in particular to a method, system, terminal, and computer-readable storage medium for dynamic optimization of quantum key distribution networks. Background Technology

[0002] Quantum key distribution (QKD) networks are unstable in dynamic environments (such as industrial noise or channel fluctuations), easily leading to high quantum bit error rates (QBER > 0.15) and key rate degradation. Existing methods lack deep integration across quantum hardware and operating systems, causing optimization algorithms (such as static GNN models) to become disconnected from actual execution, failing to respond to changes in real time. Limitations of existing methods: Traditional optimization algorithms rely on offline model training and cannot adapt to channel jitter (requiring high-frequency updates); quantum protocols (such as BB84 / E91) have poor compatibility with classical systems, increasing configuration complexity; OpenHarmony services do not fully utilize quantum data feedback, leading to delayed decision-making.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] The main objective of this invention is to provide a dynamic optimization method, system, terminal, and computer-readable storage medium for quantum key distribution networks. This invention aims to solve the problems in the prior art where quantum key distribution network optimization algorithms rely on offline training models, cannot adapt to channel jitter, and have high quantum key update delays, resulting in low system efficiency.

[0005] To achieve the above objectives, the present invention provides a dynamic optimization method for quantum key distribution networks, the method comprising the following steps: Obtain quantum channel state information in quantum networks; A graph neural network dynamic model is constructed, and the quantum channel state information is input into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links. The key injection instruction is determined based on the multiple link selection probabilities. The execution result is generated based on the key injection instruction.

[0006] Optionally, in the aforementioned dynamic optimization method for quantum key distribution networks, the quantum channel state information is a feature data stream; The acquisition of quantum channel state information in the quantum network specifically includes: Acquire raw photon counting data streams from active links in a quantum network; The original photon counting data stream is processed to obtain a feature vector; The feature vectors are structured and filtered to obtain a feature data stream.

[0007] Optionally, the dynamic optimization method for the quantum key distribution network, wherein processing the original photon counting data stream to obtain a feature vector specifically includes: Based on the original photon counting data stream, calculate the quantum error rate, key generation rate, and Euclidean distance between nodes; The quantum error rate, the key generation rate, and the Euclidean distance between nodes are normalized to obtain a feature vector.

[0008] Optionally, in the quantum key distribution network dynamic optimization method, the feature data stream includes a screening three-dimensional tensor and a screening link identifier; The step of structuring and filtering the feature vector to obtain the feature data stream specifically includes: Based on the feature vector, the parameters of each active link are used to form a corresponding three-dimensional tensor, timestamp, and link identifier; By filtering multiple three-dimensional tensors, multiple active links that meet the requirements are obtained, along with the filtered three-dimensional tensors and the filtered link identifiers.

[0009] Optionally, in the quantum key distribution network dynamic optimization method, the graph neural network dynamic model includes a convolutional layer, a dynamic attention layer, an edge feature processing layer, and a link prediction optimization layer.

[0010] Optionally, the dynamic optimization method for the quantum key distribution network, wherein inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probabilities corresponding to each of the multiple links specifically includes: The convolutional layer determines the node embeddings corresponding to the quantum network; The dynamic attention layer updates the node embedding based on the node embedding, the filtering 3D tensor, and the filtering link identifier; The edge feature processing layer obtains the edge feature embedding based on the filtered three-dimensional tensor; The link prediction optimization layer obtains the link selection probability based on the updated node embedding and the edge feature embedding.

[0011] Optionally, in the aforementioned dynamic optimization method for quantum key distribution networks, determining the node embedding corresponding to the quantum network specifically includes: Obtain the structural characteristics of quantum network nodes; Based on the structural features, the node embedding is obtained.

[0012] Optionally, in the quantum key distribution network dynamic optimization method, the screening three-dimensional tensor includes screening quantum error rate, screening key generation rate and screening Euclidean distance between nodes, and the updated node embedding includes global topology node embedding and noise-aware node embedding. The step of obtaining the updated node embedding based on the node embedding, the filtered 3D tensor, and the filtered link identifier specifically involves: Based on the node embedding, the filtered quantum error rate, the filtered key generation rate, and the filtered link identifier, output the global topology node embedding and the noise-aware node embedding; The step of obtaining the edge feature embedding based on the selected 3D tensor is specifically as follows: The edge feature embedding is determined based on the Euclidean distance between the selected nodes.

[0013] Optionally, the dynamic optimization method for the quantum key distribution network, wherein obtaining the link selection probability based on the updated node embedding and the edge feature embedding specifically includes: The global topology node embedding, the noise-aware node embedding, and the edge feature embedding are fused to obtain a concatenated vector. Output the link selection probability corresponding to each of the selected link identifiers based on the splicing vector.

[0014] Optionally, in the aforementioned dynamic optimization method for quantum key distribution networks, determining the key injection instruction based on multiple link selection probabilities specifically includes: A link selection instruction is obtained based on multiple link selection probabilities; The target link is determined from a plurality of filtered link identifiers according to the link selection instruction, and the key injection instruction is determined according to the target link.

[0015] Optionally, the dynamic optimization method for the quantum key distribution network, wherein obtaining the link selection instruction based on multiple link selection probabilities specifically includes: Convert the multiple link selection probabilities into a cumulative probability distribution; A random number is generated and matched with the cumulative probability distribution to generate a link selection instruction.

[0016] Optionally, in the aforementioned dynamic optimization method for quantum key distribution networks, the step of determining the key injection instruction based on the target link specifically includes: The corresponding working key is obtained based on the target link; The working key is encrypted into ciphertext, and a message authentication code is generated; The key injection instruction is determined based on the ciphertext, the message authentication code, and the target link.

[0017] Optionally, in the aforementioned dynamic optimization method for quantum key distribution networks, the step of generating an execution result based on the key injection instruction specifically includes: The key injection command is verified. If the verification passes, the key injection command is decrypted to obtain the plaintext key. The execution result is generated based on the plaintext key.

[0018] Furthermore, to achieve the above objectives, the present invention also provides a dynamic optimization system for quantum key distribution networks. This system is used to implement the dynamic optimization method for quantum key distribution networks described in any of the above schemes. The dynamic optimization system comprises: The information acquisition module is used to acquire quantum channel state information in the quantum network; The model building and probability output module is used to build a graph neural network dynamic model, inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links; A key instruction generation module is used to determine a key injection instruction based on multiple link selection probabilities; The execution module is used to generate an execution result based on the key injection instruction.

[0019] Optionally, in the aforementioned quantum key distribution network dynamic optimization system, the information acquisition module includes: The raw data acquisition unit is used to acquire the raw photon counting data stream in the active links of the quantum network. The preprocessing unit is used to process the original photon counting data stream to obtain a feature vector; The structuring and preliminary filtering unit is used to perform structuring and filtering based on the feature vector to obtain a feature data stream.

[0020] Optionally, in the aforementioned quantum key distribution network dynamic optimization system, the model construction and probability output module includes: A global relation modeling unit is used by the convolutional layer to determine the node embeddings corresponding to the quantum network. A local noise adaptive unit is used by the dynamic attention layer to obtain updated node embeddings based on the node embeddings, the filtering 3D tensor, and the filtering link identifiers. A quantum physics processing unit is used by the edge feature processing layer to obtain the edge feature embedding based on the selected three-dimensional tensor; The final decision unit is used by the link prediction optimization layer to obtain the link selection probability based on the updated node embedding and the edge feature embedding.

[0021] Optionally, in the aforementioned quantum key distribution network dynamic optimization system, the key instruction generation module includes: The selection instruction determination unit is used to obtain a link selection instruction based on multiple link selection probabilities. The injection instruction generation unit determines a target link from multiple filtered link identifiers according to the link selection instruction, and determines a key injection instruction according to the target link.

[0022] Optionally, in the aforementioned quantum key distribution network dynamic optimization system, the execution operation module includes: The verification and decryption unit is used to verify the key injection command. If the verification passes, the key injection command is decrypted to obtain the plaintext key. The status receipt unit is used to generate an execution result based on the plaintext key.

[0023] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a quantum key distribution network dynamic optimization program stored in the memory and executable on the processor, wherein when the quantum key distribution network dynamic optimization program is executed by the processor, it implements the steps of the quantum key distribution network dynamic optimization method as described above.

[0024] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a quantum key distribution network dynamic optimization program, which, when executed by a processor, implements the steps of the quantum key distribution network dynamic optimization method as described above.

[0025] In this invention, quantum channel state information in a quantum network is acquired; a graph neural network dynamic model is constructed, and the quantum channel state information is input into the graph neural network dynamic model to obtain the link selection probabilities corresponding to multiple links; a key injection instruction is determined based on the multiple link selection probabilities; and an execution result is generated based on the key injection instruction. This invention achieves real-time optimization under channel jitter (such as QBER fluctuations) through GNN dynamic modeling and feedback loop, deeply integrates quantum hardware and the OpenHarmony operating system, eliminates protocol compatibility layers, reduces configuration complexity, hard-codes quantum physical characteristics into the algorithm, improves key distribution efficiency, thereby increasing the key rate and improving system efficiency. Attached Figure Description

[0026] Figure 1 This is a deep integration schematic diagram of a preferred embodiment of the dynamic optimization method for quantum key distribution networks of the present invention; Figure 2This is a flowchart of a preferred embodiment of the dynamic optimization method for quantum key distribution networks of the present invention; Figure 3 This is a schematic diagram of the specific implementation steps of the entire execution process in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention; Figure 4 This is a flowchart illustrating the specific implementation process of step S10 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 5 This is a flowchart illustrating the specific implementation process of step S12 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 6 This is a flowchart illustrating the specific implementation process of step S13 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 7 This is a flowchart illustrating the specific implementation process of step S20 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 8 This is a flowchart illustrating the specific implementation process of step S21 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 9 This is a flowchart illustrating the specific implementation process of step S24 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 10 This is a flowchart illustrating the specific implementation process of step S30 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 11 This is a flowchart illustrating the specific implementation process of step S31 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 12 This is a flowchart illustrating the specific implementation process of step S32 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 13 This is a flowchart illustrating the specific implementation process of step S40 in a preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention. Figure 14 This is a schematic diagram of a structure of the quantum key distribution network dynamic optimization system of the present invention; Figure 15 This is another schematic diagram of the dynamic optimization system for quantum key distribution networks of the present invention; Figure 16 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and effects of this application clearer and more explicit, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only possible technical implementations of this application and not all possible implementations. Based on the embodiments in this application, those skilled in the art can obtain other embodiments without creative effort, and these embodiments are also within the protection scope of this application.

[0028] First, let's introduce the terms used in the embodiments of this application: QKD (Quantum Key Distribution): This application generates unconditionally secure keys using quantum mechanical principles (such as photon polarization and entanglement), overcoming the limitation of classical encryption in terms of "computational security".

[0029] QBER (Quantum Bit Error Rate): The proportion of erroneous bits to the total number of bits in a quantum channel (range 0~0.25), directly reflecting the channel noise level (such as photon loss and environmental interference), and is a key indicator for link selection (the patent constrains QBER ≤ 0.15).

[0030] OpenHarmony (OH): An open-source HarmonyOS operating system. It's a low-level system for device management, security services, and task scheduling, enabling collaboration between quantum algorithms and classical devices (such as "OH edge devices" and "OH security service framework").

[0031] GNN (Graph Neural Network): A core algorithm used to model the topology of quantum networks. It predicts the optimal link by learning the features of nodes (quantum devices) and edges (links) (e.g., "GNN dynamic modeling" or "graph neural network optimization layer").

[0032] Transformer: The Transformer model is used to capture long-distance node dependencies (such as long-distance communication over 50km) by associating photon paths across relays through a self-attention mechanism (such as "Transformer convolutional layers").

[0033] GATv2 (Graph Attention Network v2): The second version of the graph attention network. An algorithm for dynamically adjusting link weights, reducing the impact of high QBER links through a "noise-adaptive attention mechanism" (such as the "GATv2 dynamic attention layer").

[0034] MLP (Multi-Layer Perceptron): A neural network module used to independently process quantum-specific side features (such as channel loss and fidelity) to avoid classical features interfering with quantum physical properties (such as "side feature MLP processing").

[0035] BB84 / E91: Quantum key distribution protocol; BB84: A QKD protocol based on photon polarization, with a maximum transmission distance of approximately 120km (the patent restricts the link distance to ≤120km). E91: A quantum entanglement-based QKD protocol with a maximum transmission distance of approximately 75 km (limited by the brightness of the entanglement source).

[0036] PKI (Public Key Infrastructure): A key management system in classical networks. This application uses a "quantum-classical protocol converter" to adapt quantum keys to PKI format (such as X.509 certificates), achieving compatibility between quantum and classical systems.

[0037] SELinux (Security-Enhanced Linux): A security-enhanced Linux distribution. It is used for security policy control of OpenHarmony devices. It intercepts unauthorized key access through the "SELinux policy engine" to ensure the security of the key lifecycle (e.g., "SELinux_j(ctx) = allow").

[0038] HKDF (HMAC-based Key Derivation Function): An HMAC-based key derivation function. It is used to extend quantum key materials, converting short keys into long keys that meet the requirements of classical encryption (such as the 2048-bit key required for X.509 certificates).

[0039] SM4: Chinese national standard symmetric encryption algorithm. A symmetric encryption standard (128-bit block size, 128-bit key length), this application is used for key injection and data encryption.

[0040] In related technologies, current dynamic optimization techniques for quantum key distribution (QKD) networks mainly rely on traditional static models or offline training methods. Their core components include: Static GNN models: These are based on pre-trained graph neural networks (GNNs) to process the network topology, but cannot adapt to dynamic channel changes in real time (such as fluctuations in quantum bit error rate (QBER) and key rate drops). Independent quantum protocol stacks: Quantum communication protocols (such as BB84 / E91) are separated from classical operating systems (such as OpenHarmony), requiring additional compatibility layers and increasing system complexity. Offline optimization algorithms: These rely on historical data to train the model and cannot respond to real-time channel jitter (such as electromagnetic interference in industrial environments and photon loss due to temperature changes).

[0041] Disadvantages of existing technologies: Poor dynamic adaptability: Static models cannot be updated in real time, leading to a significant drop in key rates in high QBER (>0.15) scenarios. System fragmentation: Insufficient deep integration between quantum protocols and classical operating systems (such as OpenHarmony) results in high scheduling latency for key distribution tasks. Lack of integration of physical constraints: Quantum physical characteristics (such as QBER threshold and maximum protocol distance) are not hard-coded into the algorithm, causing link prediction to deviate from actual physical conditions.

[0042] This application offers an innovative solution to the core technical pain points in quantum communication networks: it utilizes dynamic GNN modeling (Transformer convolution and GATv2 attention layers) to process channel parameters in real time, supporting dynamic task decomposition (e.g., incremental training mechanisms), and integrates with the OpenHarmony quantum key management module to achieve end-to-end collaborative execution. Key advantages include: firstly, differentially hard-coding quantum physics constraints (QBER threshold ≤ 0.15) into the link prediction algorithm, improving the key rate by 17%; secondly, a protocol converter component seamlessly bridges quantum signals and the OpenHarmony PKI, eliminating system fragmentation; and thirdly, a performance feedback loop triggers dynamic updates based on monitoring data (e.g., a GATv2 weighted mechanism), ensuring end-to-end adaptability. This solution is highly operable, enhancing overall security, efficiency, and cost-effectiveness.

[0043] The embodiments of this application can be applied to industry sectors with high security and real-time dynamic optimization requirements, specifically covering the following sectors: Financial transaction security platform: Used in cross-border payments or high-frequency trading systems to dynamically optimize quantum key distribution paths and ensure millisecond-level key updates. Use cases include quantum communication networks between bank data centers and edge devices. Quantum channel parameters (such as QBER and key rate) are dynamically modeled and processed in real time using GNNs, combined with the OpenHarmony distributed device management engine to schedule tasks, significantly improving transaction security and efficiency.

[0044] Key infrastructure for the Industrial Internet: Automated control networks applied to smart factories or energy grids, optimizing quantum communication links in high-temperature, high-humidity, or electromagnetic interference environments. The OpenHarmony security service framework is tightly integrated with the quantum key management module, performing device-level key injection and lifecycle control, supporting real-time adaptive routing decisions for industrial devices (such as sensor nodes).

[0045] Smart City Communication Systems: Optimizing large-scale quantum node deployment in municipal security or emergency communication networks. The GNN-OpenHarmony collaborative optimization core handles dynamic task decomposition (e.g., hierarchical control of network topology), and ensures the robustness of city-level key distribution networks through a feedback closed-loop calibration model, suitable for multi-protocol compatible environments such as cross-platform video surveillance systems.

[0046] Potential beneficiaries include: financial services (banks, securities firms), government and public safety departments, industrial automation (manufacturing, energy), and IoT device suppliers, with seamless integration into existing OpenHarmony ecosystem edge computing devices. The core support for this scenario stems from key components in the implementation steps: quantum hardware layer data acquisition for real-time channel monitoring; GNN dynamic modeling to handle complex network topologies; and the OpenHarmony device management engine to achieve collaborative execution scheduling (such as dynamic load balancing for key distribution tasks), ensuring high application practicality.

[0047] See also in this application. Figure 1 The hardware-system-algorithm three-layer interconnection is achieved. Quantum physics layer → OH edge device: directly collects channel parameters, avoiding data conversion losses in traditional systems; GNN optimization layer ←→ OpenHarmony layer: bidirectional arrows realize closed-loop control of algorithm decision-making and system execution.

[0048] GNN-OpenHarmony collaborative optimization. Feature sharing: Device authentication data provided by the OH security service framework is injected into the features of GNN nodes; Dynamic feedback: The network topology map is updated in real time with the device execution results (red data stream).

[0049] Quantum sensing algorithm module design. Dedicated feature processing: Quantum channel parameters are processed through an independent MLP module, preserving physical properties; Protocol adaptation mechanism: BB84 / E91 protocol parameters are pre-set in the GATv2 attention layer.

[0050] OpenHarmony deep integration points, such as Figure 1 As shown.

[0051] In this application, dynamic adaptability is achieved through dynamic modeling and feedback loops using GNNs to realize real-time optimization under channel jitter (such as QBER fluctuations). Cross-system integration is achieved by deeply integrating quantum hardware with the OpenHarmony operating system, eliminating protocol compatibility layers and reducing configuration complexity. Physical constraint fusion involves hard-coding quantum physical properties (such as QBER threshold and maximum protocol distance) into the algorithm to improve key distribution efficiency. This improves the key rate (through hard-coding physical constraints and dynamic attention mechanisms), keeping QBER within a threshold of ≤0.15. System efficiency is improved, and deep integration with OpenHarmony eliminates quantum-classical protocol conversion latency, supporting millisecond-level key updates (such as in high-frequency financial trading scenarios). Feedback loops and incremental learning mechanisms ensure adaptive recovery of the network under sudden interference (such as industrial electromagnetic interference and temperature changes). Seamless integration into existing OpenHarmony ecosystem edge devices reduces the deployment and maintenance costs of quantum networks.

[0052] The preferred embodiment of the quantum key distribution network dynamic optimization method of the present invention, such as... Figure 2 and Figure 3 As shown, the dynamic optimization method for the quantum key distribution network includes the following steps: Step S10: Obtain quantum channel state information in the quantum network.

[0053] Specifically, the quantum channel state information is a feature data stream.

[0054] In this embodiment of the application, step K1 and the quantum channel parameter acquisition formula are as follows: ; For the first A set of quantum channel parameters collected; Total number of active links; ; For the first Quantum bit error rate of a single link (range 0-0.25); ; For the first Key generation rate per link (in kbps); For the first The Euclidean distance between nodes on the link; This is the set of currently active quantum links.

[0055] Explanation of the principle: The physical characteristics of the channel are captured in real time using a quantum photodetector, and three sets of parameters constitute the dynamic tensor input. QBER reflects the channel noise level, key rate characterizes transmission efficiency, and distance affects photon attenuation rate. The sampling frequency needs to be ≥10Hz to accommodate channel jitter.

[0056] like Figure 4 As shown, step S10 specifically includes: Step S11: Obtain the raw photon counting data stream from the active links of the quantum network.

[0057] Specifically, step S11 is implemented as follows: Parameter definition and physical perception (defining "what to collect") are the foundation of all subsequent work. First, it must be clarified which physical parameters can accurately characterize the state of the quantum channel. These parameters are not arbitrarily chosen, but are determined by the physical nature of quantum communication and the requirements of the subsequent GNN model.

[0058] Specifically, determine the core parameters. Quantum bit error rate (qber): directly reflects the channel noise level and is the most critical indicator affecting key security and generation rate; Key generation rate (r): directly measures the channel transmission efficiency and is the core of system practicality; Euclidean distance between nodes (d): determines the physical limit of photon attenuation and is a hard constraint on protocol selection and routing decisions. Define the mathematical and physical scope: define qber ∈ [0, 0.25], r>0, providing a basis for subsequent normalization and constraint judgment. Output a clear list of physical parameters to be collected and their mathematical definitions.

[0059] Hardware awareness and real-time acquisition (defining "how to acquire") transforms abstract physical parameters into concrete, measurable digital signals. The core of this step is real-time performance and accuracy.

[0060] Specifically, hardware selection includes deploying highly sensitive single-photon detectors (such as SPADs) to capture the arrival time and quantity of individual photons. Timing synchronization is achieved using GPS or the IEEE 1588 Precision Time Protocol to ensure highly synchronized timestamps across all nodes in the network; this is a prerequisite for calculating the key rate and correlating noise events. High-frequency sampling is used, setting the sampling frequency to ≥10Hz. This is to capture rapid channel jitter caused by solar flares, power grid fluctuations, etc., avoiding information loss that could lead to model decision lag. The output is a raw photon count data stream with high-precision timestamps.

[0061] Step S12: Process the original photon counting data stream to obtain a feature vector.

[0062] like Figure 5 As shown, step S12 specifically includes: Step S121: Calculate the quantum error rate, key generation rate, and Euclidean distance between nodes based on the original photon counting data stream.

[0063] Specifically, step S121 is implemented as follows: Data preprocessing and normalization (defining "how to process"): The raw data is "dirty" and cannot be directly used for model training. The goal of this step is to clean, transform, and standardize the data to make it "clean" and "usable".

[0064] Specifically, data cleaning involves removing outliers caused by detector saturation or interference, and interpolating to fill in the very small amount of missing data. Feature calculation involves calculating the specific values ​​of qber, r, and d in real time based on the raw counts.

[0065] Step S122: Perform feature normalization on the quantum error rate, the key generation rate, and the Euclidean distance between nodes to obtain a feature vector.

[0066] Specifically, step S122 is implemented as follows: Feature normalization. `qber`: Linearly normalizes to [0, 1]. `r`: Performs a logarithmic transformation (log(r)) to compress its large dynamic range (e.g., from 1kbps to 100kbps), preventing large values ​​from dominating model training. `d`: Normalizes based on the protocol's maximum distance (e.g., `d / 120km` for bb84). Outputs clean, normalized feature vectors that can be directly input into a GNN model.

[0067] Step S13: Structuring and filtering based on the feature vectors to obtain the feature data stream.

[0068] Specifically, the feature data stream includes filtering three-dimensional tensors and filtering link identifiers.

[0069] like Figure 6 As shown, step S13 specifically includes: Step S131: Based on the feature vector, form a corresponding three-dimensional tensor, timestamp, and link identifier for the parameters of each active link.

[0070] Specifically, step S131 is implemented as follows: Feature structuring and preliminary screening (defining "how to output") package the processed data into a standardized format and perform a final "quality check" to remove obviously non-compliant links, thereby reducing the computational burden on subsequent modules.

[0071] Specifically, structured encapsulation: combining the parameters of each active link k into a three-dimensional tensor. , and attach a timestamp and link ID.

[0072] Step S132: Filter the multiple three-dimensional tensors to obtain multiple active links that meet the requirements and the corresponding filtered three-dimensional tensors and filtered link identifiers.

[0073] Specifically, step S132 is implemented as follows: Preliminary screening: Applying hard physical constraints. For example, if If the distance exceeds the 120km limit of the BB84 protocol, the link is directly marked as "unavailable" and will no longer participate in the complex calculations of GNN. Real-time push: The structured feature data stream is pushed to the GNN model in real time through a classic communication channel with a latency of ≤50ms (steps K2-K5). Output a real-time, structured feature data stream with preliminary availability labels.

[0074] It should be noted that the features collected in step K1 are applied in subsequent steps: Quantum bit error rate This is used in step K3, the core input, as dynamic noise weights. A high qber value directly determines the model's "attention" to a particular link. A high qber value significantly reduces the weight of that link in the attention mechanism, causing the model to "ignore" unreliable links.

[0075] Key generation rate In steps K3 and K5, this is used as a metric for the "importance" or "value" of a node / link. This could mean that the link is more efficient, and its corresponding node embedding It may be given higher weight, affecting the probability of the final path selection.

[0076] Distance between nodes This is used in steps K4 and K5, the core of the physical constraints. In step K4, with... These parameters are processed together by MLP; in step K5, hard-coded constraint checks are performed to directly reject links that exceed the maximum distance of the protocol.

[0077] Step S20: Construct a graph neural network dynamic model, input the quantum channel state information into the graph neural network dynamic model, and obtain the link selection probability corresponding to each of the multiple links.

[0078] Specifically, the graph neural network dynamic model includes a convolutional layer, a dynamic attention layer, an edge feature processing layer, and a link prediction optimization layer.

[0079] like Figure 7 As shown, step S20 specifically includes: Step S21: The convolutional layer determines the node embedding corresponding to the quantum network.

[0080] In this embodiment of the application, step K2 and the Transformer convolutional layer formula are as follows: ; ; ; in, For the first The node feature matrix output by the layer; To modify the activation function of the linear unit; It is a normalized exponential function; For querying the matrix, The key matrix, It is a value matrix; The dimension of the key vector (scaling factor); , , is a trainable weight matrix; The input feature matrix; For nodes Location encoding; For nodes Degree centrality; For nodes The centrality of indicators; This is a vector concatenation operation.

[0081] Explanation of principle: Communication between nodes with a distance of 50km or more is modeled as a global attention mechanism. The position encoding pos_i uses a spherical coordinate system. To avoid projection distortion, degree centrality parameter Enhance hub node weights. Output captures photon path correlations across multiple relays.

[0082] like Figure 8 As shown, step S21 specifically includes: Step S211: Obtain the structural characteristics of quantum network nodes.

[0083] Step S212: Obtain the node embedding based on the structural features.

[0084] Specifically, step S21 is implemented as follows: Transformer convolutional layer, basic structural features of input nodes .Notice: The distance between nodes is not directly input at this stage; it is used to construct the adjacency matrix of the graph or as an edge feature, participating in attention calculation. This is achieved through a self-attention mechanism. This allows each node to "see" and weigh the importance of all other nodes in the network. The output includes node embeddings containing global context information. At this point, the feature vector of each node is no longer an isolated island, but rather encodes the topological information of the entire network. Its output... It is the core input of step K3, providing a global background for subsequent noise adaptation.

[0085] Step S22: The dynamic attention layer obtains the updated node embedding based on the node embedding, the filtering 3D tensor, and the filtering link identifier.

[0086] Specifically, the screening three-dimensional tensor includes screening quantum error rate, screening key generation rate and screening Euclidean distance between nodes, and the updated node embedding includes global topology node embedding and noise-aware node embedding.

[0087] In this embodiment of the application, step K3, the formula for the GATv2 dynamic attention layer is as follows: ; ; in, For nodes For nodes Attention weights; This is a trainable attention vector; For the modified linear unit activation function with leakage; is a trainable weight matrix; , For nodes , eigenvectors; ; for nodes , Quantum bit error rate of inter-link; This is a dynamic noise weighting factor; The attenuation coefficient; It is a time variable; For nodes The set of neighboring nodes.

[0088] Explanation of the principle: Dynamic noise weighting This enables the model to automatically reduce the impact of high QBER links during sudden disturbances (such as solar flares). An 8-head multi-head mechanism learns noise patterns across different frequency bands in parallel, outputting robust node embeddings. .

[0089] Step S22 specifically involves: Step S221: Output the global topology node embedding and the noise-aware node embedding based on the node embedding, the filtering quantum error rate, the filtering key generation rate, and the filtering link identifier.

[0090] Specifically, step S2 is implemented as follows: GATV2 dynamic attention layer (providing environmental awareness), the node embedding of the input step K2 output. Step K1 collects real-time data. and (As part of the edge features). In the computation node To the neighbors Attention score At that time, a dynamic noise weight is introduced. When a certain link A sudden increase (such as due to solar flares). The value will increase, leading to an increase in the attention score. The size decreases. This means the model automatically reduces its focus on this "unreliable" link, considering communication through it to be more risky. The output is an updated node embedding that is robust to noise. Now, the node's characteristics include not only the global topology but also the health status of the current channel environment. Its output... It is one of the key bases for making the final decision in step K5.

[0091] Step S23: The edge feature processing layer obtains the edge feature embedding based on the filtered three-dimensional tensor.

[0092] In this embodiment of the application, step K4, the edge feature MLP processing formula (independent learning of quantum parameters): ; ; in, The processed edge feature vector; , This is the weight matrix of the multilayer perceptron; For activation functions; For layer normalization operation; It is the bias vector; The original edge feature vector; For nodes , Euclidean distance between them; The photon loss rate of the channel (in decibels). Temperature parameter (used for fidelity scaling); To preserve the fidelity of quantum states.

[0093] Explanation of the principle: Separate processing of quantum-specific parameters: channel photon loss rate Exponential transformation required Quantum state fidelity By temperature parameters Scaling. LayerNorm ensures stable training with small values ​​at the 0.001 level.

[0094] Step S23 specifically involves: Step S231: Determine the edge feature embedding based on the Euclidean distance between the selected nodes.

[0095] Specifically, step S23 is implemented as follows: Edge feature MLP processing (quantum parameter refinement), inputting the original edge features collected in step K1. Independent, fine processing is performed using a small multilayer sensor. This is because of factors like photon loss... (following exponential decay) and fidelity These parameters have mathematical properties completely different from those of ordinary network latency and bandwidth, requiring specialized functions for fitting. Layernorm ensures stable capture even for small changes on the order of 0.001. Therefore, they need to be processed independently, resulting in processed edge feature embeddings with greater physical meaning. Its output With the output of step K3 , In step K5, the links are merged to jointly determine the final selection probability of the link.

[0096] Step S24: The link prediction optimization layer obtains the link selection probability based on the updated node embedding and the edge feature embedding.

[0097] In this embodiment of the application, step K5 and the link prediction optimization formula (quantum physics constraints) are as follows: ; Constraints: ; in, For nodes , The predicted probability that a link exists between them; For the Sigmoid function; These are trainable weight vectors; , For nodes , The final embedding vector; For bias terms; For the agreement Existence tag of downstream link; For the agreement Maximum allowable distance; The agreement specifies a range of 120km. It is 75km.

[0098] Explanation of principle: The Sigmoid output layer is mapped to the [0,1] probability space. Physical constraints enforce the following: BB84 protocol maximum distance 120km, E91 protocol 75km (limited by the entanglement source). Rejected links are redirected to trusted relays.

[0099] like Figure 9 As shown, step S24 specifically includes: Step S241: Perform feature fusion on the global topology node embedding, the noise-aware node embedding, and the edge feature embedding to obtain a spliced ​​vector.

[0100] Specifically, step S241 is implemented as follows: Link prediction optimization (integrated decision and physical constraints), input , (From step K3, including global topology and noise-aware node features) (From step K4, containing refined quantum physics parameters). Feature fusion: concatenate these three high-level feature vectors. This vector now contains all the information needed to make a decision.

[0101] Step S242: Output the link selection probability corresponding to each of the selected link identifiers according to the splicing vector.

[0102] Specifically, step S242 is implemented as follows: Decision Function: The concatenated vector is input into a sigmoid function. The sigmoid function maps the output value to the (0,1) interval, which can be directly interpreted as a probability. Output close to 1: The model is very confident that this link is in good condition and suitable for communication. Output close to 0: The model considers this link unreliable and should be avoided. Hard Constraints: Simultaneously with the decision-making process, the physical constraint module enforces the constraints. For example, even if the model outputs a high probability of 0.9 for a certain BB84 link, if its distance... (From step K1) If the distance exceeds 120km, the physical constraint module will directly reject this decision, setting its probability to 0 and triggering a rerouting mechanism. Output the final link selection probability. This is a value between 0 and 1, representing the overall score for selecting link (i,j) for key distribution at the current moment.

[0103] Step S30: Obtain the frequency domain spectrum based on the baseband information.

[0104] In this embodiment of the application, step K6 and the formula for the quantum-classical protocol converter are as follows: ; ; in, The converted classic key command; This is a protocol conversion function; For quantum key distribution (256 bits); For classic public key infrastructure; It is a 256-bit binary space; It is a multiplication group modulo p (where p is a large prime number).

[0105] Explanation of the principle: Realizing a quantum bit stream Adaptation to OpenHarmony public key infrastructure: quantum key segmentation and encapsulation in PKCS#1 v2.2 format; HKDF algorithm-extended key material meets X.509 requirements; supports ECDHE post-quantum hybrid mode.

[0106] like Figure 10 As shown, step S30 specifically includes: Step S31: Obtain a link selection instruction based on the multiple link selection probabilities.

[0107] like Figure 11 As shown, step S31 specifically includes: Step S311: Convert the multiple link selection probabilities into a cumulative probability distribution.

[0108] Step S312: Generate a random number and match the random number with the cumulative probability distribution to generate a link selection instruction.

[0109] Specifically, step S31 is implemented as follows: (1) Generating random numbers: The system generates a random number r that is uniformly distributed in the interval [0,1). This random number represents the result of a "lottery" or a random event.

[0110] (2) Constructing and matching cumulative probability distributions: The system converts the selection probability pi of each link into a cumulative probability interval. This process is as follows: the cumulative interval of link 1 is [0, p1); the cumulative interval of link 2 is [p1, p1+p2); the cumulative interval of link 3 is [p1+p2, p1+p2+p3); the cumulative interval of link N is [p1+...+pN-1, 1); then, the system compares the random number r generated in the first step with these cumulative intervals.

[0111] (3) Determining the selected link: The link whose cumulative probability interval the random number r falls into is selected as the final transmission path. For example: Assume there are 3 links K→M, K→N, and K→L, with selection probabilities p(M)=0.35, p(N)=0.35, and p(L)=0.30 respectively. The cumulative intervals are: M[0,0.35), N[0.35,0.70), L[0.70,1.0). If the system-generated random number r=0.52, since 0.35≤0.52<0.70, r falls into the interval of link K→N. Therefore, the system decides to select link K→N.

[0112] Step S32: Determine the target link from the plurality of filtered link identifiers according to the link selection instruction, and determine the key injection instruction according to the target link.

[0113] like Figure 12 As shown, step S32 specifically includes: Step S321: Obtain the corresponding working key based on the target link.

[0114] Step S322: Encrypt the working key into ciphertext and generate a message authentication code.

[0115] Step S323: Determine the key injection instruction based on the ciphertext, the message authentication code, and the target link.

[0116] Specifically, step S32 is implemented as follows: Understandably, this step involves a complex cryptographic encapsulation process. Its purpose is to prevent the key from existing in plaintext form during transmission or in memory.

[0117] Specifically, the process involves material preparation and pre-computation (host computer / main unit side). First, define the objective: determine which memory area in the hardware will contain the key and which key will be used to protect this transmission. Second, generate a derived key (KDF): using the master key and specific constants, derive a temporary encryption key (K1) and a verification key (K2 / K4) using the AES-MP or KDF algorithm. Third, construct the plaintext data block: combine the key to be injected (LoadKey), counter (CID), flag bits (FID), and padding bits into a standard format data block (typically 32 bytes).

[0118] Encryption and Integrity Protection. Content Encryption: The plaintext data block is encrypted using the derived key K1 and the AES-CBC algorithm to generate ciphertext data M2. Command Header Assembly (M1): The hardware unique identifier (UID), target key slot ID (LoadKey ID), and authentication key slot ID (AuthKey ID) are combined to form the command header M1. Message Authentication Code Calculation (M3): The command header M1 and ciphertext M2 are signed using the derived key K2 and the AES-CMAC algorithm to generate the MAC value M3. This step is to prevent the command from being tampered with.

[0119] Forming the final instruction package: Package M1 (plaintext header), M2 (encrypted body), and M3 (signature) to form the final "key injection instruction". At this point, the original key has been completely overwritten by the ciphertext and is bound to the hardware.

[0120] It's important to note that the link selection probability directly determines the "strategy" and "resource allocation" of key injection. This relationship manifests in three aspects: First, key strength matching (dynamic strategy): If step K5 calculates that a certain link (e.g., link A) has an extremely high probability of being selected (e.g., 90%), it means that a large amount of data will flow through this link. To balance security risks, step K6 may generate instructions requiring the injection of a high-strength session key (e.g., AES-256) into link A or frequent key changes. Conversely, if a certain link (link B) has an extremely low probability (only as a backup), step 6 may only generate instructions to inject a low-strength key or a long-term valid master key to save computational resources. Second, key index selection (multi-link scenario): In link encryption mode, each physical link typically requires an independent key. The probability distribution output by step 5 is actually a "routing table." Step K6 uses this routing table to determine which path the current data packet should take and generates a dedicated key instruction for that path. For example, if the probability points to "link K," step K6 generates an instruction to "load Key_K." Third, preloading trigger (resource prediction): If the probability model in step K5 shows that the network is about to experience a congestion switch (e.g., the probability of the primary link decreases and the probability of the backup link increases), step K6 will generate a "pre-injection instruction" in advance to prepare the key of the backup link before the switch occurs, so as to achieve a seamless and secure switch.

[0121] Understandably, while the "link selection probability" serves as both input and decision-making basis, the true output of step K6 is the "key injection instruction." This instruction must be secure and cannot contain the plaintext key. Therefore, the complete logic of step K6 comprises two parallel sub-processes: First, policy generation (based on probability): Input link selection probability table, current network security level, target link ID; the system queries the policy library to determine which key version, encryption algorithm (such as SM4 / AES), and key lifecycle (such as being destroyed after 10 minutes).

[0122] Second, instruction construction (based on cryptography): Key material synthesis, retrieving the corresponding working key or master key from the secure storage area; Encryption encapsulation, using the master key (KEK) or an asymmetric encryption algorithm (such as RSA) to encrypt the working key to be injected into ciphertext (Blob); Integrity protection, generating a MAC (Message Authentication Code) or digital signature to prevent the instruction from being tampered with during transmission to the hardware; Packaging, combining the ciphertext, MAC, target address (Memory Slot ID), and checksum into the final binary instruction package (i.e., the M1 / M2 / M3 structure you see in the search results).

[0123] Step K6 is a combination of "routing strategy (probability)" and "cryptographic techniques (encapsulation)". Probability determines "what to inject" and "where to inject", while cryptography determines "how to inject securely".

[0124] Step 40: Generate execution results according to the key injection instructions.

[0125] In this embodiment of the application, step K7 and the OpenHarmony security service scheduling formula are as follows: ; ; in, To optimize the scheduling objective function; For the first One security service task; For the task Priority weights; For the task The actual running time; For the task The deadline; the superscript plus sign indicates a positive operation (negative numbers are returned as 0); For the first A security-enhancing Linux policy module; For security context; This is the result of the allowed access policy.

[0126] Explanation of principle: Multi-objective optimization engine dynamically allocates resources: real-time tasks (For example, financial transactions) enjoy the highest priority =0.7; SELinux policy engine intercepts unconventional key access; key lifecycle is bound to device identity. .

[0127] like Figure 13 As shown, step S40 specifically includes: Step S41: Verify the key injection instruction. If the verification passes, decrypt the key injection instruction to obtain the plaintext key.

[0128] Step S42: Generate the execution result based on the plaintext key.

[0129] Specifically, step S40 is implemented as follows: Understandably, this step occurs within the security hardware (such as HSM, TPM, smart cards, and POS machine security modules), and is a hardware-level parsing and solidification process.

[0130] Specifically, the instruction reception and initial validity screening are as follows: The hardware interface receives the instruction packet, first parsing the UID in M1 to confirm whether the instruction was sent to this hardware (to prevent mis-sending). Then, it reads the corresponding authentication key (AuthKey) from internal storage based on the AuthKey ID.

[0131] Integrity Verification (Verify M3): The hardware derives K2 using the read AuthKey and the same algorithm. The CMAC is recalculated for the received M1 and M2 and compared with the received M3. If they do not match, an error is immediately reported and the process is interrupted to prevent illegal instruction injection.

[0132] Decryption and Parsing (Decrypt M2): After successful verification, the decryption key K1 is derived using the AuthKey. M2 is decrypted using AES-CBC mode to restore the original key data (LoadKey), CID, and FID. Anti-replay attack check: The CID (counter) in the instruction is compared with the current CID stored in the hardware. Writing is only allowed if the CID in the instruction is larger, preventing the old key from being repeatedly injected (rollback attack).

[0133] Secure storage and state locking: The decrypted LoadKey is written to the specified Memory Slot. The CID and FID of this slot are updated (e.g., set to read-only, disable export, etc.). Physical protection: Once the write is successful, the hardware automatically cuts off the path for external direct reading of the key, retaining only the encryption operation interface.

[0134] Response Feedback (Generation of M4 / M5): The hardware generates feedback data M4 and M5 (usually including the echoed M1 and a checksum calculated based on the new key) and sends them back to the host computer. The host computer verifies M4 / M5 to confirm that the hardware has successfully received and correctly written the data.

[0135] Further, the first stage: Access Control and Integrity Verification (Authentication). The chip receives instruction packets (M1, M2, M3) from the host computer. Identity Verification: Parsing the UID (Unique Device ID) and AuthKey ID (key index used for verification) in M1 confirms that the instruction was sent to this device and that the caller has the necessary permissions. Anti-Tampering Verification (Core): Using the locally stored AuthKey (master key or derived key), the checksum M3 of the instruction packet is recalculated (e.g., AES-CMAC). If the calculated M3 does not match the received M3, it indicates that the instruction has been tampered with or forged during transmission, and the chip immediately terminates the process and returns an error code. If this step fails, all subsequent actions will not occur.

[0136] Phase Two: Decryption and Security Hardening (Storage Locking). After successful verification, the chip begins processing the encrypted data payload M2. Derivation of Decryption Key: Using AuthKey and agreed-upon constants (such as KEY_UPDATE_ENC_C), a temporary decryption key K1 is derived using the KDF algorithm. Plaintext Restoration: K1 is used to decrypt M2 using AES-CBC, restoring the original key data (LoadKey), counter (CID), and flag (FID). Replay Protection Check: The CID in the instruction is compared with the current CID stored in the chip. Overwriting is only allowed if the CID in the instruction is larger, preventing attackers from intercepting old instructions and repeatedly injecting them (rollback attacks). Physical Write: LoadKey is written to the designated Memory Slot (key register), while CID and FID are updated, and the "read-only / non-exportable" flag is set in hardware. Once written, external software can no longer directly read the plaintext key.

[0137] Phase 3: Generating Execution Results (Issuing a Receipt). The chip generates M4 and M5 as responses to the host computer. Calculating M4: Using the newly written LoadKey, K3 is derived to encrypt a specific piece of data (such as M1 + a fixed constant), generating the latter half of M4 (16 bytes). The first half directly reuses M1. Calculating M5: Using LoadKey, K4 is derived to perform CMAC calculations on the entire M4 text, generating M5 (16 bytes). Output Results: M4 and M5 are packaged and returned to the host computer.

[0138] In this embodiment of the application, step K8 and the performance feedback closed-loop formula are as follows: ; ; in, for The loss function value at time t; This is an incremental learning update operation; This is the fine-tuning coefficient (which varies with temperature); The sampling time interval; The predicted quantum error rate; The measured quantum bit error rate; Ambient temperature; This refers to the operating temperature parameter.

[0139] Explanation of the principle: Real-time calibration of the model by feeding back quantum key verification information: QBER prediction deviation exceeding 0.01 triggers model fine-tuning coefficients. Temperature parameters are associated with equipment operating conditions (e.g., outdoor high temperatures at base stations); Incremental learning module Preserve historical topological features.

[0140] Specifically, the quantum hardware layer corresponds to the parameter acquisition formula (step K1), and the photoelectric converter ADC sampling triggers an interrupt signal; the GNN topology modeling corresponds to the Transformer convolution (step K2), and the distributed graph partitioning is stored in the virtual memory of the OH device; the GATv2 attention layer corresponds to the noise adaptation formula (step K3), and the FPGA accelerates matrix operations (with a latency of 50μs); the OH key management module corresponds to the protocol converter (step K6), and the Huks key library API is called (SM4 national cryptographic instructions); the dynamic monitoring platform corresponds to the feedback loop (step K8), and the security audit log triggers an incremental learning event.

[0141] Each module exchanges data through a shared memory channel. (Nodal gradient) and (Side feature increment) avoids the overhead of traditional IPC communication. Hardware-layer abnormal events (such as single-photon source failure) are directly injected into the GNN interrupt vector table to achieve a 10ms response time.

[0142] Step 1: Data acquisition and real-time monitoring. Establish a sensitive "nervous system" to capture the system's operating status and output results in real time.

[0143] Specifically, define Key Performance Indicators (KPIs): Identify the core performance indicators that need to be monitored, such as "defect repair cycle" and "automated test pass rate" in software development, "accuracy" and "click-through rate" in AI models, or "sales revenue" and "customer satisfaction" in business management. Deploy monitoring tools: Utilize technologies such as APM tools, log analysis platforms (e.g., ELK), user behavior tracking systems, automated testing pipelines (CI / CD), and sensors to achieve automatic data collection. Multi-dimensional coverage: Data sources should cover multiple levels, including production environment, testing environment, and direct user feedback, encompassing system-level data (e.g., CPU, memory, latency) and external interaction data (e.g., user clicks, ratings, and comments). Set thresholds and alerts: Based on the severity and scope of the indicators, set different levels of alert thresholds and notification channels to ensure that critical issues are detected promptly.

[0144] The second step is data analysis and insight generation. This involves identifying patterns, pinpointing problems, and analyzing root causes from massive amounts of data, transforming "data" into "information" and "insights".

[0145] Specifically, data cleaning and processing involves filtering out invalid, duplicate, or erroneous data and standardizing and structuring its storage. Deviation identification compares actual performance data with preset target values ​​(reference inputs) to calculate deviations (errors). For example, whether the actual defect rate is higher than expected, or whether the model accuracy has decreased. Root cause analysis and insight report generation visualize the analysis results and form clear conclusions.

[0146] The third step is decision-making and strategy formulation. Based on the diagnostic results, specific strategies for solving the problem are developed by "prescribing the right medicine for the symptoms".

[0147] Specifically, develop optimization plans: Address the root causes and design concrete improvement measures. Examples include: fixing specific code defects, adjusting hyperparameters of AI models, optimizing recommendation algorithm strategies, and simplifying business approval processes. Evaluation and prioritization: Evaluate the costs, benefits, and risks of different optimization plans, and determine implementation priorities based on business objectives and available resources.

[0148] Step 4: Execution and implementation.

[0149] Specifically, deployment and go-live involve performing code fixes, model fine-tuning, and process changes, and then deploying them to the appropriate environment (such as a test or production environment). Automated execution: Utilizing automated tools and processes as much as possible to reduce human intervention and improve efficiency and accuracy. Process tracking: Continuously tracking task progress and implementation status during execution to ensure the plan is executed flawlessly.

[0150] Step 5: Effectiveness verification and evaluation. Use data to verify the effectiveness of the improvements and form a closed loop of "facts".

[0151] Specifically, A / B testing: Within a controllable range (such as partial user traffic), compare the effects of the old and new versions to scientifically evaluate the impact of the improvements. Regression verification: In software development, automatically trigger relevant test cases to verify whether defects have been fixed and whether no new problems have been introduced. Data comparison: Collect key performance indicators again and compare them with the data before the improvement to quantify the improvement effect. Evaluation and review: Organize relevant personnel to evaluate the verification results and determine whether the goals have been achieved. If the goals have not been achieved, it is necessary to return to step two to re-analyze the reasons.

[0152] Furthermore, such as Figure 14 As shown, based on the above-described dynamic optimization method for quantum key distribution networks, this invention also provides a dynamic optimization system for quantum key distribution networks, wherein the dynamic optimization system for quantum key distribution networks includes: Information acquisition module 50 is used to acquire quantum channel state information in the quantum network; The model building and probability output module 60 is used to build a graph neural network dynamic model, input the quantum channel state information into the graph neural network dynamic model, and obtain the link selection probability corresponding to each of the multiple links. The key instruction generation module 70 is used to determine the key injection instruction based on the multiple link selection probabilities; The execution module 80 is used to generate an execution result based on the key injection instruction.

[0153] like Figure 15 As shown in this embodiment of the invention, another embodiment of the dynamic optimization system for quantum key distribution networks is presented. In this embodiment, the information acquisition module 50 includes: The raw data acquisition unit 501 is used to acquire the raw photon counting data stream in the active links of the quantum network; Preprocessing unit 502 is used to process the original photon counting data stream to obtain feature vectors; The structuring and preliminary screening unit 503 is used to perform structuring and screening based on the feature vector to obtain a feature data stream.

[0154] In this embodiment, the model construction and probability output module 60 includes: A global relation modeling unit 601 is used by the convolutional layer to determine the node embeddings corresponding to the quantum network. The local noise adaptive unit 602 is used by the dynamic attention layer to obtain updated node embeddings based on the node embeddings, the filtered 3D tensor, and the filtered link identifiers. The quantum physics processing unit 603 is used by the edge feature processing layer to obtain the edge feature embedding based on the selected three-dimensional tensor; The final decision unit 604 is used by the link prediction optimization layer to obtain the link selection probability based on the updated node embedding and the edge feature embedding.

[0155] In this embodiment, the key instruction generation module 70 includes: The selection instruction determination unit 701 is used to obtain a link selection instruction based on the multiple link selection probabilities. The injection instruction generation unit 702 determines a target link from a plurality of filtered link identifiers according to the link selection instruction, and determines a key injection instruction according to the target link.

[0156] In this embodiment, the execution operation module 80 includes: The verification and decryption unit 801 is used to verify the key injection instruction. If the verification passes, the key injection instruction is decrypted to obtain the plaintext key. The status receipt unit 802 is used to generate an execution result based on the plaintext key.

[0157] This invention designs different dynamic optimization systems for quantum key distribution networks. Through this scheme, the radar range image resolution under low signal-to-noise ratio conditions can be improved.

[0158] Furthermore, such as Figure 16 As shown, based on the above-mentioned dynamic optimization method and system for quantum key distribution networks, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 16 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0159] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a quantum key distribution network dynamic optimization program 40, which can be executed by the processor 10 to implement the quantum key distribution network dynamic optimization method of this application.

[0160] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the quantum key distribution network dynamic optimization method.

[0161] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The terminal's processor 10, memory 20, and display 30 communicate with each other via a system bus.

[0162] In one embodiment, when the processor 10 executes the quantum key distribution network dynamic optimization program 40 in the memory 20, the following steps are performed: Obtain quantum channel state information in quantum networks; A graph neural network dynamic model is constructed, and the quantum channel state information is input into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links. The key injection instruction is determined based on the multiple link selection probabilities. The execution result is generated based on the key injection instruction.

[0163] The quantum channel state information is a feature data stream; The acquisition of quantum channel state information in the quantum network specifically includes: Acquire raw photon counting data streams from active links in a quantum network; The original photon counting data stream is processed to obtain a feature vector; The feature vectors are structured and filtered to obtain a feature data stream.

[0164] The process of processing the original photon counting data stream to obtain a feature vector specifically includes: Based on the original photon counting data stream, calculate the quantum error rate, key generation rate, and Euclidean distance between nodes; The quantum error rate, the key generation rate, and the Euclidean distance between nodes are normalized to obtain a feature vector.

[0165] The feature data stream includes a filter 3D tensor and a filter link identifier; The step of structuring and filtering the feature vector to obtain the feature data stream specifically includes: Based on the feature vector, the parameters of each active link are used to form a corresponding three-dimensional tensor, timestamp, and link identifier; By filtering multiple three-dimensional tensors, multiple active links that meet the requirements are obtained, along with the filtered three-dimensional tensors and the filtered link identifiers.

[0166] The graph neural network dynamic model includes a convolutional layer, a dynamic attention layer, an edge feature processing layer, and a link prediction optimization layer.

[0167] Specifically, inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probabilities corresponding to each of the multiple links includes: The convolutional layer determines the node embeddings corresponding to the quantum network; The dynamic attention layer updates the node embedding based on the node embedding, the filtering 3D tensor, and the filtering link identifier; The edge feature processing layer obtains the edge feature embedding based on the filtered three-dimensional tensor; The link prediction optimization layer obtains the link selection probability based on the updated node embedding and the edge feature embedding.

[0168] Specifically, determining the node embedding corresponding to the quantum network includes: Obtain the structural characteristics of quantum network nodes; Based on the structural features, the node embedding is obtained.

[0169] The filtering three-dimensional tensor includes filtering quantum error rate, filtering key generation rate and filtering Euclidean distance between nodes, and the updated node embedding includes global topology node embedding and noise-aware node embedding. The step of obtaining the updated node embedding based on the node embedding, the filtered 3D tensor, and the filtered link identifier specifically involves: Based on the node embedding, the filtered quantum error rate, the filtered key generation rate, and the filtered link identifier, output the global topology node embedding and the noise-aware node embedding; The step of obtaining the edge feature embedding based on the selected 3D tensor is specifically as follows: The edge feature embedding is determined based on the Euclidean distance between the selected nodes.

[0170] Specifically, obtaining the link selection probability based on the updated node embedding and the edge feature embedding includes: The global topology node embedding, the noise-aware node embedding, and the edge feature embedding are fused to obtain a concatenated vector. Output the link selection probability corresponding to each of the selected link identifiers based on the splicing vector.

[0171] Specifically, determining the key injection instruction based on multiple link selection probabilities includes: A link selection instruction is obtained based on multiple link selection probabilities; The target link is determined from a plurality of filtered link identifiers according to the link selection instruction, and the key injection instruction is determined according to the target link.

[0172] Specifically, obtaining the link selection instruction based on the multiple link selection probabilities includes: Convert the multiple link selection probabilities into a cumulative probability distribution; A random number is generated and matched with the cumulative probability distribution to generate a link selection instruction.

[0173] Specifically, determining the key injection instruction based on the target link includes: The corresponding working key is obtained based on the target link; The working key is encrypted into ciphertext, and a message authentication code is generated; The key injection instruction is determined based on the ciphertext, the message authentication code, and the target link.

[0174] Specifically, generating the execution result based on the key injection instruction includes: The key injection command is verified. If the verification passes, the key injection command is decrypted to obtain the plaintext key. The execution result is generated based on the plaintext key.

[0175] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a dynamic optimization program for a quantum key distribution network, and the dynamic optimization program for a quantum key distribution network, when executed by a processor, implements the steps of the dynamic optimization method for a quantum key distribution network as described above.

[0176] In summary, this invention provides a dynamic optimization method, system, terminal, and computer-readable storage medium for quantum key distribution networks. The method includes: acquiring quantum channel state information in a quantum network; constructing a graph neural network dynamic model; inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probabilities corresponding to multiple links; determining a key injection instruction based on the multiple link selection probabilities; and generating an execution result based on the key injection instruction. This invention achieves real-time optimization under channel jitter (such as QBER fluctuations) through GNN dynamic modeling and feedback loop, deeply integrates quantum hardware and the OpenHarmony operating system, eliminates protocol compatibility layers, reduces configuration complexity, hard-codes quantum physical characteristics into the algorithm, improves key distribution efficiency, thereby increasing the key rate and improving system efficiency.

[0177] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0178] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0179] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A dynamic optimization method for quantum key distribution networks, characterized in that, The dynamic optimization method for quantum key distribution networks includes: Obtain quantum channel state information in quantum networks; A graph neural network dynamic model is constructed, and the quantum channel state information is input into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links. The key injection instruction is determined based on the multiple link selection probabilities. The execution result is generated based on the key injection instruction.

2. The dynamic optimization method for quantum key distribution networks according to claim 1, characterized in that, The quantum channel state information is a characteristic data stream; The acquisition of quantum channel state information in the quantum network specifically includes: Acquire raw photon counting data streams from active links in a quantum network; The original photon counting data stream is processed to obtain a feature vector; The feature vectors are structured and filtered to obtain a feature data stream.

3. The dynamic optimization method for quantum key distribution networks according to claim 2, characterized in that, The process of processing the original photon counting data stream to obtain the feature vector specifically includes: Based on the original photon counting data stream, calculate the quantum error rate, key generation rate, and Euclidean distance between nodes; The quantum error rate, the key generation rate, and the Euclidean distance between nodes are normalized to obtain a feature vector.

4. The dynamic optimization method for quantum key distribution networks according to claim 2, characterized in that, The feature data stream includes filtering 3D tensors and filtering link identifiers; The step of structuring and filtering the feature vector to obtain the feature data stream specifically includes: Based on the feature vector, the parameters of each active link are used to form a corresponding three-dimensional tensor, timestamp, and link identifier; By filtering multiple three-dimensional tensors, multiple active links that meet the requirements are obtained, along with the filtered three-dimensional tensors and the filtered link identifiers.

5. The dynamic optimization method for quantum key distribution networks according to claim 4, characterized in that, The graph neural network dynamic model includes convolutional layers, dynamic attention layers, edge feature processing layers, and link prediction optimization layers.

6. The dynamic optimization method for quantum key distribution networks according to claim 5, characterized in that, The step of inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links specifically includes: The convolutional layer determines the node embeddings corresponding to the quantum network; The dynamic attention layer updates the node embedding based on the node embedding, the filtering 3D tensor, and the filtering link identifier; The edge feature processing layer obtains the edge feature embedding based on the filtered three-dimensional tensor; The link prediction optimization layer obtains the link selection probability based on the updated node embedding and the edge feature embedding.

7. The dynamic optimization method for quantum key distribution networks according to claim 6, characterized in that, The determination of the node embedding corresponding to the quantum network specifically includes: Obtain the structural characteristics of quantum network nodes; Based on the structural features, the node embedding is obtained.

8. The dynamic optimization method for quantum key distribution networks according to claim 7, characterized in that, The screening three-dimensional tensor includes screening quantum error rate, screening key generation rate and screening Euclidean distance between nodes, and the updated node embedding includes global topology node embedding and noise-aware node embedding. The step of obtaining the updated node embedding based on the node embedding, the filtered 3D tensor, and the filtered link identifier specifically involves: Based on the node embedding, the filtered quantum error rate, the filtered key generation rate, and the filtered link identifier, output the global topology node embedding and the noise-aware node embedding; The step of obtaining the edge feature embedding based on the selected 3D tensor is specifically as follows: The edge feature embedding is determined based on the Euclidean distance between the selected nodes.

9. The dynamic optimization method for quantum key distribution networks according to claim 8, characterized in that, The step of obtaining the link selection probability based on the updated node embedding and the edge feature embedding specifically includes: The global topology node embedding, the noise-aware node embedding, and the edge feature embedding are fused to obtain a concatenated vector. Output the link selection probability corresponding to each of the selected link identifiers based on the splicing vector.

10. The dynamic optimization method for quantum key distribution networks according to claim 9, characterized in that, The step of determining the key injection instruction based on multiple link selection probabilities specifically includes: A link selection instruction is obtained based on multiple link selection probabilities; The target link is determined from a plurality of filtered link identifiers according to the link selection instruction, and the key injection instruction is determined according to the target link.

11. The dynamic optimization method for quantum key distribution networks according to claim 10, characterized in that, The step of obtaining the link selection instruction based on multiple link selection probabilities specifically includes: Convert the multiple link selection probabilities into a cumulative probability distribution; A random number is generated and matched with the cumulative probability distribution to generate a link selection instruction.

12. The dynamic optimization method for quantum key distribution networks according to claim 11, characterized in that, The step of determining the key injection instruction based on the target link specifically includes: The corresponding working key is obtained based on the target link; The working key is encrypted into ciphertext, and a message authentication code is generated; The key injection instruction is determined based on the ciphertext, the message authentication code, and the target link.

13. The dynamic optimization method for quantum key distribution networks according to claim 1, characterized in that, The step of generating the execution result according to the key injection instruction specifically includes: The key injection command is verified. If the verification passes, the key injection command is decrypted to obtain the plaintext key. The execution result is generated based on the plaintext key.

14. A dynamic optimization system for quantum key distribution networks, characterized in that, The quantum key distribution network dynamic optimization system is used to implement the quantum key distribution network dynamic optimization method according to any one of claims 1-13, and the quantum key distribution network dynamic optimization system comprises: The information acquisition module is used to acquire quantum channel state information in the quantum network; The model building and probability output module is used to build a graph neural network dynamic model, inputting the quantum channel state information into the graph neural network dynamic model to obtain the link selection probability corresponding to each of the multiple links; A key instruction generation module is used to determine a key injection instruction based on multiple link selection probabilities; The execution module is used to generate an execution result based on the key injection instruction.

15. The dynamic optimization system for quantum key distribution networks according to claim 14, characterized in that, The information acquisition module includes: The raw data acquisition unit is used to acquire the raw photon counting data stream in the active links of the quantum network. The preprocessing unit is used to process the original photon counting data stream to obtain a feature vector; The structuring and preliminary filtering unit is used to perform structuring and filtering based on the feature vector to obtain a feature data stream.

16. The dynamic optimization system for quantum key distribution networks according to claim 15, characterized in that, The model building and probability output module includes: The global relation modeling unit is used by the convolutional layers to determine the node embeddings corresponding to the quantum network. The local noise adaptive unit is used by the dynamic attention layer to obtain updated node embeddings based on the node embeddings, the filtered 3D tensors, and the filtered link identifiers. A quantum physics processing unit is used by the edge feature processing layer to obtain the edge feature embedding based on the selected three-dimensional tensor; The final decision unit is used by the link prediction optimization layer to obtain the link selection probability based on the updated node embedding and the edge feature embedding.

17. The dynamic optimization system for quantum key distribution networks according to claim 16, characterized in that, The key instruction generation module includes: The selection instruction determination unit is used to obtain a link selection instruction based on multiple link selection probabilities. The injection instruction generation unit determines a target link from multiple filtered link identifiers according to the link selection instruction, and determines a key injection instruction according to the target link.

18. The dynamic optimization system for quantum key distribution networks according to claim 17, characterized in that, The execution module includes: The verification and decryption unit is used to verify the key injection command. If the verification passes, the key injection command is decrypted to obtain the plaintext key. The status receipt unit is used to generate an execution result based on the plaintext key.

19. A terminal, characterized in that, The terminal includes: a memory, a processor, and a quantum key distribution network dynamic optimization program stored in the memory and executable on the processor. When the quantum key distribution network dynamic optimization program is executed by the processor, it implements the steps of the quantum key distribution network dynamic optimization method as described in any one of claims 1-13.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a dynamic optimization program for a quantum key distribution network, which, when executed by a processor, implements the steps of the dynamic optimization method for a quantum key distribution network as described in any one of claims 1-13.