Microgrid safety monitoring method and system based on attack detection data
By obtaining the performance evaluation parameters of the data source upload channel, integrating weight distribution, combining the extended Kalman filter and time series recognition model, dynamically adjusting the attack judgment probability threshold, and building a full closed-loop security control mechanism, the problem of false data injection attacks in power grid security monitoring is solved, and high-sensitivity and accuracy attack detection is achieved.
Patent Information
- Application Number
- CN202510882928.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-28
- Publication Date
- 2025-10-14
AI Technical Summary
Existing technologies lack dynamic response capabilities in power grid security monitoring and are unable to flexibly adjust thresholds, resulting in false alarms or missed alarms. They also fail to effectively respond to false data injection attacks, affecting system stability.
By obtaining the performance evaluation parameters of the data source upload channel, integrating weight distribution, combining the extended Kalman filter algorithm and the time series recognition model, dynamically adjusting the attack judgment probability threshold, and building a fully closed-loop security control mechanism, accurate identification and response to false data injection attacks can be achieved.
It has enhanced the anti-attack capability of the power grid system, improved the sensitivity and accuracy of attack detection, and has the ability to quickly respond and adapt to attack detection, ensuring system stability and security.
Smart Images

Figure CN120784846A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid security monitoring, and in particular to a microgrid security monitoring method and system based on attack detection data. Background Art
[0002] In distributed microgrid operations, if measured data such as voltage, current, and power are subjected to false data injection attacks (FDIA), they can directly interfere with system state estimation and control decisions, leading to unnecessary power adjustments, controller oscillations, and even power supply instability. To address this issue, we propose an attack detection framework that integrates state estimation (EKF), time series recognition (ATCN), and deep neural network (DBN). Furthermore, we design an intelligent feedback adjustment mechanism for attacked devices, integrating security monitoring with closed-loop control responses.
[0003] The existing technology, such as the invention patent with announcement number: CN113489144B, is a power grid security monitoring system, which includes a remote background server, a regional server and a node monitoring base station. The node monitoring base station is installed at the power grid node and is used to monitor the security parameters of the power grid node. Multiple node monitoring base stations are communicatively connected to the regional server to transmit monitoring data to the regional server. The regional server is communicatively connected to the remote background server and is used to analyze the monitoring data transmitted by the node monitoring module to obtain the security status of the power grid node, and transmit the acquired monitoring data and security status to the remote background server.
[0004] The prior art, such as the invention patent with announcement number CN110783919B, is a distribution network data security detection method based on interval state estimation, which includes the following steps: (1) analyzing the multi-dimensional input measurement values of the interval state estimation of each variable according to the traditional algorithm of the interval distribution network; (2) constructing a suitable interval state estimation model by using historical data analysis; (3) judging whether the node state calculated by the traditional state estimation falls within the corresponding predetermined boundary calculated by the three-phase interval state estimation of the distribution network based on the principle that the result of the distribution network state estimation changes after receiving an attack; if not, the warning system is alerted to the data attack.
[0005] Based on the above solutions, it can be seen that existing technologies in the field of power grid security monitoring lack dynamic response capabilities. They use fixed boundaries to determine anomalies and cannot flexibly adjust thresholds based on the actual operating environment and attack intensity, which may lead to false positives or missed positives. In addition, after an anomaly is detected, no corresponding response strategy is provided. Summary of the Invention
[0006] In view of the shortcomings of the existing technology, the present invention provides a microgrid security monitoring method and system based on attack detection data. To achieve the above objectives, the present invention is implemented through the following technical solutions: The microgrid security monitoring method based on attack detection data includes:
[0007] After obtaining the performance evaluation parameters of the upload channel of each data source, the data security of the upload channel of each data source is analyzed and matched to obtain the fusion weight of each data source. After data fusion, the overall operation data of each node in the microgrid is obtained and input into the fusion state estimation algorithm, and the state vector of each node is output.
[0008] The state vector of each node is input into the time series recognition model, and the time series features of each node that capture long-term dependencies are output. After optimizing the weights, the attack probability of each node is output, and the predicted attack results of each node are obtained.
[0009] Entering the detection phase, the statistical prediction of the attack result is the predicted attacked node and recorded as the predicted node, the running detection model outputs the estimated value set of the operating data of each predicted node, and the running detection device obtains the measured value set of the operating data of each predicted node.
[0010] At each moment, the difference between the measured value of the running data and the corresponding estimated value is calculated to obtain the attack detection result of each prediction node and perform corresponding operations.
[0011] A microgrid security monitoring system based on attack detection data is also provided, comprising:
[0012] The state vector output module is used to obtain the performance evaluation parameters of the upload channel of each data source, analyze the data security of the upload channel of each data source, and match the fusion weight of each data source. After fusing the data, the overall operation data of each node in the microgrid is obtained and input into the fusion state estimation algorithm to output the state vector of each node.
[0013] The attack probability prediction module is used to input the state vector of each node into the time series recognition model, output the time series features of each node that capture long-term dependencies, optimize the weights and output the attack probability of each node, and obtain the predicted attack results of each node.
[0014] The detection module is used to statistically predict the attack results as the predicted attacked nodes and record them as predicted nodes when entering the detection phase, run the detection model to output the estimated value set of the operating data of each predicted node, and run the detection equipment to obtain the measured value set of the operating data of each predicted node.
[0015] The attack response module is used to calculate the difference between the measured value of the running data and the corresponding estimated value at each moment, obtain the attack detection result of each prediction node and perform corresponding operations.
[0016] Compared with the prior art, the embodiments of the present invention have at least the following beneficial effects:
[0017] (1) The present invention provides a microgrid security monitoring method based on attack detection data. By introducing a performance evaluation parameter system for upload channels, including three dimensions: stability, latency, and topology consistency, the method carefully analyzes the upload environment stability, time characteristics, and network topology matching of the data source, thereby forming a multi-angle data security evaluation mechanism. Based on this security, fusion weights are allocated to effectively weaken the impact of data from abnormal or low-trust channels, improve the anti-attack capability of the data fusion stage and the overall credibility of the input data, and strengthen the system's defense against malicious injection and deceptive data from the source.
[0018] (2) The present invention accurately models and updates the node operation status in real time through the extended Kalman filter algorithm, introduces the mapping relationship between the node change characteristic index and the database, dynamically adjusts the algorithm embedding variables, and improves the state prediction and noise suppression capabilities. At the same time, the time series recognition model is combined to extract the long-term dependent attack evolution characteristics, dynamically adjust the attack judgment probability threshold of each node, and realize a prediction mechanism that combines probability judgment with difference comparison. In the detection stage, the error persistence analysis of the measured value and the estimated value is used to achieve effective identification of false data injection attacks. The overall process has the full-link prediction and detection capability from state perception, feature recognition to fine discrimination, which greatly improves the sensitivity and accuracy of attack detection.
[0019] (3) The present invention establishes a differentiated response mechanism based on attack levels: for level 1 attacks, the integral controller's weight is dynamically reduced and error trends are adaptively adjusted; for level 2 attacks, state estimation is activated to replace inputs, reducing reliance on suspicious sensor data; for level 3 attacks, channel isolation and protection control parameters are activated to ensure minimum system operational safety. This mechanism not only has the ability to quickly cut off the attack impact chain, but also supports continuous tracking and progressive recovery adjustment of lightly attacked nodes, avoiding control disturbances caused by excessive intervention, and achieving the elastic, adaptive, and retractable characteristics of the response strategy, thus establishing a truly closed-loop safety control chain of "attack detection - hierarchical judgment - active mitigation - feedback repair."
[0020] Of course, any product implementing the present invention does not necessarily need to achieve all of the above advantages at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram of the method of the present invention.
[0022] Figure 2 Schematic diagram of the system module of the present invention.
[0023] Figure 3Schematic diagram of the method logic of the present invention.
[0024] Figure 4 This is a diagram showing the voltage data predicted by the EKF prior state involved in the present invention.
[0025] Figure 5 Schematic diagram of the structure of the time series recognition model involved in the present invention.
[0026] Figure 6 Schematic diagram of the steps of the BKA algorithm involved in the present invention.
[0027] Figure 7 Schematic diagram of the DBN model involved in the present invention.
[0028] Figure 8 Schematic diagram of the estimation error of the first-level attack DC voltage involved in the present invention.
[0029] Figure 9 Schematic diagram of the estimation error of the first-level attack DC current involved in the present invention.
[0030] Figure 10 Schematic diagram of the estimation error of the secondary attack DC voltage involved in the present invention.
[0031] Figure 11 Schematic diagram of the estimation error of the secondary attack DC current involved in the present invention.
[0032] Figure 12 Schematic diagram of the estimation error of the three-level attack DC voltage involved in the present invention.
[0033] Figure 13 Schematic diagram of the estimation error of the three-level attack DC current involved in the present invention. DETAILED DESCRIPTION
[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0035] See also Figure 1 As shown, an embodiment of the present invention provides a microgrid security monitoring method based on attack detection data, characterized by comprising:
[0036] After obtaining the performance evaluation parameters of the upload channel of each data source, the data security of the upload channel of each data source is analyzed and matched to obtain the fusion weight of each data source. After data fusion, the overall operation data of each node in the microgrid is obtained and input into the fusion state estimation algorithm, and the state vector of each node is output.
[0037] After obtaining the performance evaluation parameters of the upload channel of each data source, the data security of the upload channel of each data source is obtained. The specific process is as follows:
[0038] The performance evaluation parameters of the upload channel of each data source include stability parameters, latency parameters, and topology consistency parameters.
[0039] Stability parameters include the data distribution kurtosis, data anomaly rate, and skewness of the upload channel of each data source.
[0040] The latency parameters include the data receiving timestamp lag, delay jitter, and data upload time standard deviation of the upload channel of each data source.
[0041] Topological consistency parameters include the Pearson correlation coefficient of the upload channel of each data source, the data direction consistency rate, and the neighborhood consistency index.
[0042] Stability parameters are used to measure the numerical fluctuations of the upload channels of each data source and their abnormalities in statistical distribution. Among them, kurtosis is used to characterize the sharpness of the distribution of measurement data within a preset time window. If the kurtosis value is significantly higher than the reference value, it usually means that there are sudden jumps or abnormal spikes in the channel, which may be caused by external interference or attacks; the data anomaly rate represents the proportion of measurement points in the upload channel data of each data source that fall outside the physical or empirical preset range. It is a direct measure of the density of channel anomalies; and skewness is used to measure whether the data distribution is symmetrical. Positive or negative skewness may indicate a continuous drift in the system state or the existence of some type of unidirectional error. The above indicators are all dimensionless quantities and can be calculated using time window statistical methods.
[0043] Latency parameters are used to characterize the time response characteristics of the data upload channel and evaluate the real-time and temporal consistency of the data. The data reception timestamp lag refers to the difference between the acquisition time at the time of data upload and the current system time. A larger value indicates that the data in the channel is older and unsuitable for high-reliability input. Delay jitter refers to the fluctuation in the delay time during multiple consecutive data uploads, described by the standard deviation. The standard deviation of the data upload time is used to measure the regularity of the channel upload interval. If the upload interval is significantly unstable, it may indicate irregular communication or intermittent blockage in the channel. Delay parameters can be extracted in real time based on the timestamp attached to the data packet.
[0044] The topological consistency parameter is used to measure whether the spatial structure of the data uploaded by a certain channel conforms to its logical association in the electrical topology. Specifically, the Pearson correlation coefficient is used to evaluate the linear correlation between the data change trends of the upload channel of the data source and its adjacent nodes. If the upload channel data is highly correlated with the direction of change of the neighboring nodes, it indicates that its behavior conforms to the operating rules of the microgrid. The data direction consistency rate further examines whether the direction of the derivative data of the upload channel of the data source is consistent with that of the adjacent channels at adjacent moments, that is, whether the trend changes are synchronized. The neighborhood consistency index integrates multiple neighbor relationship characteristics, including residual fluctuations, signal correlation, and historical performance, to form a comprehensive score of the consistency level of the upload channel of the data source within its local topological range, which is obtained through vector space aggregation method.
[0045] The performance evaluation parameters of the upload channels of all data sources of each node are counted and averaged respectively to obtain the mean set of upload channel performance evaluation parameters of each node, including the mean set of stability parameters, the mean set of latency parameters and the mean of data direction consistency rate. The mean set of upload channel performance evaluation parameters of each node is used as a reference for calculating the data security of the upload channel of each data source. 1 is used as a reference for the Pearson correlation coefficient and the neighborhood consistency index, and 1 represents an ideal state or a completely consistent state. It is used to calculate and compare the performance of the upload channel and compare it with the performance evaluation parameters of the upload channel of each data source to obtain a comparison value.
[0046] The performance evaluation parameter comparison values of the upload channels of each data source are weighted and coupled to obtain the data security of the upload channels of each data source, specifically including:
[0047]
[0048]
[0049] AQ i =AQ1 i +AQ2 i +AQ3 i ;
[0050] Among them, AQ1 i is the stability evaluation value of the upload channel of the i-th data source, AQ2 i AQ1 i is the latency evaluation value of the upload channel of the i-th data source, AQ3 i is the topology consistency evaluation value of the upload channel of the i-th data source, AQ i is the data security of the upload channel of the i-th data source, K i is the data distribution kurtosis of the upload channel of the i-th data source, AR iis the data anomaly rate of the upload channel of the i-th data source, SDD i is the skewness of the upload channel of the i-th data source, Ttl i DJ is the data receiving timestamp lag of the upload channel of the i-th data source. i is the delay jitter of the upload channel of the i-th data source, UT i is the standard deviation of data upload time of the upload channel of the i-th data source, PCC i is the Pearson correlation coefficient of the upload channel of the i-th data source, DDCR i is the data direction consistency rate of the upload channel of the i-th data source, TCX i is the neighborhood consistency index of the upload channel of the i-th data source, α1 is the weighting factor of the data distribution kurtosis, α2 is the weighting factor of the data anomaly rate, α3 is the weighting factor of the skewness, β1 is the weighting factor of the data reception timestamp lag, β2 is the weighting factor of the delay jitter, β3 is the weighting factor of the standard deviation of the data upload time, γ1 is the weighting factor of the Pearson correlation coefficient, γ2 is the weighting factor of the data direction consistency rate, γ3 is the weighting factor of the neighborhood consistency index, i is the data source number, i = 1, 2, 3, ..., N, and N is the total number of data sources.
[0051] It should be noted that the data distribution kurtosis weighting factor, data anomaly rate weighting factor, and skewness weighting factor, in the embodiment of the present invention, satisfy α1+α2+α3=1. The data distribution kurtosis weighting factor is defined as the normalized ratio of the kurtosis of the data sample distribution curve of each node, which is used to measure the peak degree of the data distribution; the data anomaly rate weighting factor is the proportion of nodes identified as abnormal data per unit time, reflecting the abnormal frequency of node data fluctuations; the skewness weighting factor indicates the degree of skewness of the data distribution relative to the average value. The larger the skewness value, the stronger the asymmetry of the node operation behavior, which usually also means potential instability. These factors are used in the calculation to regulate the degree of influence of the node distribution characteristic index on the final anomaly score or trust judgment.
[0052] In the embodiment of the present invention, the weighting factor for the data reception timestamp lag, the delay jitter weighting factor, and the data upload time standard deviation weighting factor satisfy β1+β2+β3=1. The data reception timestamp lag weighting factor reflects the average lag of the actual data reception time relative to the expected time. Nodes with larger lags may have communication bottlenecks or malicious delays. The delay jitter weighting factor characterizes the degree of fluctuation in the data reception delay, that is, whether the data transmission interval is stable, which is generally measured by the delay standard deviation. The data upload time standard deviation weighting factor measures the regularity of the time interval between node upload data. The larger the standard deviation, the more inconsistent the upload behavior, which may be affected by abnormal interference. These three types of factors control the sensitivity of timing-related indicators in the anomaly detection model, enabling the system to accurately identify abnormal nodes caused by network instability or malicious interference.
[0053] In this embodiment of the present invention, the weighting factors for the Pearson correlation coefficient, the data direction consistency rate, and the neighborhood consistency index satisfy the equation γ1+γ2+γ3=1. The Pearson correlation coefficient weighting factor measures the linear correlation between the target node and its neighboring node data; a low correlation coefficient indicates potential behavioral anomalies. The data direction consistency rate weighting factor focuses on the consistency of the data change trends between the node and its neighboring nodes, such as the ratio of similar increases and decreases. If opposite trends occur frequently, the node may have an abnormal driving factor. The neighborhood consistency index weighting factor is calculated based on multiple dimensions such as statistical similarity and trend consistency, comprehensively reflecting whether a node has "disconnected from the group" in its local area. These factors determine the importance of neighborhood structure in determining whether a node is under attack.
[0054] The fusion weights of each data source are obtained by matching. The specific process is as follows:
[0055] The data security of the upload channel of each data source is mapped and matched with the mapping set of data security-data source fusion weights pre-stored in the database to obtain the fusion weight of each data source, and the data of each data source is fused according to the corresponding fusion weight to obtain the overall operation data of each node, including the voltage, current and load status of each node.
[0056] In the specific data fusion process, for a certain operating parameter of a node, such as voltage, the real-time values of multiple data sources are collected, and weighted average is performed according to their fusion weight to generate a fused overall operating data.
[0057] In the input fusion state estimation algorithm, the state vector of each node is output, including:
[0058] The extended Kalman filter (EKF) algorithm performs the state prediction step, forward-propagating the state estimate at the last data upload time according to the built-in state transition equation to obtain the prior state prediction data at the current data upload time.
[0059] It should be noted that the state transition equation refers to the law of how the model changes over time, describing how the state at the previous moment transitions to the state at the current moment.
[0060] Forward propagation refers to inputting the state estimate of the previous moment into the state model and predicting the current state through the state equation.
[0061] The Kalman filter (KF), a recursive optimal estimation algorithm designed specifically for linear dynamic systems, has important applications in signal analysis, automatic control, navigation, positioning, and target tracking. Its core mechanism is to achieve an optimal estimate of the state vector by iteratively adjusting the system model and measurement model, incorporating the statistical characteristics of noise, when the system state cannot be directly measured.
[0062] The KF is based on a linear state transition equation and the assumption of Gaussian noise distribution. It requires that both the system state change and the observation process satisfy linear constraints, and that both process noise and observation noise are assumed to be zero-mean white noise with a known covariance matrix. The filter consists of two main steps: prediction (estimating the current state) and update (correcting the prediction based on new observations). By iterating between prediction and update, the KF gradually approaches the true state of the system while minimizing the covariance of the estimation error.
[0063] The traditional KF is designed based on the linear system model, but when dealing with nonlinear control systems, directly applying the KF cannot effectively solve the state estimation problem. Therefore, it is necessary to introduce the EKF algorithm. The basic principle of EKF is to process the state equation and observation equation of the nonlinear system through Taylor expansion, and to achieve estimation of complex nonlinear systems based on local linearization. Specifically, EKF approximates the state transition and observation model of the nonlinear system, and then performs state estimation on this linearized system model. By performing Taylor expansion linearization on each time step of the nonlinear system, it can recursively provide the best estimate of the system state. EKF combines the update mechanism of the system model and observation data, and improves the adaptability and accuracy in complex environments by continuously correcting the estimated value.
[0064] like Figure 4 The figure shows the EKF prior state prediction voltage data involved in the embodiment of the present invention. The four curves are the output voltage measurement values of the four units. It can be seen that the gray dots representing the EKF state estimation values almost coincide with the output state quantities. The simulation results show that the designed EKF module meets the design indicators of dynamic response time <2ms and steady-state error <5% within the voltage fluctuation range of ±20%.
[0065] The parameter change characteristic factors of each node are extracted, including the voltage change characteristic factor, the current change characteristic factor and the load state change characteristic factor, and weighted coupling is performed to obtain the change characteristic index. The change characteristic index of each node is mapped and matched with the mapping set of change characteristic index-algorithm embedded variable factors pre-stored in the database to obtain the algorithm embedded variable factor of each node and apply it.
[0066] It's important to note that voltage variation characteristics factors are typically calculated based on statistical characteristics such as voltage fluctuation amplitude, standard deviation, or rate of change. Current variation characteristics factors assess the temporal fluctuation characteristics of current, such as abnormal current fluctuations caused by power disturbances. Load state variation characteristics factors measure load switching frequency, power jump events, and their changing trends. These three factors are weighted and coupled using set weight parameters to form a unified variation characteristics index, which reflects the complexity and uncertainty level of each node's overall dynamic behavior.
[0067] Based on the overall operation data of each node, the residual of each node is calculated by comparing it with the prior state prediction data. It should be noted that the residual refers to the difference between the prior state prediction data and the overall operation data obtained by fusion after actual measurement of each node. The Kalman gain is calculated by the ratio of the residual of each node to the noise covariance, and the weight distribution of the prior state prediction data and the overall operation data in the state update is adjusted. It should be noted that the Kalman gain is a weight factor used to balance the prior state prediction data and the overall operation data obtained by fusion after actual measurement of each node. The purpose of weight distribution is to enable the algorithm to utilize the trend predicted by the model and correct the deviation in real time to improve robustness and accuracy.
[0068] It should also be noted that the noise covariance refers to the observation noise covariance matrix, which represents the noise measured by the sensor.
[0069] The extended Kalman filter algorithm multiplies the residual of each node by the Kalman gain. It should be noted that this operation is a key step in updating the state vector.
[0070] It should be noted that the state vector of each node obtained in the embedding algorithm is that in the microgrid, the state vector contains multiple physical quantities of multiple nodes, including the voltage amplitude, current size, active power and reactive power at the current data upload moment.
[0071] Embedded variables are core parameters that control the accuracy, stability, and convergence speed of the extended Kalman filter (EKF) algorithm. They primarily include the prediction noise covariance matrix, the observation noise covariance matrix, the sensitivity adjustment coefficient of the state transition function, and a balancing factor used to control the weighting ratio between prior and observation in the Kalman gain update strategy. During the EKF algorithm application, these variables are dynamically embedded in the two core steps of prediction and update. During the state prediction phase, prior state prediction data for the current data upload time is obtained, and the state transition noise covariance matrix is adjusted based on the node's variability to improve prediction tolerance for fluctuating nodes. During the algorithm update phase, the residuals are calculated between the actual observations and the prior predictions, and the observation noise covariance matrix is adjusted based on the variability factor to improve observation tolerance for highly volatile nodes. Furthermore, the embedded variables influence the calculation of the Kalman gain, dynamically determining the weighting of the predicted and observed values in the final state estimate. Through the above mechanism, the EKF algorithm realizes adaptive estimation updates based on node state characteristics, effectively enhancing the robustness and responsiveness to abnormal disturbances, data fluctuations and potential attacks in complex microgrid environments.
[0072] The state vector of each node is input into the time series recognition model, and the time series features of each node that capture long-term dependencies are output. After optimizing the weights, the attack probability of each node is output, and the predicted attack results of each node are obtained.
[0073] The state vector of each node is input into ACTN (time series recognition). ATCN encodes the time series operation data of each node and outputs the time series feature vector of each node. The BKA (Black Kite Optimization Algorithm) algorithm is used to perform a weighted search on the feature dimensions, highlighting the dimensions related to attack prediction. The optimized features are mapped through the sigmoid function to generate an attack probability in the [0,1] interval.
[0074] Among them, the time series feature vector of each node is output, specifically including:
[0075] The state vector of each node output by EKF is passed through 12 layers of residual blocks + self-attention mechanism to output the temporal features that capture long-term dependencies. Figure 5The figure shows a schematic diagram of the time series recognition model structure involved in an embodiment of the present invention, specifically the ATCN model. The self-attention mechanism (SA) is introduced into the feature extraction process of the TCN. The first layer of causal dilated convolution in the TCN is used to extract the short-term dependencies of the DC microgrid time series. SA is then introduced to weight the time series, highlighting the core time series weights and exploring the long-term dependencies of the DC microgrid, thereby identifying key features globally. The next causal dilated convolution layer of the TCN is then used to establish a deep correlation model. This step in turn strengthens the extraction of short-term dependencies. Finally, the extracted features are mapped to the latent feature space, completing the screening of the optimal feature subset in the high-dimensional feature space. Dynamic optimization of attention weights is achieved during the iterative training process, significantly improving the model's ability to capture the multi-dimensional time series features of the DC microgrid. The ATCN model improves on the inability of fixed convolution to dynamically focus on the key features of time series data. By nesting four core modules, it effectively captures long-term dependencies while assigning weights to adaptively allocate important features in the sequence, significantly enhancing the system's capture capability and flexibility. The input of SA (attention mechanism) comes from the query (Q), key (K) and value (V) of the embedding operator. The three share the same vector dimensions and can be calculated as:
[0076] Q=XW Q ,K=XW K ,V=XW V ;
[0077]
[0078] Among them, X is the original input feature matrix, Q is the query matrix, K is the key matrix, V is the value matrix, and d represents the dimension parameter of vectors Q and K.
[0079] In the embodiment of the present invention, the Black-winged Kite Algorithm (BKA) is introduced, such as Figure 6 The diagram shows the steps of the BKA algorithm used in an embodiment of the present invention. This algorithm is a metaheuristic optimization algorithm designed to avoid local optimal solutions and explore new potential solution regions. By integrating the Cauchy mutation strategy and the Leader strategy, the BKA algorithm enhances its global search capability and convergence speed, achieving a good balance between exploring solutions and leveraging local information.
[0080] It should be noted that Figure 6The DBN in it is a deep architecture composed of stacked multi-layer restricted Boltzmann machines (RBM), which realizes efficient mapping of data features through a hierarchical unsupervised pre-training mechanism. In response to the time series modeling requirements of the DC microgrid output state, the embodiment of the present invention adopts Gaussian RBM as the basic unit, and converts the underlying operating parameters into high-level decay law representations through layer-by-layer feature mapping. In the DC microgrid scenario, the model takes multi-dimensional state quantity time series data as input and constructs a prediction framework containing two levels of RBM: the first layer RBM1 is responsible for learning the nonlinear correlation between the input layer V and the primary hidden layer H1, and RBM2 further explores the cross-time step dependency between H1 and the deep hidden layer H2. This hierarchical feature extraction mechanism effectively solves the problem of insufficient modeling of long-term dependencies of dynamic systems by traditional models, such as Figure 7 FIG. 1 is a schematic diagram of a DBN model involved in an embodiment of the present invention.
[0081] Obtain the predicted attack results of each node, including:
[0082] The change characteristic index of each node is put into the mapping set of change characteristic index-attack judgment probability threshold adjustment value pre-stored in the database, and mapping matching is performed to obtain the attack judgment probability threshold adjustment value of each node. Based on the attack judgment probability threshold adjustment value of each node, the preset attack judgment probability threshold is dynamically adjusted. In the embodiment of the present invention, the larger the change characteristic index, the smaller the preset attack judgment probability threshold is adjusted.
[0083] Obtain the attack probability of each node, and compare the attack probability of each node with the attack judgment probability threshold of each node. If the attack probability of a node is greater than the attack judgment probability obtained for the node, the predicted attack result of the node is predicted to be attacked.
[0084] If the probability of a node being attacked is less than the attack judgment probability of the node, the predicted attack result of the node is predicted to be not attacked.
[0085] Entering the detection phase, the statistical prediction of the attack result is the predicted attacked node and recorded as the predicted node, the running detection model outputs the estimated value set of the operating data of each predicted node, and the running detection device obtains the measured value set of the operating data of each predicted node.
[0086] During the detection phase, the embodiment of the present invention deploys a monitoring center to detect each prediction node in the DC microgrid. In the monitoring unit, the EKF-ATCN-DBN detection model is used to estimate the output DC voltage and current of the prediction node. Taking DC voltage as an example, in the embodiment of the present invention, the DC voltage estimate is:
[0087]
[0088] Where t is the time, is the estimated DC voltage of the nth prediction node at time t, f n is a nonlinear function, V dc1 (t-Δt) is the DC voltage measurement value of the first prediction node at time t-Δt, Δt is the data monitoring upload period in the detection phase, n is the prediction node number, n = 1, 2, 3, ..., M, M is the total number of prediction nodes.
[0089] At each moment, the difference between the measured value of the running data and the corresponding estimated value is calculated to obtain the attack detection result of each prediction node and perform corresponding operations.
[0090] Obtain the attack detection results of each prediction node and perform corresponding operations, including:
[0091] The estimated value set of the operating data of each prediction node includes a DC current estimated value and a DC voltage estimated value at each detection moment.
[0092] The measurement value set of the operation data of each prediction node includes the DC current measurement value and the DC voltage measurement value at each detection moment.
[0093] The estimated value set and the measured value set of the operation data of each prediction node are respectively subtracted to obtain the estimated error of the DC current and the estimated error of the DC voltage at each detection moment of each prediction node.
[0094] The estimated error threshold of DC current and the estimated error threshold of DC voltage are extracted from the database, and the detection moments when the estimated error of DC current is greater than or equal to the corresponding estimated error threshold are counted. At the same time, the detection moments when the estimated error of DC voltage is greater than or equal to the corresponding estimated error threshold are counted. All of them are recorded as error detection moments, and the consecutive number of error detection moments of each prediction node is obtained. If the consecutive number of error detection moments of a prediction node is greater than the preset consecutive number threshold, it is determined that the prediction node has suffered a false data injection attack, and the node is recorded as an attacked node.
[0095] If the consecutive number of error detection moments of a prediction node is less than a preset consecutive number threshold, it is determined that the prediction node has not suffered a false data injection attack.
[0096] The continuous number of error detection moments of the attacked node is extracted and subtracted from the continuous number threshold to obtain the continuous number difference. The continuous number difference is then put into the continuous number difference-attack level mapping set for mapping and matching to obtain the attack level of the attacked node, including level one attack, level two attack, and level three attack.
[0097] Perform the corresponding operations, including:
[0098] When the attack level of the attacked node is a level one attack, the attacked node currently has slight fluctuations. The maximum estimated error of the DC current and the maximum estimated error of the DC voltage of the attacked node in the detection phase are extracted, and the difference between them and the corresponding estimated error thresholds is respectively made to obtain the estimated error difference of the DC current and the estimated error difference of the DC voltage. The current unit dimension factor and the voltage unit dimension factor are extracted from the database. The estimated error difference of the DC current is multiplied by the current unit dimension factor, and the estimated error difference of the DC voltage is multiplied by the voltage unit dimension factor, and then coupled to obtain the error comprehensive index of the attacked node, specifically including: WCZ = ΔI × δ I +ΔV×δ V , where WCZ is the error comprehensive index of the attacked node, ΔI is the estimated error difference of DC current, ΔV is the estimated error difference of DC voltage, δ I is the unit dimension factor of current, δ V is the unit dimension factor of voltage.
[0099] The error comprehensive index of the attacked node is put into the mapping set of error comprehensive index-integral control gain weight reduction value pre-stored in the database for mapping matching, and the integral control gain weight reduction value of the attacked node is obtained. The gain weight of the integral controller is lowered by the integral control gain weight reduction value, thereby mitigating the mistracking of abnormal states. The controller still maintains stable operation during this period.
[0100] After adjusting the integral controller of the attacked node, the adaptive attack active mitigation phase begins.
[0101] When the attack level of the attacked node is a level 2 attack, it indicates that there are continuous deviations in the measurement data received by the attacked node, but no serious control errors have been caused.
[0102] The attacked node enables the state estimation replacement input mode, which specifically includes: the integral controller of the attacked node references the state estimation output by the extended Kalman filter algorithm instead of the actual data currently output by the sensor as its control input reference.
[0103] The error comprehensive index of the attacked node is extracted and put into the mapping set of error comprehensive index-state valuation replacement input time pre-stored in the database for mapping matching, the duration of the state valuation replacement input mode of the attacked node is obtained, and the state valuation replacement input mode is executed.
[0104] When the attack level of the attacked node is level three, it indicates that the attacked node has been interfered with by high-intensity continuous data injection, causing a systematic impact on the operation of the microgrid.
[0105] At this time, channel isolation is started, including: disconnecting the communication link of the attacked node and extracting the error comprehensive index of the attacked node, and mapping and matching the error comprehensive index-protection control parameter mapping pre-stored in the database to obtain the protection control parameters of the attacked node, including the output power reduction value and frozen frequency adjustment value of the attacked node. After application, the attacked node maintains minimum functional operation and sends an alarm to the microgrid operation and maintenance management terminal.
[0106] Entering the adaptive attack proactive mitigation phase, specifically including:
[0107] The attacked node with the attack level of level one is continuously monitored, and a sliding window with a fixed length of time is used to obtain the sliding window error sequence of the attacked node. If the decline of the attacked node in the sliding window error sequence is greater than or equal to the preset error decline threshold, it is considered that the error has been alleviated, and the gain weight of the integral controller is restored.
[0108] If the decline in the sliding window error sequence of the attacked node is less than the preset error decline threshold, it is considered as error amplification, and the gain weight of the integral controller is further reduced. The specific process includes:
[0109] The error compensation difference of the attacked node is obtained by subtracting the decline amplitude of the attacked node in the sliding window error sequence from the preset error decline threshold. The error compensation difference of the attacked node is put into the mapping set of error compensation difference-integral control gain weight advanced reduction value preset in the database for mapping and matching to obtain the integral control gain weight advanced reduction value of the attacked node, and the gain weight of the integral controller is further reduced.
[0110] In the embodiment of the present invention, a DC microgrid is built based on the MATLAB simulation platform to realize the typical operation simulation of the DC microgrid. In the simulation, when the prediction node encounters a level 1 attack, the estimation error of the DC current and the estimation error of the DC voltage at each detection moment are as follows: Figure 8 and Figure 9 As shown, Figure 8 is the estimated error of the DC voltage, Figure 9 is the estimation error of DC current; when the prediction node encounters a secondary attack, the estimation error of DC current and DC voltage at each detection moment is as follows: Figure 10 and Figure 11 As shown, Figure 10 is the estimated error of the DC voltage, Figure 11 is the estimation error of DC current; when the prediction node encounters a three-level attack, the estimation error of DC current and DC voltage at each detection moment is as follows: Figure 12 and Figure 13 As shown, Figure 12 is the estimated error of the DC voltage, Figure 13is the estimated error of DC current.
[0111] In this embodiment, the present invention provides a microgrid security monitoring system based on attack detection data, including:
[0112] The state vector output module is used to obtain the performance evaluation parameters of the upload channel of each data source, analyze the data security of the upload channel of each data source, and match the fusion weight of each data source. After fusing the data, the overall operation data of each node in the microgrid is obtained and input into the fusion state estimation algorithm to output the state vector of each node.
[0113] The attack probability prediction module is used to input the state vector of each node into the time series recognition model, output the time series features of each node that capture long-term dependencies, optimize the weights and output the attack probability of each node, and obtain the predicted attack results of each node.
[0114] The detection module is used to statistically predict the attack results as the predicted attacked nodes and record them as predicted nodes when entering the detection phase, run the detection model to output the estimated value set of the operating data of each predicted node, and run the detection equipment to obtain the measured value set of the operating data of each predicted node.
[0115] The attack response module is used to calculate the difference between the measured value of the running data and the corresponding estimated value at each moment, obtain the attack detection result of each prediction node and perform corresponding operations.
[0116] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0117] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the contents of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can better understand and utilize the present invention. As long as they do not deviate from the structure of the present invention or exceed the scope defined by the present invention, they should fall within the scope of protection of the present invention.
Claims
1. A microgrid security monitoring method based on attack detection data, characterized in that: include: After obtaining the performance evaluation parameters of the upload channel of each data source, the data security of the upload channel of each data source is analyzed and matched to obtain the fusion weight of each data source. After data fusion, the overall operation data of each node in the microgrid is obtained and input into the fusion state estimation algorithm to output the state vector of each node; The state vector of each node is input into the time series recognition model, and the time series features of each node that capture long-term dependencies are output. After optimizing the weights, the attack probability of each node is output, and the predicted attack result of each node is obtained; Entering the detection phase, the predicted attack results are statistically predicted as the predicted attacked nodes and recorded as predicted nodes. The running detection model outputs a set of estimated values of the operating data of each predicted node, and the running detection equipment obtains a set of measured values of the operating data of each predicted node. At each moment, the difference between the measured value of the running data and the corresponding estimated value is calculated to obtain the attack detection result of each prediction node and perform corresponding operations.
2. The microgrid security monitoring method based on attack detection data according to claim 1, characterized in that: After obtaining the performance evaluation parameters of the upload channel of each data source, the data security of the upload channel of each data source is obtained. The specific process is as follows: The performance evaluation parameters of the upload channel of each data source include stability parameters, latency parameters and topology consistency parameters; The stability parameters include the data distribution kurtosis, data anomaly rate and skewness of the upload channel of each data source; The delay parameters include the data receiving timestamp hysteresis, delay jitter and data upload time standard deviation of the upload channel of each data source; The topology consistency parameters include the Pearson correlation coefficient, data direction consistency rate and neighborhood consistency index of the upload channel of each data source; The performance evaluation parameters of the upload channels of all data sources of each node are counted and averaged respectively to obtain the mean set of upload channel performance evaluation parameters of each node, including the mean set of stability parameters, the mean set of latency parameters, and the mean of data direction consistency rate. The mean set of upload channel performance evaluation parameters of each node is used as a reference for calculating the data security of the upload channel of each data source. The constant 1 is used as a reference for the Pearson correlation coefficient and the neighborhood consistency index, where 1 represents an ideal state or a completely consistent state. The constant is used to calculate and compare the performance of the upload channel, and is compared with the performance evaluation parameters of the upload channel of each data source to obtain a comparison value. The performance evaluation parameter comparison values of the upload channels of each data source are weightedly coupled to obtain the data security of the upload channels of each data source.
3. The microgrid security monitoring method based on attack detection data according to claim 1, characterized in that: The matching process obtains the fusion weight of each data source, and the specific process is as follows: The data security of the upload channel of each data source is mapped and matched with the mapping set of data security-data source fusion weights pre-stored in the database to obtain the fusion weight of each data source, and the data of each data source is fused according to the corresponding fusion weight to obtain the overall operation data of each node, including the voltage, current and load status of each node.
4. The microgrid security monitoring method based on attack detection data according to claim 1, characterized in that: In the input fusion state estimation algorithm, the state vector of each node is output, specifically including: The extended Kalman filter algorithm performs the state prediction step, forward-propagating the state estimate at the last data upload time according to the built-in state transition equation to obtain the prior state prediction data at the current data upload time; Extract the parameter change characteristic factors of each node, including the voltage change characteristic factor, current change characteristic factor, and load state change characteristic factor, perform weighted coupling to obtain the change characteristic index, and map the change characteristic index of each node to the mapping set of change characteristic index-algorithm embedded variable factors pre-stored in the database to obtain the algorithm embedded variable factor of each node and apply it; Based on the overall operation data of each node, the residual of each node is calculated by comparing it with the prior state prediction data. At the same time, the noise covariance of each node is obtained. The Kalman gain is calculated by the ratio of the residual of each node to the noise covariance. The weight distribution of the prior state prediction data and the overall operation data in the state update is adjusted to correct the deviation in real time. The extended Kalman filter algorithm multiplies the residual of each node with the Kalman gain and embeds it into the algorithm to obtain the state vector of each node, including the voltage amplitude, current size, active power and reactive power at the current data upload moment.
5. The microgrid security monitoring method based on attack detection data according to claim 1, characterized in that: The obtaining of the predicted attack result of each node specifically includes: The change characteristic index of each node is put into the mapping set of change characteristic index-attack judgment probability threshold adjustment value pre-stored in the database, and the attack judgment probability threshold adjustment value of each node is obtained by mapping and matching. Based on the attack judgment probability threshold adjustment value of each node, the preset attack judgment probability threshold is dynamically adjusted; Obtain the attack probability of each node and compare it with the attack judgment probability threshold of each node. If the attack probability of a node is greater than the attack judgment probability of the node, the predicted attack result of the node is predicted to be attacked; If the probability of a node being attacked is less than the attack judgment probability of the node, the predicted attack result of the node is predicted to be not attacked.
6. The microgrid security monitoring method based on attack detection data according to claim 1, characterized in that: Obtaining the attack detection results of each prediction node and performing corresponding operations specifically include: The estimated value set of the operation data of each prediction node includes the DC current estimated value and the DC voltage estimated value at each detection moment; The measurement value set of the operation data of each prediction node includes the DC current measurement value and the DC voltage measurement value at each detection moment; Subtract the estimated value set and the measured value set of the operating data of each prediction node respectively to obtain the estimated error of the DC current and the estimated error of the DC voltage at each detection moment of each prediction node; Extract the estimated error thresholds of DC current and DC voltage from the database, count the detection moments when the estimated error of DC current is greater than or equal to the corresponding estimated error thresholds, and simultaneously count the detection moments when the estimated error of DC voltage is greater than or equal to the corresponding estimated error thresholds, all of which are recorded as error detection moments. Obtain the consecutive number of error detection moments of each prediction node. If the consecutive number of error detection moments of a prediction node is greater than a preset consecutive number threshold, it is determined that the prediction node has suffered a false data injection attack, and the node is recorded as an attacked node. If the number of consecutive error detection moments of a prediction node is less than the preset consecutive number threshold, it is determined that the prediction node has not been attacked by false data injection; The continuous number of error detection moments of the attacked node is extracted and subtracted from the continuous number threshold to obtain the continuous number difference. The continuous number difference is then put into the continuous number difference-attack level mapping set for mapping and matching to obtain the attack level of the attacked node, including level one attack, level two attack, and level three attack.
7. The microgrid security monitoring method based on attack detection data according to claim 6, characterized in that: The performing of corresponding operations specifically includes: When the attack level of the attacked node is a level one attack, the attacked node currently has a slight fluctuation. The maximum estimated error of the DC current and the maximum estimated error of the DC voltage of the attacked node in the detection phase are extracted, and the difference between them and the corresponding estimated error thresholds is respectively made to obtain the estimated error difference of the DC current and the estimated error difference of the DC voltage. The current unit dimension factor and the voltage unit dimension factor are extracted from the database. The estimated error difference of the DC current is multiplied by the current unit dimension factor, and the estimated error difference of the DC voltage is multiplied by the voltage unit dimension factor. After coupling, the error comprehensive index of the attacked node is obtained. The error comprehensive index of the attacked node is put into the mapping set of the error comprehensive index-integral control gain weight reduction value pre-stored in the database for mapping matching, and the integral control gain weight reduction value of the attacked node is obtained. The gain weight of the integral controller is reduced by the integral control gain weight reduction value. After adjusting the integral controller of the attacked node, the adaptive attack active mitigation phase begins.
8. The microgrid security monitoring method based on attack detection data according to claim 6, characterized in that: The corresponding operations are performed, and the specific processing conditions are: When the attack level of the attacked node is level 2, the attacked node enables the state estimation replacement input mode, which specifically includes: the integral controller of the attacked node uses the state estimation output by the extended Kalman filter algorithm instead of the actual measured data currently output by the sensor as its control input reference; Extract the error comprehensive index of the attacked node and put it into the mapping set of error comprehensive index-state valuation replacement input time stored in the database for mapping matching, obtain the duration of the state valuation replacement input mode of the attacked node, and execute the state valuation replacement input mode; When the attack level of the attacked node is a level three attack, channel isolation is initiated, including: disconnecting the communication link of the attacked node and extracting the error comprehensive index of the attacked node, and performing mapping matching on the error comprehensive index-protection control parameter mapping pre-stored in the database to obtain the protection control parameters of the attacked node, including the output power reduction value and frozen frequency adjustment value of the attacked node. After application, the attacked node maintains minimum functional operation, and at the same time sends an alarm to the microgrid operation and maintenance management terminal.
9. The microgrid security monitoring method based on attack detection data according to claim 7, characterized in that: Entering the adaptive attack active mitigation stage specifically includes: Continuously monitor the attacked node at level one of the attack level, and use a fixed-length sliding window to obtain the sliding window error sequence of the attacked node. If the error trend of the sliding window error sequence of the attacked node is a downward trend, and the decline in the sliding window error sequence of the attacked node is greater than or equal to the preset error decline threshold, it is considered that the error has been alleviated, and the gain weight of the integral controller is restored; If the decline in the sliding window error sequence of the attacked node is less than the preset error decline threshold, it is considered as error amplification, and the gain weight of the integral controller is further reduced. The specific process includes: The error compensation difference of the attacked node is obtained by subtracting the decline amplitude of the attacked node in the sliding window error sequence from the preset error decline threshold. The error compensation difference of the attacked node is put into the mapping set of error compensation difference-integral control gain weight advanced reduction value preset in the database for mapping and matching to obtain the integral control gain weight advanced reduction value of the attacked node, and the gain weight of the integral controller is further reduced.
10. A system applied to the microgrid security monitoring method based on attack detection data according to any one of claims 1 to 9, characterized in that: The state vector output module is used to obtain the performance evaluation parameters of the upload channel of each data source, analyze the data security of the upload channel of each data source, and match the fusion weight of each data source. After fusing the data, the overall operation data of each node of the microgrid is obtained and input into the fusion state estimation algorithm to output the state vector of each node; The attack probability prediction module is used to input the state vector of each node into the time series recognition model, output the time series features of each node that capture long-term dependencies, optimize the weights, and output the attack probability of each node to obtain the predicted attack results of each node; The detection module is used to, when entering the detection phase, statistically predict the attack results as nodes predicted to be attacked and record them as predicted nodes, run the detection model to output a set of estimated values of the operating data of each predicted node, and run the detection equipment to obtain a set of measured values of the operating data of each predicted node; The attack response module is used to calculate the difference between the measured value of the running data and the corresponding estimated value at each moment, obtain the attack detection result of each prediction node and perform corresponding operations.
Citation Information
Patent Citations
A method for data security detection in distribution networks based on interval state estimation
CN110783919B
A power grid safety monitoring system
CN113489144B
Cited By
Transformer voltage regulation cooperative control system based on data acquisition of Internet of Things
CN121417246A
A transformer voltage regulation collaborative control system based on Internet of Things (IoT) data acquisition
CN121417246B
