An FDI Attack Detection Method for Wind Power Prediction

Detecting and restoring FDI attacks in wind power data through k-fold cross-validation and autoencoder technology, the shortcomings of existing methods in identifying new attacks and data recovery are solved, and the robustness and accuracy of wind power power prediction are improved.

CN118916806BActive Publication Date: 2025-08-01QINGDAO UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410929974.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-08-01
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

When facing FDI attacks, existing wind power power prediction methods rely on the labeled data sets of specific attack types are insufficient in recognition capabilities and fail to effectively process the attacked data, which affects the economic benefits of wind power plants and grid stability.

Method used

The wind power data is divided by k-fold cross-verification and sliding window technology, combined with sparse autoencoder (SAE) to detect reconstruction errors, identify and remove attacked data, and recover data using denoised autoencoder (DAE).

Benefits of technology

Effectively detect and restore FDI attack data, improve the stability and accuracy of wind power power prediction, enhance the economic benefits of wind power plants and grid stability, and is suitable for a variety of attack detection and data recovery scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916806B_ABST
    Figure CN118916806B_ABST
Patent Text Reader

Abstract

The present invention discloses a FDI attack detection method for wind power prediction, which belongs to the technical field of wind power prediction. The method comprises: obtaining wind power data to be detected to obtain a data set to be detected; using the idea of k-fold cross-validation to preliminarily divide the data set to be detected into k subsets; in each round of iteration, one of the subsets is selected in turn as a test set; using the trained SAE to test each test set, and calculating the reconstruction error of each test set data after SAE reconstruction; if the formula is satisfied: σ>σ0, and R max >μ+hσ, then R max The corresponding test set with the largest reconstruction error is marked as attacked data and removed from the dataset to be tested. The original k-fold cross-validation is correspondingly converted to k-1-fold cross-validation, and the process proceeds to step S103. The present invention can enhance the robustness of wind power prediction models, improve the economic benefits of wind power plants, and improve the stability of power grids.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wind power prediction, and in particular to an FDI attack detection method for wind power prediction. Background Art

[0002] With technological advancements, society's growing demand for energy is driving the search for clean, affordable, and sustainable energy. By the end of March 2024, my country's installed renewable energy capacity reached 1.585 billion kilowatts, a year-on-year increase of 26%, accounting for approximately 52.9% of the country's total installed capacity. Wind power and photovoltaic power generation combined exceeded 1.1 billion kilowatts. China's cumulative grid-connected wind power capacity reached 457 million kilowatts, a year-on-year increase of 22%. With technological advancements and policy support, renewable energy sources such as wind power will undoubtedly usher in even greater development opportunities.

[0003] However, the randomness, volatility, and uncertainty of wind power pose significant challenges to wind power forecasting. Improving wind power forecasting accuracy is crucial in renewable energy management and grid operations. While time-series-based wind power forecasting methods have been shown to improve forecast accuracy, supervisory control and data acquisition (SCADA) systems in the wind power sector face significant cybersecurity challenges. False data injection (FDI) attacks, in particular, pose a serious threat to wind power forecasting accuracy by tampering with or injecting erroneous data. Therefore, research on how to protect wind power data from FDI attacks is crucial for both the economic profitability of wind farms and the stability of power grids.

[0004] Existing FDI detection methods in the literature fall into two main categories: model-based algorithms and data-driven algorithms. Model-based algorithms rely on the system's physical model and parameters to improve the system's static and dynamic state estimators. While effective in some cases, they are computationally intensive, costly, and have poor scalability. Data-driven algorithms offer an alternative that does not require system models or parameters. By employing techniques such as deep belief networks (DBNs), reinforcement learning (RL), long short-term memory networks (LSTMs), and support vector machines (SVMs), they have demonstrated potential in FDI attack detection. However, these methods have limited application in wind power forecasting, and most rely on labeled datasets specific to specific attack types, lacking the ability to identify unknown attacks. Furthermore, most traditional methods neglect the data recovery step when processing attacked data. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a FDI attack detection method for wind power prediction, so as to enhance the robustness of the wind power prediction model and improve the economic benefits of wind power plants and the stability of power grids.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] A FDI attack detection method for wind power forecasting, comprising:

[0008] Step S101: Acquire wind power data to be detected to obtain a data set to be detected;

[0009] Step S102: Using the idea of k-fold cross validation, the dataset to be tested is preliminarily divided into k subsets.

[0010] Step S103: In each iteration, one of the subsets is selected as the test set in turn;

[0011] Step S104: Use the trained SAE to test each test set and calculate the reconstruction error of each test set data after SAE reconstruction;

[0012] Step S105: If the formula is satisfied:

[0013] σ>σ0, and R max >μ+hσ

[0014] In the formula, σ is the standard deviation of the reconstruction error of each test set data, σ0 is the preset threshold, R max is the maximum value of the reconstruction error of each test set data, μ is the mean value of the reconstruction error of each test set data, and h is the preset coefficient;

[0015] Then R max The corresponding test set with the largest reconstruction error is marked as attacked data and removed from the dataset to be tested. The original k-fold cross-validation is correspondingly converted to k-1-fold cross-validation, and the process goes to step S103.

[0016] Furthermore, in step S102, k is 10;

[0017] And / or, step S103 includes:

[0018] Use the sliding window technique to subdivide the test set data to ensure that the sample size M is determined according to the following formula:

[0019]

[0020] Among them, n represents the total amount of data in the dataset, ω represents the sliding window size, and s represents the moving step size, indicating the floor operation to ensure that the obtained number of samples is an integer.

[0021] Furthermore, the training process of the SAE includes:

[0022] Step A1: Obtain wind power data samples to get the original dataset;

[0023] Step A2: Perform scaling attacks on part of the data in the original dataset;

[0024] Step A3: Use the dataset after scaling attack and combine k-fold cross-validation to train the SAE.

[0025] Furthermore, in step A2, 15%-30% of the data in the original dataset is subjected to scaling attack, and the scaling factor of the scaling attack is 0.3-0.5.

[0026] Furthermore, step A3 includes:

[0027] Step A31: Draw on the idea of k-fold cross-validation to preliminarily divide the dataset after scaling attack and evenly divide it into k subsets;

[0028] Step A32: In each round of iteration, alternately select one of the subsets as the test set, and combine the remaining k-1 subsets to form the training set. Use the sliding window technique to further subdivide the training set and test set data and then train the SAE.

[0029] Furthermore, after step S105, it also includes:

[0030] Step S106: Input all the labeled attacked data into the trained DAE for attacked data recovery.

[0031] Furthermore, the training process of the DAE includes:

[0032] Step B1: Obtain wind power data samples to get the original dataset that has not been attacked;

[0033] Step B2: Add noise with a standard normal distribution to the original dataset to get the training dataset;

[0034] Step B3: Use the training dataset to train the DAE.

[0035] Furthermore, in step B2, the noise is 0.1-0.3 times the noise of the standard normal distribution;

[0036] And / or, in step B3, 80% of the training data set is used to train the DAE, and the remaining 20% is used to test the model's ability to recover data.

[0037] Further, in step A2, through scaling attacks, a part of the system data is increased or decreased by a certain percentage of the original value and is modeled as:

[0038]

[0039] where t s and t e represent the start time and end time of the network attack respectively, α s represents the scaling factor, D t is the original data set, and is the attacked data set.

[0040] Further, in step S105, the z-score is used to identify the attacked data. The z-score quantifies the relationship between a single data point and the mean of the data set and can help identify anomalies or outliers in the data set. The calculation of the z-score is based on the following formula:

[0041]

[0042] where X = {x1, x2, …, x n} represents the observed values, μ represents the mean of the observed values, σ represents the standard deviation of the observed values. When applying the z-score for detection, a threshold must be set, and this threshold corresponds to the region where the data points deviate far from the mean in the normal distribution.

[0043] The present invention has the following beneficial effects:

[0044] The present invention provides an FDI attack detection and data recovery method for wind power prediction. This method draws on the idea of k-fold cross-validation and can effectively detect and recover the attacked data caused by FDI attacks. The detection method adopted by the present invention is simple and easy to implement and does not require a large amount of manually labeled data. After verification, compared with the prior art, the present invention does not rely on a labeled data set of a specific attack type, can effectively identify new or unknown attack patterns, and at the same time, through the data recovery step, prevents information loss caused by simply deleting the attack data and ensures the integrity of the data. After implementing this method, the stability and accuracy of wind power prediction are significantly improved, providing a technical guarantee for the economy of wind farms and the stability of the power grid. In addition, this method has strong universality and is not only applicable to the field of wind power prediction but also can be extended and applied to various scenarios requiring attack detection and data recovery. Description of the Drawings

[0045] Figure 1Schematic diagram of the FDI attack detection method for wind power prediction according to the present invention;

[0046] Figure 2 Schematic diagram of the principle of the FDI attack detection and data recovery method for wind power prediction according to the present invention;

[0047] Figure 3 Schematic diagram of wind power data of a wind farm;

[0048] Figure 4 Schematic diagram of k-fold cross-validation;

[0049] Figure 5 Structural diagram of a sparse autoencoder with one hidden layer;

[0050] Figure 6 Schematic diagram of comparison between attacked data and reconstructed data. Detailed implementation manners

[0051] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0052] The randomness, volatility and uncertainty of the wind, as well as the FDI attacks faced by the SCADA system on which wind turbines depend, all threaten the accuracy of wind power prediction, thereby affecting the economic benefits of wind farms and the dispatching balance of the power grid. Most traditional FDI attack detection methods for wind power prediction rely on labeled data sets of specific attack types, have insufficient recognition ability for new or unknown attacks, and mostly ignore the data recovery step when dealing with attacked data.

[0053] Therefore, the present invention draws on the idea of k-fold cross-validation and proposes a method that can not only effectively detect FDI attacks but also recover the attacked data, so as to enhance the robustness of the wind power prediction model and improve the economic benefits of wind farms and the stability of the power grid. The specific description is as follows.

[0054] The present invention provides an FDI attack detection method for wind power prediction, as Figure 1-2 shown, including:

[0055] Step S101: Obtain the wind power data to be detected to obtain the data set to be detected;

[0056] Step S102: Draw on the idea of k-fold cross-validation to preliminarily divide the data set to be detected and evenly divide it into k subsets;

[0057] In this step, drawing on the idea of k-fold cross-validation, the data set to be detected is preliminarily divided and evenly divided into k subsets, which are called "folds". Preferably, in step S102, k is 10.

[0058] Step S103: In each round of iteration, select one of the subsets as the test set in turn;

[0059] As an alternative embodiment, step S103 may include:

[0060] Use the sliding window technique to subdivide the test set data to ensure that the sample quantity M is determined according to the following formula:

[0061]

[0062] where n represents the total data volume of the data set, ω represents the sliding window size (which can be flexibly set as needed, for example, set to 100), s represents the moving step size (which can be flexibly set as needed, for example, set to 1), represents the floor operation to ensure that the obtained sample quantity is an integer. Through this method, we can obtain structured and ordered data.

[0063] Step S104: Use the trained SAE (Sparse Autoencoder) to test each test set and calculate the reconstruction error of the data of each test set after SAE reconstruction;

[0064] As an alternative embodiment, the training process of SAE may include:

[0065] Step A1: Obtain wind power data samples to get the original data set;

[0066] In one example, the wind power data of a certain wind turbine in a certain wind farm in China can be collected. The wind power data is as Figure 3 shown. Specifically, obtain 10,000 wind power data points of a certain wind turbine in a certain wind farm in China from July 1, 2014 to July 8, 2014 as the original data set X, and each data point is the average power within one minute.

[0067] Step A2: Perform scaling attacks on part of the data in the original data set;

[0068] Preferably, in step A2, perform scaling attacks on 15%-30% of the data in the original data set, and the scaling factor of the scaling attack is 0.3-0.5.

[0069] Preferably, in step A2, through the scaling attack, a part of the system data will increase or decrease by a certain percentage of the original value, which can be modeled as:

[0070]

[0071] where t s and t e represent the start time and end time of the cyber attack respectively, α s represents the scaling factor, D t is the original dataset, while is the attacked dataset.

[0072] For the aforementioned example, to simulate the FDI attack, we perform a scaling attack with a scaling factor of 0.3 on the 6150th to 8150th data in the original dataset X. The dataset after the scaling attack is denoted by X a to provide data for the training and testing of the SAE.

[0073] Step A3: Use the dataset after the scaling attack and combine it with k-fold cross-validation to train the SAE.

[0074] Preferably, the step A3 includes:

[0075] Step A31: Draw on the idea of k-fold cross-validation to preliminarily divide the dataset after the scaling attack and evenly divide it into k subsets;

[0076] Step A32: In each round of iteration, take turns selecting one of the subsets as the test set, and combine the remaining k - 1 subsets to form the training set. Use the sliding window technique to further subdivide the training set and test set data and then train the SAE.

[0077] Specifically in implementation, it is to draw on the idea of k-fold cross-validation to preliminarily divide the dataset X a and evenly divide it into k (k is set to 10) subsets, called "folds". In each round of iteration, we take turns selecting one of the subsets as the test set, and combine the remaining k - 1 subsets to form the training set. The k-fold cross-validation is as Figure 4 shown. Using the sliding window technique, we further subdivide the training set and test set data to ensure that the sample quantity M is determined according to the following formula:

[0078]

[0079] where n represents the total data volume of the dataset, ω represents the sliding window size (which can be flexibly set according to needs, for example, set to 100), s represents the moving step size (which can be flexibly set according to needs, for example, set to 1), denotes the floor operation to ensure that the obtained sample quantity is an integer. Through this method, we can obtain structured and ordered data.

[0080] In each round of iteration, we successively take a different "fold" as the test set, denoted as X ai(i = 1, 2…k), while the remaining k - 1 "folds" together constitute the training set, denoted as This process is repeated.

[0081] The training and testing of SAE capture the internal structure of the data through unsupervised learning; from Figure 5 It can be seen that the basic composition of SAE includes an input layer, one or more hidden layers, and an output layer. The training objective is to make the output as close as possible to the input. The output of the training process is expressed as:

[0082]

[0083] Among them, represents the i-th training set, h w,b represents the forward propagation function, w represents the weight, and b represents the bias. The loss function includes a cost function and a sparsity penalty:

[0084] L = E + λ·KL(ρ ∥ ρ j ′)

[0085] E represents the cost function, and the mean squared error is used as the error metric:

[0086]

[0087] Among them, N represents the size of the training set, represents the data of the i-th training set, represents the reconstructed data of the i-th training set.

[0088] λ is the sparsity parameter, ρ is the average activation of the hidden layer units, ρ j ′ is the expected value of the hidden layer activation, and KL(ρ ∥ ρ i ′ ) is the Kullback-Leibler divergence, and its expression is:

[0089]

[0090] In this way, through the above steps A1 - A3, the training of SAE can be completed.

[0091] In step S104, after using the trained SAE to test each test set, it is also necessary to calculate the reconstruction error of the reconstructed data of each test set by SAE. The calculation of the reconstruction error can be as follows:

[0092] Use the trained SAE to test the test set X ai (i = 1, 2…k), and the output of the test process is expressed as:

[0093] X′ ai = h w,b (Xai ), i = 1, 2... k

[0094] Among them, X ai represents the i-th test set, h w,b represents the forward propagation function, w represents the weight, and b represents the bias.

[0095] Calculate the reconstruction error of each test set data after SAE reconstruction, which is given by the following formula:

[0096]

[0097] Among them, R i represents the reconstruction error of the i-th test set data. N represents the size of the test set, X ai represents the i-th test set data, and X' ai represents the reconstructed i-th test set data.

[0098] Step S105: If the formula is satisfied:

[0099] σ > σ0, and R max > μ + hσ

[0100] In the formula, σ is the standard deviation of the reconstruction error of each test set data, σ0 is the preset threshold, and R max is the maximum value of the reconstruction error of each test set data, μ is the mean value of the reconstruction error of each test set data, and h is the preset coefficient;

[0101] Then mark the test set with the largest reconstruction error corresponding to R max as the attacked data and remove it from the dataset to be detected. The original k-fold cross-validation is correspondingly changed to (k - 1)-fold cross-validation, and go to step S103.

[0102] In this step, the z-score is used to set the threshold to identify the attacked data. The specific process can be as follows:

[0103] If R max satisfies That is:

[0104] R max > μ + hσ

[0105] Among them, R max represents the maximum value of R i (i = 1, 2... k), h is the set threshold (h can be set to 1.2), μ represents the mean value of R i (i = 1, 2... k), and its calculation formula is:

[0106]

[0107] σ represents Ri (for \(i = 1, 2, \ldots, k\)), its standard deviation, and its calculation formula is:

[0108]

[0109] And at the same time, it satisfies \(\sigma>\sigma_0\), where \(\sigma_0\) is the early stopping threshold to prevent the algorithm from exceeding the limit (\(\sigma_0\) can be set to 1). Then R max The corresponding test set with the maximum reconstruction error will be marked as the attacked data and removed from the data set X a among.

[0110] The above process of setting the threshold using the z - score to identify the attacked data is only one attack detection in the loop iteration process. The present invention adopts a cyclic attack detection, that is: in step S103, since a test set is marked as the attacked data and removed from the data set to be detected, the original k - fold cross - validation correspondingly changes to (k - 1) - fold cross - validation. We will follow this adjustment and continue to execute the process from step S103 to step S105. This process will continue to loop until all the attacked data are marked and removed, and there is no attacked data in the data set to be detected.

[0111] Preferably, in step S105, if the above formula is not satisfied, it means that there is no longer any attacked data in the test set, then it can be transferred to step S106.

[0112] Preferably, in step S105, the z - score is used to identify the attacked data. The z - score quantifies the relationship between a single data point and the mean of the data set and can help identify anomalies or outliers in the data set. The calculation of the z - score is based on the following formula:

[0113]

[0114] where \(X=\{x_1,x_2,\ldots,x\) n}\) represents the observed values, \(\mu\) represents the mean of the observed values, \(\sigma\) represents the standard deviation of the observed values. When applying the z - score for detection, a threshold must be set, and this threshold corresponds to the region where the data points deviate far from the mean in the normal distribution.

[0115] As an alternative embodiment, after step S105, it may further include:

[0116] Step S106: Input all the marked attacked data into the trained DAE (Denoising Autoencoder) to recover the attacked data.

[0117] Preferably, the training process of the DAE includes:

[0118] Step B1: Obtain wind power data samples to obtain the original data set that has not been attacked;

[0119] The execution of this step can refer to the aforementioned step A1 and will not be repeated here.

[0120] Step B2: Add standard normal distribution noise to the original data set to obtain the training data set;

[0121] Preferably, in step B2, the noise is 0.1-0.3 times the standard normal distribution noise;

[0122] In one instance, in order to train and test the DAE and recover the attacked data, we add 0.1 times the standard normal distribution noise to the original dataset X. The dataset after adding noise is denoted by X. n express.

[0123] Step B3: Train the DAE using the training dataset.

[0124] Preferably, in step B3, 80% of the training data set is used to train the DAE, and the remaining 20% is used to test the model's ability to recover data.

[0125] The goal of DAE is to minimize the reconstruction error between the output and the original noise-free data. In an example, we take the dataset X n 80% of the training data is used to train the DAE, while the remaining 20% is used to test the model’s ability to recover data. The training and testing process of DAE is similar to that of SAE, but focuses on recovering data from noise.

[0126] Once the model training is completed, we input all the labeled attacked data into DAE. The output of DAE, i.e. the recovered data, is given by the following formula:

[0127] X L ′=h w,b (X L )

[0128] Among them, X L Represents all the marked attacked data, h w,b represents the forward propagation function, w represents the weight, and b represents the bias.

[0129] In order to clearly observe the difference between the data reconstructed by DAE and the attacked data, we compared the data before and after reconstruction, such as Figure 6 As shown in the figure, before reconstruction, the data was attacked by FDI, which not only affected the accuracy of the data but also obscured the true patterns and trends of the data. After using DAE for data recovery, we were able to effectively restore the original pattern of the data.

[0130] The randomness, volatility, and uncertainty of the wind make it a major challenge to accurately predict wind power. In addition, the SCADA system in the wind power system may have cybersecurity vulnerabilities and is vulnerable to cyberattacks by malicious actors, especially FDI attacks. These attacks not only threaten the accuracy of the wind power prediction model but may also seriously affect the economic benefits of wind power plants and the dispatching balance of the power grid.

[0131] To address the above challenges, the present invention proposes an FDI attack detection and data recovery method for wind power prediction. First, the idea of k-fold cross-validation is used to preliminarily divide the dataset, and the sliding window technique is used to further subdivide the training set and test set data to prepare the input data for the training and testing of the sparse autoencoder. Then, the reconstruction error of the sparse autoencoder is calculated, and the corresponding attacked data is identified using the z-score, marked, and deleted. This process is repeated until all data is secure and free of attacks. Finally, the denoising autoencoder is used to recover the marked attacked data. The present invention can effectively detect and recover data anomalies caused by FDI attacks, restore the original pattern of the data, thereby significantly improving the robustness of the wind power prediction model, performing effective power grid dispatching and load balancing, and ensuring the economic benefits of wind power plants and the stable operation of the power grid.

[0132] The present invention has the following beneficial effects:

[0133] 1. The present invention provides an FDI attack detection and data recovery method for wind power prediction. Compared with traditional attack detection methods, it is easier to implement and operate, and has significant advantages in improving detection accuracy, achieving a double improvement in the security and economic benefits in the wind power field.

[0134] 2. In the present invention, the SAE model can automatically identify abnormal patterns in the data through unsupervised learning. This ability gives the present invention a unique advantage in detecting unknown or new attacks, without the need for cumbersome data marking and model training for each potential attack, thus saving a large amount of time and resources.

[0135] 3. The present invention can not only detect FDI attacks but also learn the essential features of the data through the DAE, thereby restoring the attacked data to its original state. This ability not only improves the quality of the wind power prediction training data, ensures the high accuracy of wind power prediction, but also enhances the reliability of the prediction process.

[0136] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for detecting FDI attacks for wind power prediction, characterized in that, include: Step S101: Acquire wind power data to be detected to obtain a data set to be detected; Step S102: Using the idea of k-fold cross validation, the dataset to be tested is preliminarily divided into k subsets. Step S103: In each iteration, one of the subsets is selected as the test set in turn; In step S102, k is 10; And / or, step S103 includes: Use the sliding window technique to subdivide the test set data to ensure that the sample size M is determined according to the following formula: Among them, represents the total data volume of the dataset, represents the sliding window size, moving step size, represents the floor operation to ensure that the obtained number of samples is an integer; Step S104: Use the trained SAE to test each test set and calculate the reconstruction error of each test set data after SAE reconstruction; Step S105: If the formula is satisfied: and Wherein, is the standard deviation of the reconstruction error of each test set of data, is a preset threshold, is the maximum value of the reconstruction error of each test set of data, is the mean value of the reconstruction error of each test set of data, is a preset coefficient; Then Mark the test set corresponding to the largest reconstruction error as the attacked data, and remove it from the dataset to be detected. The original k-fold cross-validation is correspondingly changed to (k-1)-fold cross-validation, and go to step S103; The SAE training process includes: Step A1: Obtain wind power data samples to obtain the original data set; Step A2: performing a scaling attack on part of the data in the original data set; Step A3: Use the scaled attack dataset and k-fold cross validation to train the SAE. In step A2, a scaling attack is performed on 15%-30% of the data in the original data set, and the scaling factor of the scaling attack is 0.3-0.5; Step A3 includes: Step A31: Using the idea of k-fold cross-validation, the dataset after the scaling attack is preliminarily divided into k subsets. Step A32: In each iteration, one of the subsets is selected as the test set in turn, and the remaining k-1 subsets are combined to form the training set. The training set and test set data are further subdivided using the sliding window technique to train the SAE; Furthermore, the loss function L used in SAE training and testing includes the cost function and sparsity penalty: denotes the cost function, using the mean squared error as the error metric: Among them, represents the size of the training set, denotes the th training set data, represents the th training set data after reconstruction; is a sparse parameter, is the average activation of the hidden layer units, is the expected value of the hidden layer activation, is the Kullback-Leibler divergence, and its expression is: After step S105, the following steps are further included: Step S106: Input all marked attacked data into the trained DAE to recover the attacked data; The training process of DAE includes: Step B1: Obtain wind power data samples to obtain the original data set that has not been attacked; Step B2: Add standard normal distribution noise to the original data set to obtain the training data set; Step B3: training the DAE using the training data set; In step B2, the noise is 0.1-0.3 times the standard normal distribution noise; And / or, in step B3, 80% of the training dataset is used to train the DAE, and the remaining 20% is used to test the model's ability to recover data.

2. The method according to claim 1, characterized in that, In step A2, through the scaling attack, a portion of the system data will increase or decrease by a certain percentage of the original value, which is modeled as: Among them, and represent the start time and end time of the network attack respectively, represents the scaling factor, is the original data set, while is the data set under attack.

3. The method according to claim 2, wherein In step S105, the z-score is used to identify the attacked data. The z-score quantifies the relationship between a single data point and the average value of the data set, and can help identify anomalies or outliers in the data set. The z-score is calculated based on the following formula: Among them, represents the observed value, represents the mean of the observed values, represents the standard deviation of the observed values. When applying the z-score for detection, a threshold must be set, which corresponds to the region where the data points deviate far from the mean in the normal distribution.