Quantum key resource pool elastic expansion and contraction method and system based on load prediction

CN122764482APending Publication Date: 2026-09-15YIXUNTONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610932801.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-15

AI Technical Summary

Technical Problem

[0006]为了解决现有量子密钥资源池资源供需失衡的问题,以提升QKD网络的整体资源利用率与服务稳定性,本申请提供基于负载预测的量子密钥资源池弹性扩缩方法及系统

Benefits of technology

[0026]In summary, this application includes at least the following beneficial technical effects: acquiring historical operational data in a quantum key distribution network, wherein the historical operational data includes key consumption time-series data and key generation time-series data of each communication node pair within the network, as well as business association relationships between communication node pairs; then, based on the business association relationships, constructing a key demand association graph; then, for each graph node in the key demand association graph, performing self-feature mining on the key consumption time-series data and key generation time-series data corresponding to the graph node to obtain node intrinsic features; and, sequentially taking each graph node as a target graph node, performing graph feature mining on the target graph node's target node intrinsic features based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node to obtain node association features; then, based on the node association features, determining the predicted key load distribution within a future preset time period; and then, based on the difference between the predicted key load distribution and the key inventory distribution of communication node pairs in the quantum key resource pool, generating an elastic scaling strategy and performing elastic adjustments to the quantum key resource pool. In this invention, by constructing a key demand association graph and aggregating neighbor node information, the chain reaction of business associations is captured, improving the accuracy of key load prediction. At the same time, by deeply integrating key consumption and generation time-series data, early warning signs of supply and demand imbalance are detected, and targeted scaling instructions are generated based on accurate predictions and current inventory differences. This achieves proactive, on-demand, and precise elastic resource adjustment, solving the problem of resource supply and demand imbalance. While ensuring peak service quality, it reduces resource idleness during off-peak periods, improving the resource utilization and service stability of the QKD network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122764482A_ABST
    Figure CN122764482A_ABST
Patent Text Reader

Abstract

The application discloses a quantum key resource pool elasticity expansion and contraction method and system based on load prediction, relates to the technical field of communication network resource management, and comprises the following steps: obtaining historical operation data in a quantum key distribution network; constructing a key demand correlation graph based on the business correlation; performing self-feature mining on the key consumption time sequence data and the key generation time sequence data corresponding to each graph node in the key demand correlation graph to obtain node intrinsic characteristics; taking each graph node as a target graph node in turn, performing graph feature mining on the target node intrinsic characteristics corresponding to the target graph node based on the neighbor node intrinsic characteristics corresponding to the neighbor graph nodes of the target graph node to obtain node correlation characteristics; and determining a key load prediction distribution in a future preset time period based on the node correlation characteristics. The application has the effect of improving the overall resource utilization rate and service stability of the QKD network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of communication network resource management, and in particular to a method and system for elastic scaling of quantum key resource pools based on load prediction. Background Technology

[0002] With the rapid development of quantum communication technology, quantum key distribution networks (QKD) have gradually moved from the laboratory to practical applications. Their core advantage lies in using quantum mechanics principles to ensure the absolute security of key distribution. In QKD networks, the quantum key resource pool serves as the core component for storing, managing, and distributing keys, and its performance directly affects the service quality and security of the entire communication network.

[0003] Currently, key resource pools in QKD networks mostly adopt a fixed-capacity configuration mode, that is, the size of the resource pool is planned according to the preset maximum load demand. However, in practical applications, the key demand load of different communication node pairs has significant dynamic fluctuations: for example, the demand for keys increases sharply during peak financial transaction periods, while the demand drops significantly during off-peak periods at night. Fixed-capacity resource pool configuration has obvious drawbacks: when peak load periods arrive, the fixed capacity may not be able to meet sudden demand, leading to key allocation delays or even communication interruptions; while during off-peak periods, a large amount of resources are idle, resulting in a serious waste of hardware resources such as quantum channels and storage devices, while increasing system operation and maintenance costs and energy consumption.

[0004] To alleviate these problems, some technologies attempt to introduce dynamic adjustment mechanisms, but they generally lack the ability to accurately predict key demand load. Traditional methods either rely on manually set fixed threshold alarms, passively replenishing the key inventory when it falls below a certain threshold, resulting in a severely delayed response; or they use simple time-series models to extrapolate isolated trends from the historical consumption data of a single communication node pair. These methods ignore the complex service topology relationships in QKD networks. For example, when the key demand of multiple service links carried by a single aggregation node surges, the key load of associated node pairs sharing the same source and destination nodes, reusing the same quantum key distribution link, or belonging to the same priority service type will inevitably be affected in a chain reaction. At the same time, current technologies have failed to deeply integrate the time-series data of key consumption and key generation, making it difficult to accurately characterize the dynamic supply and demand characteristics of node pairs. Due to the lack of graph association feature mining in the spatial dimension and deep integration of supply and demand, the prediction results deviate significantly from reality, leading to lagging and inefficient resource pool expansion and contraction operations, further exacerbating the problem of resource supply and demand mismatch.

[0005] To address the aforementioned shortcomings, the industry urgently needs a technology that can accurately predict key demand dynamics and achieve real-time matching of resource supply and demand. This would ensure communication service quality during peak periods while effectively reducing resource idleness and waste during off-peak periods, solving the pain point of resource supply and demand imbalance under the existing fixed configuration mode, and improving the overall resource utilization and service stability of QKD networks. Summary of the Invention

[0006] To address the existing imbalance between supply and demand in quantum key resource pools and improve the overall resource utilization and service stability of QKD networks, this application provides a method and system for elastic scaling of quantum key resource pools based on load prediction.

[0007] Firstly, this application provides a method for elastic scaling of quantum key pools based on load prediction, employing the following technical solution: A method for elastic scaling of quantum key pools based on load prediction, characterized by comprising: Acquire historical operational data in a quantum key distribution network, wherein the historical operational data includes key consumption time-series data and key generation time-series data for each communication node pair within the network, as well as the business association relationships between the communication node pairs; Based on the aforementioned business relationships, a key requirement association graph is constructed with communication node pairs as nodes; For each graph node in the key demand association graph, self-feature mining is performed on the key consumption time series data and the key generation time series data corresponding to the graph node to obtain the node intrinsic features; and, each graph node is sequentially taken as a target graph node, and graph feature mining is performed on the target node intrinsic features corresponding to the target graph node based on the neighbor node intrinsic features corresponding to the neighbor graph nodes of the target graph node to obtain the node association features. Based on the node association characteristics, the predicted distribution of key load within a future preset time period is determined; Based on the difference between the predicted key load distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool, an elastic scaling strategy is generated, and the quantum key resource pool is elastically adjusted.

[0008] By adopting the above technical solution, historical operational data in the quantum key distribution network is obtained. This historical operational data includes key consumption time-series data and key generation time-series data for each communication node pair within the network, as well as the business association relationships between the communication node pairs. Based on these business association relationships, a key demand association graph is constructed. Then, for each graph node in the key demand association graph, self-feature mining is performed on the key consumption time-series data and key generation time-series data corresponding to the graph node to obtain the node intrinsic features. Furthermore, each graph node is sequentially taken as a target graph node. Based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node, graph feature mining is performed on the intrinsic features of the target graph node to obtain node association features. Based on these node association features, the predicted key load distribution within a preset future time period is determined. Finally, based on the difference between the predicted key load distribution and the key inventory distribution of communication node pairs in the quantum key resource pool, an elastic scaling strategy is generated, and the quantum key resource pool is elastically adjusted. In this invention, by constructing a key demand association graph and aggregating neighbor node information, the chain reaction of business associations is captured, improving the accuracy of key load prediction. At the same time, by deeply integrating key consumption and generation time-series data, early warning signs of supply and demand imbalance are detected, and targeted scaling instructions are generated based on accurate predictions and current inventory differences. This achieves proactive, on-demand, and precise elastic resource adjustment, solving the problem of resource supply and demand imbalance. While ensuring peak service quality, it reduces resource idleness during off-peak periods, improving the resource utilization and service stability of the QKD network.

[0009] Optionally, the step of constructing a key requirement association graph with communication node pairs as nodes based on the business association relationship includes: Using the communication node pairs as graph nodes, construct an initial graph structure; For any two graph nodes, determine whether there is a service association relationship between the corresponding communication node pairs, wherein the service association relationship includes at least one of the following: sharing the same source node or destination node, being carried on the multiplexing path of the same quantum key distribution link, or belonging to the same priority service type; Edges are established between graph nodes that are determined to have the business relationship, and the weights of the edges are determined according to the business relationship to form a weighted adjacency matrix; Based on the initial graph structure and the weighted adjacency matrix, a key requirement association graph is generated.

[0010] By adopting the above technical solution, in order to construct the key requirement association graph, an initial graph structure is constructed using communication node pairs as graph nodes. Then, for any two graph nodes, it is determined whether there is a business association relationship between the corresponding communication node pairs. The business association relationship includes at least one of the following: sharing the same source node or destination node, being carried on the multiplexing path of the same quantum key distribution link, or belonging to the same priority business type. Then, edges are established between the graph nodes that are determined to have a business association relationship, and the weight of the edges is determined according to the business association relationship to form a weighted adjacency matrix. Finally, based on the initial graph structure and the weighted adjacency matrix, the key requirement association graph is generated.

[0011] Optionally, the step of determining the weights of the edges based on the business relationships to form a weighted adjacency matrix includes: Preset a corresponding basic weight for each type of business relationship; For any two graph nodes, calculate the association strength quantification value of the two graph nodes under each relationship type of the business association relationship, wherein the calculation rule of the association strength quantification value is as follows: If the relationship type is sharing the same source node or destination node, then the association strength quantification value is determined based on the ratio of the number of shared nodes to the total number of node connections; If the relationship type is a multiplexed path carried on the same quantum key distribution link, then the correlation strength quantization value is determined based on the key slot multiplexing rate or link load correlation coefficient of the multiplexed path. If the relationship type belongs to the same priority business type, the association strength quantification value is determined based on the business priority matching degree and the key consumption pattern similarity. Based on the type-based weights, the quantified values ​​of the association strength are weighted and summed to obtain the association weight between the two graph nodes. Based on the aforementioned association weights, a weighted adjacency matrix is ​​constructed.

[0012] By adopting the above technical solution, in order to generate a weighted adjacency matrix, a corresponding type-based weight is preset for each type of business association. Then, for any two graph nodes, the association strength quantification value of the two graph nodes under each type of business association is calculated. The calculation rules for the association strength quantification value are as follows: if the relationship type is sharing the same source node or destination node, the association strength quantification value is determined based on the ratio of the number of shared nodes to the total number of node connections; if the relationship type is carried on a multiplexed path of the same quantum key distribution link, the association strength quantification value is determined based on the key slot multiplexing rate or link load correlation coefficient of the multiplexed path; if the relationship type belongs to the same priority business type, the association strength quantification value is determined based on the business priority matching degree and key consumption pattern similarity. Then, based on the type-based weight, the association strength quantification value is weighted and summed to obtain the association weight between the two graph nodes. Finally, based on the association weight, a weighted adjacency matrix is ​​constructed.

[0013] Optionally, the step of performing self-feature mining on the key consumption time-series data and the key generation time-series data corresponding to the graph nodes to obtain the intrinsic features of the nodes includes: The key consumption time-series data corresponding to the graph nodes are time-series encoded to obtain consumption time-series features; The key generation timing data corresponding to the graph node is time-series encoded to obtain the generation timing features; The consumption time-series features and the generation time-series features are fused and encoded to obtain the node intrinsic features.

[0014] By adopting the above technical solution, in order to obtain the intrinsic features of nodes, the timing data of key consumption corresponding to the graph node is time-coded to obtain the consumption timing features. Then, the timing data of key generation corresponding to the graph node is time-coded to obtain the generation timing features. Finally, the consumption timing features and the generation timing features are fused and encoded to obtain the intrinsic features of nodes.

[0015] Optionally, the step of performing time-series encoding on the key consumption time-series data corresponding to the graph node to obtain consumption time-series features includes: The key consumption time-series data is loaded into a gated time-series coding unit, wherein the gated time-series coding unit includes a first coding layer and a second coding layer, and both the first coding layer and the second coding layer include a linear mapping layer, and the second coding layer also includes a Sigmoid activation function; By performing a linear mapping on the key consumption time-series data through the first encoding layer, consumption candidate features are obtained; The key consumption time-series data is linearly mapped through the second encoding layer, and the corresponding linear mapping result is input into the Sigmoid activation function to obtain the consumption gating feature; The consumption candidate features and the consumption gating features are multiplied element-wise to obtain the consumption time-series features.

[0016] By adopting the above technical solution, in order to obtain the consumption time-series features, the key consumption time-series data is loaded into a gated time-series coding unit. The gated time-series coding unit includes a first coding layer and a second coding layer, both of which include a linear mapping layer. The second coding layer also includes a Sigmoid activation function. Then, the key consumption time-series data is linearly mapped through the first coding layer to obtain consumption candidate features. Then, the key consumption time-series data is linearly mapped through the second coding layer, and the corresponding linear mapping result is input into the Sigmoid activation function to obtain consumption gated features. Finally, the consumption candidate features and the consumption gated features are multiplied element-wise to obtain the consumption time-series features.

[0017] Optionally, the step of fusing and encoding the consumption time-series features and the generation time-series features to obtain the node intrinsic features includes: The consumed temporal features and the generated temporal features are loaded into the attention fusion unit, wherein the attention fusion unit includes a feature projection layer, a joint encoding layer, a score mapping layer and a weighted fusion layer; Through the feature projection layer, the consumed time-series features are linearly mapped to obtain consumed projection features, and the generated time-series features are linearly mapped to obtain generated projection features; The supply and demand joint features are obtained by adding the consumption projection features and the generation projection features element by element through the joint coding layer. The supply and demand joint features are linearly mapped through the score mapping layer, and the corresponding linear mapping results are activated to obtain attention score features. The attention score features are normalized to obtain the attention weight vector; Through the weighted fusion layer, the generation time-series features are weighted channel by channel based on the attention weight vector to obtain the generation-side contribution features. The consumption time-series features are then added element by element to the generation-side contribution features to obtain the node intrinsic features.

[0018] By adopting the above technical solution, in order to obtain the intrinsic features of the node, the consumption time-series features and the generation time-series features are loaded into the attention fusion unit. The attention fusion unit includes a feature projection layer, a joint encoding layer, a score mapping layer, and a weighted fusion layer. Then, through the feature projection layer, the consumption time-series features are linearly mapped to obtain consumption projection features, and the generation time-series features are linearly mapped to obtain generation projection features. Then, through the joint encoding layer, the consumption projection features and generation projection features are added element-wise to obtain the supply and demand joint features. Then, through the score mapping layer, the supply and demand joint features are linearly mapped, and the corresponding linear mapping results are activated to obtain attention score features. Then, the attention score features are normalized to obtain the attention weight vector. Then, through the weighted fusion layer, based on the attention weight vector, the generation time-series features are weighted channel-wise to obtain the generation side contribution features. Finally, the consumption time-series features and generation side contribution features are added element-wise to obtain the intrinsic features of the node.

[0019] Optionally, the step of performing graph feature mining on the intrinsic features of the target graph node corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node to obtain node association features includes: The intrinsic features of the target node and the intrinsic features of the neighboring nodes are loaded into the graph attention unit, wherein the graph attention unit includes a feature mapping layer, a weight learning layer and an information aggregation layer; Through the feature mapping layer, the intrinsic features of the target node are linearly mapped to obtain the target mapping features, and the intrinsic features of the neighboring nodes are linearly mapped to obtain the neighbor mapping features. For each of the neighbor mapping features, the neighbor mapping feature is added element-wise to the target mapping feature through the weight learning layer to obtain the neighbor-target joint feature; The joint features of the neighboring targets are linearly mapped, and the corresponding linear mapping results are activated to obtain the initial attention score; Based on the edge weights of each edge of the target graph node in the key requirement association graph, the initial attention score is weighted and corrected to obtain the neighbor attention score; The neighbor attention scores are normalized to obtain the attention weights; Through the information aggregation layer, based on the attention weight, the intrinsic features of the neighbor nodes are weighted and summed to obtain the neighbor aggregation features; The intrinsic features of the target node are concatenated with the neighbor aggregation features to obtain the node association features of the target graph node.

[0020] By adopting the above technical solution, in order to obtain node association features, the intrinsic features of the target node and the intrinsic features of neighboring nodes are loaded into the graph attention unit. The graph attention unit includes a feature mapping layer, a weight learning layer, and an information aggregation layer. Then, through the feature mapping layer, the intrinsic features of the target node are linearly mapped to obtain the target mapping features, and the intrinsic features of neighboring nodes are linearly mapped to obtain the neighbor mapping features. Then, for each neighbor mapping feature, through the weight learning layer, the neighbor mapping feature and the target mapping feature are added element-wise to obtain the joint neighbor-target feature. Then, the joint neighbor-target feature is linearly mapped, and the corresponding linear mapping result is activated to obtain the initial attention score. Then, based on the edge weights of each edge of the target graph node in the key requirement association graph, the initial attention score is weighted and corrected to obtain the neighbor attention score. Then, the neighbor attention score is normalized to obtain the attention weight. Then, through the information aggregation layer, based on the attention weight, the intrinsic features of neighboring nodes are weighted and summed to obtain the neighbor aggregation feature. Finally, the intrinsic features of the target node and the neighbor aggregation feature are concatenated to obtain the node association features of the target graph node.

[0021] Optionally, the step of determining the predicted distribution of key payload within a future preset time period based on the node association characteristics includes: The node association features of all the graph nodes are loaded into a preset temporal prediction unit, wherein the temporal prediction unit includes a time unrolling structure and an output mapping layer; Using the aforementioned time-expansion structure, the node association features are taken as initial input features and expanded progressively according to a preset number of future time steps. In the first future time step, a state update is performed based on the initial input features and a preset initial internal state, and the hidden state features of the first future time step are output. In each future time step after the first future time step, a state update is performed based on the hidden state features of the previous future time step and the updated internal state of the previous future time step, and the hidden state features of the current future time step are output. Through the output mapping layer, the hidden state features of each future time step are linearly mapped to obtain the key payload prediction value corresponding to each future time step. Based on the predicted key load values ​​at each future time step, the predicted key load distribution of the graph nodes is generated.

[0022] By adopting the above technical solution, in order to determine the predicted key load distribution within a preset future time period, the node association features of all graph nodes are loaded into a preset temporal prediction unit. The temporal prediction unit includes a time expansion structure and an output mapping layer. Then, through the time expansion structure, the node association features are used as initial input features and expanded step by step according to a preset number of future time steps. In the first future time step, the state is updated based on the initial input features and the preset initial internal state, and the hidden state features of the first future time step are output. In each future time step after the first future time step, the state is updated based on the hidden state features of the previous future time step and the updated internal state of the previous future time step, and the hidden state features of the current future time step are output. Then, through the output mapping layer, the hidden state features of each future time step are linearly mapped to obtain the predicted key load value corresponding to each future time step. Finally, based on the predicted key load values ​​of each future time step, the predicted key load distribution of the graph nodes is generated.

[0023] Optionally, the step of generating a resilient scaling strategy based on the difference between the key load prediction distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool includes: Obtain the key storage distribution of each communication node pair in the quantum key resource pool, wherein the key storage distribution is used to characterize the key storage amount of the communication node pair at the current moment; For each communication node pair, calculate the difference between the predicted load value of the communication node pair in the key load prediction distribution and the key inventory quantity in the key inventory distribution, wherein the difference is used to characterize the supply and demand deviation of the communication node pair in a future preset time period. The difference is compared with a preset expansion / reduction threshold. If the difference is greater than zero and exceeds the expansion threshold, the communication node pair is determined to need expansion. The expansion range is determined based on the product of the difference and the expansion safety coefficient, and a targeted expansion instruction for the communication node pair is generated. If the difference is less than zero and lower than the reduction threshold, the communication node pair is determined to need reduction. The reduction range is determined based on the product of the absolute value of the difference and the reduction redundancy coefficient, and a targeted reduction instruction for the communication node pair is generated. Based on the directional expansion and / or directional shrinkage commands of each communication node pair, an elastic expansion and shrinkage strategy is generated.

[0024] By adopting the above technical solution, in order to generate an elastic scaling strategy, the key inventory distribution of each communication node pair in the quantum key resource pool is obtained. The key inventory distribution is used to characterize the key storage amount of the communication node pair at the current moment. Then, for each communication node pair, the difference between the predicted load value of the communication node pair in the key load prediction distribution and the key inventory amount in the key inventory distribution is calculated. The difference is used to characterize the supply and demand deviation of the communication node pair in a future preset time period. Then, the difference is compared with a preset scaling threshold. If the difference is greater than zero and exceeds the scaling threshold, it is determined that the communication node pair needs to be expanded, and the scaling magnitude is determined based on the product of the difference and the scaling security coefficient, generating a targeted scaling instruction for the communication node pair. If the difference is less than zero and lower than the scaling threshold, it is determined that the communication node pair needs to be scaled down, and the scaling magnitude is determined based on the product of the absolute value of the difference and the scaling redundancy coefficient, generating a targeted scaling instruction for the communication node pair. Then, an elastic scaling strategy is generated based on the targeted scaling instructions and / or targeted scaling instructions of each communication node pair.

[0025] Secondly, this application also provides a quantum key pool elastic scaling system based on load prediction, which adopts the following technical solution: A load prediction-based quantum key pool elastic scaling system includes: The data acquisition module is used to acquire historical operating data in the quantum key distribution network. The historical operating data includes key consumption time-series data and key generation time-series data of each communication node pair in the network, as well as the business association relationship between the communication node pairs. The graph construction module is used to construct a key requirement association graph based on the business association relationships; The graph node feature mining module is used to perform self-feature mining on each graph node in the key demand association graph, on the key consumption time series data and the key generation time series data corresponding to the graph node, to obtain the node intrinsic features; and, taking each graph node as a target graph node in sequence, performing graph feature mining on the target node intrinsic features corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes of the target graph node, to obtain the node association features. The key load prediction module is used to determine the key load prediction distribution within a preset time period based on the node association characteristics. The scaling strategy generation and execution module is used to generate an elastic scaling strategy based on the difference between the predicted key load distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool, and to perform elastic adjustments to the quantum key resource pool.

[0026] In summary, this application includes at least the following beneficial technical effects: acquiring historical operational data in a quantum key distribution network, wherein the historical operational data includes key consumption time-series data and key generation time-series data of each communication node pair within the network, as well as business association relationships between communication node pairs; then, based on the business association relationships, constructing a key demand association graph; then, for each graph node in the key demand association graph, performing self-feature mining on the key consumption time-series data and key generation time-series data corresponding to the graph node to obtain node intrinsic features; and, sequentially taking each graph node as a target graph node, performing graph feature mining on the target graph node's target node intrinsic features based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node to obtain node association features; then, based on the node association features, determining the predicted key load distribution within a future preset time period; and then, based on the difference between the predicted key load distribution and the key inventory distribution of communication node pairs in the quantum key resource pool, generating an elastic scaling strategy and performing elastic adjustments to the quantum key resource pool. In this invention, by constructing a key demand association graph and aggregating neighbor node information, the chain reaction of business associations is captured, improving the accuracy of key load prediction. At the same time, by deeply integrating key consumption and generation time-series data, early warning signs of supply and demand imbalance are detected, and targeted scaling instructions are generated based on accurate predictions and current inventory differences. This achieves proactive, on-demand, and precise elastic resource adjustment, solving the problem of resource supply and demand imbalance. While ensuring peak service quality, it reduces resource idleness during off-peak periods, improving the resource utilization and service stability of the QKD network. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the overall process of an embodiment of this application.

[0028] Figure 2 This is a schematic diagram of the system structure of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0030] This application discloses a method for elastic scaling of a quantum key resource pool based on load prediction.

[0031] Reference Figure 1 A method for elastic scaling of quantum key pools based on load prediction includes: Step S11: Obtain historical operating data in the quantum key distribution network. The historical operating data includes key consumption time-series data and key generation time-series data of each communication node pair in the network, as well as business association relationships between communication node pairs.

[0032] It is important to note that historical operational data forms the foundation for key load prediction. Key consumption time-series data records the actual amount of keys consumed by each communication node pair at different historical points in time, reflecting the changing patterns of key resource demands from the business. Key generation time-series data records the actual amount of keys generated by each communication node pair through the quantum key distribution process at corresponding points in time, reflecting the dynamic characteristics of physical layer key supply. Business relationships describe the inherent connections between different communication node pairs at the business level, such as sharing the same source or destination node, being carried on the same multiplexing path of the quantum key distribution link, or belonging to the same priority business type. Obtaining these relationships allows for a subsequent view of the key requirements of each communication node pair from the perspective of network topology and business logic, rather than in isolation, providing a basis for constructing a key requirement relationship graph.

[0033] Step S12: Based on business relationships, construct a key requirement association graph with communication node pairs as nodes.

[0034] It should be noted that the key requirement association graph is a structured representation of the business relationships between communication node pairs. This step uses communication node pairs as graph nodes, the existence of business relationships as the basis for edge construction, and assigns corresponding weights to each edge based on the type and strength of the relationship, forming a weighted adjacency matrix and the corresponding graph structure. Through this construction process, the originally isolated communication node pairs are organized into an interconnected topological network. The weights of each edge in the graph quantitatively characterize the degree of mutual influence between connected node pairs in terms of key requirements, enabling subsequent graph feature mining to effectively aggregate information from neighboring nodes and enhance the ability to perceive the load change trends of target nodes.

[0035] Step S13: For each graph node in the key demand association graph, perform self-feature mining on the key consumption time series data and key generation time series data corresponding to the graph node to obtain the node intrinsic features; and, take each graph node as the target graph node in turn, and perform graph feature mining on the target node intrinsic features corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes of the target graph node to obtain the node association features.

[0036] It should be noted that this step involves a two-level feature mining process. The first level is self-feature mining, where for each graph node, its corresponding key consumption time-series data and key generation time-series data are time-encoded separately, and the time-series features of the consumption and generation sides are extracted and fused to obtain the node's intrinsic features that comprehensively reflect the dynamic patterns of key supply and demand. The second level is graph feature mining, where, under the topological constraints of the aforementioned key demand association graph, for each target graph node, the intrinsic features of its neighboring graph nodes are aggregated using an attention mechanism, and the aggregation process is weighted and guided by the edge weights in the graph, so that neighboring nodes with closer business connections to the target node contribute more to its feature representation. The final node association features not only include the node's own historical supply and demand patterns but also incorporate the load change information of business-related neighbors, possessing stronger expressive power and predictive potential.

[0037] Step S14: Based on node association characteristics, determine the predicted distribution of key load within a future preset time period.

[0038] It should be noted that after obtaining the node association features of each graph node, this step inputs these features, which contain rich spatiotemporal information, into the time series prediction model, and unfolds the prediction step by step according to the preset number of future time steps. At each future time step, the time series prediction model updates its state based on the current input features and internal state, outputs the hidden state features corresponding to that time step, and then obtains the key load prediction value for that time step through mapping. By performing the above prediction process on all communication node pairs, the key load prediction distribution of each node pair in the entire network within the preset future time period can be obtained, providing a quantitative basis for subsequent scaling decisions.

[0039] Step S15: Based on the difference between the key load prediction distribution and the key inventory distribution of communication node pairs in the quantum key resource pool, generate an elastic scaling strategy and perform elastic adjustment of the quantum key resource pool.

[0040] It should be noted that the key inventory distribution reflects the actual key storage volume of each communication node pair at the current moment, while the key load prediction distribution reflects the expected key demand within a preset future time period. This step calculates the difference between the two to obtain the supply-demand deviation for each communication node pair in the future time period. When the predicted load is significantly higher than the current inventory and exceeds the expansion threshold, it indicates that the node pair is facing a key shortage risk and a targeted expansion instruction needs to be generated according to the deviation magnitude. Conversely, when the predicted load is significantly lower than the current inventory and lower than the reduction threshold, it indicates that the node pair has idle resources and a targeted reduction instruction can be generated according to the deviation magnitude. Based on the targeted expansion and reduction instructions of each node pair, a fine-grained elastic expansion and reduction strategy is finally formed and triggered for execution, thereby realizing proactive and precise elastic adjustment of the quantum key resource pool, effectively avoiding resource waste and key supply shortages.

[0041] In the above implementation, historical operational data of the quantum key distribution network is acquired. This historical operational data includes key consumption time-series data and key generation time-series data of each communication node pair within the network, as well as business association relationships between the communication node pairs. Based on these business association relationships, a key demand association graph is constructed. Then, for each graph node in the key demand association graph, self-feature mining is performed on the key consumption time-series data and key generation time-series data corresponding to the graph node to obtain the node intrinsic features. Furthermore, each graph node is sequentially taken as a target graph node. Based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node, graph feature mining is performed on the intrinsic features of the target graph node to obtain node association features. Based on the node association features, the predicted key load distribution within a preset future time period is determined. Then, based on the difference between the predicted key load distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool, an elastic scaling strategy is generated, and the quantum key resource pool is elastically adjusted. In this invention, by constructing a key demand association graph and aggregating neighbor node information, the chain reaction of business associations is captured, improving the accuracy of key load prediction. At the same time, by deeply integrating key consumption and generation time-series data, early warning signs of supply and demand imbalance are detected, and targeted scaling instructions are generated based on accurate predictions and current inventory differences. This achieves proactive, on-demand, and precise elastic resource adjustment, solving the problem of resource supply and demand imbalance. While ensuring peak service quality, it reduces resource idleness during off-peak periods, improving the resource utilization and service stability of the QKD network.

[0042] As a further implementation of the method, the step of constructing a key requirement association graph with communication node pairs as nodes based on business relationships includes: Step S21: Construct the initial graph structure using communication node pairs as graph nodes.

[0043] Step S22: For any two graph nodes, determine whether there is a business association relationship between the corresponding communication node pairs. The business association relationship includes at least one of the following: sharing the same source node or destination node, being carried on the multiplexing path of the same quantum key distribution link, or belonging to the same priority business type.

[0044] Step S23: Establish edges between graph nodes that are determined to have business relationships, and determine the weights of the edges according to the business relationships to form a weighted adjacency matrix.

[0045] Step S24: Generate a key requirement association graph based on the initial graph structure and the weighted adjacency matrix.

[0046] It should be noted that from steps S21 to S24, by visualizing and quantifying the abstract business relationships between communication node pairs through a graph structure, the subsequent graph feature mining can effectively perceive and utilize the implicit key demand linkage patterns in the business topology. Specifically, sharing the same source or destination node means that two communication node pairs use the same source or destination node. For example, node pairs AB and AC share source node A. This convergence or divergence relationship in the topology means that changes in the key resource status of the source or destination node will simultaneously affect multiple associated node pairs. Being carried on the same multiplexed path of the same quantum key distribution link means that the key distribution paths of two communication node pairs physically pass through the same quantum key distribution link, and this link simultaneously serves the key generation of these multiple node pairs through time-division multiplexing and other methods. When the key generation capacity on the multiplexed path fluctuates, the key supply of each node pair carried on it will be affected synchronously. Belonging to the same priority business type means that the communication services carried by two communication node pairs are divided into the same priority level. Services with the same priority usually have similar key consumption patterns and bursty characteristics, so their key demands often exhibit synchronous fluctuation patterns. By identifying the aforementioned relationships and quantifying them as edge weights, the generated key demand relationship graph provides a topological basis and prior guidance on the influence strength for the attention network to aggregate neighbor features, enabling the model to more accurately capture the propagation effect of key payload in the network.

[0047] In the above implementation, in order to construct the key requirement association graph, an initial graph structure is constructed using communication node pairs as graph nodes. Then, for any two graph nodes, it is determined whether there is a business association relationship between the corresponding communication node pairs. The business association relationship includes at least one of the following: sharing the same source node or destination node, being carried on the multiplexing path of the same quantum key distribution link, or belonging to the same priority business type. Then, an edge is established between the graph nodes that are determined to have a business association relationship, and the weight of the edge is determined according to the business association relationship to form a weighted adjacency matrix. Finally, based on the initial graph structure and the weighted adjacency matrix, the key requirement association graph is generated.

[0048] As a further implementation of the method, the step of determining the edge weights based on business relationships to form a weighted adjacency matrix includes: Step S31: Preset the corresponding basic weight for each type of business relationship; Step S32: For any two graph nodes, calculate the association strength quantization value of the two graph nodes under each relationship type of business association relationship. The calculation rules for the association strength quantization value are as follows: If the relationship type is sharing the same source node or destination node, the association strength quantization value is determined based on the ratio of the number of shared nodes to the total number of node connections; if the relationship type is carried on the multiplexing path of the same quantum key distribution link, the association strength quantization value is determined based on the key slot multiplexing rate or link load correlation coefficient of the multiplexing path; if the relationship type belongs to the same priority business type, the association strength quantization value is determined based on the business priority matching degree and the key consumption pattern similarity.

[0049] Step S33: Based on the type-based weights, the quantified values ​​of the association strength are weighted and summed to obtain the association weight between the two graph nodes.

[0050] Step S34: Construct a weighted adjacency matrix based on the association weights.

[0051] It should be noted that steps S31 to S34 aim to quantify the strength of business relationships into specific edge weights, enabling the weighted adjacency matrix to more precisely characterize the mutual influence between communication node pairs. Specifically, the ratio of the number of shared nodes to the total number of node connections refers to the proportion of the number of nodes commonly connected to two communication node pairs that share the same source or destination node, relative to the total number of nodes each node is connected to. A higher ratio indicates a higher degree of topological clustering between the two node pairs, more intense competition for key resources, and a stronger association. Key slot reuse rate or link load correlation coefficient refers to the density of key generation slots allocated to multiple node pairs on the same quantum key distribution link multiplexing path. A higher reuse rate indicates a tighter supply coupling between node pairs. The link load correlation coefficient is determined by analyzing the consistency of historical key load trends for two communication node pairs on the link. If the loads of both nodes show a synchronous increase or decrease within the same time period, the correlation coefficient is close to 1, indicating a high degree of consistency in their influence by the link's state and a strong correlation. Service priority matching degree and key consumption pattern similarity refer to the degree of agreement between two node pairs belonging to the same priority service type. Service priority matching degree measures the degree of conformity in their priority classification criteria; a perfect match indicates a stronger correlation. Key consumption pattern similarity is calculated by comparing the morphological characteristics (such as peak periods and fluctuation frequencies) of the key consumption curves of two node pairs over historical periods. The more similar the patterns, the more consistent their key demand patterns and the stronger their correlation. Through the above multidimensional quantification rules, different types of business relationships are uniformly transformed into comparable and computable relationship strength values, and then weighted and fused with type-based weights. The resulting relationship weights can comprehensively reflect the degree of coupling between node pairs at the topological, physical, and business levels, providing a physically meaningful structural prior for subsequent graph attention networks.

[0052] In the above implementation, in order to generate a weighted adjacency matrix, a corresponding type-based weight is preset for each type of business association. Then, for any two graph nodes, the association strength quantification value of the two graph nodes under each type of business association is calculated. The calculation rules for the association strength quantification value are as follows: if the relationship type is sharing the same source node or destination node, the association strength quantification value is determined based on the ratio of the number of shared nodes to the total number of node connections; if the relationship type is carried on a multiplexed path of the same quantum key distribution link, the association strength quantification value is determined based on the key slot multiplexing rate or link load correlation coefficient of the multiplexed path; if the relationship type belongs to the same priority business type, the association strength quantification value is determined based on the business priority matching degree and key consumption pattern similarity. Then, based on the type-based weight, the association strength quantification value is weighted and summed to obtain the association weight between the two graph nodes. Finally, based on the association weight, a weighted adjacency matrix is ​​constructed.

[0053] As a further implementation of the method, the step of performing self-feature mining on the key consumption time-series data and key generation time-series data corresponding to graph nodes to obtain the intrinsic features of the nodes includes: Step S41: Perform time-series encoding on the key consumption time-series data corresponding to the graph nodes to obtain consumption time-series features.

[0054] Step S42: Perform time-series encoding on the key generation time-series data corresponding to the graph nodes to obtain the generation time-series features.

[0055] Step S43: The consumption time series features and the generation time series features are fused and encoded to obtain the node intrinsic features.

[0056] In the above implementation, in order to obtain the intrinsic features of a node, the timing data of the key consumption corresponding to the graph node is time-coded to obtain the consumption timing features. Then, the timing data of the key generation corresponding to the graph node is time-coded to obtain the generation timing features. Finally, the consumption timing features and the generation timing features are fused and encoded to obtain the intrinsic features of the node.

[0057] As a further implementation of the method, the step of performing time-series encoding on the key consumption time-series data corresponding to graph nodes to obtain consumption time-series features includes: Step S51: Load the key consumption time-series data into the gated time-series coding unit. The gated time-series coding unit includes a first coding layer and a second coding layer. Both the first coding layer and the second coding layer include a linear mapping layer. The second coding layer also includes a Sigmoid activation function.

[0058] Step S52: Through the first encoding layer, the key consumption time-series data is linearly mapped to obtain consumption candidate features.

[0059] Step S53: Through the second coding layer, the key consumption time-series data is linearly mapped, and the corresponding linear mapping result is input into the Sigmoid activation function to obtain the consumption gating feature.

[0060] Step S54: Multiply the consumption candidate features and consumption gating features element by element to obtain consumption time-series features.

[0061] It should be noted that from steps S51 to S54, a gating mechanism is used to encode the key consumption time-series data, aiming to adaptively filter and retain key information in the time-series data. Specifically, the gated time-series encoding unit contains two parallel processing paths: the first encoding layer directly maps the original key consumption time-series data to the feature space through linear mapping, generating consumption candidate features carrying all information; the second encoding layer also performs linear mapping on the original data, but additionally introduces the Sigmoid activation function to compress the mapping result to between 0 and 1, generating consumption gated features. Since the output value of the Sigmoid function is close to 0 indicating suppression and close to 1 indicating enhancement, the consumption gated features essentially learn a soft selection mechanism, which can automatically identify which time points of key consumption data are more important for subsequent predictions during the training process. Finally, the consumption candidate features and the consumption gated features are multiplied element-wise. The parts of the candidate features judged to be unimportant are decayed to near zero by the gated features, while the important parts are retained and highlighted, thus obtaining consumption time-series features that filter noise and focus on key fluctuation patterns, providing high-quality input for subsequent supply and demand fusion encoding.

[0062] It should be further explained that the basic principle of generating time series features is basically the same as that of consuming time series features, and the implementation method of generating time series features can be referred to steps S51 to S54.

[0063] In the above embodiment, in order to obtain the consumption time-series features, the key consumption time-series data is loaded into a gated time-series coding unit. The gated time-series coding unit includes a first coding layer and a second coding layer, and both the first coding layer and the second coding layer include a linear mapping layer. The second coding layer also includes a Sigmoid activation function. Then, the key consumption time-series data is linearly mapped through the first coding layer to obtain consumption candidate features. Then, the key consumption time-series data is linearly mapped through the second coding layer, and the corresponding linear mapping result is input into the Sigmoid activation function to obtain consumption gated features. Finally, the consumption candidate features and the consumption gated features are multiplied element-wise to obtain the consumption time-series features.

[0064] As a further implementation of the method, the step of fusing and encoding consumption time-series features and generation time-series features to obtain node intrinsic features includes: Step S61: The consumed temporal features and generated temporal features are loaded into the attention fusion unit, wherein the attention fusion unit includes a feature projection layer, a joint encoding layer, a score mapping layer and a weighted fusion layer.

[0065] Step S62: Through the feature projection layer, the consumed temporal features are linearly mapped to obtain the consumed projection features, and the generated temporal features are linearly mapped to obtain the generated projection features.

[0066] Step S63: Through the joint coding layer, the consumed projection features and the generated projection features are added element by element to obtain the supply and demand joint features.

[0067] Step S64: Through the score mapping layer, the supply and demand joint features are linearly mapped, and the corresponding linear mapping results are activated to obtain the attention score features.

[0068] Step S65: Normalize the attention score features to obtain the attention weight vector.

[0069] Step S66: Through the weighted fusion layer, the generation time-series features are weighted channel by channel based on the attention weight vector to obtain the generation side contribution features. The consumption time-series features and the generation side contribution features are then added element by element to obtain the node intrinsic features.

[0070] It should be noted that from steps S61 to S66, the attention mechanism is used to adaptively fuse the consumption time-series features and the generation time-series features. The core idea is to allow the consumption-side features to actively filter out information valuable for load prediction from the generation-side features. Specifically, the consumption time-series features and the generation time-series features are first mapped to a unified feature space through feature projection layers to obtain consumption projection features and generation projection features. Then, the two are fused by element-wise addition to form a joint supply and demand feature that simultaneously contains information from both the supply and demand sides. Subsequently, the joint feature is linearly mapped and activated to generate attention score features, which are then normalized to obtain an attention weight vector. This weight vector essentially reflects the importance of each channel of the generation time-series features in responding to changes in consumption-side demand. Finally, in the weighted fusion layer, the generation time-series features are weighted channel-wise according to the attention weight vector to extract the generation-side contribution features most relevant to the current consumption state. These features are then added element-wise to the original consumption time-series features to obtain the node intrinsic features. The advantage of this fusion method is that it does not simply splice or add the consumption and generation information together, but rather allows the consumption side to take the lead and selectively absorb the supplementary information from the generation side. This results in the final node intrinsic characteristics that not only fully preserve the original demand patterns of the consumption side, but also introduce the dynamic changes of the supply side, which can more sensitively reflect the imbalance between the key supply and demand of the node.

[0071] In the above implementation, to obtain the intrinsic features of a node, consumption time-series features and generation time-series features are loaded into an attention fusion unit. The attention fusion unit includes a feature projection layer, a joint encoding layer, a score mapping layer, and a weighted fusion layer. Then, through the feature projection layer, the consumption time-series features are linearly mapped to obtain consumption projection features, and the generation time-series features are linearly mapped to obtain generation projection features. Then, through the joint encoding layer, the consumption projection features and generation projection features are added element-wise to obtain supply and demand joint features. Then, through the score mapping layer, the supply and demand joint features are linearly mapped, and the corresponding linear mapping results are activated to obtain attention score features. Then, the attention score features are normalized to obtain an attention weight vector. Then, through the weighted fusion layer, based on the attention weight vector, the generation time-series features are weighted channel-wise to obtain generation-side contribution features. Finally, the consumption time-series features and generation-side contribution features are added element-wise to obtain the intrinsic features of the node.

[0072] As a further implementation of the method, the step of performing graph feature mining on the intrinsic features of the target graph node corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node to obtain node association features includes: Step S71: Load the intrinsic features of the target node and the intrinsic features of the neighboring nodes into the graph attention unit, wherein the graph attention unit includes a feature mapping layer, a weight learning layer and an information aggregation layer.

[0073] Step S72: Through the feature mapping layer, the intrinsic features of the target node are linearly mapped to obtain the target mapping features, and the intrinsic features of the neighboring nodes are linearly mapped to obtain the neighbor mapping features.

[0074] Step S73: For each neighbor mapping feature, the neighbor mapping feature and the target mapping feature are added element-wise through the weight learning layer to obtain the joint neighbor-target feature.

[0075] Step S74: Perform a linear mapping on the joint features of neighboring targets, and activate the corresponding linear mapping results to obtain the initial attention score.

[0076] Step S75: Based on the edge weights of each edge of the target graph node in the key requirement association graph, the initial attention score is weighted and corrected to obtain the neighbor attention score.

[0077] Step S76: Normalize the neighbor attention scores to obtain the attention weights.

[0078] Step S77: Through the information aggregation layer, based on attention weights, the intrinsic features of neighboring nodes are weighted and summed to obtain the neighbor aggregation features.

[0079] Step S78: The intrinsic features of the target node and the neighbor aggregation features are concatenated to obtain the node association features of the target graph node.

[0080] It should be noted that from steps S71 to S78, the intrinsic features of the target node and its neighboring nodes are mined through a graph attention mechanism, enabling each communication node to adaptively perceive and aggregate load change information of neighboring nodes closely related to its business. Specifically, the intrinsic features of the target node and each neighboring node are first linearly mapped to transform them into the same feature space. Then, each neighbor mapping feature is element-wise added to the target mapping feature to generate a joint feature carrying target-neighbor interaction information. The joint feature is then scored using linear mapping and an activation function to obtain an initial attention score that measures the initial importance of each neighbor to the target node. Based on this, pre-established edge weights in the key requirement association graph are introduced to weight and correct the initial attention score, so that neighboring nodes that are more closely coupled with the target node at the topological, physical, or business levels receive higher attention scores. After normalization, the intrinsic features of each neighboring node are weighted and summed using the final attention weights to generate a neighbor aggregation feature, which centrally reflects the weighted influence of business-related neighbors around the target node. Finally, the intrinsic features of the target node are concatenated with the aggregated features of its neighbors to form a node association feature that includes both the node's own supply and demand time series patterns and the load change information of business-related neighbors, providing a more comprehensive feature expression for subsequent key load prediction.

[0081] In the above implementation, to obtain node association features, the intrinsic features of the target node and the intrinsic features of neighboring nodes are loaded into a graph attention unit. The graph attention unit includes a feature mapping layer, a weight learning layer, and an information aggregation layer. Then, through the feature mapping layer, the intrinsic features of the target node are linearly mapped to obtain target mapping features, and the intrinsic features of neighboring nodes are linearly mapped to obtain neighbor mapping features. Then, for each neighbor mapping feature, through the weight learning layer, the neighbor mapping feature and the target mapping feature are added element-wise to obtain a joint neighbor-target feature. Then, the joint neighbor-target feature is linearly mapped, and the corresponding linear mapping result is activated to obtain an initial attention score. Then, based on the edge weights of each edge of the target graph node in the key requirement association graph, the initial attention score is weighted and corrected to obtain a neighbor attention score. Then, the neighbor attention score is normalized to obtain attention weights. Then, through the information aggregation layer, based on the attention weights, the intrinsic features of neighboring nodes are weighted and summed to obtain a neighbor aggregation feature. Finally, the intrinsic features of the target node and the neighbor aggregation feature are concatenated to obtain the node association features of the target graph node.

[0082] As a further implementation of the method, the step of determining the predicted distribution of key payload within a future preset time period based on node association characteristics includes: Step S81: Load the node association features of all graph nodes into a preset temporal prediction unit, wherein the temporal prediction unit includes a time unfolding structure and an output mapping layer.

[0083] Step S82: Using a time-expanded structure, the node association features are used as initial input features and gradually expanded according to a preset number of future time steps; and, in the first future time step, the state is updated based on the initial input features and the preset initial internal state, and the hidden state features of the first future time step are output; and, in each future time step after the first future time step, the state is updated based on the hidden state features of the previous future time step and the updated internal state of the previous future time step, and the hidden state features of the current future time step are output.

[0084] Step S83: Through the output mapping layer, the hidden state features of each future time step are linearly mapped to obtain the key payload prediction value corresponding to each future time step.

[0085] Step S84: Based on the key load prediction values ​​for each future time step, generate the key load prediction distribution of the graph nodes.

[0086] In the above implementation, in order to determine the key load prediction distribution within a preset future time period, the node association features of all graph nodes are loaded into a preset temporal prediction unit. The temporal prediction unit includes a time expansion structure and an output mapping layer. Then, through the time expansion structure, the node association features are used as initial input features and expanded step by step according to a preset number of future time steps. In the first future time step, the state is updated based on the initial input features and the preset initial internal state, and the hidden state features of the first future time step are output. In each future time step after the first future time step, the state is updated based on the hidden state features of the previous future time step and the updated internal state of the previous future time step, and the hidden state features of the current future time step are output. Then, through the output mapping layer, the hidden state features of each future time step are linearly mapped to obtain the key load prediction value corresponding to each future time step. Finally, based on the key load prediction values ​​of each future time step, the key load prediction distribution of the graph nodes is generated.

[0087] As a further implementation of the method, the step of generating a flexible scaling strategy based on the difference between the key load prediction distribution and the key inventory distribution of communication node pairs in the quantum key resource pool includes: Step S91: Obtain the key storage distribution of each communication node pair in the quantum key resource pool, wherein the key storage distribution is used to characterize the key storage amount of the communication node pair at the current moment.

[0088] Step S92: For each communication node pair, calculate the difference between the predicted load value in the key load prediction distribution and the key inventory quantity in the key inventory distribution, wherein the difference is used to characterize the supply and demand deviation of the communication node pair in a future preset time period.

[0089] Step S93: Compare the difference with a preset expansion / shrinkage threshold. If the difference is greater than zero and exceeds the expansion threshold, it is determined that the communication node pair needs to be expanded. The expansion range is determined based on the product of the difference and the expansion safety coefficient, and a targeted expansion instruction for the communication node pair is generated. If the difference is less than zero and lower than the shrinkage threshold, it is determined that the communication node pair needs to be shrunk. The shrinkage range is determined based on the product of the absolute value of the difference and the shrinkage redundancy coefficient, and a targeted shrinkage instruction for the communication node pair is generated.

[0090] Step S94: Generate an elastic scaling strategy based on the directional scaling-up instructions and / or directional scaling-down instructions of each communication node pair.

[0091] It should be noted that steps S91 to S94 transform the key load prediction results into specific executable resource adjustment instructions, thus realizing a complete link from prediction to closed-loop control. Specifically, firstly, the actual key inventory distribution of each communication node pair at the current moment is obtained. Then, for each node pair, the difference between its future predicted load value and its current inventory is calculated. This difference directly reflects the supply and demand gap or surplus faced by the node pair during the prediction period. Comparing the difference with a preset scaling threshold is to avoid frequent adjustments caused by small fluctuations; scaling actions are only triggered when the supply and demand deviation exceeds the tolerance range. When the difference is greater than zero and exceeds the expansion threshold, it indicates that the key demand will significantly exceed the current inventory, posing a risk of key depletion. In this case, the expansion range is determined based on the product of the difference and the expansion security coefficient, with a security coefficient greater than 1 ensuring a buffer margin after expansion. When the difference is less than zero and below the shrinkage threshold, it indicates that the key inventory will be severely excessive, resulting in idle and wasted resources. In this case, the shrinkage range is determined based on the product of the absolute value of the difference and the shrinkage redundancy coefficient, with a redundancy coefficient less than 1 enabling resource recovery with a safety margin. Finally, the targeted expansion and shrinkage instructions from each node pair are aggregated to form a network-wide elastic expansion and shrinkage strategy. This avoids the risk of communication interruption due to key shortages and reduces resource waste caused by excessive reserves, achieving precise and differentiated elastic resource scheduling.

[0092] In the above implementation, in order to generate a flexible scaling strategy, the key inventory distribution of each communication node pair in the quantum key resource pool is obtained, wherein the key inventory distribution is used to characterize the key storage amount of the communication node pair at the current moment. Then, for each communication node pair, the difference between the predicted load value of the communication node pair in the key load prediction distribution and the key inventory amount in the key inventory distribution is calculated, wherein the difference is used to characterize the supply and demand deviation of the communication node pair in a future preset time period. Then, the difference is compared with a preset scaling threshold. If the difference is greater than zero and exceeds the scaling threshold, it is determined that the communication node pair needs to be expanded, and the scaling magnitude is determined based on the product of the difference and the scaling security coefficient, generating a targeted scaling instruction for the communication node pair. And, if the difference is less than zero and lower than the scaling threshold, it is determined that the communication node pair needs to be scaled down, and the scaling magnitude is determined based on the product of the absolute value of the difference and the scaling redundancy coefficient, generating a targeted scaling instruction for the communication node pair. Then, based on the targeted scaling instructions and / or targeted scaling instructions of each communication node pair, a flexible scaling strategy is generated.

[0093] This application also discloses a quantum key pool elastic scaling system based on load prediction.

[0094] refer to Figure 2 A load prediction-based quantum key pool elastic scaling system includes: The data acquisition module is used to acquire historical operational data in the quantum key distribution network. The historical operational data includes key consumption time-series data and key generation time-series data of each communication node pair in the network, as well as the business relationship between the communication node pairs. The graph construction module is used to build a key requirement association graph based on business relationships; The graph node feature mining module is used to perform self-feature mining on the key consumption time series data and key generation time series data corresponding to each graph node in the key demand association graph to obtain the node intrinsic features; and, taking each graph node as a target graph node in turn, to perform graph feature mining on the target graph node intrinsic features corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes of the target graph node to obtain the node association features. The key load prediction module is used to determine the predicted distribution of key load within a preset time period based on node association characteristics. The scaling strategy generation and execution module is used to generate an elastic scaling strategy based on the difference between the key load prediction distribution and the key inventory distribution of communication node pairs in the quantum key resource pool, and to perform elastic adjustments to the quantum key resource pool.

[0095] The load prediction-based quantum key pool elastic scaling system of the present invention can implement any of the load prediction-based quantum key pool elastic scaling methods, and the specific working process of the load prediction-based quantum key pool elastic scaling system of the present invention can refer to the corresponding process in the load prediction-based quantum key pool elastic scaling method described above.

[0096] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.

Claims

1. A method for elastic scaling of a quantum key pool based on load prediction, characterized in that, include: Acquire historical operational data in a quantum key distribution network, wherein the historical operational data includes key consumption time-series data and key generation time-series data for each communication node pair within the network, as well as the business association relationships between the communication node pairs; Based on the aforementioned business relationships, a key requirement association graph is constructed with communication node pairs as nodes; For each graph node in the key demand association graph, self-feature mining is performed on the key consumption time series data and the key generation time series data corresponding to the graph node to obtain the node intrinsic features; and, each graph node is sequentially taken as a target graph node, and graph feature mining is performed on the target node intrinsic features corresponding to the target graph node based on the neighbor node intrinsic features corresponding to the neighbor graph nodes of the target graph node to obtain the node association features. Based on the node association characteristics, the predicted distribution of key load within a future preset time period is determined; Based on the difference between the predicted key load distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool, an elastic scaling strategy is generated, and the quantum key resource pool is elastically adjusted.

2. The method of claim 1, wherein, The step of constructing a key requirement association graph with communication node pairs as nodes based on the business association relationship includes: Using the communication node pairs as graph nodes, construct an initial graph structure; For any two graph nodes, determine whether there is a service association relationship between the corresponding communication node pairs, wherein the service association relationship includes at least one of the following: sharing the same source node or destination node, being carried on the multiplexing path of the same quantum key distribution link, or belonging to the same priority service type; Edges are established between graph nodes that are determined to have the business relationship, and the weights of the edges are determined according to the business relationship to form a weighted adjacency matrix; Based on the initial graph structure and the weighted adjacency matrix, a key requirement association graph is generated.

3. The method of claim 2, wherein, The step of determining the weights of the edges based on the business relationships and forming a weighted adjacency matrix includes: Preset a corresponding basic weight for each type of business relationship; For any two graph nodes, calculate the association strength quantification value of the two graph nodes under each relationship type of the business association relationship, wherein the calculation rule of the association strength quantification value is as follows: If the relationship type is sharing the same source node or destination node, then the association strength quantification value is determined based on the ratio of the number of shared nodes to the total number of node connections; If the relationship type is a multiplexed path carried on the same quantum key distribution link, then the correlation strength quantization value is determined based on the key slot multiplexing rate or link load correlation coefficient of the multiplexed path. If the relationship type belongs to the same priority business type, the association strength quantification value is determined based on the business priority matching degree and the key consumption pattern similarity. Based on the type-based weights, the quantified values ​​of the association strength are weighted and summed to obtain the association weights between the two graph nodes. Based on the aforementioned association weights, a weighted adjacency matrix is ​​constructed.

4. The method of claim 1, wherein, The step of performing self-feature mining on the key consumption time-series data and key generation time-series data corresponding to the graph nodes to obtain the intrinsic features of the nodes includes: The key consumption time-series data corresponding to the graph nodes are time-series encoded to obtain consumption time-series features; The key generation timing data corresponding to the graph node is time-series encoded to obtain the generation timing features; The consumption time-series features and the generation time-series features are fused and encoded to obtain the node intrinsic features.

5. The method of claim 4, wherein, The step of performing time-series encoding on the key consumption time-series data corresponding to the graph node to obtain consumption time-series features includes: The key consumption time-series data is loaded into a gated time-series coding unit, wherein the gated time-series coding unit includes a first coding layer and a second coding layer, and both the first coding layer and the second coding layer include a linear mapping layer, and the second coding layer also includes a Sigmoid activation function; By performing a linear mapping on the key consumption time-series data through the first encoding layer, consumption candidate features are obtained; The key consumption time-series data is linearly mapped through the second encoding layer, and the corresponding linear mapping result is input into the Sigmoid activation function to obtain the consumption gating feature; The consumption candidate features and the consumption gating features are multiplied element-wise to obtain the consumption time-series features.

6. The method of claim 4, wherein, The step of fusing and encoding the consumption time-series features and the generation time-series features to obtain the node intrinsic features includes: The consumed temporal features and the generated temporal features are loaded into the attention fusion unit, wherein the attention fusion unit includes a feature projection layer, a joint encoding layer, a score mapping layer and a weighted fusion layer; Through the feature projection layer, the consumed time-series features are linearly mapped to obtain consumed projection features, and the generated time-series features are linearly mapped to obtain generated projection features; The supply and demand joint features are obtained by adding the consumption projection features and the generation projection features element by element through the joint coding layer. The supply and demand joint features are linearly mapped through the score mapping layer, and the corresponding linear mapping results are activated to obtain attention score features. The attention score features are normalized to obtain the attention weight vector; Through the weighted fusion layer, the generation time-series features are weighted channel by channel based on the attention weight vector to obtain the generation-side contribution features. The consumption time-series features are then added element by element to the generation-side contribution features to obtain the node intrinsic features.

7. The method of claim 1, wherein, The step of performing graph feature mining on the intrinsic features of the target graph node corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes corresponding to the target graph node to obtain node association features includes: The intrinsic features of the target node and the intrinsic features of the neighboring nodes are loaded into the graph attention unit, wherein the graph attention unit includes a feature mapping layer, a weight learning layer and an information aggregation layer; Through the feature mapping layer, the intrinsic features of the target node are linearly mapped to obtain the target mapping features, and the intrinsic features of the neighboring nodes are linearly mapped to obtain the neighbor mapping features. For each of the neighbor mapping features, the neighbor mapping feature is added element-wise to the target mapping feature through the weight learning layer to obtain the neighbor-target joint feature; The joint features of the neighboring targets are linearly mapped, and the corresponding linear mapping results are activated to obtain the initial attention score; Based on the edge weights of each edge of the target graph node in the key requirement association graph, the initial attention score is weighted and corrected to obtain the neighbor attention score; The neighbor attention scores are normalized to obtain the attention weights; Through the information aggregation layer, based on the attention weight, the intrinsic features of the neighbor nodes are weighted and summed to obtain the neighbor aggregation features; The intrinsic features of the target node are concatenated with the neighbor aggregation features to obtain the node association features of the target graph node.

8. The method of claim 1, wherein, The step of determining the predicted distribution of key load within a future preset time period based on the node association characteristics includes: The node association features of all the graph nodes are loaded into a preset temporal prediction unit, wherein the temporal prediction unit includes a time unrolling structure and an output mapping layer; Using the aforementioned time-expansion structure, the node association features are taken as initial input features and expanded progressively according to a preset number of future time steps. In the first future time step, a state update is performed based on the initial input features and a preset initial internal state, and the hidden state features of the first future time step are output. In each future time step after the first future time step, a state update is performed based on the hidden state features of the previous future time step and the updated internal state of the previous future time step, and the hidden state features of the current future time step are output. Through the output mapping layer, the hidden state features of each future time step are linearly mapped to obtain the key payload prediction value corresponding to each future time step. Based on the predicted key load values ​​at each future time step, the predicted key load distribution of the graph nodes is generated.

9. The method of claim 1, wherein, The step of generating a flexible scaling strategy based on the difference between the key load prediction distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool includes: Obtain the key storage distribution of each communication node pair in the quantum key resource pool, wherein the key storage distribution is used to characterize the key storage amount of the communication node pair at the current moment; For each communication node pair, calculate the difference between the predicted load value of the communication node pair in the key load prediction distribution and the key inventory quantity in the key inventory distribution, wherein the difference is used to characterize the supply and demand deviation of the communication node pair in a future preset time period; The difference is compared with a preset expansion / reduction threshold. If the difference is greater than zero and exceeds the expansion threshold, the communication node pair is determined to need expansion. The expansion range is determined based on the product of the difference and the expansion safety coefficient, and a targeted expansion instruction for the communication node pair is generated. If the difference is less than zero and lower than the reduction threshold, the communication node pair is determined to need reduction. The reduction range is determined based on the product of the absolute value of the difference and the reduction redundancy coefficient, and a targeted reduction instruction for the communication node pair is generated. Based on the directional expansion and / or directional shrinkage commands of each communication node pair, an elastic expansion and shrinkage strategy is generated.

10. A quantum key resource pool elastic scaling system based on load prediction, characterized in that, include: The data acquisition module is used to acquire historical operating data in the quantum key distribution network. The historical operating data includes key consumption time-series data and key generation time-series data of each communication node pair in the network, as well as the business association relationship between the communication node pairs. The graph construction module is used to construct a key requirement association graph based on the business relationship. The graph node feature mining module is used to perform self-feature mining on each graph node in the key demand association graph, on the key consumption time series data and the key generation time series data corresponding to the graph node, to obtain the node intrinsic features; and, taking each graph node as a target graph node in sequence, performing graph feature mining on the target node intrinsic features corresponding to the target graph node based on the intrinsic features of the neighboring graph nodes of the target graph node, to obtain the node association features. The key load prediction module is used to determine the key load prediction distribution within a preset time period based on the node association characteristics. The scaling strategy generation and execution module is used to generate an elastic scaling strategy based on the difference between the predicted key load distribution and the key inventory distribution of the communication node pairs in the quantum key resource pool, and to perform elastic adjustments to the quantum key resource pool.