A method for detecting adversarial network attacks in smart grids based on iterative algorithm
By adopting the detection method based on iterative algorithms in the smart grid, generating adversarial attack samples and building an automatic encoder network model, the shortcomings of existing systems in complex data processing and parameter adjustment are solved, and the robustness of the detection system is significantly improved. and concealment, realizes stable detection of complex attack scenarios.
Patent Information
- Application Number
- CN202411868215.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing smart grid detection system is not adaptable when processing complex multivariate long-time series data, and cannot effectively identify adversarial samples, resulting in poor robustness, poor concealment detection effect, and more false alarms and missed reports. And lacks flexible parameter adjustment strategies and cannot cope with different attack types and intensity.
Adopting an adversarial network attack detection method based on iterative algorithms, multi-dimensional operation data is collected through a distributed sensor network, and adversarial attack samples containing attack vectors are generated after preprocessing, and an automatic encoder network model is constructed and dynamic parameter adjustment is performed. Optimize the model to improve detection accuracy.
It significantly improves the ability of smart grid systems to identify complex attack scenarios, enhances the level of security protection, improves the detection ability of the detection system's robustness and hidden samples, reduces false alarms and missed reports, and realizes the various Stable detection of scenes.
Smart Images

Figure CN119324839B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart grid network security, and specifically relates to a method for detecting adversarial network attacks in a smart grid based on an iterative algorithm. Background Art
[0002] Smart grid network security technology refers to the technology that protects smart grid systems from cyber attacks and other security threats. This technology covers a variety of means from encrypted communication, identity authentication to intrusion detection systems to ensure the security and stability of smart grids. In the face of adversarial attacks and other malicious activities, it can effectively identify and resist potential threats and ensure the normal operation of the power system. In recent years, with the rapid development of smart grids, its network security faces more and more challenges. The frequency and complexity of cyber attacks have increased significantly, making traditional security measures incapable of dealing with complex attack scenarios. In the face of advanced adversarial attacks, existing detection systems are insufficient in accuracy and robustness, and are prone to false positives or false negatives. This situation highlights the importance of smart grid network security technology, forcing researchers to continuously innovate and optimize detection methods to adapt to new threats. In order to improve the overall security protection capabilities of smart grids, ensure the stable operation of power systems, and avoid equipment misoperation or power outages caused by attacks, relevant research has been conducted on existing technologies.
[0003] At present, the existing technology mainly focuses on anomaly detection models, adversarial sample defense and attack detection systems, such as patent applications CN117792750A, CN116595515A, CN116488325A, etc., but there are still the following deficiencies:
[0004] 1) Existing methods are not adaptable enough when processing complex multivariate long time series data and cannot effectively identify adversarial samples in highly dynamic environments, resulting in poor robustness of the detection system;
[0005] 2) The existing detection system has poor detection effect on the concealment of adversarial samples. Adversarial attack samples can easily bypass the protection mechanism in the existing defense system, increasing false positives and false negatives;
[0006] 3) Existing methods lack flexible parameter adjustment strategies, are not robust enough in the face of different attack types and intensities, and cannot achieve stable detection in various scenarios. Summary of the invention
[0007] To solve the above technical problems, the present invention provides a method for detecting adversarial network attacks in smart grids based on an iterative algorithm, which simulates real attack scenarios to generate adversarial attack samples containing specific disturbances, i.e., attack vectors. By dynamic parameter adjustment, the detection system's ability to recognize complex attack scenarios is improved, thereby enhancing the security protection level of the smart grid system.
[0008] The invention discloses a method for detecting adversarial network attacks in a smart grid based on an iterative algorithm, comprising the following steps:
[0009] Step S1: Collect multi-dimensional operation data from the core nodes of the smart grid through the deployed distributed sensor network, and pre-process the collected data;
[0010] Step S2: Based on the preprocessed data, an iterative algorithm is used to generate adversarial attack samples containing attack vectors for adversarial attacks, so that the attack samples can bypass the bad data detection system based on state estimation in the power monitoring system;
[0011] Step S3: constructing and training an autoencoder network model for detecting adversarial attacks, and dynamically adjusting parameters during model training;
[0012] Step S4: Use the trained autoencoder network model to detect adversarial attack samples, evaluate the effectiveness of the adversarial attack samples in bypassing the detection system, determine their concealment and attack success rate, and optimize the autoencoder network model according to the detection results.
[0013] Furthermore, in step S1, the collected multi-dimensional operation data includes:
[0014] (1) Substation operating parameters: voltage U, current I, active power P, reactive power Q;
[0015] (2) Power measurement unit (PMU) data: phasor data under time synchronization ,in represents the voltage phasor at node i, ;
[0016] (3) Communication network data: traffic , communication delay and packet loss rate ;
[0017] (4) Load information: real-time power demand , historical electricity consumption curve ;
[0018] The collected multi-dimensional running data is represented as a multi-dimensional tensor ,in, represents the feature vector of node i at time t; T represents the total number of time points in the acquisition period, which depends on the acquisition frequency and duration; N represents the total number of monitoring nodes in the power grid.
[0019] Furthermore, the following multi-level preprocessing is performed on the collected multi-dimensional operation data:
[0020] (1) Data cleaning: Remove noise and missing values from the collected multi-dimensional running data by using mean filling or interpolation methods;
[0021] (2) Feature extraction of cleaned multi-dimensional operation data:
[0022] For intelligent measurement unit PMU data, calculate phase data The voltage correlation between nodes i and j ,in The value range is ,when When it is 1, it means perfect correlation. When it is −1, it indicates a complete anti-correlation. When it is 0, it means there is no correlation; They represent the voltage phasor angles of node i and node j, respectively, in radians. These angles are obtained from the synchronized phasor data collected by the PMU;
[0023] For load information, calculate the rate of change ,in is the real-time power demand in the load information, Indicates time The real-time power demand, Indicates time Real-time power demand;
[0024] (3) Data normalization: Normalize the extracted feature data and adjust the data to the form of standard normal distribution;
[0025] (4) Feature dimensionality reduction: Use principal component analysis (PCA) to reduce the dimension of the normalized data, retain key information, and obtain processed data .
[0026] Furthermore, step S2 is specifically as follows:
[0027] Step S201: Randomly select data from the preprocessed data As adversarial seed samples, the selected adversarial seed samples Perform the first step of calculation to generate the current sample , the formula is ;in, Generate learning rates for adversarial examples; is the initial momentum parameter, defined as ,in, is the loss function Relative to adversarial seed samples The gradient of loss function Defined as ,in for The reconstructed output of is the reconstruction error, is the attack effect function, used to evaluate samples Whether the expected attack effect is achieved on the target system;
[0028] Step S202: Calculate the loss function ,in for The reconstructed output of is the reconstruction error, is the attack effect function, used to evaluate samples Whether the expected attack effect is produced on the target system; based on the loss function Calculate new gradients ;
[0029] Step S203: Update momentum parameters ,in, is the momentum coefficient, is the loss function right The gradient of , which indicates the direction of steepest descent at that point, is used to generate the next sample;
[0030] Step S204: Generate adversarial samples , that is, based on the updated momentum parameter , for the current sample Further optimization is performed to obtain new adversarial attack samples ; Calculate the new loss function And update the momentum parameter , continue to optimize the generation of adversarial samples;
[0031] Step S205: Generate adversarial samples , ; That is, based on the updated momentum parameter , for the current sample Further optimization is performed to obtain new adversarial attack samples ; Calculate the new loss function And update the momentum parameter , continue to optimize the generation of adversarial samples; represents the i-th iteration sample in the process of generating adversarial attack samples;
[0032] Step S206: If the reconstruction error of the current sample Exceeding the target reconstruction error of adversarial sample generation , the iteration terminates; otherwise, it returns to step S205 to perform the next iteration; the adversarial sample generates a target reconstruction error ;in, is the reconstruction error of normal data, The adjustment value is 0.01;
[0033] Step S207: Generate initial adversarial attack sample .
[0034] Furthermore, the The initial value of is obtained by statistically analyzing the reconstruction error of normal data. First, a group of normal data samples that are not affected by any attack or anomaly are selected, and these samples are input into the initial basic detection network to obtain the reconstructed data through the encoding-decoding process. Then, the reconstruction error of each sample is calculated in the form of mean square error, and the mean of the mean square error of all samples is calculated as the baseline value of the reconstruction error of normal data. ; In the formula is the total number of normal samples, represents the true value of the jth sample, Represents the reconstructed value of the jth sample.
[0035] Further, in step S3, the autoencoder network model includes an input layer, an encoder, a latent space, a decoder and an output layer,
[0036] The encoder performs feature compression on the input data of the input layer through convolution and pooling operations, reducing the initial input data dimension Convert to The low-dimensional representation of ; the specific operations include:
[0037] (1) Convolution operation: In each convolution operation, the spatial features of the input data are extracted. The formula is: ;in, is the input data of the autoencoder, which is used to train the model to recognize the characteristics of normal data; Indicates that the encoder is Feature representation obtained after layer convolution operation; is the activation function; For encoder The convolution kernel of the layer; For encoder The bias term of the layer;
[0038] (2) Pooling operation: Pooling operation is applied after each convolution layer to gradually reduce the spatial dimension and transfer the data from Compress to A low-dimensional representation of
[0039] The latent space is a The latent space of dimension is the final output of the encoder and is the core compact feature representation of the entire input data, which is used to retain the main information for subsequent reconstruction operations;
[0040] The decoder transforms the features of the latent space from Restore the original structure of the input data And output through the output layer; the specific operations include:
[0041] (1) Upsampling operation gradually restores the spatial dimension of the feature and restores the low-dimensional representation to the spatial size of the original input data. The formula is: ;in, Indicated in The reconstructed data obtained after layer upsampling; For decoder Upsampling weights of the layer; represents the latent space; is the bias term for the upsampling operation of the i-th layer of the decoder;
[0042] (2) Convolution operation: After each upsampling, a convolution operation is performed to increase the number of feature channels and further adjust the features to gradually approach the original input structure. The formula is: ;in, For decoder The output features after the layer convolution operation represent the intermediate features that gradually approach the original input structure after upsampling and convolution operations; For decoder The weights of the layer convolution operations; For decoder Bias term for the convolution operation at the layer.
[0043] Furthermore, the autoencoder network model is trained, and dynamic parameter adjustment is performed during the training process, specifically:
[0044] Step S301: Set training optimization learning rate The initial value of When , gradually reduce the training optimization learning rate The value of is used to optimize the parameters more carefully in the later stage of model convergence; the specific update formula is: ,in; is the learning rate The reduction factor, The range is set to 0.9 to 0.99 to ensure gradually decrease;
[0045] Step S302: Initialize training optimization momentum coefficient For momentum update, The initial setting is 0.5, and it is gradually increased to the target value during the training process to accelerate convergence; When , the training will optimize the momentum coefficient The value of increases by 0.01, but does not exceed the upper limit of 0.99; the specific update formula is ;
[0046] Step S303: Reconstruct error value based on input data , calculate the reconstruction error of the training optimization target , which is slightly higher than the reconstruction error of normal data to ensure that adversarial samples can pass the detection in the initial training stage; whenever the update cycle is met When the training optimization objective is reconstructed, the error To reduce; the specific update formula is ,in The reduction factor of the reconstruction error for the training optimization objective, The value range is 0.9 to 0.99;
[0047] Step S304: Output the updated training optimization learning rate , training optimization momentum coefficient , and the training optimization objective reconstruction error .
[0048] Furthermore, step S4 is specifically as follows:
[0049] Step S401: Performance evaluation: input the adversarial sample into the autoencoder network model and calculate its detection accuracy and recall performance indicators to verify its ability to bypass the detection system:
[0050] ,
[0051] ,
[0052] in, is the number of attack samples successfully detected; is the number of normal samples that are falsely detected; is the number of real attack samples that were not detected;
[0053] Step S402, scaling condition test, testing the impact of the adversarial sample on the current waveform under different scaling conditions to verify its concealment and stability under various conditions.
[0054] The beneficial effects of the present invention are:
[0055] 1) The autoencoder network model constructed by the present invention has a latent space represented by a 256-dimensional core compact feature, which can fully extract the global and local features of the input data, reduce information redundancy and improve feature expression capabilities; this module effectively compresses high-dimensional data, retains key information, and provides high-quality input for subsequent feature decoding and reconstruction;
[0056] 2) The present invention introduces multi-scale convolution kernels in the convolution layer of the encoder to achieve multi-granularity capture of input features to adapt to the spatiotemporal characteristics of different levels in the data; this design significantly enhances the robustness of the model and the ability to detect hidden samples, and further improves the adaptability to complex multivariate long time series data;
[0057] 3) The present invention introduces an attention mechanism between the latent space and the decoder, and dynamically adjusts the parameters by weighted processing of key features, which effectively enhances the sensitivity of the model to hidden samples and improves the accuracy of the detection system;
[0058] 4) Based on the dynamic parameter adjustment strategy, the present invention ensures the stability and robustness of the model in dealing with different attack scenarios by adaptively adjusting the training optimization momentum coefficient and the training optimization target reconstruction error during the training process;
[0059] 5) The present invention generates adversarial samples that can bypass traditional detection systems through an iterative algorithm, simulating real attack scenarios and significantly improving the network's anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 The schematic diagram of the structure of the adversarial attack detection system based on the multi-layer defense structure in the smart grid;
[0061] Figure 2 This is a schematic diagram of the hierarchical protection structure of the smart grid;
[0062] Figure 3 is a flow chart of the method of the present invention;
[0063] Figure 4 Schematic diagram of the automatic encoder network structure;
[0064] Figure 5 Schematic diagram of the autoencoder network architecture based on convolution and upsampling;
[0065] Figure 6This is a schematic diagram of the power system structure of the IEEE D6 benchmark test system;
[0066] Figure 7 A schematic diagram of the attack scenario structure based on modifying the current transformer settings;
[0067] Figure 8 It is a diagram of the FDI attack scenario based on process bus;
[0068] Fig. 9 This is a schematic diagram of the power system simulation test structure;
[0069] Fig.10 A waveform diagram of the fault measurement result of the target transmission line;
[0070] Fig.11 This is the waveform diagram of the fault measurement results of the test case power system;
[0071] Fig.12 Test case failure waveforms generated for adversarial seeds;
[0072] Fig.13 This is the waveform diagram of the adversarial attack sample constructed;
[0073] Fig.14 Target fault waveform for adversarial attack seeds;
[0074] Fig.15 Schematic diagram of the performance of the constructed adversarial attack sample in the target system;
[0075] Fig.16 Schematic diagram of measurement results scaled for the target power system against the seed;
[0076] Fig.17 Schematic diagram of the waveform performance of the constructed adversarial attack sample under scaling. DETAILED DESCRIPTION
[0077] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments in conjunction with the accompanying drawings.
[0078] In this embodiment, the bypass effect of the proposed evasive attack method based on iterative algorithm in the automatic encoder detection system is verified through simulation test. The test case is based on the real scenario of smart grid, and the i7-9700KCPU and RTX2080 GPU are configured to generate the initial attack seeds, and the evasive attack samples are generated through iterative algorithm. In the simulation, the sliding data of 240 sample windows is input, and the detection system monitors the abnormal changes of current data in real time.
[0079] Figure 1Schematic diagram of the adversarial attack detection system based on multi-layer defense structure in smart grid. Figure 1 The four main hierarchical structures of smart grids are shown in the figure, including enterprise layer, boundary layer, control layer and field layer. The core devices and functions of each layer are marked in the figure to show their role in adversarial attack detection and protection. Specifically, the enterprise layer contains an intelligent control center, which is responsible for real-time monitoring, grid data analysis, and supports decision-making based on deep learning to ensure the advanced management and control of the grid; the boundary layer (Demilitarized Zone, DMZ) provides encrypted communication and identity authentication functions to protect the data exchange security between the enterprise layer and the control layer; the control layer sets up an intelligent attack detection system and an intelligent protection system, using CNN, LSTM, GAN and other algorithms to detect and protect adversarial samples. Through adaptive firewalls and intrusion prevention systems, this layer can effectively identify and isolate malicious data to prevent the spread of attacks; the field layer includes intelligent sensor groups and actuator groups, which monitor real-time grid data (such as voltage, current, etc.) and respond to instructions from the control layer. In addition, the red dotted arrows indicate the potential paths of adversarial attacks, showing that adversarial samples injected by malicious devices may be transmitted through the control layer to the intelligent control center at the enterprise layer, threatening the overall security of the system. Figure 1 It can be concluded that the system adopts a multi-level protection architecture with clear division of labor and mutual cooperation at each level, building a complete security protection network to effectively deal with adversarial attacks; the control layer plays a core role in system protection, preventing the spread of malicious samples through intelligent detection and protection systems; the encrypted communication and identity authentication functions of the boundary layer play a key role in ensuring the security of enterprise-level data and blocking unauthorized access.
[0080] Figure 2 Schematic diagram of hierarchical protection structure of smart grid. Figure 2 The multi-level structure of the smart grid protection and control system is shown in the figure, including modules such as the control center, wide area network, firewall, adjacent substations and substation automation equipment, which constitute the security protection system of the power system. The control center is connected to each adjacent substation through the wide area network, and multiple layers of firewalls are deployed around the wide area network to ensure communication security. The substation automation area below shows the station control layer bus and process layer bus, which are connected to key equipment such as protection relays, circuit breakers, instrument transformers, etc., forming a detection and control function for the real-time status of the power grid. Figure 2The structural design in the paper enhances the real-time and fault-tolerance performance of the smart grid system. However, due to the characteristics of rapid response to demand and unencrypted communication, low-level devices have certain security risks and are easily targeted by network attacks. Therefore, the smart grid needs to strengthen the intrusion detection and protection mechanism of the low-level system to prevent attackers from exploiting communication vulnerabilities to carry out damage.
[0081] like Figure 3 As shown, the method for detecting adversarial network attacks in a smart grid based on an iterative algorithm according to the present invention comprises the following steps:
[0082] Step S1: Collect multi-dimensional operation data from the core nodes of the smart grid through the deployed distributed sensor network, and pre-process the collected data;
[0083] Step S2: Based on the preprocessed data, an iterative algorithm is used to generate adversarial attack samples containing attack vectors for adversarial attacks, so that the attack samples can bypass the bad data detection system based on state estimation in the power monitoring system;
[0084] Step S3: constructing and training an autoencoder network model for detecting adversarial attacks, and dynamically adjusting parameters during model training;
[0085] Step S4: Use the trained autoencoder network model to detect adversarial attack samples, evaluate the effectiveness of the adversarial attack samples in bypassing the detection system, determine their concealment and attack success rate, and optimize the autoencoder network model according to the detection results.
[0086] Figure 4 Schematic diagram of the autoencoder network structure. Figure 4 The overall structure of the autoencoder network model is shown in the figure, including the encoder, latent space, and decoder parts. The encoder part gradually compresses the input data to generate a low-dimensional latent space representation; the decoder part gradually reconstructs the output data similar to the input based on the latent space representation. This structure helps with data dimensionality reduction and feature extraction. In the evasive attack detection of smart grids, the autoencoder network model can be used to effectively generate adversarial samples, thereby simulating the evasive behavior of attackers and improving the detection system's ability to identify abnormal data.
[0087] Figure 5 Schematic diagram of the architecture of the autoencoder network model based on convolution and upsampling, which is used for cyber attack detection on overcurrent protection relays in smart grids. Figure 5The specific structure of the autoencoder network model is shown in the figure, including the input layer, encoder, latent space (z), decoder and output layer. The autoencoder network model uses a convolutional and upsampling network structure to complete the tasks of data dimensionality reduction, feature extraction and data reconstruction; it includes the following parts:
[0088] Encoder part: Starting from the input layer, the encoder gradually compresses the input data to a lower dimension through a series of convolution and pooling operations to extract key features; the original data accepted by the input layer is 240×C data (where C represents the number of channels of the data). The feature conversion process of the encoder is: gradually reduce the dimension from 240×32 to 1×256, and after each downsampling, the number of feature channels of the convolution operation gradually increases. This combination of downsampling and increase in feature channels ensures that the main feature information of the data is effectively retained;
[0089] Latent space (z): The encoder compresses the data into the latent space z, which is a 1×256 low-dimensional representation, the most compact representation of the input data, and contains the core features of the data. The dimension of the latent space is designed to be low-dimensional in order to extract important features while removing unnecessary noise, so that the model can focus on key feature information during reconstruction;
[0090] Decoder part: The decoder gradually recovers the structure of the original data from the low-dimensional representation of the latent space z, and reversely expands the data through upsampling and convolution operations, so that its shape is gradually restored to 240×32. The upsampling and convolution operations of the decoder are the inverse process of the encoder process. Through this structure, the dimension of the data is gradually enlarged and the details of the input data are reconstructed;
[0091] Output layer: The final output of the decoder has the same shape as the input layer, forming a reconstructed version of the data. The purpose of reconstruction is to make the output data as close as possible to the pattern of the input data, so that when abnormal input data is detected, its characteristics different from normal data can be identified.
[0092] Through this architectural design, the autoencoder network model can effectively detect abnormal signals of overcurrent protection relays in smart grids. Once an abnormal signal is input, the reconstruction error will increase significantly, triggering a system alarm to identify potential network attacks. Figure 5 The structure shown implements the feature extraction, compact representation and data reconstruction process of the input data, which helps the system to issue an alarm when data significantly different from the normal pattern is detected, thereby enhancing the protection capability and stability of the power grid system.
[0093] Figure 6The schematic diagram of the power system structure of the IEEE D6 benchmark test system includes three main substations: Substation A, Substation B and Substation C. Each substation is interconnected through four transmission lines (L1, L2, L3, L4) to form a typical power transmission and distribution network. Different modules in the system undertake specific tasks and interact through data and control signals. The generator module (G1 to G4) is located in Substation A and is responsible for providing power. As the main power source of the system, each generator is connected to the transformer (Tr1 to Tr4) through a circuit breaker (CB1 to CB8) to quickly cut off the power supply when the power is abnormal to protect the safety of the power generation equipment and the transmission system. The transformer module (Tr1 to Tr6) is used to convert the voltage output by the generator into a voltage level suitable for transmission of the transmission line, thereby reducing power loss and improving system efficiency. The circuit breaker module (CB1 to CB20) is spread throughout the system to cut off the current in the event of current overload or short circuit, prevent equipment damage, and protect the entire system. Current transformers (CT) and voltage transformers (VT) are responsible for real-time monitoring of current and voltage information and providing data to protection devices for analysis. The data from these transformers is integrated by the merging unit (MU) and sent to the protection relay, reducing the data transmission load and improving efficiency. The protection relay modules are distributed in multiple locations in the substation to monitor current and voltage anomalies, determine whether there is an overcurrent or short circuit fault, and trigger the circuit breaker to isolate the fault when necessary.
[0094] The current generated by the generator is connected to the transmission line after the voltage is adjusted by the transformer and monitored by the mutual inductor. The data collected by the mutual inductor is integrated by the merging unit and sent to the protection relay. The protection relay analyzes the data and instructs the circuit breaker to disconnect the circuit when an abnormality is detected to achieve rapid fault isolation. Each substation is connected through a transmission line to form a complete power transmission and distribution system to ensure system reliability. The design of the D6 benchmark test system takes into account distributed protection and reliability, making it easy to verify the impact of cyber attacks on the protection system through simulation tests, and evaluate the response effect of the protection relay and the system robustness. This multi-level protection architecture can effectively isolate local faults and ensure the stable operation of the power system.
[0095] Figure 7 Schematic diagram of the attack scenario structure based on modifying the current transformer settings. Figure 7A scenario of attack by modifying the current transformer (CT) settings is presented in . This scenario contains two substations (Substation 1 and Substation 2), each equipped with a circuit breaker (CB), a voltage transformer (VT), a merging unit (MU), an intelligent electronic device (IED), and a process bus for transmitting protection communications. By accessing the merging unit (MU), the attacker adjusts the CT settings in Substation 1, forges a current signal higher than the normal threshold, and sends it to the protection relay (BRKR IED), inducing the relay to misjudge the system abnormality and perform a trip operation. In addition, the two substations are connected by a remote protection communication line to achieve the transmission and coordination of protection information.
[0096] Figure 8 Schematic diagram of the structure of the false data injection (FDI) attack scenario based on the process bus. Figure 8 A process bus-based FDI attack scenario is presented in the paper. The scenario includes two substations (Substation 1 and Substation 2), each of which is equipped with circuit breakers (CB), current transformers (CT), voltage transformers (VT), merging units (MU), intelligent electronic devices (IED), and a process bus for remote protection communication. In this scenario, the attacker connects a malicious device to the process bus and injects false high-amplitude current data to mislead the protection relay (BRKR IED) into thinking that an abnormality has occurred in the system, thereby triggering a tripping operation. In addition, the two substations are connected via a remote protection communication line to achieve the intercommunication of protection information.
[0097] Fig. 9 Schematic diagram of the power system simulation test structure. Fig. 9 The power system structure used for simulation test is shown in Figure 1, which includes a 3.125 MVA synchronous generator (SG), a 2250 hp induction motor (IM), and resistive loads (Ld1 and Ld2). The system is connected to the 25 kV grid (Grid) through a 6 MVA transformer. In this structure, SG and IM are connected through buses (Bus1 and Bus2), respectively, and loads Ld1 and Ld2 are located on bus 2 and bus 1, respectively. Fig. 9 It is used to generate initial attack seeds and provide a real test environment for the verification of evasive attack methods by simulating the normal operation of the power system. Through this structure, the bypass effect of evasive attack samples under the automatic encoder network attack detection system can be tested, and the response of the power system under abnormal signal injection can be analyzed.
[0098] Figure 10-Figure 17 The current waveform representation of the target system and the test system under fault and evasive attack conditions.
[0099] When evaluating the bypass effect of the evasive attack on the target system, the three-phase current waveform performance of the target system and the test system under fault and evasive attack conditions was recorded respectively: Fig.10 The following is a waveform diagram of the fault measurement results of the target transmission line. Before the fault, the three-phase current was stable and sinusoidal. When the fault occurred, the current of phases A and C changed significantly, and the current of phase B fluctuated slightly, which may be caused by a single-phase grounding or interphase short circuit fault. After the fault, the current gradually recovered, but there was still instability, which reflected the response of the protection device and the tripping process of the circuit breaker. Fig.11 The waveform diagram of the fault measurement results of the test case power system shows the fault waveform of the simulation test system. At the beginning of the fault, the three-phase current is normal, but after the fault point, the current amplitudes of phases A, B, and C suddenly increase, the phase relationship changes, and enters an abnormal state. The current of phase A increases rapidly and decays, while the current of phases B and C change successively, reflecting the dynamic characteristics of the system's fault response and providing data support for the analysis of protection and detection mechanisms. Fig.12 In order to counter the seed-generated test case fault waveform, when the fault is triggered, the current of phase A increases transiently to the peak value, and phases B and C show relatively lagging amplitude fluctuations, forming an asymmetric waveform. This characteristic disturbs the system detection, causing the protection relay to misjudge it as a normal state, achieving a preliminary avoidance effect. Fig.13 The waveform of the adversarial attack sample constructed is smoothed to present a change trend similar to that of the normal waveform, avoiding drastic phase shift and amplitude mutation, making the fault characteristics less obvious, thereby bypassing the anomaly detection of the detection system.
[0100] Under normal fault conditions ( Fig.10 and Fig.11 ), the three-phase current has significant amplitude and phase mutations when a fault occurs, and the system enters an abnormal state. However, the adversarial seeds and carefully constructed evasive attack samples ( Fig.12 and Fig.13 ) achieves covert disturbance of the waveform by precisely controlling the amplitude and phase of the current, successfully bypassing the detection system. Fig.13 The adversarial attack samples pose a challenge to the detection system while maintaining the appearance of normal system operation through smooth waveform adjustment, verifying the effectiveness of evasive attacks in hiding fault features and bypassing anomaly detection.
[0101] In order to verify the effectiveness of the evasive attack samples in the target system, the three-phase current waveforms of the target system under the conditions of adversarial attack seeds and adversarial attack samples were recorded respectively. Fig.14The target fault waveform diagram of the counter-attack seed shows the three-phase current waveform after the counter-attack seed is injected, among which the A-phase, B-phase and C-phase currents show significant phase shift and amplitude mutation near the sampling point 200, showing the abnormal characteristics of the system current, proving that the counter-attack seed can effectively disturb the system and trigger the alarm of the detection system. Fig.15 The performance of the constructed adversarial attack sample in the target system is shown, and the three-phase current waveform performance of the adversarial attack sample in the target system is demonstrated. The optimized adversarial attack sample waveform remains smooth near the fault point, avoiding mutations and significant phase and amplitude changes, so that it can successfully bypass the fault identification mechanism of the detection system. Comparative analysis shows that the adversarial attack seed directly introduces the abnormal characteristics of the system current, causing the detection system to be able to identify the fault, while the adversarial attack sample hides the abnormal characteristics of the current through waveform optimization, thus circumventing the detection system. This comparison verifies that the adversarial attack sample has a high degree of concealment while maintaining the effectiveness of the attack, indicating the effectiveness and reliability of its design in concealed attacks.
[0102] In order to verify the stability of evasive attack samples under different scaling conditions, the present invention scales the target system and adversarial attack samples and observes their waveform performance. Fig.16 The scaling measurement results of the target power system of the adversarial seed are shown, and the three-phase current waveform of the target power system under the scaling condition of the adversarial seed is displayed, showing the phase and amplitude characteristics of the A-phase, B-phase and C-phase currents at different sampling points. Under the scaling condition, the three-phase current maintains the stability of the sinusoidal waveform, and the phase relationship of the three phases does not change significantly, indicating that the adversarial seed has good waveform consistency under different current amplitudes. After a slight disturbance near the sampling point 200, it quickly returns to the sinusoidal shape, showing the concealment and authenticity of the adversarial seed. This adversarial disturbance makes it difficult for the detection system to distinguish the difference from normal fluctuations, and the adversarial seed can maintain its concealment effect under different current conditions. Fig.17 The waveform performance of the constructed adversarial attack sample under scaling conditions is shown, and the three-phase current waveform of the adversarial attack sample under scaling conditions is displayed. The three-phase waveform is smooth and has no mutations. The phases of the three phases are highly consistent and have no phase offset. The amplitude is stable and the frequency is consistent. The adversarial attack sample can adapt to different current ranges without triggering the detection system alarm, showing its concealment under scaling and different load conditions. The adversarial seed maintains the consistency and phase stability of the sinusoidal waveform under different scaling conditions, making it difficult to be identified by the detection system, while the adversarial attack sample shows a high degree of concealment and adaptability under a wider range of scaling conditions, effectively evading the identification of the detection system. This verifies the stability and applicability of the adversarial attack sample in different power grid environments, and provides reliable support for covert attacks.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to be a further limitation of the present invention. All equivalent changes made using the contents of the present specification and drawings are within the protection scope of the present invention.
Claims
1. A method for detecting adversarial network attacks in smart grids based on an iterative algorithm, characterized in that: The following steps are involved: Step S1: Collect multi-dimensional operation data from the core nodes of the smart grid through the deployed distributed sensor network, and pre-process the collected data; Step S2: Based on the preprocessed data, an iterative algorithm is used to generate adversarial attack samples containing attack vectors for adversarial attacks, so that the attack samples can bypass the bad data detection system based on state estimation in the power monitoring system; specifically: Step S201: Randomly select data from the preprocessed data As adversarial seed samples, the selected adversarial seed samples Perform the first step of calculation to generate the current sample , the formula is ;in, Generate learning rates for adversarial examples; is the initial momentum parameter, defined as ,in, is the loss function Relative to adversarial seed samples The gradient of loss function Defined as ,in for The reconstructed output of is the reconstruction error, is the attack effect function, used to evaluate samples Whether the expected attack effect is achieved on the target system; Step S202: Calculate the loss function ,in for The reconstructed output of is the reconstruction error, is the attack effect function, used to evaluate samples Whether the expected attack effect is produced on the target system; based on the loss function Calculate new gradients ; Step S203: Update momentum parameters ,in, is the momentum coefficient, is the loss function right The gradient of , which indicates the direction of steepest descent at that point, is used to generate the next sample; Step S204: Generate adversarial samples , that is, based on the updated momentum parameter , for the current sample Further optimization is performed to obtain new adversarial attack samples ; Calculate the new loss function And update the momentum parameter , continue to optimize the generation of adversarial samples; Step S205: Generate adversarial samples , ; That is, based on the updated momentum parameter , for the current sample Further optimization is performed to obtain new adversarial attack samples ; Calculate the new loss function And update the momentum parameter , continue to optimize the generation of adversarial samples; represents the i-th iteration sample in the process of generating adversarial attack samples; Step S206: If the reconstruction error of the current sample Exceeding the target reconstruction error of adversarial sample generation , the iteration terminates; otherwise, it returns to step S205 to perform the next iteration; the adversarial sample generates a target reconstruction error ;in, is the reconstruction error of normal data, The adjustment value is 0.01; Step S207: Generate initial adversarial attack sample ; Step S3: constructing and training an autoencoder network model for detecting adversarial attacks, and dynamically adjusting parameters during model training; Step S4: Use the trained autoencoder network model to detect adversarial attack samples, evaluate the effectiveness of the adversarial attack samples in bypassing the detection system, determine their concealment and attack success rate, and optimize the autoencoder network model according to the detection results.
2. According to claim 1, a method for detecting adversarial network attacks in a smart grid based on an iterative algorithm is characterized in that: In step S1, the collected multi-dimensional operation data includes: (1) Substation operating parameters: voltage U, current I, active power P, reactive power Q; (2) Intelligent measurement unit PMU data: phasor data under time synchronization ,in represents the voltage phasor at node i, ; (3) Communication network data: traffic , communication delay and packet loss rate ; (4) Load information: real-time power demand , historical electricity consumption curve ; The collected multi-dimensional running data is represented as a multi-dimensional tensor ,in, represents the feature vector of node i at time t; T represents the total number of time points in the acquisition cycle; N represents the total number of monitoring nodes in the power grid.
3. The method for detecting adversarial network attacks in smart grids based on iterative algorithm according to claim 2, characterized in that: Preprocess the collected multi-dimensional operation data, specifically: (1) Data cleaning: Remove noise and missing values from the collected multi-dimensional running data by using mean filling or interpolation methods; (2) Feature extraction of cleaned multi-dimensional operation data: For intelligent measurement unit PMU data, calculate phase data The voltage correlation between nodes i and j ,in The value range is ;when When it is 1, it means perfect correlation. When it is −1, it indicates a complete anti-correlation. When it is 0, it means there is no correlation; Represent the voltage phasor angles of node i and node j respectively; For load information, calculate the rate of change ,in is the real-time power demand in the load information, Indicates time The real-time power demand, Indicates time Real-time power demand; (3) Data normalization: Normalize the extracted feature data and adjust the data to the form of standard normal distribution; (4) Feature dimensionality reduction: Use principal component analysis (PCA) to reduce the dimension of the normalized data, retain key information, and obtain processed data .
4. The method for detecting adversarial network attacks in smart grid based on iterative algorithm according to claim 3 is characterized in that: Said The initial value of is obtained by statistically analyzing the reconstruction error of normal data. First, a group of normal data samples that are not affected by any attack or anomaly are selected, and these samples are input into the initial basic detection network to obtain the reconstructed data through the encoding-decoding process. Then, the reconstruction error of each sample is calculated in the form of mean square error, and the mean of the mean square error of all samples is calculated as the baseline value of the reconstruction error of normal data. ; In the formula is the total number of normal samples, represents the true value of the jth sample, Represents the reconstructed value of the jth sample.
5. The method for detecting adversarial network attacks in smart grids based on iterative algorithm according to claim 4, characterized in that: In step S3, the autoencoder network model includes an input layer, an encoder, a latent space, a decoder and an output layer; The encoder performs feature compression on the input data of the input layer through convolution and pooling operations, reducing the initial input data dimension Convert to The low-dimensional representation of ; the specific operations include: (1) Convolution operation: In each convolution operation, the spatial features of the input data are extracted. The formula is: ;in, is the input data of the autoencoder, which is used to train the model to recognize the characteristics of normal data; Indicates that the encoder is Feature representation obtained after layer convolution operation; is the activation function; For encoder The convolution kernel of the layer; For encoder The bias term of the layer; (2) Pooling operation: Pooling operation is applied after each convolution layer to gradually reduce the spatial dimension and transfer the data from Compress to A low-dimensional representation of The latent space is a The latent space of dimension is the final output of the encoder and is the core compact feature representation of the entire input data, which is used to retain the main information for subsequent reconstruction operations; The decoder transforms the features of the latent space from Restore the original structure of the input data And output through the output layer; the specific operations include: (1) Upsampling operation gradually restores the spatial dimension of the feature and restores the low-dimensional representation to the spatial size of the original input data. The formula is: ;in, Indicated in The reconstructed data obtained after layer upsampling; For decoder Upsampling weights of the layer; represents the latent space; is the bias term for the upsampling operation of the i-th layer of the decoder; (2) Convolution operation: After each upsampling, a convolution operation is performed to increase the number of feature channels and further adjust the features to gradually approach the original input structure. The formula is: ;in, For decoder The output features after the layer convolution operation represent the intermediate features that gradually approach the original input structure after upsampling and convolution operations; For decoder The weights of the layer convolution operations; For decoder Bias term for the convolution operation at the layer.
6. The method for detecting adversarial network attacks in smart grid based on iterative algorithm according to claim 1, characterized in that: The automatic encoder network model is trained, and dynamic parameter adjustment is performed during the training process, specifically: Step S301: Set training optimization learning rate The initial value of When , gradually reduce the training optimization learning rate The value of is used to optimize the parameters more carefully in the later stage of model convergence; the specific update formula is: ,in; is the learning rate The reduction factor, The range is set to 0.9 to 0.99 to ensure gradually decrease; Step S302: Initialize the training optimization momentum coefficient For momentum update, The initial setting is 0.5, and it is gradually increased to the target value during the training process to accelerate convergence; When , the training will optimize the momentum coefficient The value of increases by 0.01, but does not exceed 0.99; the specific update formula is ; Step S303: Reconstruct error value based on input data , calculate the reconstruction error of the training optimization target ; Whenever the update cycle is met When the training optimization objective is reconstructed, the error To reduce; the specific update formula is ,in The reduction factor of the reconstruction error for the training optimization objective, The value range is 0.9 to 0.99; Step S304: Output the updated training optimization learning rate , training optimization momentum coefficient , and the training optimization objective reconstruction error .
7. The method for detecting adversarial network attacks in smart grid based on iterative algorithm according to claim 1, characterized in that: Step S4 is specifically as follows: Step S401: Performance evaluation: input the adversarial sample into the autoencoder network model and calculate its detection accuracy and recall performance indicators to verify its ability to bypass the detection system: , , in, is the number of attack samples successfully detected; is the number of normal samples that are falsely detected; is the number of real attack samples that were not detected; Step S402, scaling condition test, testing the impact of the adversarial sample on the current waveform under different scaling conditions to verify its concealment and stability under various conditions.
Citation Information
Patent Citations
Smart power grid anomaly detection and classification method and device, and readable storage medium
CN116488325A
Adversarial sample defense method and system based on de-noising auto-encoder
CN116595515A
Information physical system anomaly detection method based on generative adversarial network
CN117792750A
Android malicious software escape attack enhancement detection method based on anti-purification strategy
CN117494127A
Adversarial Optimization Method for Training Process of Generative Adversarial Network
US20220122348A1