A quantum network anomaly detection method based on a power system and related equipment
By introducing a fusion model into the power system for quantum network anomaly detection, the problems of poor adaptability and high false negative rate in existing technologies are solved, achieving anomaly detection with high reliability and low false negative rate, and supporting intelligent analysis of power grid operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NARI INFORMATION & COMM TECH
- Filing Date
- 2026-03-12
- Publication Date
- 2026-07-14
AI Technical Summary
Existing quantum network anomaly detection technologies have poor adaptability and high false negative rates in power scenarios, and cannot effectively deal with abnormal behavior of the quantum physical layer of QKD systems in power systems, thus affecting power grid security.
We employ a fusion model based on LightGBM, XGBoost, calibration module, and logistic regression meta-learner. By extracting multi-dimensional features from the QKD system, we perform feature concatenation and probability calibration, and combine the optimal decision threshold for anomaly detection.
It improves the reliability of power communication security protection, can adaptively detect unknown attacks, reduce false negative rates, and provide full-process closed-loop anomaly detection support.
Smart Images

Figure CN122394770A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and related equipment for detecting anomalies in quantum networks based on power systems, belonging to the interdisciplinary field of quantum communication security and artificial intelligence. Background Technology
[0002] As a critical national infrastructure, the communication security between the power system's control center, smart substations, and distributed energy sites is directly related to the stable operation of the power grid. Traditional public-key cryptography systems such as RSA and ECC (Elliptic Curve Cryptography) pose security risks in future quantum computing environments. Quantum key distribution (QKD), based on quantum mechanics principles, offers information-theoretically provable security and has become an important technological approach for power system communication security.
[0003] However, in real-world power industry environments, the physical layer devices and quantum channels of QKD systems face a variety of threats, including eavesdropping attacks, hardware failures, channel attenuation, and strong electromagnetic interference, which lead to problems such as increased qubit error rate and decreased security key rate, seriously affecting system security.
[0004] Currently, mainstream Network Intrusion Detection Systems (NIDS) primarily rely on network and transport layer features, failing to detect anomalous behavior at the quantum physical layer, resulting in monitoring blind spots. Existing quantum security research largely focuses on detecting specific attacks, lacking a unified, adaptive anomaly detection framework. Although some research has attempted to incorporate machine learning, most methods suffer from weak feature engineering and simplistic models, making it difficult to achieve low false negative rates and high robustness in real-world power scenarios.
[0005] Therefore, an anomaly detection scheme with high reliability and strong adaptability, which can be based on quantum physical layer parameters, is needed to ensure the long-term safe and stable operation of power quantum communication networks. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a quantum network anomaly detection method and related equipment based on power systems. This method solves the problems of poor adaptability and high false negative rate of existing quantum network anomaly detection technologies in power scenarios.
[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0008] In a first aspect, the present invention provides a method for detecting anomalies in quantum networks based on power systems, comprising:
[0009] Obtain the raw dataset from the QKD system;
[0010] Multi-dimensional features are extracted from the original dataset, and the multi-dimensional features are concatenated to obtain an enhanced feature vector.
[0011] The enhanced feature vector is input into the trained fusion model for processing to obtain the anomaly probability of the QKD system.
[0012] If the probability of an anomaly in the QKD system is greater than the optimal decision threshold, the QKD system is determined to be abnormal and an alarm is triggered; otherwise, the QKD system is determined to be normal.
[0013] The fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connected to the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
[0014] Optionally, the raw dataset includes: qubit error rate, secure key rate, channel visibility, phase error, polarization drift, channel loss, detector efficiency, dark count, coherence time, entanglement fidelity, basis mismatch rate, Eve attack markers, temperature variation, vibration level, and magnetic field interference.
[0015] Optionally, before extracting multi-dimensional features from the original dataset, preprocessing is also included:
[0016] The original dataset is subjected to data cleaning, standardization, and class balancing in sequence, and a random seed is set to ensure the reproducibility of the preprocessing process.
[0017] Optionally, the multi-dimensional features include: statistical distribution features, trend features, stability features, frequency domain features, coherence features, temporal correlation features, channel transmission features, security degradation features, and multi-parameter correlation features;
[0018] The statistical distribution characteristics refer to the statistical analysis of each quantum parameter in the original dataset within a time window, including the mean, standard deviation, range, and median.
[0019] The trend feature and stability feature are used to characterize the trend and fluctuation of the quantum parameters over time, respectively; wherein, the trend feature is obtained by calculating the linear change slope of each quantum parameter, and the stability feature is obtained by calculating the first-order difference coefficient of variation of each quantum parameter.
[0020] The frequency domain characteristics and coherence characteristics are used to characterize the energy distribution and coherence of quantum parameters in the frequency domain, respectively; wherein, the frequency domain characteristics are obtained by performing spectral analysis on each quantum parameter, and the coherence characteristics are used to measure the concentration of the main peak energy in the spectrum;
[0021] The aforementioned temporal correlation characteristic refers to the use of calculating the lag k-order autocorrelation coefficient of each quantum parameter to characterize its temporal dependence.
[0022] The channel transmission characteristics and security degradation characteristics are used to characterize the degradation trend of the transmission quality and system security performance of the quantum channel, respectively. The channel transmission characteristics include the channel capacity estimated based on quantum parameters, and the security degradation characteristics are the time degradation rate of key security parameters in the original dataset, used to quantify the decay rate of the security performance of the QKD system.
[0023] The multi-parameter correlation feature refers to the Pearson correlation coefficient between different quantum parameters, which is used to characterize the degree of linear correlation between the quantum parameters.
[0024] Optionally, the enhanced feature vector is input into the trained fusion model for processing to obtain the anomaly probability of the QKD system, including:
[0025] The enhanced feature vector is input into the LightGBM model for processing to obtain the first prediction probability;
[0026] The enhanced feature vector is input into the XGBoost model for processing to obtain the second prediction probability;
[0027] The first calibration probability is obtained by performing ordinal-preserving regression on the first predicted probability using the first calibration module.
[0028] The second calibration probability is obtained by performing ordinal-preserving regression on the second predicted probability using the second calibration module.
[0029] The first calibration probability and the second calibration probability are input into the meta-feature construction module to construct meta-features. The two and their derived interaction features are concatenated to obtain the meta-feature vector. The meta-feature vector is input into the logistic regression meta-learner for decision-making and fusion processing to obtain the anomaly probability of the QKD system.
[0030] Optionally, the training process of the fusion model includes:
[0031] Obtain a training dataset, which is a simulation dataset with the same format as the original dataset;
[0032] The training dataset is preprocessed sequentially, multi-dimensional features are extracted, and features are concatenated to generate an enhanced feature sample set;
[0033] The enhanced feature sample set is input into the first layer of the fusion model. The LightGBM model and the XGBoost model are trained in parallel using the five-fold hierarchical cross-validation method, and the original anomaly probabilities of the two models on each fold validation set are output.
[0034] The original anomaly probability is calibrated by order-preserving regression, resulting in a first calibration probability and a second calibration probability.
[0035] Based on the first calibration probability and the second calibration probability, a meta-feature vector is constructed and input into the logistic regression meta-learner for training to obtain the trained meta-learner.
[0036] The trained fusion model consists of the trained LightGBM model, XGBoost model, first calibration module, second calibration module, and logistic regression meta-learner.
[0037] Optionally, the optimal decision threshold can be dynamically determined by performing a grid search on the verification set with the objective of maximizing the overall security score.
[0038] The formula for calculating the comprehensive safety score is as follows:
[0039]
[0040] in, For comprehensive safety scoring; Recall rate; for Fraction; For accuracy; It is a false positive rate.
[0041] Secondly, the present invention provides a quantum network anomaly detection system based on a power system, comprising:
[0042] The data acquisition module is used to acquire the raw dataset of the QKD system;
[0043] The feature extraction module is used to extract multi-dimensional features based on the original dataset and concatenate the multi-dimensional features to obtain an enhanced feature vector.
[0044] The detection module is used to process the enhanced feature vector into the trained fusion model to obtain the anomaly probability of the QKD system.
[0045] The alarm determination module is used to determine that the QKD system is abnormal and trigger an alarm if the abnormal probability of the QKD system is greater than the optimal decision threshold; otherwise, the QKD system is considered to be normal.
[0046] The fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connected to the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
[0047] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor;
[0048] The memory is used to store programs;
[0049] The processor is used to execute the program to implement the quantum network anomaly detection method based on the power system as described in the first aspect.
[0050] Fourthly, the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the quantum network anomaly detection method based on a power system as described in the first aspect.
[0051] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0052] This invention proposes a quantum network anomaly detection method and related equipment for power systems. The method first extracts multi-dimensional features from the original dataset of the QKD system and then concatenates these features to obtain an enhanced feature vector. This not only improves model performance but also makes the detection results traceable and interpretable, helping maintenance personnel understand the physical causes behind the anomalies. Secondly, a fusion model integrating the LightGBM model, XGBoost model, first and second calibration modules, a meta-feature construction module, and a logistic regression meta-learner is introduced. The enhanced feature vector is input into the trained fusion model for processing to obtain the anomaly probability of the QKD system. Finally, an alarm is determined based on the optimal decision threshold. This invention's fusion model effectively integrates the algorithmic advantages of LightGBM and XGBoost, and combines probability calibration with a safety-oriented decision threshold, greatly improving the reliability of power communication security protection.
[0053] The present invention proposes a quantum network anomaly detection method and related equipment based on power systems. It does not rely on prior, specific attack knowledge and can adaptively learn normal and abnormal patterns from data. Therefore, it has the potential to detect unknown attacks, i.e. zero-day attacks, and provides a forward-looking technical reserve for power quantum networks to cope with new threats in the future. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0055] Figure 1The flowchart shown is a method for detecting anomalies in a quantum network based on a power system, as described in this embodiment of the invention.
[0056] Figure 2 The diagram shown is a schematic diagram of the enhanced feature vector acquisition process in an embodiment of the present invention;
[0057] Figure 3 The diagram shown illustrates the workflow of the fusion model in this embodiment of the invention.
[0058] Figure 4 The diagram shown is a schematic diagram of the optimal decision threshold acquisition process in an embodiment of the present invention.
[0059] Figure 5 The diagram shown is a schematic of a quantum network anomaly detection system based on a power system in an embodiment of the present invention. Detailed Implementation
[0060] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0061] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0062] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0063] The application principle of the present invention will be described in detail below with reference to the accompanying drawings.
[0064] Example 1
[0065] like Figure 1 As shown, this embodiment of the invention provides a quantum network anomaly detection method based on a power system, comprising the following steps:
[0066] S1: Obtain the original dataset of the QKD system;
[0067] S2: Extract multi-dimensional features based on the original dataset, and concatenate the multi-dimensional features to obtain an enhanced feature vector;
[0068] S3: Input the enhanced feature vector into the trained fusion model for processing to obtain the anomaly probability of the QKD system;
[0069] S4: If the probability of an anomaly in the QKD system is greater than the optimal decision threshold, the QKD system is determined to be abnormal and an alarm is triggered; otherwise, the QKD system is determined to be normal.
[0070] Specifically, the fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connected to the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
[0071] In this embodiment, step S1 obtains the raw dataset of the QKD system, which includes: qubit error rate, security key rate, channel visibility, phase error, polarization drift, channel loss, detector efficiency, dark count, coherence time, entanglement fidelity, basis mismatch rate, Eve attack marker, temperature change, vibration level, and magnetic field interference.
[0072] In this embodiment, before extracting multi-dimensional features based on the original dataset in step S2, preprocessing is further included. The preprocessing steps specifically include:
[0073] The original dataset is subjected to data cleaning, standardization, and class balancing in sequence, and a random seed is set to ensure the reproducibility of the preprocessing process.
[0074] Specifically, data cleaning refers to detecting and processing outliers in the original dataset. For missing values (NaN), removal or imputation methods are used to eliminate them; for infinity values (Inf), they are replaced with finite values to ensure data integrity.
[0075] Specifically, the standardization process uses the Z-score standardization method to make the cleaned data dimensionless, so that the mean of each dimension of the features is 0 and the standard deviation is 1, thus eliminating the impact of dimensional differences on model training.
[0076] Specifically, class balancing is achieved by applying Synthetic Minority Oversampling Technique (SMOTE) to augment minority class samples and generate new synthetic samples. This balances the proportion of positive and negative class samples in the dataset and prevents the model from being biased towards the majority class.
[0077] Specifically, a random seed of 42 is set to ensure the reproducibility of the above preprocessing and guarantee the consistency of experimental results.
[0078] like Figure 2As shown, in this embodiment, step S2, which enhances the acquisition of feature vectors, includes:
[0079] S21: Parallel extraction of multi-dimensional features of quantum parameters from the original dataset, specifically:
[0080] 1) Statistical distribution characteristics: Calculate the mean, standard deviation, range, and median to characterize the central tendency and dispersion of the parameters within the observation window.
[0081] 2) Trend and Stability Characteristics: The slope of sequence changes is obtained through linear fitting to quantify the overall evolution trend of quantum parameters. A stability index based on the first-order difference coefficient of variation is introduced to assess the anti-interference capability.
[0082]
[0083] in, It is a first-order difference; Standard deviation; The mean; To prevent division by zero, use a very small constant.
[0084] 3) Frequency domain and coherence characteristics: The frequency domain characteristics of the quantum signal are analyzed by fast Fourier transform, and the energy concentration is calculated to evaluate the signal coherence and noise interference.
[0085] 4) Temporal correlation characteristics: Extracting the autocorrelation coefficient of lag k to reveal the memory effect of quantum parameters:
[0086]
[0087] in, The autocorrelation coefficient is the one with lag order k.
[0088] The observation value at time t; R(k) is the mean of the entire sequence; k is the lag order; n represents the length of the time series. R(k) ∈ [-1, 1], and the larger its absolute value, the more significant the linear memory of the sequence within the k-step delay.
[0089] 5) Channel transmission and security degradation characteristics: A channel capacity estimation model is constructed based on Shannon's formula to evaluate the effective transmission capability of quantum channels.
[0090]
[0091] in, For channel capacity; The variance of a quantum signal sequence (such as a legitimate photon detection counting sequence); The variance of a noisy sequence (such as dark counts or background noise); Ensure numerical stability.
[0092] Linear fitting is performed on key quantum parameters such as the quantum bit error rate (QBER) to obtain their time degradation rate and monitor the decay trend of security performance.
[0093] 6) Multi-parameter correlation characteristics: Calculate the Pearson correlation coefficients between different quantum parameters to uncover the co-variation patterns among multiple physical quantities such as QBER and visibility, key rate and channel loss.
[0094]
[0095] Where X and Y represent two different quantum parameter time series, such as QBER and visibility, or key rate and channel loss; and This represents their mean; This represents the Pearson correlation coefficient between X and Y. The enhanced feature engineering system proposed in this embodiment is rooted in quantum physics mechanisms, and the extracted features have clear physical meanings, such as stability indices, security degradation rates, and channel capacity. This not only improves model performance but also makes detection results traceable and interpretable, helping maintenance personnel understand the physical causes behind anomalies.
[0096] S22: Concatenate the multi-dimensional features to obtain the enhanced feature vector.
[0097] like Figure 3 As shown, the workflow of the fusion model, specifically step S3, involves inputting the enhanced feature vector into the trained fusion model for processing to obtain the anomaly probability of the QKD system, including:
[0098] S31: Input the enhanced feature vector into the LightGBM model for processing to obtain the first prediction probability;
[0099] S32: Input the enhanced feature vector into the XGBoost model for processing to obtain the second prediction probability;
[0100] S33: The first predicted probability is processed using the first calibration module to perform order-preserving regression to obtain the first calibrated probability, i.e. Figure 3 The calibration probability P in LGBM ;
[0101] S34: Use the second calibration module to perform ordinal-preserving regression on the second predicted probability to obtain the second calibrated probability. Figure 3 The calibration probability P in XGBoost ;
[0102] S35: Input the first calibration probability and the second calibration probability into the meta-feature construction module to construct meta-features, and concatenate the two and their derived interactive features to obtain the meta-feature vector;
[0103] S36: Input the meta-feature vector into the Logistic Regression meta-learner for decision-making and fusion processing to obtain the anomaly probability of the QKD system.
[0104] In this embodiment, the training process of the fusion model includes:
[0105] Obtain a training dataset, which is a simulation dataset with the same format as the original dataset;
[0106] The training dataset is preprocessed sequentially, multi-dimensional features are extracted, and features are concatenated to generate an enhanced feature sample set;
[0107] The enhanced feature sample set is input into the first layer of the fusion model. The LightGBM model and the XGBoost model are trained in parallel using the five-fold hierarchical cross-validation method, and the original anomaly probabilities of the two models on each fold validation set are output.
[0108] The original anomaly probability is calibrated by order-preserving regression, resulting in a first calibration probability and a second calibration probability.
[0109] Based on the first calibration probability and the second calibration probability, a meta-feature vector is constructed and input into the logistic regression meta-learner for training to obtain the trained meta-learner.
[0110] The trained fusion model consists of the trained LightGBM model, XGBoost model, first calibration module, second calibration module, and logistic regression meta-learner.
[0111] Specifically, the simulation dataset contains a multivariate time series simulation dataset with 15 core parameters such as quantum bit error rate (QBER), security key rate, and visibility. It simulates five typical attacks and faults, including interception and retransmission, and photon number separation. The total number of samples is 2,000, with an anomaly rate of 35%.
[0112] like Figure 4 As shown, in this embodiment, the optimal decision threshold in step S4 is dynamically determined by performing a grid search on the validation set with the goal of maximizing the overall security score. Specifically, it includes: obtaining the calibrated anomaly probability value of the validation set samples as input data for the selection of the decision threshold.
[0113] A set of candidate threshold sequences is preset, such as discrete values from 0.1 to 0.9 with a step size of 0.1, as candidate parameters for grid search;
[0114] For each candidate threshold, perform the following operations:
[0115] Anomaly detection is performed on the validation set samples based on the current threshold: if the anomaly probability of a sample is greater than the current threshold, it is judged as anomaly; otherwise, it is judged as normal.
[0116] Performance metrics are calculated based on the decision results, including precision, recall, F1 score, and false positive rate (FPR).
[0117] Calculate the overall security score:
[0118]
[0119] in, The weighting coefficients in the formula can be adjusted according to actual business needs.
[0120] After iterating through all candidate thresholds, the threshold that maximizes the overall safety score is selected as the optimal decision threshold. If multiple thresholds simultaneously achieve the highest score, one can be chosen at random or determined according to preset rules.
[0121] This embodiment uses grid search to dynamically determine the optimal threshold with the goal of maximizing the overall security score, avoiding the blindness of manually setting thresholds and improving the adaptability and accuracy of the anomaly detection method described in this embodiment.
[0122] In this embodiment, if the anomaly probability of the QKD system is greater than the optimal decision threshold in step S4, then the QKD system is determined to be abnormal, and an alarm is triggered; specifically, the alarm is as follows:
[0123] The system performs correlation analysis between the detected anomaly results and the original data to generate alarm information that includes anomaly labels, probability scores, and the contribution of key features. This information is then provided to power grid operation and maintenance personnel via API interfaces or graphical interfaces to support their anomaly analysis and fault handling.
[0124] In summary, this embodiment proposes a quantum network anomaly detection method for power systems. The introduced fusion model, based on ensemble learning, probability calibration, and dynamic threshold optimization mechanisms, aims to achieve high reliability and low false negative rate anomaly detection. Combined with alarms, it realizes a closed-loop process from data acquisition to alarm display, thereby improving the intelligence level of power grid operation and maintenance.
[0125] Example 2
[0126] like Figure 5 As shown, this embodiment also proposes a quantum network anomaly detection system based on a power system to implement the quantum network anomaly detection method based on a power system proposed in Embodiment 1, including:
[0127] The data acquisition module is used to acquire the raw dataset of the QKD system;
[0128] The feature extraction module is used to extract multi-dimensional features based on the original dataset and concatenate the multi-dimensional features to obtain an enhanced feature vector.
[0129] The detection module is used to process the enhanced feature vector into the trained fusion model to obtain the anomaly probability of the QKD system.
[0130] The alarm determination module is used to determine that the QKD system is abnormal and trigger an alarm if the abnormal probability of the QKD system is greater than the optimal decision threshold; otherwise, the QKD system is considered to be normal.
[0131] The fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connected to the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
[0132] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.
[0133] Example 3
[0134] This embodiment describes an electronic device, including: a memory and a processor;
[0135] The memory is used to store programs;
[0136] The processor is used to execute the program to implement the quantum network anomaly detection method based on the power system in Embodiment 1.
[0137] Example 4
[0138] This embodiment describes a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the quantum network anomaly detection method based on a power system in Embodiment 1.
[0139] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0140] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0143] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for detecting anomalies in a quantum network based on a power system, characterized in that, include: Obtain the raw dataset of the QKD system; Based on the original dataset, multi-dimensional features are extracted and concatenated to obtain an enhanced feature vector. The enhanced feature vector is input into the trained fusion model for processing to obtain the anomaly probability of the QKD system. If the probability of an anomaly in the QKD system is greater than the optimal decision threshold, the QKD system is determined to be abnormal and an alarm is triggered; otherwise, the QKD system is determined to be normal. The fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connected to the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
2. The anomaly detection method for quantum networks based on power systems according to claim 1, characterized in that, The original dataset includes: qubit error rate, secure key rate, channel visibility, phase error, polarization drift, channel loss, detector efficiency, dark count, coherence time, entanglement fidelity, basis mismatch rate, Eve attack markers, temperature variation, vibration level, and magnetic field interference.
3. The anomaly detection method for quantum networks based on power systems according to claim 2, characterized in that, Before extracting multi-dimensional features from the original dataset, preprocessing is also included: The original dataset is subjected to data cleaning, standardization, and class balancing in sequence, and a random seed is set to ensure the reproducibility of the preprocessing process.
4. The anomaly detection method for quantum networks based on power systems according to claim 3, characterized in that, The multi-dimensional features include: statistical distribution features, trend features, stability features, frequency domain features, coherence features, temporal correlation features, channel transmission features, security degradation features, and multi-parameter correlation features; The statistical distribution characteristics refer to the statistical analysis of each quantum parameter in the original dataset within a time window, including the mean, standard deviation, range, and median. The trend feature and stability feature are used to characterize the trend and fluctuation of the quantum parameters over time, respectively; wherein, the trend feature is obtained by calculating the linear change slope of each quantum parameter, and the stability feature is obtained by calculating the first-order difference coefficient of variation of each quantum parameter. The frequency domain characteristics and coherence characteristics are used to characterize the energy distribution and coherence of quantum parameters in the frequency domain, respectively; wherein, the frequency domain characteristics are obtained by performing spectral analysis on each quantum parameter, and the coherence characteristics are used to measure the concentration of the main peak energy in the spectrum; The aforementioned temporal correlation characteristic refers to the use of calculating the lag k-order autocorrelation coefficient of each quantum parameter to characterize its temporal dependence. The channel transmission characteristics and security degradation characteristics are used to characterize the degradation trend of the transmission quality and system security performance of the quantum channel, respectively. The channel transmission characteristics include the channel capacity estimated based on quantum parameters, and the security degradation characteristics are the time degradation rate of key security parameters in the original dataset, used to quantify the decay rate of the security performance of the QKD system. The multi-parameter correlation feature refers to the Pearson correlation coefficient between different quantum parameters, which is used to characterize the degree of linear correlation between the quantum parameters.
5. The anomaly detection method for quantum networks based on power systems according to claim 4, characterized in that, The enhanced feature vectors are input into the trained fusion model for processing to obtain the anomaly probability of the QKD system, including: The enhanced feature vector is input into the LightGBM model for processing to obtain the first prediction probability; The enhanced feature vector is input into the XGBoost model for processing to obtain the second prediction probability; The first calibration probability is obtained by performing ordinal-preserving regression on the first predicted probability using the first calibration module. The second calibration probability is obtained by performing ordinal-preserving regression on the second predicted probability using the second calibration module. The first calibration probability and the second calibration probability are input into the meta-feature construction module to construct meta-features. The two and their derived interaction features are concatenated to obtain the meta-feature vector. The meta-feature vector is input into the logistic regression meta-learner for decision-making and fusion processing to obtain the anomaly probability of the QKD system.
6. The anomaly detection method for quantum networks based on power systems according to claim 5, characterized in that, The training process of the fusion model includes: Obtain a training dataset, which is a simulation dataset with the same format as the original dataset; The training dataset is preprocessed sequentially, multi-dimensional features are extracted, and features are concatenated to generate an enhanced feature sample set; The enhanced feature sample set is input into the first layer of the fusion model. The LightGBM model and the XGBoost model are trained in parallel using the five-fold hierarchical cross-validation method, and the original anomaly probabilities of the two models on each fold validation set are output. The original anomaly probability is calibrated by order-preserving regression, resulting in a first calibration probability and a second calibration probability. Based on the first calibration probability and the second calibration probability, a meta-feature vector is constructed and input into the logistic regression meta-learner for training to obtain the trained meta-learner. The trained fusion model consists of the trained LightGBM model, XGBoost model, first calibration module, second calibration module, and logistic regression meta-learner.
7. The anomaly detection method for quantum networks based on power systems according to claim 6, characterized in that, The optimal decision threshold is dynamically determined by performing a grid search on the validation set with the objective of maximizing the overall security score. The formula for calculating the comprehensive safety score is as follows: in, For comprehensive safety scoring; Recall rate; for Fraction; For accuracy; It is a false positive rate.
8. A quantum network anomaly detection system based on a power system, characterized in that, include: The data acquisition module is used to acquire the raw dataset of the QKD system; The feature extraction module is used to extract multi-dimensional features based on the original dataset and concatenate the multi-dimensional features to obtain an enhanced feature vector. The detection module is used to process the enhanced feature vector into the trained fusion model to obtain the anomaly probability of the QKD system. The alarm determination module is used to determine that the QKD system is abnormal and trigger an alarm if the abnormal probability of the QKD system is greater than the optimal decision threshold; otherwise, the QKD system is considered to be normal. The fusion model includes a LightGBM model, an XGBoost model, a first calibration module connected to the LightGBM model, a second calibration module connected to the XGBoost model, a meta-feature construction module connecting the first and second calibration modules, and a logistic regression meta-learner connected to the meta-feature construction module.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the quantum network anomaly detection method based on power systems as described in any one of claims 1-7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the quantum network anomaly detection method based on the power system as described in any one of claims 1-7.