Power distribution terminal communication method based on quantum key distribution and related device
By constructing partial differential equations and using Lagrange optimization to solve the key generation rate, combined with dynamic key pool management, the real-time performance and adaptability issues of quantum key distribution systems in power distribution networks were solved, achieving efficient key resource allocation and improved communication security.
Patent Information
- Application Number
- CN202511210809.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-10-17
AI Technical Summary
Existing quantum key distribution systems suffer from insufficient real-time performance, poor dynamic adaptability, and low key management efficiency in power distribution terminal applications, making it difficult to meet the high-frequency key requirements and dynamic changes in complex channel environments of power distribution networks.
By constructing a partial differential equation for the key generation rate and solving it using Lagrange optimization, the key generation rate is optimized. By establishing an integral equation for the key pool capacity and adopting a dynamic key pool management strategy, combined with load prediction and hierarchical key pool optimization, flexible allocation and efficient management of key resources can be achieved.
It improves the quantum key generation rate, enhances the system's anti-interference capability and security, meets the requirements of high real-time performance and complex channel environments in power distribution networks, and improves communication efficiency and security.
Smart Images

Figure CN120811601A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of communication security, and relates to a power distribution terminal communication method based on quantum key distribution and related devices. BACKGROUND
[0002] In a power distribution automation system, a power distribution terminal undertakes the functions of remote measurement, remote signaling and remote control (i.e., "three remotes") to realize remote monitoring and control of the state of a power distribution network. However, traditional communication encryption technology relies on mathematical complexity, and its security is threatened by quantum computers.
[0003] Quantum key distribution (QKD) uses the uncertainty principle and unconditional security of quantum mechanics to ensure the security of the key during transmission, so even if an attacker intercepts a photon stream, the key cannot be reconstructed. Therefore, combining QKD with power distribution terminal communication can significantly improve the anti-quantum attack capability of power grid communication. However, existing QKD systems are mainly applied in the fields of finance and government affairs, and mature solutions have not yet been formed in the power system, and there are the following shortcomings: (1) Lack of real-time performance: power grid communication requires millisecond-level response, while the key generation rate of traditional QKD systems is limited by physical equipment, making it difficult to meet the high-frequency key demand.
[0004] (2) Poor dynamic adaptability: the channel environment of the power distribution terminal is complex, including electromagnetic interference, fiber attenuation, data load fluctuations and other factors, resulting in unstable QKD key generation rate.
[0005] (3) Low key management efficiency: the existing QKD system's key pool management method cannot adapt to the high consumption demand of the power distribution terminal, easily leading to key overload or shortage, affecting the continuity of secure communication. SUMMARY
[0006] The purpose of the present application is to overcome the shortcomings of the prior art and provide a power distribution terminal communication method based on quantum key distribution and related devices to solve the problems of lack of real-time performance, poor dynamic adaptability and low key management efficiency in the prior art.
[0007] To achieve the above purpose, the following technical solutions are adopted: The power distribution terminal communication method based on quantum key distribution comprises the following steps: The propagation influencing factors of collected photons in the optical fiber are constructed, a partial differential equation of the key generation rate is constructed, the partial differential equation is decomposed into a time-dependent part and a space-dependent part, the time-dependent part and the space-dependent part are solved, and a key generation rate expression is obtained; under the constraint of the propagation influencing factors, the key generation rate expression is solved by Lagrange optimization to obtain an optimal key generation rate; An integral equation of the key pool capacity is constructed, based on the optimal key generation rate, the integral equation of the key pool capacity is solved by Lagrange optimization in combination with the number of available keys of the key pool, the key consumption rate and the key replenishment rate, and a first optimal key pool capacity is obtained; The load of the power distribution terminal in a stable state is obtained, a predicted value of the key consumption rate considering the load is calculated and obtained, the change value of the number of available keys of the key pool is obtained in combination with the optimal key generation rate, and then it is judged whether the first optimal key pool capacity needs to be updated, if yes, the updated second optimal key pool capacity is obtained by updating the optimal key generation rate; Based on the first optimal key pool capacity or the second optimal key pool capacity, the number of available keys is allocated to key pools of different levels according to the priority of the communication data stored in the key pool, and the key pools of different levels include a high-priority key pool, a normal key pool and a low-priority key pool.
[0008] Further improvements of the application are as follows: Preferably, the propagation influencing factors include channel attenuation, environmental noise and signal compensation.
[0009] Preferably, the key generation rate expression is as follows:
[0010] The optimization target of the key generation rate expression is as follows:
[0011] Wherein, is the key generation rate, is an integral constant of the time differential equation, is an integral constant of the space differential equation, and e is an exponential function, is an initial attenuation factor, is a time attenuation factor, represents an initial noise intensity, is a noise attenuation factor, is a compensation coefficient, is a photon attenuation factor in the optical fiber, is a transmission distance, is time.
[0012] Preferably, the integral equation of the key pool capacity is as follows:
[0013] wherein, is the key pool capacity at time t, is the time integral variable, is the initial key pool available key number, is the key generation rate at time t, is the key consumption rate at time t, is the key discard rate at time t, is the key replenishment rate; the optimization objective of the key pool capacity integral equation is that the key pool capacity is close to the optimal key pool capacity.
[0014] Preferably, the process of judging whether the first optimal key pool capacity needs to be updated is: obtaining a key pool available key number judgment factor through the change value of the key pool available key number, comparing the key pool available key number judgment factor with a preset threshold, and if it is less than the preset threshold, the first optimal key pool capacity needs to be updated.
[0015] Preferably, the formula for updating the key generation rate is:
[0016] wherein, is the key generation rate, is the predicted value of the key consumption rate, is a regularization parameter, is a basic key generation rate, and T is an upper limit of key generation time.
[0017] Preferably, the available key number of each level of the key pool is related to a key generation allocation ratio, and the key generation allocation ratio is obtained through convex optimization calculation.
[0018] The power distribution terminal communication device based on quantum key distribution comprises: a key generation rate module, which collects propagation influencing factors of photons in an optical fiber, constructs a partial differential equation of a key generation rate, decomposes the partial differential equation into a time-dependent part and a space-dependent part, solves the time-dependent part and the space-dependent part, and obtains a key generation rate expression; under the constraint of the propagation influencing factors, the key generation rate expression is solved through Lagrange optimization to obtain an optimal key generation rate; a key pool capacity optimization module, which constructs a key pool capacity integral equation, based on the optimal key generation rate, combines a key pool available key number, a key consumption rate, and a key replenishment rate, solves the key pool capacity integral equation through Lagrange optimization to obtain a first optimal key pool capacity; The load update optimization module obtains the load of the distribution terminal in a stable state, calculates the predicted value of the key consumption rate taking the load into consideration, and combines it with the optimal key generation rate to obtain the change in the number of available keys in the key pool. It then determines whether the capacity of the first optimal key pool needs to be updated. If so, it obtains the updated second optimal key pool capacity by updating the key generation rate. The key distribution module allocates the number of available keys to key pools at each level based on the first optimal key pool capacity or the second optimal key pool capacity and according to the priority of the communication data stored in the key pool. The key pools at each level include a high priority key pool, a common key pool and a low priority key pool.
[0019] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the power distribution terminal communication method based on quantum key distribution is implemented.
[0020] .A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the distribution terminal communication method based on quantum key distribution is implemented.
[0021] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a distribution terminal communication method based on quantum key distribution. This method optimizes the effects of channel attenuation, environmental noise, and signal compensation by introducing a quantum key generation rate calculation method based on a calculus model, thereby improving the quantum key generation rate and communication efficiency. A dynamic key pool management strategy is adopted, combined with a distributed optimization algorithm, to achieve efficient management of the key pool and flexible allocation of key resources, meeting the needs of multiple terminals and dynamic loads in the distribution network. In addition, the present invention also enhances the system's anti-interference capability and improves the security and stability of quantum key distribution by accurately modeling quantum channel noise and interference. This method constructs a dynamic key management model driven by multiple integral and differential equations to meet the requirements of high real-time performance and complex channel environments of distribution terminals, and can improve the application efficiency and security of quantum key distribution technology in distribution networks. This technical solution effectively solves the application problems of quantum communication in distribution networks and improves the security and reliability of distribution system communications. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a flow chart of a power distribution terminal communication method based on quantum key distribution of the present invention; Figure 2 This is a logic flow chart of power distribution terminal communication based on quantum key distribution of the present invention; Figure 3A power distribution terminal communication device based on quantum key distribution according to the present application. DETAILED DESCRIPTION
[0023] Hereinafter, the terms "first", "second", "third", "fourth" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third", "fourth" can explicitly or implicitly include one or more of the features.
[0024] The method of shooting provided by the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and the like. The embodiments of the present application do not make any limitation on the specific type of the terminal device.
[0025] It should be noted that the terms "first", "second", and the like in the specification and drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0026] The first aspect of the present application proposes a power distribution terminal communication method based on quantum key distribution, specifically comprising the following steps: S1, collecting the propagation influencing factors of photons in an optical fiber, constructing a partial differential equation of key generation rate, decomposing the partial differential equation into a time-dependent part and a space-dependent part, solving the time-dependent part and the space-dependent part, and obtaining a key generation rate expression; under the constraint of the propagation influencing factors, the key generation rate expression is solved by Lagrange optimization to obtain an optimal key generation rate; S2, construct a key pool capacity integral equation based on the optimal key generation rate, combine the available key number of the key pool, the key consumption rate and the key replenishment rate, solve the key pool capacity integral equation through Lagrange optimization to obtain a first optimal key pool capacity; S3, obtain the power distribution terminal load at the steady state, calculate the predicted value of the key consumption rate considering the load, combine the optimal key generation rate to obtain the change value of the available key number of the key pool, and then judge whether the first optimal key pool capacity needs to be updated, if yes, update the key generation rate to obtain a second optimal key pool capacity; S4, based on the first optimal key pool capacity or the second optimal key pool capacity, allocate the available key number to each level of the key pool according to the communication data priority stored in the key pool, and the each level of the key pool includes a high priority key pool, a normal key pool and a low priority key pool.
[0027] The method of the application first establishes a partial differential equation model of the key generation rate, analyzes the influence of channel attenuation, environmental noise and signal compensation on the key generation rate, optimizes the partial differential equation model of the key generation rate to obtain a first optimal key generation rate, which is the optimal key generation rate under the long-term resource framework, so that the channel adaptive key generation is realized, and the rate and security are improved. By constructing a key pool capacity differential equation, the key generation, consumption, discard and replenishment process is reflected. Combined with the change value of the load, the second optimal key pool capacity when the short-term demand response changes can be obtained, so that the available key number to be allocated in the subsequent can not only meet the long-term demand of the entire communication terminal, but also respond to the communication terminal demand when the load changes. The layered key pool strategy is adopted to ensure the key supply of high priority tasks, improve the key utilization rate and reduce waste. The method of the application ensures that the key supply matches the communication demand, avoids key shortage or accumulation, and improves the security and stability of power communication.
[0028] In some embodiments of the application, in S1, during the quantum key distribution (QKD) process, the photons propagating in the optical fiber channel are affected by factors such as channel attenuation, environmental noise and signal compensation, resulting in a key generation rate which is not a fixed value, but a dynamic value that changes over time and transmission distance This step establishes a partial differential equation model for describing the evolution of the key generation rate.
[0029] Let be the key generation rate (unit: bit / s); key represents the key, which changes due to the influence of channel attenuation, environmental noise and signal compensation, be the transmission distance (unit: km); be the time (unit: s).
[0030] Specifically, channel attenuation is the loss of fiber channel that leads to the decrease of photon number, which affects the key generation rate. Let the channel attenuation factor be .
[0031] Specifically, environmental noise is the additional bit error rate introduced by external interference. Let the environmental noise factor be , noise represents environmental noise.
[0032] Specifically, signal compensation is to improve the key generation rate by optimizing the light source intensity or bit error correction. Let the compensation coefficient of signal compensation be .
[0033] Based on the above influencing factors, the partial differential equation of the key generation rate is established, as follows (1): (1) Where, is the key generation rate (unit: bit / s); e is the exponential function is the photon attenuation factor in the optical fiber, which affects the long-distance key distribution (unit: km -1 ); is the transmission distance (unit: km).
[0034] is the channel attenuation factor (unit: dB / km), which follows the exponential decay model, as follows (2): (2) Where, is the initial attenuation factor (unit: dB / km); is the time attenuation factor (unit: s -1 ).
[0035] is the environmental noise factor (unit: dB), which can be modeled as Poisson noise, as follows (3): (3) Where, represents the initial noise intensity (unit: dB); is the noise attenuation factor (unit: s -1 ).
[0036] Since the above partial differential equation (1) is difficult to solve analytically, the separation of variables method is used for approximate solution, including the following steps: S101, separate variables, decompose into time-dependent part and space-dependent part , as follows (4): (4) Substitute the partial differential equation (1) to obtain the following equation (5): (5) Separate the time-dependent part from the space-dependent part to obtain the following equation (6) and the following equation (7): (6) (7) S102, solve the time-dependent part, solve the time differential equation (6), as follows equation (8): (8) (9) Wherein, is the integral constant of the time differential equation, reflecting the influence of the initial state of the time-dependent part on the key generation rate.
[0037] S103, solve the space-dependent part, solve the spatial differential equation (7), as follows equation (10): (10) Wherein, is the integral constant of the spatial differential equation, reflecting the influence of the initial state of the space-dependent part on the key generation rate.
[0038] The final key generation rate expression is as follows equation (11): (11) In order to optimize the key generation rate, define the optimization goal as follows equation (12): (12) The optimization goal in equation (12) is to maximize the key generation rate under the conditions of satisfying the channel attenuation constraint, the environmental noise constraint and the key generation rate threshold, and the specific constraint conditions are: The channel attenuation constraint is as follows equation (13): (13) Wherein, is the maximum allowed attenuation factor.
[0039] The environmental noise constraint is as follows equation (14): (14) Wherein, is the maximum allowed noise level.
[0040] The key generation rate constraint is as follows equation (15): (15) where, is the minimum key generation rate required by the system.
[0041] The optimization objective equation (12) is solved using the Lagrange multiplier method, as follows equation (16) (16) where, and are the Lagrange factors, denotes the Lagrange function.
[0042] Solving equation (16), the optimal parameters of the time decay factor and the noise decay factor are obtained, as follows equation (17): (17) where, is the optimal parameter of the time decay factor ; is the optimal parameter of the noise decay factor .
[0043] In some embodiments of the present application, in S2, in the quantum key distribution (QKD) system of the power distribution terminal, the generation and consumption of the key are dynamically changing, and a single static key pool cannot meet the long-term security requirements. This step establishes a dynamic key pool management mechanism, which ensures the availability and security of the key pool through multiple integrals, differential equations, stochastic process modeling and convex optimization.
[0044] Define the state variables of the key pool: is the number of available keys in the key pool (unit: bits); is the key generation rate (unit: bits / s); is the key consumption rate (unit: bits / s); is the key discard rate (unit: bits / s); is the key replenishment rate (unit: bits / s).
[0045] Based on the differential equation, the evolution model of the key pool is as follows equations (18) and (19): (18) (19) where Z is the total length of signal propagation.
[0046] Considering the influence of power grid communication demand, the calculation formula is as follows equation (20): (20) in, is the key consumption rate for encrypted communication (unit: bit / s), and enc is the abbreviation of Encryption, which means encryption.
[0047] The key consumption rate for identity authentication (unit: bit / s). auth is the abbreviation of Authorization, which means authentication.
[0048] It is the encryption consumption rate of the control signal of the distribution terminal (unit: bit / s). sig is the abbreviation of Signal, which represents signal.
[0049] Depends on the key storage time, as shown in formula (21) (twenty one) in, is the time decay factor.
[0050] It depends on the number of key synchronizations, as shown in Equation (22): (twenty two) in, is the amount of externally available key, (unit: bit), which can generate shared keys through trusted relay nodes or multi-party quantum communication protocols and synchronize them to the target terminal in segments; is the synchronization efficiency factor (unit: s -1 ), ext is the abbreviation of External, which means external.
[0051] In order to ensure that the number of available keys in the key pool is always sufficient, the upper and lower limits of the number of available keys in the key pool are set as follows (23): (twenty three) in, The lower limit of the key pool capacity (unit: bit); The upper limit of the key pool capacity (unit: bits).
[0052] By integrating the differential equation (19), we can obtain the time accumulation relationship of the number of available keys in the key pool, as shown in the following equation (24): (twenty four) in, is the number of available keys in the key pool at the initial moment; is the time-integrated variable, for The key generation rate at the moment; for the key consumption rate at time t; is the key discard rate at time t, is the key replenishment rate.
[0053] The optimization objective of the key pool capacity is as follows in equation (25): (25) wherein, is the optimal key pool available key number, avoiding resource waste caused by too large key pool, and is a constant value; min is the minimization, is a key pool management period.
[0054] Lagrange optimization is used to solve equation (25), as shown in equation (26): (26) wherein, is a key pool management period, and are Lagrange factors, denotes the Lagrange function.
[0055] The first optimal key pool capacity is obtained by derivation, so that the key pool capacity is as close as possible to At the same time, when the upper and lower limits are touched, the Lagrange factors and are adjusted to prevent default, ensuring the availability and security of the key pool, and the first optimal key pool capacity is finally obtained, as shown in equation (27): (27) In some embodiments of the present application, in the quantum key distribution (QKD) system of the power distribution terminal in S3, the load change directly affects the communication demand, and the communication demand determines the key consumption rate; in order to ensure the sustainability of the key pool and prevent key shortage or excessive accumulation, a key update strategy based on load prediction is established in this step, and through time sequence prediction, optimal control and differential equation modeling, dynamic adjustment of the key pool is realized. Based on the LSTM (Long Short-Term Memory) load prediction model, the mapping relationship between the key consumption and the power communication demand is established, and the key generation rate is adjusted through optimal control.
[0056] The load power of the power distribution terminal is a function of time, and the change is predicted by LSTM. In order to analyze the mathematical characteristics of the load change, differential equation modeling is used to simulate the load change trend.
[0057] The load of the power distribution terminal Affected by multiple factors, including base load, time-varying load and environmental impact.
[0058] Load variation can be described by time-varying differential equation formula (28).
[0059] (28) Where: is the load of the power distribution terminal, (unit: watt); is the load self-damping coefficient, (unit: s -1 ), indicating the rate of load returning to stable value, is the environmental impact weight, is the disturbance impact weight, is a white noise process, simulating load fluctuations.
[0060] Based on the above formula (28), solve the following formula (29) to obtain the load of the power distribution terminal at steady state.
[0061] (29) Predict the load demand at future time by formula (29), where, is the steady-state solution, indicating the load level that the system tends to stabilize in dynamic changes after a period of time, steady indicates stable; is the initial load of the system, is the environmental impact function, indicating the effect of external environment (such as temperature, weather, light, etc.) on load over time, env is the abbreviation of environment, indicating factors from external environment, is the cumulative impact from 0 to the current time t.
[0062] Quantum keys are used to encrypt load monitoring data, and the key consumption rate is affected by the amount of data transmission , which is positively correlated with the size of the load, and can be modeled as shown in the following formula (30): (30) Where, is the conversion coefficient from load to data volume, is the base data volume (such as heartbeat packet, status data, etc.).
[0063] Where, the key consumption rate is determined by the key length and encryption requirements, as shown in the following formula (31): (31) Combined with the aforementioned load prediction, the predicted value of the key consumption rate can be obtained, as shown in the following formula (32): (32) Set the change value of the number of available keys in the key pool Following the differential equation model (33), the key generation rate and key consumption rate can be calculated using the above-mentioned equation, where pool represents the key pool.
[0064] (33) in, is the key generation rate, which is the optimal key generation rate mentioned above, is the predicted value of the key consumption rate calculated by the above formula (32).
[0065] Prediction-based , obtain the judgment factor of the number of available keys in the key pool The size of is as follows (34): (34) Among them, when When it falls below the preset threshold, the key update mechanism is triggered to update the key generation rate.
[0066] The update optimization target of the key generation rate is as follows (35): (35) in: is a regularization parameter used to prevent excessive key generation, is the basic key generation rate, and T is the upper limit of the key generation time.
[0067] The optimal solution of equation (35) is as follows (36): (36) The key generation rate obtained by formula (36) when considering the load is Substituting into formula (24), we can obtain the updated capacity of the second key pool. This strategy ensures that the key pool maintains balance dynamically while meeting the requirements of short-term load changes and preventing resource waste.
[0068] In some embodiments of the present invention, in S4, the key pool is divided into a high-priority key pool, a common key pool and a low-priority key pool according to the different data stored in the key pool, and different numbers of keys are allocated according to the different priorities of the data stored in different key pools.
[0069] High priority key pool: used to store emergency commands and control communications, requiring low latency and high security, as shown in the following formula (37): (37) in, is the available key number of the high priority key pool at time t, (unit: bit), is the key generation allocation ratio of the high priority key pool, is the key consumption rate of the high priority key pool, (unit: bit / s), is the key discard rate of the high priority key pool, (unit: bit / s), is the key generation rate (unit: bit / s), H is the abbreviation of High.
[0070] Normal key pool, used for regular data encryption communication, as follows (38).
[0071] (38) wherein, is the available key number of the normal key pool at time t, (unit: bit), is the key generation allocation ratio of the normal key pool, is the key consumption rate of the normal key pool, (unit: bit / s), is the key discard rate of the normal key pool, (unit: bit / s), N is the abbreviation of Normal.
[0072] Low priority key pool , used for log transmission, low-risk data, as follows (39): (39) wherein, is the available key number of the low priority key pool at time t, (unit: bit), is the key generation allocation ratio of the low priority key pool, is the key consumption rate of the low priority key pool, is the key discard rate of the low priority key pool, (unit: bit / s), L is the abbreviation of Low.
[0073] The relationship formula of the key generation allocation ratio of the key pool is as follows (40): (40) The convex optimization of the following formula (41) is used to solve formula (40): (41) wherein, reflects the priority weight of different key pools, which is the data set by oneself.
[0074] Through convex optimization, at a given time t or within a certain time window, according to the current key pool state, the optimal , and Let the weighted sum of the total number of key pools available be maximum, (38)-(41) are state update formulas; the convex optimization is a strategy for generating the proportion in real time, so that the key pool is more sufficient on high priority applications.
[0075] And the convex optimization algorithm is adopted to realize intelligent regulation and control of the key pool.
[0076] The communication data of the power distribution terminal is obtained according to the corresponding key pool priority, and the available key number is allocated and communicated.
[0077] The second aspect of the application discloses a The third aspect of the present application discloses a computer device, which comprises a processor and a memory. The memory is used to store a computer program, and the computer program comprises program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor is the computing core and control core of the terminal, and is suitable for implementing one or more instructions, and is particularly suitable for loading and executing one or more instructions to implement a corresponding method flow or a corresponding function. The processor in the embodiment can be used to implement a power distribution terminal communication method based on quantum key distribution, which comprises the following steps: S1, collecting the propagation influencing factors of photons in an optical fiber, constructing a partial differential equation of a key generation rate, decomposing the partial differential equation into a time-dependent part and a space-dependent part, solving the time-dependent part and the space-dependent part, and obtaining a key generation rate expression; under the constraint of the propagation influencing factors, the key generation rate expression is solved by Lagrange optimization to obtain an optimal key generation rate; S2, constructing a key pool capacity integral equation, based on the optimal key generation rate, combining the available key number of the key pool, the key consumption rate and the key replenishment rate, solving the key pool capacity integral equation by Lagrange optimization to obtain a first optimal key pool capacity; S3, obtaining the load of the power distribution terminal in a stable state, calculating the predicted value of the key consumption rate considering the load, combining the optimal key generation rate to obtain the change value of the available key number of the key pool, and then judging whether the first optimal key pool capacity needs to be updated. If it needs to be updated, the second optimal key pool capacity is obtained by updating the key generation rate; S4, based on the first optimal key pool capacity or the second optimal key pool capacity, the available key number is allocated to each level of key pool according to the communication data priority stored in the key pool, and the each level of key pool comprises a high-priority key pool, a normal key pool and a low-priority key pool.
[0078] The fourth aspect of the present application discloses a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in a terminal device, used for storing programs and data. It can be understood that the computer readable storage medium herein can include a built-in storage medium in the terminal device, and of course can also include an expansion storage medium supported by the terminal device. The computer readable storage medium provides a storage space that stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement a power distribution terminal communication method based on quantum key distribution in one of the above embodiments, including the following steps: S1, collecting the propagation influencing factors of photons in an optical fiber, constructing a partial differential equation of key generation rate, decomposing the partial differential equation into a time-dependent part and a space-dependent part, solving the time-dependent part and the space-dependent part, and obtaining a key generation rate expression; under the constraint of the propagation influencing factors, the key generation rate expression is solved by Lagrange optimization to obtain an optimal key generation rate; S2, constructing a key pool capacity integral equation, based on the optimal key generation rate, combining the available key number of the key pool, the key consumption rate and the key replenishment rate, solving the key pool capacity integral equation by Lagrange optimization to obtain a first optimal key pool capacity; S3, obtaining the load of the power distribution terminal in the steady state, calculating the predicted value of the key consumption rate considering the load, combining the optimal key generation rate to obtain the change value of the available key number of the key pool, and then judging whether the first optimal key pool capacity needs to be updated, if so, updating the key generation rate to obtain a second optimal key pool capacity; S4, based on the first optimal key pool capacity or the second optimal key pool capacity, the available key number is allocated to each level of key pool according to the communication data priority stored in the key pool, and the each level of key pool includes a high priority key pool, a normal key pool and a low priority key pool.
[0079] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A power distribution terminal communication method based on quantum key distribution, characterized in that: The following steps are involved: The factors affecting photon propagation in optical fibers are collected to construct a partial differential equation for the key generation rate. This equation is then decomposed into time-dependent and space-dependent parts. These parts are solved to obtain an expression for the key generation rate. Under the constraints of the propagation factors, the key generation rate expression is solved through Lagrangian optimization to obtain the optimal key generation rate. Constructing a key pool capacity integral equation, and solving the key pool capacity integral equation through Lagrangian optimization based on the optimal key generation rate, the number of available keys in the key pool, the key consumption rate, and the key replenishment rate to obtain a first optimal key pool capacity; Obtain the load of the power distribution terminal in a steady state, calculate a predicted value of the key consumption rate taking the load into account, combine it with the optimal key generation rate, and obtain the change value of the number of available keys in the key pool. Then, determine whether the capacity of the first optimal key pool needs to be updated. If so, obtain an updated second optimal key pool capacity by updating the optimal key generation rate. Based on the first optimal key pool capacity or the second optimal key pool capacity, available keys are allocated to key pools at various levels according to the communication data priority stored in the key pools. The key pools at various levels include a high priority key pool, a common key pool, and a low priority key pool.
2. The power distribution terminal communication method based on quantum key distribution according to claim 1, characterized in that: The propagation influencing factors include channel attenuation, environmental noise and signal compensation.
3. The power distribution terminal communication method based on quantum key distribution according to claim 1, characterized in that: The key generation rate expression is: The optimization goal of the key generation rate expression is: in, is the key generation rate, is the integration constant of the time differential equation, is the integration constant of the spatial differential equation, e is the exponential function, is the initial attenuation factor, is the time decay factor, represents the initial noise intensity, is the noise attenuation factor, is the compensation coefficient, is the photon attenuation factor in the optical fiber, is the transmission distance, For time.
4. The power distribution terminal communication method based on quantum key distribution according to claim 1, characterized in that: The key pool capacity integral equation is: in, is the key pool capacity at time t, is the time-integrated variable, is the number of available keys in the key pool at the initial moment, for The key generation rate at time, for The key consumption rate at time, for The key discard rate at time, is the key replenishment rate; The optimization goal of the key pool capacity integral equation is to make the key pool capacity close to the optimal key pool capacity.
5. The power distribution terminal communication method based on quantum key distribution according to claim 1, characterized in that: The process of determining whether the first optimal key pool capacity needs to be updated is as follows: obtaining a determination factor for the number of available keys in the key pool according to a change in the number of available keys in the key pool, comparing the determination factor for the number of available keys in the key pool with a preset threshold, and if the value is less than the threshold, updating is required.
6. The power distribution terminal communication method based on quantum key distribution according to claim 1, characterized in that: The formula for updating the key generation rate is: in: is the key generation rate, The predicted value of the key consumption rate, is the regularization parameter, is the basic key generation rate, and T is the upper limit of the key generation time.
7. The power distribution terminal communication method based on quantum key distribution according to claim 6, characterized in that: The number of available keys in the key pools at each level is related to a key generation distribution ratio, and the key generation distribution ratio is obtained through convex optimization calculation.
8. A power distribution terminal communication device based on quantum key distribution, characterized in that: include: The key generation rate module collects factors affecting photon propagation in optical fibers, constructs a partial differential equation for the key generation rate, decomposes the partial differential equation into time-dependent and space-dependent parts, and solves the time-dependent and space-dependent parts to obtain an expression for the key generation rate. Under the constraints of the propagation factors, the key generation rate expression is solved through Lagrangian optimization to obtain the optimal key generation rate. A key pool capacity optimization module constructs a key pool capacity integral equation, and based on the optimal key generation rate, combines the number of available keys in the key pool, the key consumption rate, and the key replenishment rate, solves the key pool capacity integral equation through Lagrangian optimization to obtain a first optimal key pool capacity; The load update optimization module obtains the load of the distribution terminal in a stable state, calculates the predicted value of the key consumption rate taking the load into consideration, and combines it with the optimal key generation rate to obtain the change in the number of available keys in the key pool. It then determines whether the capacity of the first optimal key pool needs to be updated. If so, it obtains the updated second optimal key pool capacity by updating the key generation rate. The key distribution module allocates the number of available keys to key pools at each level based on the first optimal key pool capacity or the second optimal key pool capacity and according to the priority of the communication data stored in the key pool. The key pools at each level include a high priority key pool, a common key pool and a low priority key pool.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the power distribution terminal communication method based on quantum key distribution as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the power distribution terminal communication method based on quantum key distribution as described in any one of claims 1 to 7 is implemented.