Model version updating-based hidden attack detection method for power grid data
Through LIME and LOF algorithms, the feature values and abnormal detection are extracted in the power grid data analysis system, which solves the problem of detection of hidden attacks in a distributed learning environment, and realizes efficient and accurate security detection, improving the security and attack resistance of the system ability.
Patent Information
- Application Number
- CN202410970342.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-19
AI Technical Summary
In the power grid data analysis system based on model version update, there is a risk of hidden attacks, and traditional security protection mechanisms are difficult to directly apply to distributed learning environments, and the detection mechanism needs to improve accuracy and real-time while ensuring data privacy and system performance. .
Eigenvalue extraction and LOF algorithm are used for outlier detection. The eigenvalues of power grid users are extracted through each round of training, abnormal behavior is identified, and potential attackers are identified in combination with local density difference analysis.
Effectively detect and defend against hidden attacks, improve the accuracy and efficiency of detection, ensure the security and attack resistance of the power grid data analysis system, and be compatible with existing operation and maintenance processes and technical architectures.
Smart Images

Figure CN118921199A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid application of model version update, and in particular to a detection method for covert attacks based on model version update for secure sharing of grid data. Background Art
[0002] In the current era of digitalization and Internetization, the security of power grid as an infrastructure is particularly important. With the development of smart grids, the collection, transmission and analysis of power grid data have become increasingly complex and critical. However, the centralization and processing of such large-scale data also brings new security challenges, especially for data analysis systems based on model version updates, which have potential hidden attack risks.
[0003] Model version update, as an emerging distributed learning method, allows model training while protecting data privacy. It protects data privacy by performing calculations on devices or local data without transmitting the original data to a central server. However, it is this decentralized computing method that also provides potential opportunities for malicious attackers to implant backdoors. Covert attacks on power grid data may lead to serious consequences, such as paralysis of control systems, malicious control of power grid operations, information leakage, or data tampering. Therefore, it is crucial to ensure the security of power grid data analysis systems based on model version updates. Currently, researchers are actively exploring various methods to detect and prevent these potential covert attacks.
[0004] One of the key challenges in the research background is how to effectively monitor and identify possible backdoors while ensuring data privacy. Traditional security protection mechanisms may not be directly applicable to the model version update environment because the data is not stored in a single location but distributed across multiple devices or data centers. Therefore, new algorithms and technologies need to be developed to adapt to this decentralized learning and data analysis mode. Another important research direction is how to enhance the accuracy and real-time performance of the detection mechanism without sacrificing system performance and efficiency. The model version update system usually requires data exchange and model updates between multiple power grid users, which requires the security detection system to have sufficient response speed and real-time performance, as well as highly adaptive capabilities to cope with ever-changing attack threats and patterns.
[0005] Considering the particularity of the power grid as a critical infrastructure, any security solution must take into account the stability and reliability of the system. The introduction of security measures should not impose additional burdens or risks on the normal operation of the power grid, but should be compatible with the existing operation and maintenance processes and technical architecture. With the development and application of power grid data analysis systems based on model version updates, research on protecting these systems from covert attacks is particularly urgent. Through in-depth research and the application of innovative technologies, we can effectively improve the security and anti-attack capabilities of power grid data analysis systems, thereby ensuring the stable operation of the power grid and the protection of data privacy. There are currently no patents similar to this invention in China or abroad. Summary of the invention
[0006] The present invention provides a method for detecting covert attacks in existing model version updates, and there is no effective method. The method uses LIME to extract the characteristic value of each power grid user in each round of training, and quickly and effectively detects attackers or abnormal behaviors through two rounds of outlier detection algorithms. Compared with the traditional central scenario (characterized by the detection algorithm having access to all training data sets) or data poisoning attacks (characterized by the attacker trying to destroy the convergence of the model, so the uploaded gradient data will be obviously abnormal with normal users), covert attacks are more concealed, do not need to access other data, and behave like ordinary models in non-backdoor situations, so detection is much more difficult.
[0007] The present invention is achieved through the following technical solutions:
[0008] A detection method for covert attacks on power grid data based on model version update is characterized by including:
[0009] Model training phase: Each grid user trains a smart grid sub-model locally and uploads it to the grid’s central integration node for integration. The grid’s central integration node integrates all smart grid sub-models and then sends them to each grid user for the next smart grid sub-model training.
[0010] User model feature extraction stage: feature extraction is performed on the smart grid sub-model trained locally by the grid users in each round.
[0011] User anomaly detection stage: The outlier detection algorithm is used to detect whether there are abnormal grid users that are attacked.
[0012] Furthermore, in the model training phase: the central node of the power grid randomly initializes the model and distributes it to each power grid user. The learning rate η during smart grid model training and the proportion C of the number of power grid users selected for each model update training to all power grid users are determined.
[0013] In the t rounds of training, for each individual grid user k, the current global model parameter G is calculated t-1 The gradient data calculated by the user on the local model dataset is
[0014] After obtaining this gradient data, the grid user will upload it to the grid central node for aggregation. After aggregation, the grid central node will update the overall parameters, that is, And distribute the aggregated model to each grid user.
[0015] Further user model feature extraction stage: In each round of model version update training, feature extraction and the influencing factor of each feature are performed on the smart grid sub-model trained by each grid user.
[0016] Furthermore, the data selected for the model can be a portion of the data used by each power grid user during the training process, or a representative test data set, ensuring that the selected data covers all important features and possible boundary conditions. Then, the data is standardized or normalized to ensure that the data features of different power grid users are on the same scale. Finally, missing values, outliers and noise are processed to ensure data quality.
[0017] Furthermore, each grid user will train its own smart grid sub-model and synchronize it with the overall model of the grid central node, which will also record the model parameters and key data features of each grid user during the training process. These features may include grid operation parameters, equipment status, etc.
[0018] Furthermore, LIME is applied to interpret the model and the input data point x used in the training process of each power grid user is selected. Perturbation data is generated near x to construct the perturbation data set D x . For the perturbation data set D x Use the sub-model to make predictions and get the model's prediction output f(D x ). According to the perturbation data set D x And the prediction results of the sub-model f(D x ), train an interpretable model g.
[0019] Furthermore, feature contribution analysis analyzes the contribution of each feature to the model's prediction on the selected sample through the interpretation model. In the fitted interpretation model, different methods can be used to analyze the contribution of each feature to the model's prediction on the selected sample. For linear models, the coefficient of the feature is its contribution. A larger coefficient indicates that the feature has a greater impact on the model output. The Shapley value of each feature can also be calculated. The Shapley value evaluates the impact of each feature on the model output by considering different permutations and combinations of features, and is suitable for model interpretation of nonlinear relationships.
[0020] Furthermore, the feature weights and feature values of each sub-model extracted above are used to perform user anomaly detection through an outlier detection algorithm. The main step is to perform detailed screening through a local outlier factor algorithm.
[0021] Among them, the local outlier factor algorithm is used to screen out abnormal power grid users in detail and calculate the local neighborhood density of the sample in the feature space. The LOF score represents the ratio of the density of each sample relative to its neighborhood to the density of other samples in the neighborhood. Generally, LOF scores significantly higher than 1 are considered outliers.
[0022] The local reachability density formula of point P is:
[0023] O is a locally reachable point of P.
[0024] The formula of the local anomaly factor of point P is:
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The present invention effectively defends against covert attacks similar to covert attacks carried out by attackers in a model version update environment. By adopting the idea of LIME to extract eigenvalues and the weight of each feature, LIME is a model-independent and data-independent method that can be used for any type of model and data, thereby ignoring the differences in models and data between each power grid user to extract the features and the weight of each feature, and then extracting the eigenvalues through a linear model and Shapley. In addition, the present invention adopts the LOF algorithm for outlier detection, which significantly improves the accuracy and efficiency of the detection algorithm. The LOF (Local Outlier Factor) algorithm has many advantages. First, it can identify more hidden outliers by analyzing the local density differences of data points. LOF determines whether a data point is an outlier by comparing the density relationship between a data point and its neighboring data points. Therefore, LOF can not only detect points that have a large deviation from the overall data distribution, but also identify those points that are abnormal in the local area. Compared with outlier detection methods based only on global statistical features, LOF can provide more sophisticated anomaly detection results, especially when the data distribution is complex or there are local anomalies. Through this method, the entire detection process is both efficient and accurate, providing a strong guarantee for security in the model version update environment. The application of the LOF algorithm ensures the robustness and precision of the detection algorithm, which helps to maintain a high level of detection performance in various complex data environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0028] Figure 1 The present invention is a flow chart of an embodiment of a method for detecting covert attacks based on model version updates on power grid data. DETAILED DESCRIPTION
[0029] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings and preferred embodiments.
[0030] A detection scheme for power grid data based on model version update for detecting whether there is a hidden attack method during model training or iteration.
[0031] This scheme is based on the feature extraction and outlier detection of power grid users in terms of the detection of covert attacks. Since the data between the various smart grid sub-models updated by the model version is not circulated, and the model and data types of each power grid user may be different, we use the LIME method to extract features. LIME is a model- and data-independent method that can be used for any type of model and data, so that the differences in the models and data between each power grid user can be ignored to extract the features and the weights of each feature. In addition, the present invention uses LOF (Local Outlier Factor) to perform outlier detection on the data. LOF can deeply analyze the local density differences of data points and identify outliers by comparing the local density of each data point and its neighbors. Compared with other algorithms, LOF has higher flexibility and adaptability when processing multidimensional data sets, and can effectively detect more hidden outliers, especially when the data is unevenly distributed. Through this method, the present invention realizes the accurate identification of outliers and improves the accuracy and efficiency of detection.
[0032] Figure 1 The present invention is a flow chart of an embodiment of a method for detecting covert attacks based on model version updates on power grid data.
[0033] like Figure 1 As shown, the method for detecting covert attacks on model version updates in smart grids provided by this embodiment can be divided into three parts: S1, model training stage, each grid user trains a smart grid sub-model locally and uploads it to the central integration node of the grid for integration. The central integration node of the grid integrates all smart grid sub-models and then sends them to each grid user for the next smart grid sub-model training. S2, user model feature extraction stage: feature extraction is performed on the smart grid sub-model trained locally by the grid users in each round. S3, user anomaly detection stage: detect whether there are abnormal grid users under attack through the outlier detection algorithm.
[0034] In this embodiment S1, the central node of the power grid randomly initializes the model and distributes it to each power grid user. The learning rate η during the training of the smart grid model and the proportion C of the number of power grid users selected for each smart grid model update training to all power grid users are determined. In the t rounds of training, for each individual power grid user k, the current global smart grid model parameter G is calculated. t-1 Under this condition, the gradient data calculated by the grid user on the local smart grid model dataset is After obtaining this gradient data, the grid user will upload it to the central node in the grid for aggregation. After aggregation, the central node of the grid will update the overall parameters, that is, And distribute the aggregated model to each grid user.
[0035] In S2 of this embodiment, the feature extraction of the model is to extract the features of each grid user after each smart grid sub-model training is completed, and reserve them as samples for attack outlier detection. Figure 1 As shown, the feature extraction steps include four steps: S201, data collection and preparation; S202, training model version update sub-model; S203, applying LIME to interpret the model; S204, feature contribution analysis.
[0036] S201 refers to the central node of the power grid collecting data from each power grid user for training the smart grid sub-model. This can be a part of the data used by each power grid user in the training process, or a representative test data set, ensuring that the selected data covers all important features and possible boundary conditions. Then, the data is standardized or normalized to ensure that the data features of different power grid users are on the same scale. Finally, missing values, outliers and noise are processed to ensure data quality.
[0037] Furthermore, in S202, each grid user will train its own model and synchronize it with the overall model of the grid central node, and the grid central node will also record the model parameters and key data features of each grid user during the training process. These features may include grid operation parameters, equipment status, etc.
[0038] Further, in S203, LIME is used to interpret the model, and the input data point x used in the training process of each grid user is selected. Perturbation data is generated near x. These perturbation data points are obtained by slightly modifying x, with the purpose of generating a data set similar to x but slightly different. The goal of this step is to observe the behavior of the model on these similar data points, so as to understand the prediction mechanism of the model for x. All generated perturbation data points are grouped into a perturbation data set D x This dataset contains multiple samples close to the original data point x. x Use the sub-model to make predictions and get the model's prediction output f(D x ). The perturbed data set D x And its corresponding prediction result f(D x ) as training data, train an interpretable model g. The goal of the training process is to make the interpretable model g as close as possible to the prediction behavior of the sub-model on the perturbed data set. This means that the prediction results of g should be consistent with the prediction results f(D x ) as similar as possible.
[0039] Further, in S204, the contribution or influence of each feature in the model prediction is obtained by the LIME method. These contributions can help understand the importance of each feature for the prediction of the power grid operation status. By interpreting the model, the contribution of each feature to the prediction of the model on the selected sample is analyzed. In the fitted explanatory model, different methods can be used to analyze the contribution of each feature to the prediction of the model on the selected sample. For a linear model, the coefficient of the feature is its contribution. A larger coefficient indicates that the feature has a greater impact on the model output. The Shapley value of each feature can also be calculated. The Shapley value evaluates the impact of each feature on the model output by considering different permutations and combinations of features, and is suitable for model interpretation of nonlinear relationships.
[0040] In this embodiment S3, the outlier detection module uses the feature values and feature weights extracted above as input each time to filter out outliers, that is, abnormal points. Figure 1 As shown, this step is mainly divided into two steps: S301, calculating the local reachable density; S302, finding the local abnormal factor.
[0041] Where S301 is the reciprocal of the average distance of the reachable distance from point P to the points in its k-neighborhood ("local"), O is the locally reachable point of P, and the specific formula is as follows:
[0042]
[0043] The significance of taking the reciprocal: to make distance and density reach cognitive consistency: the greater the distance, the smaller the density
[0044] k-distance neighborhood: Among the points closest to data point P, the distance between the kth closest point and point P is called the k-distance of point P, denoted as k-distance(p), which defines the concept of "local" in the local anomaly factor algorithm. Draw a circle with point P as the center and k-distance as the radius. The range within this circle is the k-distance neighborhood.
[0045] Among them, according to the definition of local reachable density in S302, if a data point is similar to the average density of the surrounding data points (now only consider density, and temporarily forget the concept of distance, otherwise it is easy to confuse), then their ratio should be close to 1. Therefore, the LOF algorithm measures the degree of abnormality of a data point not by looking at its absolute local density, but by looking at its relative density to the surrounding neighboring points, that is, the concept of ratio. Therefore, the local anomaly factor is defined by local density. The local anomaly factor of data point P is the ratio of the average local reachable density of points in the k-neighborhood of point P to the local reachable density of point P. The formula is as follows
[0046]
Claims
1. A detection method for covert attacks based on model version update on power grid data, characterized in that: include: Model training stage: Each grid user trains a smart grid sub-model locally and uploads it to the central integration node of the grid for integration. After the central integration node of the grid integrates all smart grid sub-models, it updates the global model and sends the updated global model to each grid user for the next smart grid sub-model training optimization. User model feature extraction stage: The Local Interpretable Model-Independent Explanation (LIME) method is used to extract features from the smart grid sub-model trained locally by each round of grid users, and the contribution of each feature to the model prediction is calculated; User anomaly detection stage: Based on the extracted features and their contribution, the local outlier factor (LOF) outlier detection algorithm is used to screen power grid users and identify the power grid users that are secretly attacked.
2. The method for detecting covert attacks based on model version update on power grid data according to claim 1, characterized in that: In the model training phase, it specifically includes: The central integration node of the power grid randomly initializes the smart grid model and distributes it to each grid user; Determine the learning rate η during smart grid model training and the ratio C of the number of grid users selected in each round of smart grid model update training to all grid users; For each grid user k, according to the global model parameter G t-1 Calculate local gradient data t is the number of training times, and it is uploaded to the central integration node of the power grid; The central integration node of the power grid updates the global model parameters based on the uploaded gradient data And distribute the updated global model parameters to each grid user.
3. The method for detecting covert attacks based on model version update on power grid data according to claim 1, characterized in that: In the user model feature extraction stage, the local interpretable model-independent explanation (LIME) method is used to extract features from the smart grid sub-model trained locally by each round of power grid users, specifically including: S201, data collection and preparation: collect data from each grid user for training sub-models; S202, training smart grid sub-models: each grid user trains its own model, and during the training process, records the prediction behavior of each sub-model on local data, including prediction results and corresponding input features; S203, apply LIME to interpret the model: S2031 selects input data points x used in the training process of each power grid user; S2032 generates perturbation data near point x and constructs a perturbation data set D x ; S2033 perturbation data set D x Use the sub-model to make predictions and get the prediction output f(D x ), according to the perturbation data set D x And the prediction results of the sub-model f(D x ), train an interpretable model g; S204, feature contribution analysis: analyzing the contribution of each feature to the prediction of the model g on the selected sample.
4. The method for detecting covert attacks based on model version update on power grid data according to claim 3 is characterized in that: S201, data collection and preparation: collecting data from each grid user for training the sub-model, specifically: First, select a set of input data points for interpretation. This can be a portion of the data used in the training process for each grid user, or a representative test data set, ensuring that the selected data covers all important features and possible boundary cases; Then, the data is standardized or normalized to ensure that the data characteristics of different power grid users are on the same scale; Finally, missing values, outliers, and noise are processed to ensure data quality.
5. The method for detecting covert attacks based on model version update on power grid data according to claim 4 is characterized in that: The representative test data set includes normal data and possible abnormal data, and ensures that the selected data covers all important features and possible boundary cases.
6. The method for detecting covert attacks based on model version update on power grid data according to claim 1, characterized in that: The local outlier factor algorithm is used to screen out abnormal power grid users in detail. For all power grid users, their local neighborhood density in the feature space is calculated. The LOF score represents the ratio of the density of each sample relative to its neighborhood to the density of other samples in the neighborhood. The local reachable density formula of point P is as follows: O is a locally reachable point of P; The formula of the local anomaly factor of point P is:
Citation Information
Patent Citations
Method for detecting backdoor attacks in federated learning based on cooperative game theory
CN112257063A
member reasoning attack-oriented deep model privacy protection method based on abnormal point detection
CN113283536A
Malicious code confrontation sample detection method and system and storage medium
CN114745205A
Medical abnormity violation big data risk early warning method based on unsupervised machine learning and integrated learning
CN117764741A
SQL injection attack detection method based on network data packet context
CN117879934A
Cited By
Smart park communication network security control method and system
CN120074948A
