Anomaly data filtering method based on data-driven algorithm of adversarial attack

By establishing key feature and node selector, abnormal data identifier and repairer model, and constructing input data filter, the problem of data-driven algorithm being vulnerable to adversarial attacks is solved, and the accuracy under adversarial attacks is improved and the error results are reduced.

CN117688000BActive Publication Date: 2025-10-21ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311711062.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-10-21
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

Data-driven algorithms are vulnerable to adversarial attacks in power systems, resulting in strong concealment and potentially serious consequences. Existing technologies struggle to effectively filter and repair attack vectors.

Method used

Establish models for a key feature and key node selector, an anomaly data identifier, and an anomaly data repairer. Construct an input data filter, select key features and nodes through χ2 test, and filter and repair attack vectors using anomaly data identification and repair algorithms.

Benefits of technology

Effectively filter and repair attack vectors to improve the output accuracy of data-driven algorithms under adversarial attacks and reduce the probability of erroneous results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117688000B_ABST
    Figure CN117688000B_ABST
Patent Text Reader

Abstract

The application discloses an abnormal data filtering method based on a data-driven algorithm of an adversarial attack, belongs to the field of electric power energy, and relates to an input data filter which is composed of a key feature and key node selector, an abnormal data identifier and an abnormal data repairer and comprises the following contents: firstly, a key feature and key node selector model is established, input is measurement data, a key measurement data matrix is generated by considering a feature key degree sequence and a node key degree sequence; then, based on an abnormal data identification method, an abnormal data identifier model is established, input of the abnormal data identifier model is the key measurement data matrix, output is node measurement data detected as abnormal, and abnormal data is removed from the key measurement data; finally, based on correlation of adjacent node measurement data and considering real-time requirement of an abnormal data repair process, an abnormal data repairer model is established.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to an abnormal data filtering method based on a data-driven algorithm for countering attacks. Background Art

[0002] With the rapid development of data science, data-driven algorithms have become a powerful tool for power system analysis. Based on extensive experimental and measured data, data-driven algorithms construct empirical models that describe data relationships, thereby exploring problem characteristics and guiding analytical decisions. Numerous studies and applications have demonstrated the effectiveness of data-driven algorithms in power systems. However, due to objective design considerations, data-driven algorithms can also introduce new security risks, particularly the risk of cyber-physical coupling failures caused by cyberattacks. Attackers exploit the cyber-physical coupling characteristics of power systems to inject attack vectors into the system and target data-driven algorithms. Compared to traditional physical attacks, adversarial attacks against data-driven algorithms are more subtle and can result in more serious consequences.

[0003] In this context, it is necessary to conduct research on the adversarial attack and defense problems of data-driven algorithms, propose an abnormal data filtering method for data-driven algorithms based on adversarial attacks, construct an abnormal data filter, filter and repair the attack vectors in the input data, so that the data-driven algorithm can still output correct results when inputting data containing attack vectors. Summary of the Invention

[0004] In order to solve the deficiencies mentioned in the above background technology, the purpose of the present invention is to provide a method for filtering abnormal data based on a data-driven algorithm for countermeasure attacks.

[0005] The purpose of the present invention can be achieved by the following technical solution: a method for filtering abnormal data based on a data-driven algorithm for countermeasure attack, the method comprising the following steps:

[0006] Establish a key feature and key node selector model, take measurement data as input, and generate a key measurement data matrix considering the feature criticality sequence and node criticality sequence;

[0007] Based on the abnormal data identification method, an abnormal data identifier model is established. The input of the abnormal data identifier model is the key measurement data matrix, and the output is the node measurement data detected as abnormal. The abnormal data is removed from the key measurement data.

[0008] Considering the correlation of adjacent node measurement data and the real-time requirement of the abnormal data repair process, an abnormal data repair model is established;

[0009] Based on the above key features and key node selector, abnormal data identifier and abnormal data repairer models, an input data filter is formed to implement abnormal data filtering based on the data-driven algorithm of adversarial attack;

[0010] The key features and key node selector model include:

[0011] The input of the key feature and key node selector is the measurement data X, and the output is the key measurement data matrix X S , which has the same dimension as the input data X, and the key features and key node selectors are based on the pre-calculated feature criticality sequence Q F and node criticality sequence Q N Implementation, in sequence Q F Front K KF Randomly select k key features SF features, in the sequence Q N Front K KN Randomly select k key nodes SN nodes, the critical degree sequence is obtained by χ 2 The test calculation is, 2 The smaller the value, the more critical the feature or node is:

[0012]

[0013] where k F is the feature number, l is the sample label, E F is the feature k for label l F The expectation of T is the total number of samples, T l is the total number of samples with label l, ∑ m X i (k F ) is the kth node in the i-th sample F The sum of all data of features, ∑ m X l (k F ) is the kth node in the sample with label l F The sum of all data of features;

[0014] The feature criticality sequence and node criticality sequence include:

[0015] χ F 2 Arrange the sequence Q in ascending order F , and select some of the more critical feature data to obtain the key feature sequence Q SF :

[0016] Q F =sort(χF 2 )

[0017] Q SF =random(Q F (1:k KF ),k SF )

[0018] where sort(·) is a sorting function and random(·) is a random function that randomly selects a certain number of members in the sequence;

[0019] Node criticality sequence Q N The calculation method is:

[0020]

[0021]

[0022] Q N =sort(χ N 2 )

[0023] Q SN =random(Q N (1:k KN ),k SN )

[0024] where k N is the node number, E N is the node k for label l N The expectation of the data, Q SF With Q SN Commonly labeled as key sequence Q S ;

[0025] According to Q SF and Q SN , extract the data points X corresponding to the selected nodes and features from the input data C :

[0026]

[0027] To X C Smoothing is performed and the data of the missing data points are supplemented with the average value of the corresponding data of the adjacent key features, so as to obtain the measurement data X containing only the key features and key nodes. S :

[0028]

[0029] where X C (i1) is the data of the i1th feature of all nodes in the intercepted input data.

[0030] Preferably, the abnormal data identification method and abnormal data identifier model include:

[0031] The input of abnormal data identifier is key measurement data X S , the output is the node measurement data X detected as abnormal P , X P Dimension and X S Similarly, the measurement data of nodes marked as not containing attack vectors are set to zero:

[0032]

[0033] in:

[0034]

[0035] Among them, M is the correlation matrix, m is the iteration step number, i2 and j1 are the summation step numbers, p and q are the data cluster numbers, ρ i2 is the attack vector label. After clustering, the class with fewer members is marked as containing the attack vector, and the class with more members is marked as not containing the attack vector. The label ρ is set to 1 or 0 respectively. The parameters α and β in L are:

[0036]

[0037] The closer L is to 1, the greater the difference between the data, that is, the more likely there is an attack vector in the data. Therefore, there is a constant L min , when L>L min When the measurement data of the input data driving the algorithm contains attack vectors,

[0038] From key measurement data X S Remove abnormal data X P You can get the measurement data X without attack vectors D :

[0039] X D =X S -X P .

[0040] Preferably, the abnormal data repair process includes:

[0041] If the attack area only contains a single node, the node with the closest electrical distance can be selected, and the data of the target node can be restored based on the proportional relationship between the measurement data of the two nodes; if the attack area is multiple adjacent nodes, and the adjacent nodes of some of the nodes are attacked, it is necessary to restore the poisoned data layer by layer from the outermost layer of the attack area, and then restore the data of the target node.

[0042] Preferably, the abnormal data repairer model includes:

[0043] The abnormal data repairer model can be described as follows:

[0044]

[0045] Where: is the measurement data of the i-th node after repair; X D (i) After detecting and eliminating anomalies, the i-th node in X D The original measurement data in ; ρ(i) indicates whether the i-th node contains the attack label (ρi∈{0,1}); B(i) is the i-th row of the adjacency matrix B, which represents the weight of each node adjacent to the i-th node (sorted by electrical distance); X D Represents a matrix of dimension N×d, which represents the key measurement data of all nodes at the current moment, where N is the number of nodes and d is the feature dimension of each node. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0047] Figure 1 is a flow chart of the method of the present invention;

[0048] Figure 2 Schematic diagram of abnormal data recovery process of the present invention;

[0049] Figure 3 This is a structural diagram of the input data filter of the present invention;

[0050] Figure 4 This is the topology diagram of the New England 39-node system. DETAILED DESCRIPTION

[0051] 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 any creative efforts shall fall within the scope of protection of the present invention.

[0052] like Figure 1 As shown, a data-driven algorithm abnormal data filtering method based on adversarial attack includes the following steps:

[0053] Establish a key feature and key node selector model, take measurement data as input, and generate a key measurement data matrix considering the feature criticality sequence and node criticality sequence;

[0054] Based on the abnormal data identification method, an abnormal data identifier model is established. The input of the abnormal data identifier model is the key measurement data matrix, and the output is the node measurement data detected as abnormal. The abnormal data is removed from the key measurement data.

[0055] Considering the correlation of adjacent node measurement data and the real-time requirement of the abnormal data repair process, an abnormal data repair model is established;

[0056] Based on the above key features and key node selector, abnormal data identifier and abnormal data repairer models, an input data filter is formed to realize abnormal data filtering based on the data-driven algorithm of adversarial attack.

[0057] The key features and key node selector model include:

[0058] The input of the key feature and key node selector is the measurement data X, and the output is the key measurement data matrix X S , which has the same dimension as the input data X, and the key features and key node selectors are based on the pre-calculated feature criticality sequence Q F and node criticality sequence Q N Implementation, in sequence Q F Front K KF Randomly select k key features SF features, in the sequence Q N Front K KN Randomly select k key nodes SN nodes, the critical degree sequence is obtained by χ 2 The test calculation is, 2 The smaller the value, the more critical the feature or node is:

[0059]

[0060] where k F is the feature number, l is the sample label, E F is the feature k for label l F The expectation of T is the total number of samples, T l is the total number of samples with label l, ∑ m X i (k F ) is the kth node in the i-th sample F The sum of all data of features, ∑ m X l (k F) is the kth node in the sample with label l F The sum of all data of features;

[0061] The feature criticality sequence and node criticality sequence include:

[0062] χ F 2 Arrange the sequence Q in ascending order F , and select some of the more critical feature data to obtain the key feature sequence Q SF :

[0063] Q F =sort(χ F 2 )

[0064] Q SF =random(Q F (1:k KF ),k SF )

[0065] Where sort(·) is a sorting function and random(·) is a random function that randomly selects a certain number of members in the sequence:

[0066] Node criticality sequence Q N The calculation method of Q F Similar to the following:

[0067]

[0068]

[0069] Q N =sort(χ N 2 )

[0070] Q SN =random(Q N (1:k KN ),k SN )

[0071] where k N is the node number, E N is the node k for label l N The expectation of the data. SF With Q SN Commonly labeled as key sequence Q S .

[0072] According to Q SF and Q SN , extract the data points X corresponding to the selected nodes and features from the input dataC , as shown below:

[0073]

[0074] X is calculated by the following formula C Smoothing is performed and the data of the missing data points are supplemented with the average value of the corresponding data of the adjacent key features, so as to obtain the measurement data X containing only the key features and key nodes. S :

[0075]

[0076] where X C (i1) is the data of the i1th feature of all nodes in the intercepted input data.

[0077] The abnormal data identification method and abnormal data identifier model include:

[0078] The input of abnormal data identifier is key measurement data X S , the output is the node measurement data X detected as abnormal P , X P Dimension and X S Similarly, the measurement data of nodes marked as not containing attack vectors are set to zero:

[0079]

[0080] in:

[0081]

[0082] Among them, M is the correlation matrix, m is the iteration step number, i2 and j1 are the summation step numbers, p and q are the data cluster numbers, ρ i2 is the attack vector label. After clustering, the class with fewer members is marked as containing the attack vector, and the class with more members is marked as not containing the attack vector. The label ρ is set to 1 or 0 respectively. The parameters α and β in L are:

[0083]

[0084] The closer L is to 1, the greater the difference between the data, that is, the more likely there is an attack vector in the data. Therefore, there is a constant L min , when L>L min When the measurement data of the input data driving the algorithm contains attack vectors,

[0085] From key measurement data X S Remove abnormal data X P You can get the measurement data X without attack vectors D :

[0086] X D =X S -X P .

[0087] The abnormal data repair process includes:

[0088] Due to X D Some node data containing attack vectors is missing in the algorithm, so it needs to be repaired to complete the missing data. Considering that the power system is a continuous system, the measurement data of adjacent nodes are correlated, and the real-time requirements of the abnormal data repair process need to be considered, replacing the measurement data of the node containing the attack vector with the measurement data of the adjacent nodes generally does not change the judgment results of the data-driven algorithm.

[0089] The recovery process for abnormal data is as follows Figure 2 As shown in the figure, it can be divided into two categories: (1) The attack area only contains a single node. In this case, the node with the closest electrical distance can be selected, and the data of the target node can be restored based on the proportional relationship between the measurement data of the two nodes. (2) The attack area is composed of multiple adjacent nodes, and the adjacent nodes of some nodes are also attacked. In this case, it is necessary to restore the poisoned data layer by layer from the outermost layer of the attack area, and then restore the data of the target node.

[0090] The abnormal data repairer model includes:

[0091] The abnormal data repairer model can be described as follows:

[0092]

[0093] Where: is the measurement data of the i-th node after repair; X D (i) After detecting and eliminating anomalies, the i-th node in X D The original measurement data in ; ρ(i) indicates whether the i-th node contains the attack label (ρi∈{0,1}); B(i) is the i-th row of the adjacency matrix B, which represents the weight of each node adjacent to the i-th node (sorted by electrical distance); X D Represents a matrix of dimension N×d, which represents the key measurement data of all nodes at the current moment, where N is the number of nodes and d is the feature dimension of each node.

[0094] The input data filter and the abnormal data filtering based on the data-driven algorithm of the adversarial attack include:

[0095] (1) Key features and key node selectors

[0096] (2) Abnormal data identifier

[0097] (3) Abnormal data repairer

[0098] The input data filter structure is as follows Figure 3 As shown, it is connected to the input front end of the data-driven algorithm, which can effectively destroy the attack vectors implicit in the data, thereby preventing the data-driven algorithm from being induced by the attack vectors to output erroneous results as much as possible, thereby significantly improving the data-driven algorithm's ability to defend against attacks. An optional embodiment of the present invention is described in detail below.

[0099] In one embodiment of the present invention: the above method is applied to Figure 4 In the New England 39-node system shown, a measurement unit, numbered M1 through M10, is deployed on each of the 10 generators. These units measure voltage, power angle, active power, and reactive power at each generator node. Distributed generation (DGs) are connected to multiple nodes in the New England 39-node system, and measurement units are deployed at each node to monitor voltage.

[0100] We attack 2000 groups of samples in the attack scenario and statistically analyze the impact of whether or not to deploy input data filters on the attack effect when using different data-driven models, as shown in Table 1.

[0101] Table 1 Effect of adding input data filter on improving the accuracy of data-driven algorithm output results under attack

[0102]

[0103] Before implementing the input data filter, adversarial attacks effectively reduced the accuracy of the output results of the target data-driven algorithm. However, after implementing the input data filter, although the accuracy of the output results for normal data decreased slightly, the accuracy under the adversarial attack increased significantly. The test results show that the proposed method for filtering abnormal data in data-driven algorithms based on adversarial attacks can effectively reduce the impact of adversarial attacks on data-driven algorithms.

[0104] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0105] The above shows and describes the basic principles, main features and advantages of the present disclosure. Those skilled in the art should understand that the present disclosure is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present disclosure. Various changes and improvements may be made to the present disclosure without departing from the spirit and scope of the present disclosure, and such changes and improvements shall fall within the scope of the present disclosure.

Claims

1. A data-driven algorithm abnormal data filtering method based on adversarial attack, characterized in that: The method comprises the following steps: Establish a key feature and key node selector model, take measurement data as input, and generate a key measurement data matrix considering the feature criticality sequence and node criticality sequence; Based on the abnormal data identification method, an abnormal data identifier model is established. The input of the abnormal data identifier model is the key measurement data matrix, and the output is the node measurement data detected as abnormal. The abnormal data is removed from the key measurement data. Considering the correlation of adjacent node measurement data and the real-time requirement of the abnormal data repair process, an abnormal data repair model is established; Based on the above key features and key node selector, abnormal data identifier and abnormal data repairer models, an input data filter is formed to implement abnormal data filtering based on the data-driven algorithm of adversarial attack; The key features and key node selector model include: The input of the key feature and key node selector is the measurement data X, and the output is the key measurement data matrix X S , which has the same dimension as the input data X, and the key features and key node selectors are based on the pre-calculated feature criticality sequence Q F and node criticality sequence Q N Implementation, in sequence Q F Front K KF Randomly select k key features SF features, in the sequence Q N Front K KN Randomly select k key nodes SN nodes, the critical degree sequence is obtained by χ 2 The test calculation is, 2 The smaller the value, the more critical the feature or node is: where k F is the feature number, l is the sample label, E F is the feature k for label l F The expectation of T is the total number of samples, T l is the total number of samples with label l, ∑ m X i (k F ) is the kth node in the i-th sample F The sum of all data of features, ∑ m X l (k F ) is the kth node in the sample with label l F The sum of all data of features; The feature criticality sequence and node criticality sequence include: χ F 2 Arrange in ascending order to get the sequence Q F , and select some of the more critical feature data to obtain the key feature sequence Q SF : Q F =sort(x F 2 ) Q SF =random(Q F (1:k KF ),k SF ) where sort(·) is a sorting function and random(·) is a random function that randomly selects a certain number of members in the sequence; Node criticality sequence Q N The calculation method is: Q N =sort(x N 2 ) Q SN =random(Q N (1:k KN ),k SN ) where k N is the node number, E N is the node k for label l N The expectation of the data, Q SF With Q SN Commonly labeled as key sequence Q S ; According to Q SF and Q SN , extract the data points X corresponding to the selected nodes and features from the input data C : To X C Smoothing is performed and the data of the missing data points are supplemented with the average value of the corresponding data of the adjacent key features, so as to obtain the measurement data X containing only the key features and key nodes. S : where X C (i1) is the data of the i1th feature of all nodes in the intercepted input data.

2. The method for filtering abnormal data based on a data-driven algorithm for countermeasure attack according to claim 1, characterized in that: The abnormal data identification method and abnormal data identifier model include: The input of abnormal data identifier is key measurement data X S , the output is the node measurement data X detected as abnormal P , X P Dimension and X S Similarly, the measurement data of nodes marked as not containing attack vectors are set to zero: in: Among them, M is the correlation matrix, m is the iteration step number, i2 and j1 are the summation step numbers, p and q are the data cluster numbers, ρ i2 is the attack vector label. After clustering, the class with fewer members is marked as containing the attack vector, and the class with more members is marked as not containing the attack vector. The label ρ is set to 1 or 0 respectively. The parameters α and β in L are: The closer L is to 1, the greater the difference between the data, that is, the more likely there is an attack vector in the data. Therefore, there is a constant L min , when L>L min When the measurement data of the input data driving the algorithm contains attack vectors, From key measurement data X S Remove abnormal data X P You can get the measurement data X without attack vectors D : X D =X S -X P 。 3. The method for filtering abnormal data based on a data-driven algorithm for countermeasure attack according to claim 1, characterized in that: The abnormal data repair process includes: If the attack area only contains a single node, the node with the closest electrical distance can be selected, and the data of the target node can be restored based on the proportional relationship between the measurement data of the two nodes; if the attack area is multiple adjacent nodes, and the adjacent nodes of some of the nodes are attacked, it is necessary to restore the poisoned data layer by layer from the outermost layer of the attack area, and then restore the data of the target node.

4. The method for filtering abnormal data based on a data-driven algorithm for countermeasure attack according to claim 1, characterized in that: The abnormal data repairer model includes: The abnormal data repairer model can be described as follows: in: is the measurement data of the i-th node after repair; X D (i) After detecting and eliminating anomalies, the i-th node in X D The original measurement data in ; ρ(i) indicates whether the i-th node contains the attack label; B(i) is the i-th row of the adjacency matrix B, which indicates the weight of each node adjacent to the i-th node; X D Represents a matrix of dimension N×d, which represents the key measurement data of all nodes at the current moment, where N is the number of nodes and d is the feature dimension of each node.

Citation Information

Patent Citations

  • Power system attacked measurement data two-layer restoration method based on data driving

    CN114372045A

  • Identification method and identification device for abnormal data in power system

    CN116881746A