Power system data anomaly prediction method and system based on space-time federated learning

Through the space-time federated learning framework and federal averaging algorithm, the shortcomings of centralized data processing in the power system are solved, efficient abnormal detection and fine-grained fault classification are achieved, and fault response capabilities and data privacy protection of the power system are improved.

CN120336901APending Publication Date: 2025-07-18STATE GRID ANHUI ELECTRIC POWER CO LTD +1

Patent Information

Application Number
CN202510396584.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing method model training relies on centralized data processing, and is difficult to adapt to the complex changes in different regions and time series data in the power system, resulting in insufficient training efficiency and prediction accuracy, and does not involve fine-grained fault classification of abnormal data.

Method used

The power system data anomaly prediction method based on spatiotemporal federated learning, by pre-constructing a spatiotemporal federated learning framework including a central server and multiple power nodes, pre-processing historical data and real-time running data to form a standardized local training set, using unsupervised learning method to train anomaly detection sub-models, and iteratively trains to obtain a global anomaly prediction model, and combines the fault classification module to perform fine-grained fault classification.

Benefits of technology

Distributed collaborative modeling is realized, the training efficiency and fault response speed of the model are improved, the adaptability to different spatial and temporal data is enhanced, and potential exceptions can be accurately identified and fine-grained fault classification is carried out to ensure the safe and stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336901A_ABST
    Figure CN120336901A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system data anomaly prediction method and system based on space-time federation learning, belongs to the technical field of electric power data analysis, and solves the problem that model training in an existing method depends on centralized data processing and is difficult to adapt to complex changes of different regions and time sequence data in an electric power system. The method comprises the steps of pre-constructing a space-time federated learning framework comprising a central server and a plurality of power nodes, training to obtain an anomaly detection sub-model, aggregating sub-model parameters based on a federated average algorithm to obtain a global anomaly prediction model, and performing anomaly detection on real-time operation data based on the global anomaly prediction model. Through a space-time federated learning framework, an aggregation strategy of a global model can be dynamically adjusted, and distributed collaborative modeling of a plurality of power nodes is realized by combining distributed training of federated learning and modeling capability of deep learning, so that adaptability to different space and time data is enhanced, and fault response speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power data analysis, and particularly relates to a method and system for predicting power system data anomalies based on spatio-temporal federated learning. Background Art

[0002] As a key infrastructure of modern society, the operating stability of the power system has a crucial impact on the security and efficiency of energy supply and economic operation. With the intelligent and large-scale development of the power system, the amount of server monitoring data has shown an explosive growth, and these data are distributed in different regional nodes, showing significant spatio-temporal correlation. However, data privacy protection and transmission limitations have become important factors restricting the application of traditional centralized anomaly detection methods. Traditional methods usually rely on preset rules or manual diagnosis, and it is difficult to cope with the complexity and diversity of anomaly features, and they are easily interfered by subjective factors, resulting in insufficient detection accuracy and response speed. Especially in the power system, the abnormal behaviors at different time and space nodes may have significant differences, which poses a higher challenge to traditional methods.

[0003] In recent years, with the development of artificial intelligence and machine learning technologies, anomaly detection methods based on deep learning have gradually been applied to the power system. In addition, a combined method based on an improved k-means clustering algorithm and a deep learning model has also shown good results in power system anomaly detection. However, most of the above methods rely on centralized data processing and are difficult to meet the requirements of power system data privacy protection and distributed management.

[0004] Chinese Patent CN111738348B discloses a method and device for detecting power data anomalies, which are used to detect power data anomalies, including: receiving a plurality of historical power data sent by a preset terminal and performing data preprocessing operations to generate a plurality of training data corresponding one-to-one to the plurality of historical power data; training a multi-scale convolutional neural network model with the plurality of training data, determining the residual terms of the plurality of training data to obtain a target multi-scale convolutional neural network model; training a self-organizing mapping network model with the residual terms of the plurality of training data to obtain a target self-organizing mapping network model; receiving the current power data sent by the preset terminal, and inputting the current power data into the target multi-scale convolutional neural network model to generate the residual terms of the current power data; inputting the residual terms of the current power data into the target self-organizing mapping network model to determine whether the current power data is abnormal; however, the existing method model training depends on centralized data processing and is difficult to adapt to the complex changes of different regional and time series data in the power system. The adopted centralized method has deficiencies in training efficiency and prediction accuracy, and does not involve a mechanism for fine-grained fault classification of abnormal data. In view of the above problems, we propose a method and system for predicting power system data anomalies based on spatio-temporal federated learning. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and system for predicting abnormal power system data based on spatio-temporal federated learning in view of the deficiencies of the prior art, and to solve the problems that the model training of the existing methods depends on centralized data processing, it is difficult to adapt to the complex changes of different regional and time series data in the power system, and the existing centralized methods have deficiencies in training efficiency and prediction accuracy.

[0006] The present invention is implemented as follows. A method for predicting abnormal power system data based on spatio-temporal federated learning, the method for predicting abnormal power system data based on spatio-temporal federated learning includes:

[0007] Pre-construct a spatio-temporal federated learning framework including a central server and multiple power nodes, and collect historical data and real-time operation data of the power system through the power nodes;

[0008] Preprocess the historical data and real-time operation data to form a standardized local training set, and train the local training set based on unsupervised learning to obtain an anomaly detection sub-model, and trigger a parameter encryption upload instruction;

[0009] In response to the parameter encryption upload instruction, the central server obtains the sub-model parameters of the anomaly detection sub-model, aggregates the sub-model parameters based on the federated averaging algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes;

[0010] Load the global anomaly prediction model, and the power nodes detect anomalies in the real-time operation data based on the global anomaly prediction model, output node prediction results including the degree of data anomaly, use a fault classification module to classify the fault types of the node prediction results, and generate a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification.

[0011] Preferably, the method for preprocessing the historical data and real-time operation data includes:

[0012] Load the historical data and real-time operation data, the data includes the CPU utilization rate, memory occupancy, storage occupancy, and slot usage rate of the power system server, and perform data cleaning on the historical data and real-time operation data to obtain a data cleaning set;

[0013] Obtain the data cleaning set, eliminate the dimension and perform normalization processing on the data cleaning set based on the spatio-temporal normalization algorithm, and output a normalized set;

[0014] Among them, when eliminating the dimension and performing normalization processing on the data cleaning set based on the spatio-temporal normalization algorithm, first perform time normalization processing on the data cleaning set, extract the high-frequency components in the data cleaning set, and then extract the local components in the data cleaning set based on the spatial normalization formula to obtain a normalized set;

[0015] The time normalization formula is expressed as:

[0016]

[0017] The space normalization formula is expressed as:

[0018]

[0019] Wherein, represents the high-frequency component extracted from the data cleaning set A during time normalization processing i,t in, respectively represent the mean and variance under the given low-frequency components of the data cleaning set, γ i , γ respectively represent the normalization scaling factor and the initial scaling parameter of the data cleaning set, represents the offset of the high-frequency component, represents the offset of the local component, represents the local component extracted from the data cleaning set A during space normalization processing i,t in, represents the mean and standard deviation under the global component and time conditions, and p and q respectively represent the frequency domain range parameter and the time domain range parameter;

[0020] Obtain the normalization set, filter the normalization set based on an RC low-pass filter, load the filtered normalization set, and combine a Chebyshev filter to suppress the noise of the normalization set to form a standardized local training set.

[0021] Preferably, the method for training the local training set to obtain an anomaly detection sub-model based on the unsupervised learning method includes:

[0022] Pre-construct an anomaly detection sub-model, use a generative adversarial network as the initial architecture of the anomaly detection sub-model, introduce an input layer before the generative adversarial network, introduce an output layer after the generative adversarial network, introduce an autoencoder between the generative adversarial network and the input layer, the autoencoder includes an encoding module, a decoding module and a fully connected layer, the fully connected layer is used to connect the encoding module and the decoding module, add a soft clustering model between the generative adversarial network and the output layer, and the soft clustering model combines the spatio-temporal DBSCAN algorithm and the fuzzy clustering algorithm to consider spatio-temporal correlation and complete the preliminary anomaly detection of the local training set;

[0023] Load the pre-constructed anomaly detection sub-model, select the Sigmoid function as the activation function, and set the sub-model parameters between the autoencoder and the generative adversarial network. The sub-model parameters include weights, thresholds, and hyperparameters;

[0024] Obtain the local training set, train the local training set using unsupervised learning methods, dynamically adjust the sub-model parameters, and output a converged anomaly detection sub-model;

[0025] Among them, during training, use a generative adversarial network to extract the sample features of the local training set, convert the local training set into feature vectors, perform soft clustering analysis on the sample features by combining the spatio-temporal DBSCAN algorithm and fuzzy clustering, group the features of the local training set, extract the features of potential abnormal samples and mark them as abnormal samples, and output the initial detection result.

[0026] Preferably, the method for aggregating sub-model parameters based on the federated averaging algorithm and iteratively training to obtain a global anomaly prediction model includes:

[0027] Load at least one group of local training sets and initial detection results, perform fusion processing on the local training sets and initial detection results to obtain a fusion data set, and divide the fusion data set into a global training set and a global test set;

[0028] Pre-construct a global anomaly prediction model. The global anomaly prediction model is based on an anomaly detection sub-model based on decision scores. Introduce a spatio-temporal neural network model into the basic architecture. The spatio-temporal neural network model is used to process samples at different time and space nodes. Introduce the spatio-temporal DBSCAN algorithm into the spatio-temporal neural network model to cluster and group samples. Introduce a decision score mechanism into the neural network model. The decision score mechanism quantifies the anomaly degree of samples based on spatio-temporal weighting factors. After the anomaly detection sub-model, introduce a fault classification module based on supervised learning. The fault classification module is a supervised learning model based on a deep neural network to complete the construction of the global anomaly prediction model;

[0029] Load the sub-model parameters, aggregate the sub-model parameters based on the improved spatio-temporal federated averaging algorithm, dynamically adjust the weight contribution of each node, obtain the aggregated parameters of the global model, and set the training rounds, loss function, and training batches of the global anomaly prediction model;

[0030] Among them, the improved spatio-temporal federated averaging algorithm is expressed as:

[0031]

[0032] Among them, w k (t) represents the sub-model parameters of the k-th node, n k is the local data volume of the k-th node, w(t) is the aggregated parameter of the global model, T k represents the time feature of the k-th node, S k represents the spatial feature of the k-th node, α k ,β kThey are the time and space weighting factors of the k-th node respectively, which are used to dynamically adjust the weight contribution of each node;

[0033] Obtain the global training set, activate the global anomaly prediction model through the activation function, and iteratively train the global anomaly prediction model with the global training set. During training, use the exponential weighted moving average to dynamically adjust the weight contribution of each node until the global anomaly prediction model meets the preset convergence accuracy, and output the converged global anomaly prediction model;

[0034] Obtain the global test set, use the global test set as the input, execute the global anomaly prediction model, and the global anomaly prediction model outputs the test anomaly degree and the test fault type. Determine whether the test anomaly degree and the test fault type meet the preset test thresholds;

[0035] If the test anomaly degree and the test fault type meet the preset test thresholds, output the converged global anomaly prediction model, and send the global anomaly prediction model to the power node;

[0036] If the test anomaly degree and the test fault type do not meet the preset test thresholds, activate the global anomaly prediction model through the activation function, and continue to iteratively train the global anomaly prediction model with the global training set.

[0037] Preferably, when the decision score mechanism quantifies the anomaly degree of the sample based on the spatio-temporal weighting factor, the following formula is used to calculate the sample decision score:

[0038]

[0039] Among them, A(x) represents the sample decision score, and x i represents the eigenvalue of the i-th sample, μ is the mean of the global training set, N represents the number of samples in the training set, T i , S i represent the time eigenvalue and the space eigenvalue of the i-th sample respectively, α i , β i represent the time and space weighting factors of the i-th sample respectively, max(T i ), are the maximum value of the sample time feature and the mean value of the sample time feature respectively, T is the number of sample time features, α0 and β0 are the initial values of the sample time feature and the sample space feature respectively, represents the mean value of the sample space feature.

[0040] Preferably, when activating the global anomaly prediction model through the activation function, the activation process is described by the following formula:

[0041]

[0042] Among them, is the activation value of the i-th neuron in the l-th layer, is the weight matrix from the (l - 1)-th layer to the l-th layer, is the bias value of the l-th layer, f is the activation function, χ is the adjustment coefficient of spatio-temporal features, T i ,S i respectively represent the time feature value and the spatial feature value of the i-th sample.

[0043] Preferably, the method for the power node to detect anomalies in real-time operation data based on the global anomaly prediction model includes:

[0044] Obtain real-time operation data, perform data cleaning on the real-time operation data to obtain a real-time cleaning set;

[0045] Obtain the real-time cleaning set, perform dimension elimination and normalization processing on the real-time cleaning set based on the spatio-temporal normalization algorithm, and output the normalized real-time cleaning set;

[0046] Obtain the real-time cleaning set, perform filtering processing on the real-time cleaning set based on an RC low-pass filter, load the filtered real-time cleaning set, and combine a Chebyshev filter to suppress noise in the real-time cleaning set to form a standardized local data set;

[0047] Using the local data set as input, execute the global anomaly prediction model. The decision scoring mechanism of the global anomaly prediction model quantifies the anomaly degree of the data based on spatio-temporal weighting factors and outputs the data anomaly degree;

[0048] Use the fault classification module to classify the node prediction results into fault types, and classify the data faults into normal state, CPU overload, memory leak, storage performance bottleneck, or slot resource exhaustion fault types;

[0049] Generate a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification, and present the node prediction results and fault type classification through a visualization interface. The interface includes a spatio-temporal view function.

[0050] On the other hand, the present invention also provides a power system data anomaly prediction system based on spatio-temporal federated learning. The power system data anomaly prediction system based on spatio-temporal federated learning includes:

[0051] A spatio-temporal data acquisition module for pre-constructing a spatio-temporal federated learning framework including a central server and multiple power nodes, and collecting historical data and real-time operation data of the power system through the power nodes;

[0052] The sub-model training module is used to preprocess historical data and real-time operation data to form a standardized local training set, train the local training set based on unsupervised learning to obtain an anomaly detection sub-model, and trigger a parameter encryption and upload instruction;

[0053] The global model fusion module, in response to the parameter encryption and upload instruction, the central server obtains the sub-model parameters of the anomaly detection sub-model, aggregates the sub-model parameters based on the federated averaging algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes;

[0054] The anomaly prediction module loads the global anomaly prediction model, and the power node performs anomaly detection on the real-time operation data based on the global anomaly prediction model, outputs a node prediction result including the data anomaly degree, and uses the fault classification module to classify the fault types of the node prediction result;

[0055] The visualization monitoring module generates a real-time operation status monitoring report and a fault diagnosis report based on the node prediction result and the fault type classification, presents the node prediction result and the fault type classification through a visualization interface, and the interface includes a spatio-temporal view function.

[0056] Preferably, the sub-model training module includes:

[0057] The data preprocessing unit is used to preprocess historical data and real-time operation data to form a standardized local training set;

[0058] The sub-model generation unit trains the local training set based on unsupervised learning to obtain an anomaly detection sub-model;

[0059] The parameter upload unit is used to obtain the sub-model parameters of the anomaly detection sub-model and the local training set, trigger a parameter encryption and upload instruction, and upload the sub-model parameters and the local training set to the global model fusion module.

[0060] Preferably, the data preprocessing unit includes:

[0061] The data cleaning module loads historical data and real-time operation data, performs data cleaning on the historical data and real-time operation data to obtain a data cleaning set;

[0062] The spatio-temporal normalization module obtains the data cleaning set, eliminates the dimension and normalizes the data cleaning set based on the spatio-temporal normalization algorithm, and outputs a normalized set;

[0063] The filtering processing module obtains the normalized set, performs filtering processing on the normalized set based on an RC low-pass filter, loads the filtered normalized set, and suppresses the noise of the normalized set in combination with a Chebyshev filter to form a standardized local training set.

[0064] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:

[0065] Through the spatio-temporal federated learning framework, the present invention can dynamically adjust the aggregation strategy of the global model, combine the distributed training of federated learning with the modeling ability of deep learning, and realize the distributed collaborative modeling of multiple power nodes. Each node uses unsupervised learning algorithms for local anomaly detection, extracts key features and identifies potential abnormal data. This distributed collaborative modeling method not only improves the training efficiency of the model, but also can make full use of the computing resources of each node to achieve efficient anomaly detection, thereby enhancing the adaptability to data in different spaces and times and improving the fault response speed.

[0066] In the embodiments of the present invention, through data cleaning and filtering processing, noise and outliers are effectively removed, and the accuracy and consistency of the data are improved. The spatio-temporal normalization algorithm can extract high-frequency components and local components in the data, enhance the model's ability to capture spatio-temporal dynamics, and improve the accuracy of anomaly detection. The normalization processing and filtering processing can optimize the data distribution, improve the generalization ability of the model in different scenarios, and reduce the risk of overfitting. The preprocessed data can accelerate the convergence speed of the model, improve the training efficiency, and provide high-quality input data for subsequent anomaly detection and fault classification.

[0067] In the embodiments of the present invention, the anomaly detection sub-model uses a generative adversarial network as the initial architecture of the anomaly detection sub-model. The generative adversarial network can extract the features of the local training set samples, convert the data into feature vectors, and provide high-quality input for subsequent clustering analysis. At the same time, combining the spatio-temporal DBSCAN algorithm with fuzzy clustering for soft clustering analysis of the sample features can more comprehensively consider the spatio-temporal features and uncertainties of the data, improve the accuracy of anomaly detection, and quickly identify abnormal patterns by feature grouping and marking potential abnormal samples, effectively capturing the global characteristics of cross-node and spatio-temporal correlations, improving the accuracy and generalization ability of anomaly detection. On the premise of protecting data privacy, each node uses unsupervised learning algorithms to process and detect anomalies in local data, extracts key features and identifies potential abnormal samples. In addition, considering the spatio-temporal characteristics of power system data, the anomaly detection process not only focuses on the data of a single node, but also considers the spatio-temporal dependence relationship between nodes. The model parameters generated by local training are uploaded to the central server in an encrypted manner, ensuring data privacy while realizing distributed collaborative modeling and providing reliable input for subsequent global model aggregation.

[0068] In the embodiments of the present invention, an improved federated averaging algorithm is used to aggregate the sub-model parameters uploaded by each node to generate a global anomaly prediction model that captures global characteristics. The global anomaly prediction model not only utilizes the synergy of data from each node but also integrates spatio-temporal information, enabling it to better capture the abnormal behavior patterns in different regions and at different time points of the power system. It can significantly improve the generalization ability of detecting abnormal behaviors in complex power systems. Especially in a distributed environment, it solves the limitations of traditional centralized methods in terms of privacy protection and performance optimization, while enhancing the response ability to spatio-temporal correlated anomalies, providing high-quality detection results for subsequent fault classification.

[0069] In the embodiments of the present invention, the fault classification module is a supervised learning model based on a deep neural network. The fault classification module uses the supervised learning method to perform fine-grained classification on the detected abnormal samples, including but not limited to common fault types such as CPU overload, memory leak, storage performance bottleneck, and slot depletion. By training known fault samples, the fault classification module can accurately distinguish different types of fault states, thus providing reliable support for online fault diagnosis. By combining the results of anomaly detection and fault classification, the alarm mechanism is triggered in real-time to generate alarm information and send it to the maintenance personnel. The alarm information includes content such as fault type, impact range, and timestamp, and provides more accurate alarm information by combining spatio-temporal features, guiding the maintenance personnel to respond quickly and handle the fault problems in the power system in a timely manner to ensure the safe and stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a schematic diagram of the implementation process of the power system data anomaly prediction method based on spatio-temporal federated learning provided by the present invention.

[0071] Figure 2 It shows a schematic diagram of the implementation process of the preprocessing method for historical data and real-time operation data.

[0072] Figure 3 It shows a schematic diagram of the implementation process of the method for training an anomaly detection sub-model based on an unsupervised learning method on a local training set.

[0073] Figure 4 It shows a schematic diagram of the implementation process of the method for aggregating sub-model parameters based on the federated averaging algorithm and iteratively training to obtain a global anomaly prediction model.

[0074] Figure 5 It shows a schematic diagram of the implementation process of the method for anomaly detection of real-time operation data by a power node based on the global anomaly prediction model.

[0075] Figure 6 It shows a schematic diagram of the structure of the power system data anomaly prediction system based on spatio-temporal federated learning. Detailed implementation mode

[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.

[0077] The existing method for model training relies on centralized data processing and is difficult to adapt to the complex changes of different regional and time-series data in the power system. The centralized method adopted has deficiencies in training efficiency and prediction accuracy. To address the above problems, we propose a method and system for predicting power system data anomalies based on spatio-temporal federated learning. Briefly, when implementing the method, a spatio-temporal federated learning framework including a central server and multiple power nodes is first pre-constructed, historical data and real-time operation data are preprocessed to form a standardized local training set, an anomaly detection sub-model is trained based on the unsupervised learning method for the local training set, the central server obtains the sub-model parameters of the anomaly detection sub-model, aggregates the sub-model parameters based on the federated averaging algorithm, and iteratively trains to obtain a global anomaly prediction model. The power nodes detect anomalies in the real-time operation data based on the global anomaly prediction model and output node prediction results including the degree of data anomaly, and a fault classification module is used to classify the fault types of the node prediction results. Through the spatio-temporal federated learning framework, the present invention can dynamically adjust the aggregation strategy of the global model, combines the distributed training of federated learning with the modeling ability of deep learning, realizes the distributed collaborative modeling of multiple power nodes, and each node uses the unsupervised learning algorithm for local anomaly detection, extracts key features and identifies potential abnormal data. This distributed collaborative modeling method not only improves the training efficiency of the model but also can make full use of the computing resources of each node to achieve efficient anomaly detection, thereby enhancing the adaptability to different spatial and time data and improving the fault response speed.

[0078] Embodiment 1

[0079] The embodiment of the present invention provides a method for predicting power system data anomalies based on spatio-temporal federated learning, Figure 1 which shows a schematic diagram of the implementation process of the method for predicting power system data anomalies based on spatio-temporal federated learning. The method for predicting power system data anomalies based on spatio-temporal federated learning specifically includes:

[0080] Step S10, pre - construct a spatio - temporal federated learning framework including a central server and multiple power nodes, and collect historical data and real - time operation data of the power system through the power nodes;

[0081] Step S20, pre - process the historical data and real - time operation data to form a standardized local training set, train the local training set based on the unsupervised learning method to obtain an anomaly detection sub - model, and trigger a parameter encrypted upload instruction;

[0082] Step S30, in response to the parameter encrypted upload instruction, the central server obtains the sub - model parameters of the anomaly detection sub - model, aggregates the sub - model parameters based on the federated average algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes;

[0083] Step S40, load the global anomaly prediction model, the power nodes perform anomaly detection on the real - time operation data based on the global anomaly prediction model, output a node prediction result including the degree of data anomaly, use a fault classification module to classify the fault types of the node prediction result, generate a real - time operation status monitoring report and a fault diagnosis report based on the node prediction result and the fault type classification, provide a comprehensive evaluation of the operation status of the power system, and at the same time analyze the performance bottlenecks of different time and space nodes, providing technical support for system resource optimization, fault troubleshooting, and preventive maintenance.

[0084] In this embodiment, after using the fault classification module to classify the fault types of the node prediction results, an alarm mechanism is triggered according to the classification results, an alarm message is sent to the maintenance personnel, and spatio - temporal correlation analysis is performed on the fault types in combination with spatio - temporal characteristics to improve the accuracy of classification, which can be widely applied to transmission line monitoring, substation management, and distribution network evaluation, providing technical guarantee for the safe operation of the power system.

[0085] Through the spatio - temporal federated learning framework, the present invention can dynamically adjust the aggregation strategy of the global model, combine the distributed training of federated learning with the modeling ability of deep learning, realize the distributed collaborative modeling of multiple power nodes. Each node uses the unsupervised learning algorithm for local anomaly detection, extracts key features and identifies potential abnormal data. This distributed collaborative modeling method not only improves the training efficiency of the model, but also can make full use of the computing resources of each node to achieve efficient anomaly detection, thereby enhancing the adaptability to data in different spaces and times and improving the fault response speed.

[0086] The embodiment of the present invention provides a method for pre - processing historical data and real - time operation data, Figure 2 shows a schematic implementation flow diagram of the method for pre - processing historical data and real - time operation data. The method for pre - processing historical data and real - time operation data specifically includes:

[0087] Step S101: Load historical data and real-time operation data. The data includes, but is not limited to, the CPU utilization rate of the power system server, memory occupancy, storage occupancy, and slot utilization rate. Clean the historical data and real-time operation data to obtain a data cleaning set;

[0088] It should be noted that the data cleaning methods include, but are not limited to, removing outliers, filling in missing values, and unifying the data scale to improve data quality.

[0089] Step S102: Obtain the data cleaning set, perform dimension elimination and normalization processing on the data cleaning set based on the spatio-temporal normalization algorithm, and output a normalized set. Considering the correlation of different time and space nodes, use the spatio-temporal normalization method to ensure that different types of data have the same dimension and improve the stability of model training;

[0090] Among them, when performing dimension elimination and normalization processing on the data cleaning set based on the spatio-temporal normalization algorithm, first perform time normalization processing on the data cleaning set, extract the high-frequency components in the data cleaning set, and then extract the local components in the data cleaning set based on the space normalization formula to obtain a normalized set. Extracting the high-frequency components in the data helps the model capture the rapid changes and short-term fluctuations in the time series, which is particularly important for transient anomaly detection in the power system. Extracting the local components helps the model capture the spatial differences between different nodes and enhance the ability to identify local anomalies.

[0091] The time normalization formula is expressed as:

[0092]

[0093] The space normalization formula is expressed as:

[0094]

[0095] Among them, represents extracting the high-frequency components in the data cleaning set A i,t during time normalization processing, respectively represent the mean and variance under the given low-frequency components of the data cleaning set, and γ i , γ respectively represent the normalization scaling factor and the initial scaling parameter of the data cleaning set, represents the offset of the high-frequency components, represents the offset of the local components, represents extracting the local components in the data cleaning set A i,t during space normalization processing, represents the mean and standard deviation under the global components and time conditions, and p, q respectively represent the frequency domain range parameter and the time domain range parameter;

[0096] Step S103: Obtain the normalization set, filter the normalization set based on an RC low-pass filter, load the filtered normalization set, and suppress the noise of the normalization set in combination with a Chebyshev filter to form a standardized local training set.

[0097] In this embodiment, the RC low-pass filter can effectively remove high-frequency noise and retain the low-frequency components in the data. This is very useful for long-term trend analysis and anomaly detection in power systems because anomalies usually manifest as mutations in low-frequency signals. The Chebyshev filter has good frequency selectivity and can design the passband and stopband characteristics of the filter according to needs to precisely suppress the noise within a specific frequency range. This helps to further optimize the data quality and improve the sensitivity of the model to anomaly signals.

[0098] In the embodiment of the present invention, through data cleaning and filtering processing, noise and outliers are effectively removed, improving the accuracy and consistency of the data. The spatio-temporal normalization algorithm can extract the high-frequency components and local components in the data, enhancing the model's ability to capture spatio-temporal dynamics and improving the accuracy of anomaly detection. The normalization processing and filtering processing can optimize the data distribution, improve the model's generalization ability in different scenarios, and reduce the risk of overfitting. The preprocessed data can accelerate the convergence speed of the model, improve the training efficiency, and provide high-quality input data for subsequent anomaly detection and fault classification.

[0099] The embodiment of the present invention provides a method for training an anomaly detection sub-model from a local training set based on an unsupervised learning method. Figure 3 The schematic diagram of the implementation process of the method for training an anomaly detection sub-model from a local training set based on an unsupervised learning method is shown. The method for training an anomaly detection sub-model from a local training set based on an unsupervised learning method specifically includes:

[0100] Step S201: Pre-build an anomaly detection sub-model, use a generative adversarial network as the initial architecture of the anomaly detection sub-model, introduce an input layer before the generative adversarial network, introduce an output layer after the generative adversarial network, introduce an autoencoder between the generative adversarial network and the input layer. The autoencoder compresses the data into a low-dimensional representation through the encoder and then reconstructs the data through the decoder, which can learn the low-dimensional features of the data, remove noise and redundant information. The autoencoder includes an encoding module, a decoding module, and a fully connected layer. The fully connected layer is used to connect the encoding module and the decoding module. Introducing a fully connected layer in the autoencoder can further enhance the feature extraction ability and provide higher-quality input features for the generative adversarial network. Add a soft clustering model between the generative adversarial network and the output layer. The soft clustering model combines the spatio-temporal DBSCAN algorithm and the fuzzy clustering algorithm to consider spatio-temporal correlation and complete the preliminary anomaly detection of the local training set.

[0101] It should be noted that the generative adversarial network (GAN) can generate samples similar to the real data distribution. Through the adversarial training of the generator and discriminator, it can effectively capture the complex distribution and abnormal patterns in the data. While generating samples, GAN can extract features from the input data, providing a richer feature representation for subsequent anomaly detection. The spatio-temporal DBSCAN algorithm can consider the spatio-temporal correlation of the data and identify abnormal patterns with spatio-temporal clustering. DBSCAN is robust to noise and can effectively identify local anomalies. Soft classification of samples can be achieved through fuzzy clustering, allowing samples to belong to multiple clusters simultaneously, enhancing the model's ability to handle data uncertainty. Combining the spatio-temporal DBSCAN and fuzzy clustering algorithms can more comprehensively consider the spatio-temporal characteristics and uncertainty of the data, improving the accuracy of anomaly detection.

[0102] Step S202: Load the pre-built anomaly detection sub-model, select the Sigmoid function as the activation function, and set the sub-model parameters between the autoencoder and the generative adversarial network. The sub-model parameters include weights, thresholds, and hyperparameters. By setting the weights, thresholds, and hyperparameters, the performance of the anomaly detection sub-model can be optimized to better adapt to the characteristics of local data. Dynamically adjusting the parameters can improve the flexibility and adaptability of the model, especially when dealing with complex power system data, and thus better capture the abnormal patterns in the data.

[0103] Step S203: Obtain the local training set, use the unsupervised learning method to train the local training set, dynamically adjust the sub-model parameters, and output the converged anomaly detection sub-model. Unsupervised learning does not require labeled data and can directly learn the internal structure and patterns of the data from the raw data, which is suitable for a large amount of unlabeled data in the power system, thus reducing the workload of manual annotation and improving the efficiency of anomaly detection. Dynamically adjusting the parameters can optimize the performance of the model and enable it to better capture the abnormal patterns in the data during the training process.

[0104] Among them, during training, the generative adversarial network is used to extract the sample features of the local training set, convert the local training set into feature vectors, perform soft clustering analysis on the sample features by combining the spatio-temporal DBSCAN algorithm and fuzzy clustering, group the features of the local training set, extract the features of potential abnormal samples and label them as abnormal samples, and output the initial detection result.

[0105] In the embodiment of the present invention, the anomaly detection sub-model uses a generative adversarial network as the initial architecture of the anomaly detection sub-model. The generative adversarial network can extract the features of the local training set samples, convert the data into feature vectors, and provide high-quality input for subsequent clustering analysis. At the same time, combining the spatio-temporal DBSCAN algorithm and fuzzy clustering for soft clustering analysis of the sample features can more comprehensively consider the spatio-temporal features and uncertainties of the data, improve the accuracy of anomaly detection. By feature grouping and marking potential anomaly samples, the anomaly pattern can be quickly identified, and the global characteristics of cross-node and spatio-temporal correlation can be effectively captured, improving the accuracy and generalization ability of anomaly detection. On the premise of protecting data privacy, each node uses an unsupervised learning algorithm to process local data and detect anomalies, extract key features and identify potential anomaly samples. In addition, considering the spatio-temporal characteristics of power system data, the anomaly detection process not only focuses on the data of a single node, but also considers the spatio-temporal dependence relationship between nodes. The model parameters generated by local training are uploaded to the central server in an encrypted manner to achieve distributed collaborative modeling while ensuring data privacy, providing reliable input for subsequent global model aggregation.

[0106] The embodiment of the present invention provides a method for aggregating sub-model parameters based on the federated averaging algorithm and iteratively training to obtain a global anomaly prediction model. Figure 4 The figure shows a schematic implementation flow diagram of a method for aggregating sub-model parameters based on the federated averaging algorithm and iteratively training to obtain a global anomaly prediction model. The method for aggregating sub-model parameters based on the federated averaging algorithm and iteratively training to obtain a global anomaly prediction model specifically includes:

[0107] Step S301, load at least one group of local training sets and initial detection results, perform fusion processing on the local training sets and initial detection results to obtain a fused data set, and divide the fused data set into a global training set and a global test set;

[0108] In the embodiment of the present invention, the ratio of the global training set to the global test set can be 3 - 4:1. By fusing the local training set and the initial detection results, the preliminary detection information of the local model can be fully utilized to provide a richer data basis for the global model.

[0109] Step S302: Pre-build a global anomaly prediction model. The global anomaly prediction model is based on an anomaly detection sub-model based on decision scores. A spatio-temporal neural network model is introduced into the basic architecture. The spatio-temporal neural network model is used to process samples at different time and space nodes. The spatio-temporal DBSCAN algorithm is introduced into the spatio-temporal neural network model to cluster and group the samples. A decision score mechanism is introduced into the anomaly detection sub-model. The decision score mechanism quantifies the anomaly degree of the samples based on spatio-temporal weighting factors. A fault classification module based on supervised learning is introduced after the anomaly detection sub-model. The fault classification module is a supervised learning model based on a deep neural network to complete the construction of the global anomaly prediction model;

[0110] In the embodiment of the present invention, the spatio-temporal neural network model can process samples at different time and space nodes, capture spatio-temporal correlations, and enhance the model's adaptability to complex data. The decision score mechanism quantifies the anomaly degree of the samples based on spatio-temporal weighting factors, and can more accurately evaluate anomaly samples, improving the accuracy of anomaly detection. The combination of the spatio-temporal DBSCAN algorithm and the supervised learning-based fault classification module can achieve full-process processing from anomaly detection to fault classification, improving the practicality and diagnostic ability of the model. The central server aggregates the sub-model parameters uploaded by each node through an improved federated averaging algorithm to generate a global anomaly prediction model that captures global characteristics. The global anomaly prediction model not only utilizes the synergy of data from each node but also integrates spatio-temporal information, and can better capture the abnormal behavior patterns in different regions and at different time points in the power system. It can significantly improve the detection generalization ability of abnormal behaviors in complex power systems, especially in a distributed environment, solve the limitations of traditional centralized methods in terms of privacy protection and performance optimization, and at the same time enhance the response ability to spatio-temporal correlated anomalies, providing high-quality detection results for subsequent fault classification.

[0111] In the embodiments of the present invention, the fault classification module is a supervised learning model based on a deep neural network. The fault classification module uses the supervised learning method to perform fine-grained classification on the detected abnormal samples, including but not limited to common fault types such as CPU overload, memory leak, storage performance bottleneck, and slot depletion. By training known fault samples, the fault classification module can accurately distinguish different types of fault states, thereby providing reliable support for online fault diagnosis. By combining the results of anomaly detection and fault classification, the alarm mechanism is triggered in real time to generate alarm information and send it to the maintenance personnel. The alarm information includes content such as fault type, impact range, and timestamp, and combines spatio-temporal features to provide more accurate alarm information to guide the maintenance personnel to respond quickly and handle the fault problems in the power system in a timely manner, ensuring the safe and stable operation of the power system. After the fault classification module is embedded in the global anomaly prediction model, it can combine spatio-temporal features and real-time data to achieve real-time fault monitoring of the power system. This real-time monitoring ability helps to detect potential faults in advance and achieve preventive maintenance. Through supervised learning, the fault classification module can dynamically adjust the model parameters according to the actual data, so as to better adapt to the fault characteristics in different scenarios. This self-adaptability enables the model to more flexibly handle complex fault patterns in the power system, and then can handle complex fault patterns, including multi-source faults, progressive faults, and sudden faults. Through supervised learning, the model can learn the characteristics of these complex fault patterns, thereby improving the comprehensiveness of fault diagnosis. From data processing, feature extraction, anomaly detection to fault classification, the entire process is completed within a unified framework, reducing the error accumulation in the intermediate links and improving the overall performance.

[0112] Step S303: Load the sub-model parameters, aggregate the sub-model parameters based on the improved spatio-temporal federated averaging algorithm, dynamically adjust the weight contribution of each node, obtain the aggregated parameters of the global model, and set the number of training rounds, loss function, and training batches of the global anomaly prediction model; in this embodiment, the number of training rounds can be 100-120, the training batches can be 5-10, and the loss function can be the cross-entropy loss function.

[0113] Among them, the improved spatio-temporal federated averaging algorithm is expressed as:

[0114]

[0115] Among them, w k (t) represents the sub-model parameters of the k-th node, n k is the local data volume of the k-th node, w(t) is the aggregated parameters of the global model, T k represents the time feature of the k-th node, S k represents the spatial feature of the k-th node, α k , β kThey are the time and space weighting factors of the k-th node respectively, which are used to dynamically adjust the weight contribution of each node;

[0116] Step S304: Obtain the global training set, activate the global anomaly prediction model through the activation function, and iteratively train the global anomaly prediction model using the global training set. During training, the exponential weighted moving average is used to dynamically adjust the weight contribution of each node until the global anomaly prediction model meets the preset convergence accuracy, and then output the converged global anomaly prediction model;

[0117] Step S305: Obtain the global test set, use the global test set as the input, execute the global anomaly prediction model, and the global anomaly prediction model outputs the test anomaly degree and the test fault type;

[0118] Step S306: Determine whether the test anomaly degree and the test fault type meet the preset test threshold. The test threshold is used to represent the test accuracy, and the preset test threshold can be 0.85 - 0.9. The test fault types include CPU overload, memory leak, resource exhaustion, storage bottleneck, etc.;

[0119] Step S307: If the test anomaly degree and the test fault type meet the preset test threshold, output the converged global anomaly prediction model, and send the global anomaly prediction model to the power nodes;

[0120] If the test anomaly degree and the test fault type do not meet the preset test threshold, activate the global anomaly prediction model through the activation function, return to step S304, and continue to iteratively train the global anomaly prediction model using the global training set.

[0121] In this embodiment, when the decision score mechanism quantifies the anomaly degree of the sample based on the spatio-temporal weighting factor, the following formula is used to calculate the sample decision score:

[0122]

[0123] where A(x) represents the sample decision score, x i represents the feature value of the i-th sample, μ is the mean of the global training set, N represents the number of samples in the training set, T i , S i represent the time feature value and the space feature value of the i-th sample respectively, α i , β i represent the time and space weighting factors of the i-th sample respectively, max(T i ), are the maximum value of the sample time feature and the mean value of the sample time feature respectively, T is the number of sample time features, α0 and β0 are the initial values of the sample time feature and the sample space feature respectively, represents the mean value of the sample space feature.

[0124] It should be noted that when the decision score mechanism quantifies the abnormality degree of a sample based on the spatio-temporal weighting factor, by introducing the spatio-temporal weighting factor, the decision score mechanism can comprehensively consider the time characteristics and space characteristics of the sample, and more accurately quantify the abnormality degree of the sample. Compared with single time or space analysis, the spatio-temporal weighting factor can better capture the spatio-temporal dynamic changes in the data, thereby improving the accuracy of anomaly detection. The spatio-temporal weighting factor can dynamically adjust the weight according to the time characteristic value and space characteristic value of the sample, adapting to the data characteristics in different scenarios. This method can effectively handle multi-source faults, progressive faults and sudden faults in the power system. Based on anomaly detection, the decision score mechanism can provide more accurate input for subsequent fault classification. By quantifying the abnormality degree of the sample, the model can more accurately distinguish different types of faults, such as CPU overload, memory leak, resource exhaustion, etc., so as to achieve fine-grained fault classification. Based on the dynamic adjustment of the spatio-temporal weighting factor, the decision score mechanism can automatically optimize the weight according to the actual data. This method enables the model to adaptively adjust the emphasis on different features, thus better adapting to the dynamic changes in the power system. By quantifying the abnormality degree through the spatio-temporal weighting factor, the model can quickly process real-time data and output the anomaly detection results. This method supports the real-time anomaly detection of the power system, helps to detect potential faults in advance, and realizes preventive maintenance. The spatio-temporal weighting factor can more accurately quantify the abnormality degree of the sample, thereby reducing false alarms and missed alarms. This method improves the model's ability to identify abnormal samples by dynamically adjusting the weight, and reduces the misjudgment rate.

[0125] In the embodiment of the present invention, when activating the global anomaly prediction model through the activation function, the activation process is described by the following formula:

[0126]

[0127] Where is the activation value of the i-th neuron in the l-th layer, is the weight matrix from the (l - 1)-th layer to the l-th layer, is the bias value of the l-th layer, f is the activation function, the activation function can be the sigmoid function or the ReLU activation function, χ is the adjustment coefficient of the spatio-temporal feature, T i , S i respectively represent the time characteristic value and space characteristic value of the i-th sample.

[0128] The embodiment of the present invention provides a method for anomaly detection of real-time operation data by power nodes based on a global anomaly prediction model. Figure 5The schematic diagram of the implementation process of the method for detecting anomalies in real-time operation data by a power node based on a global anomaly prediction model is shown. The method for detecting anomalies in real-time operation data by the power node based on the global anomaly prediction model specifically includes:

[0129] Step S401: Obtain real-time operation data, perform data cleaning on the real-time operation data, and obtain a real-time cleaning set;

[0130] Step S402: Obtain the real-time cleaning set, perform dimension elimination and normalization processing on the real-time cleaning set based on the spatio-temporal normalization algorithm, and output the normalized real-time cleaning set;

[0131] Step S403: Obtain the real-time cleaning set, perform filtering processing on the real-time cleaning set based on an RC low-pass filter, load the filtered real-time cleaning set, and combine a Chebyshev filter to suppress the noise of the real-time cleaning set to form a standardized local data set;

[0132] Step S404: Use the local data set as input, execute the global anomaly prediction model. The decision scoring mechanism of the global anomaly prediction model quantifies the anomaly degree of the data based on spatio-temporal weighting factors, and outputs the data anomaly degree;

[0133] Step S405: Use a fault classification module to classify the node prediction results into fault types, and classify the data faults into normal state, CPU overload, memory leak, storage performance bottleneck, or slot resource exhaustion fault types;

[0134] Step S406: Generate a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification, and present the node prediction results and fault type classification through a visualization interface. The interface includes a spatio-temporal view function.

[0135] In this embodiment, by utilizing the distributed collaborative modeling ability of the federated learning framework and the efficient modeling ability of the deep learning model, combined with spatio-temporal dependence modeling, potential anomalies in the distributed power system can be discovered in a timely manner, and the fault types can be accurately classified, providing a real-time reference for online diagnosis and maintenance. Combining the distributed training mechanism of the spatio-temporal federated learning framework, key resources of the power system can be dynamically monitored, including status such as CPU utilization, memory occupancy, storage performance, and slot usage rate. This method can discover potential problems in advance, consider spatio-temporal correlation and trigger an alarm mechanism to avoid equipment fault escalation or system collapse, thereby significantly improving the security and stability of the power system.

[0136] Embodiment 2

[0137] The embodiment of the present invention provides a power system data anomaly prediction system based on spatio-temporal federated learning, Figure 6The structural schematic diagram of the power system data anomaly prediction system based on spatio-temporal federated learning is shown. The power system data anomaly prediction system based on spatio-temporal federated learning specifically includes:

[0138] The spatio-temporal data acquisition module 100 is used to pre-construct a spatio-temporal federated learning framework including a central server and multiple power nodes, and collect historical data and real-time operation data of the power system through the power nodes;

[0139] The sub-model training module 200 is used to preprocess the historical data and real-time operation data to form a standardized local training set, train the local training set based on the unsupervised learning method to obtain an anomaly detection sub-model, and trigger a parameter encryption upload instruction;

[0140] The global model fusion module 300, in response to the parameter encryption upload instruction, the central server obtains the sub-model parameters of the anomaly detection sub-model, aggregates the sub-model parameters based on the federated averaging algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes;

[0141] The anomaly prediction module 400 loads the global anomaly prediction model, and the power nodes perform anomaly detection on the real-time operation data based on the global anomaly prediction model, output node prediction results including the degree of data anomaly, and use the fault classification module to classify the fault types of the node prediction results;

[0142] The visualization monitoring module 500 generates a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification, presents the node prediction results and fault type classification through a visualization interface, and the interface includes a spatio-temporal view function.

[0143] In this embodiment, the sub-model training module 200 includes:

[0144] The data preprocessing unit 210 is used to preprocess the historical data and real-time operation data to form a standardized local training set;

[0145] The sub-model generation unit 220 trains the local training set based on the unsupervised learning method to obtain an anomaly detection sub-model;

[0146] The parameter upload unit 230 is used to obtain the sub-model parameters of the anomaly detection sub-model and the local training set, trigger a parameter encryption upload instruction, and upload the sub-model parameters and the local training set to the global model fusion module.

[0147] Among them, the data preprocessing unit 210 includes:

[0148] The data cleaning module 211 loads historical data and real-time operation data, where the data includes the CPU utilization rate, memory occupancy, storage occupancy, and slot usage rate of the power system server, and performs data cleaning on the historical data and real-time operation data to obtain a data cleaning set;

[0149] The spatio-temporal normalization module 212 obtains the data cleaning set, and performs dimension elimination and normalization processing on the data cleaning set based on the spatio-temporal normalization algorithm, and outputs a normalized set;

[0150] The filtering processing module 213 obtains the normalized set, performs filtering processing on the normalized set based on an RC low-pass filter, loads the filtered normalized set, and suppresses the noise of the normalized set in combination with a Chebyshev filter to form a standardized local training set.

[0151] It can be understood that the power system data anomaly prediction system based on spatio-temporal federated learning provided in the embodiments of the present invention corresponds to the above-mentioned power system data anomaly prediction method based on spatio-temporal federated learning. For the explanations, examples, beneficial effects, etc. of the relevant content, reference can be made to the corresponding content in the power system data anomaly prediction method based on spatio-temporal federated learning, and will not be elaborated here.

[0152] In summary, the present invention provides a power system data anomaly prediction method and system based on spatio-temporal federated learning. Through the spatio-temporal federated learning framework, the present invention can dynamically adjust the aggregation strategy of the global model, combine the distributed training of federated learning with the modeling ability of deep learning, and realize the distributed collaborative modeling of multiple power nodes. Each node uses an unsupervised learning algorithm for local anomaly detection, extracts key features and identifies potential abnormal data. This distributed collaborative modeling method not only improves the training efficiency of the model, but also can make full use of the computing resources of each node to achieve efficient anomaly detection, thereby enhancing the adaptability to data in different spaces and times and improving the fault response speed.

[0153] It should be noted that for the foregoing embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0154] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting the protection scope of the invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on these embodiments, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art can still, without conflict and without creative efforts, combine, add or delete the features in the embodiments of the present invention according to the circumstances or make other adjustments, so as to obtain different technical solutions that essentially do not deviate from the concept of the present invention, and these technical solutions also belong to the scope of protection of the present invention.

Claims

1. A method for predicting abnormal power system data based on spatio-temporal federated learning, characterized in that, Including: Pre - construct a spatio - temporal federated learning framework including a central server and multiple power nodes, and collect historical data and real - time operation data of the power system through the power nodes; Pre - process the historical data and real - time operation data to form a standardized local training set, and train the local training set based on the unsupervised learning method to obtain an anomaly detection sub - model, and trigger a parameter encryption upload instruction; In response to the parameter encryption upload instruction, the central server obtains the sub - model parameters of the anomaly detection sub - model, aggregates the sub - model parameters based on the federated averaging algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes; Load the global anomaly prediction model, and the power nodes perform anomaly detection on the real - time operation data based on the global anomaly prediction model, output a node prediction result including the data anomaly degree, use a fault classification module to classify the fault types of the node prediction result, and generate a real - time operation status monitoring report and a fault diagnosis report based on the node prediction result and the fault type classification.

2. The method for predicting abnormal power system data based on spatio-temporal federated learning according to claim 1, characterized in that: The method for pre - processing the historical data and real - time operation data includes: Load the historical data and real - time operation data, where the data includes the CPU utilization rate, memory occupancy, storage occupancy, and slot usage rate of the power system server, and perform data cleaning on the historical data and real - time operation data to obtain a data cleaning set; Obtain the data cleaning set, eliminate the dimension and perform normalization processing on the data cleaning set based on the spatio - temporal normalization algorithm, and output a normalized set; Among them, when eliminating the dimension and performing normalization processing on the data cleaning set based on the spatio - temporal normalization algorithm, first perform time normalization processing on the data cleaning set, extract the high - frequency components in the data cleaning set, and then extract the local components in the data cleaning set based on the spatial normalization formula to obtain a normalized set; The time normalization formula is expressed as: The spatial normalization formula is expressed as: Among them, represents extracting the data cleaning set A during time normalization processing i,t for the high-frequency components, respectively represent the mean and variance under the given low-frequency components of the data cleaning set, and γ i , γ respectively represent the normalization scaling factor and the initial scaling parameter of the data cleaning set, represents the offset of the high-frequency component, represents the offset of the local component, represents extracting the data cleaning set A during spatial normalization processing i,t for the local components, represents the mean and standard deviation under the global component and time conditions, and p, q respectively represent the frequency domain range parameter and the time domain range parameter; Obtain the normalized set, perform filtering processing on the normalized set based on an RC low - pass filter, load the filtered normalized set, and suppress the noise of the normalized set in combination with a Chebyshev filter to form a standardized local training set.

3. The method for predicting abnormal power system data based on spatio-temporal federated learning according to claim 1, wherein: The method for training the local training set based on the unsupervised learning method to obtain an anomaly detection sub - model includes: Pre - construct an anomaly detection sub - model, use a generative adversarial network as the initial architecture of the anomaly detection sub - model, introduce an input layer before the generative adversarial network, introduce an output layer after the generative adversarial network, introduce an auto - encoder between the generative adversarial network and the input layer, the auto - encoder includes an encoding module, a decoding module, and a fully - connected layer, the fully - connected layer is used to connect the encoding module and the decoding module, add a soft clustering model between the generative adversarial network and the output layer, and the soft clustering model combines the spatio - temporal DBSCAN algorithm and the fuzzy clustering algorithm to consider spatio - temporal correlation and complete the preliminary anomaly detection of the local training set; Load the pre - constructed anomaly detection sub - model, select the Sigmoid function as the activation function, and set the sub - model parameters between the auto - encoder and the generative adversarial network, where the sub - model parameters include weights, thresholds, and hyperparameters; Obtain the local training set, use the unsupervised learning method to train the local training set, dynamically adjust the sub - model parameters, and output a converged anomaly detection sub - model; Among them, during training, a generative adversarial network is used to extract the features of the local training set samples, convert the local training set into feature vectors, and perform soft clustering analysis on the sample features by combining the spatio-temporal DBSCAN algorithm and fuzzy clustering, group the features of the local training set, extract the features of potential abnormal samples and label them as abnormal samples, and output the initial detection result.

4. The method for predicting abnormal power system data based on spatio-temporal federated learning according to claim 2, wherein: The method for aggregating the parameters of the sub-model based on the federated averaging algorithm and iteratively training to obtain the global anomaly prediction model includes: Load at least one group of local training sets and the initial detection results, perform fusion processing on the local training sets and the initial detection results to obtain a fusion data set, and divide the fusion data set into a global training set and a global test set; Pre-construct a global anomaly prediction model. The global anomaly prediction model is based on an anomaly detection sub-model based on decision scores. A spatio-temporal neural network model is introduced into the basic architecture. The spatio-temporal neural network model is used to process samples at different time and space nodes. The spatio-temporal DBSCAN algorithm is introduced into the spatio-temporal neural network model to cluster and group the samples. A decision score mechanism is introduced into the neural network model. The decision score mechanism quantifies the anomaly degree of the samples based on spatio-temporal weighting factors. A fault classification module based on supervised learning is introduced after the anomaly detection sub-model. The fault classification module is a supervised learning model based on a deep neural network to complete the construction of the global anomaly prediction model; Load the sub-model parameters, aggregate the sub-model parameters based on the improved spatio-temporal federated averaging algorithm, dynamically adjust the weight contributions of each node, obtain the aggregated parameters of the global model, and set the training rounds, loss function, and training batches of the global anomaly prediction model; Among them, the improved spatio-temporal federated averaging algorithm is expressed as: Among them, w k (t) represents the sub-model parameters of the k-th node, and n k is the local data volume of the k-th node, w(t) is the aggregation parameter of the global model, and T k represents the time feature of the k-th node, and S k represents the spatial feature of the k-th node, and α k , β k are the time and space weighting factors of the k-th node respectively, used to dynamically adjust the weight contribution of each node; Obtain the global training set, activate the global anomaly prediction model through the activation function, and iteratively train the global anomaly prediction model with the global training set. During training, use the exponential weighted moving average to dynamically adjust the weight contributions of each node until the global anomaly prediction model meets the preset convergence accuracy, and output the converged global anomaly prediction model; Obtain the global test set, use the global test set as the input, execute the global anomaly prediction model, and the global anomaly prediction model outputs the test anomaly degree and test fault type, and judge whether the test anomaly degree and test fault type meet the preset test thresholds; If the test anomaly degree and test fault type meet the preset test thresholds, output the converged global anomaly prediction model, and send the global anomaly prediction model to the power nodes; If the test anomaly degree and test fault type do not meet the preset test thresholds, activate the global anomaly prediction model through the activation function, and continue to iteratively train the global anomaly prediction model with the global training set.

5. The method for predicting abnormal power system data based on spatio-temporal federated learning according to claim 4, wherein: When the decision score mechanism quantifies the anomaly degree of the samples based on spatio-temporal weighting factors, the following formula is used to calculate the sample decision score: Among them, A(x) represents the sample decision score, and x i represents the eigenvalue of the i-th sample, μ is the mean of the global training set, N represents the number of samples in the training set, T i , S i represent the time eigenvalue and the space eigenvalue of the i-th sample respectively, α i , β i represent the time and space weighting factors of the i-th sample respectively, max(T i ), are the maximum value of the sample time feature and the mean value of the sample time feature respectively, T is the number of sample time features, α0 and β0 are the initial values of the sample time feature and the sample space feature respectively, represents the mean value of the sample space feature.

6. The method for predicting abnormal power system data based on spatio-temporal federated learning according to claim 4, characterized in that: When activating the global anomaly prediction model through the activation function, the activation process is described by the following formula: Among them, is the activation value of the i-th neuron in the l-th layer, is the weight matrix from the (l-1)-th layer to the l-th layer, is the bias value of the l-th layer, f is the activation function, χ is the adjustment coefficient of spatio-temporal features, T i , S i respectively represent the time feature value and the spatial feature value of the i-th sample.

7. The power system data anomaly prediction method based on spatio-temporal federated learning according to claim 5, characterized in that: The method for the power node to perform anomaly detection on real-time operation data based on the global anomaly prediction model includes: Obtain the real-time operation data, perform data cleaning on the real-time operation data to obtain the real-time cleaning set; Obtain the real-time cleaning set, eliminate the dimension and normalize the real-time cleaning set based on the spatio-temporal normalization algorithm, and output the normalized real-time cleaning set; Obtain the real-time cleaning set, perform filtering processing on the real-time cleaning set based on an RC low-pass filter, load the filtered real-time cleaning set, and combine with a Chebyshev filter to suppress the noise of the real-time cleaning set to form a standardized local data set; Use the local data set as the input, execute the global anomaly prediction model. The decision score mechanism of the global anomaly prediction model quantifies the anomaly degree of the data based on the spatio-temporal weighting factor, and outputs the data anomaly degree; Use the fault classification module to classify the fault types of the node prediction results, and classify the data faults into normal state, CPU overload, memory leak, storage performance bottleneck, or slot resource exhaustion fault types; Generate a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification, and present the node prediction results and fault type classification through a visualization interface. The interface includes a spatio-temporal view function.

8. A power system data anomaly prediction system based on spatio-temporal federated learning, which is used to implement the power system data anomaly prediction method based on spatio-temporal federated learning according to any one of claims 1-7, and is characterized in that: The power system data anomaly prediction system based on spatio-temporal federated learning includes: A spatio-temporal data acquisition module, which is used to pre-construct a spatio-temporal federated learning framework including a central server and multiple power nodes, and collect historical data and real-time operation data of the power system through the power nodes; A sub-model training module, which is used to preprocess the historical data and real-time operation data to form a standardized local training set, train the local training set based on the unsupervised learning method to obtain an anomaly detection sub-model, and trigger a parameter encryption upload instruction; A global model fusion module, in response to the parameter encryption upload instruction, the central server obtains the sub-model parameters of the anomaly detection sub-model, aggregates the sub-model parameters based on the federated averaging algorithm, iteratively trains to obtain a global anomaly prediction model, and distributes the global anomaly prediction model to the power nodes; An anomaly prediction module, which loads the global anomaly prediction model. The power nodes detect anomalies in the real-time operation data based on the global anomaly prediction model, output node prediction results including the data anomaly degree, and use the fault classification module to classify the fault types of the node prediction results; A visualization monitoring module, which generates a real-time operation status monitoring report and a fault diagnosis report based on the node prediction results and fault type classification, and presents the node prediction results and fault type classification through a visualization interface. The interface includes a spatio-temporal view function.

9. The power system data anomaly prediction system based on spatio-temporal federated learning according to claim 8, wherein: The sub-model training module includes: A data preprocessing unit, which is used to preprocess the historical data and real-time operation data to form a standardized local training set; A sub-model generation unit, which trains the local training set based on the unsupervised learning method to obtain an anomaly detection sub-model; A parameter upload unit, which is used to obtain the sub-model parameters of the anomaly detection sub-model and the local training set, trigger a parameter encryption upload instruction, and upload the sub-model parameters and the local training set to the global model fusion module.

10. The power system data anomaly prediction system based on spatio-temporal federated learning according to claim 9, wherein: The data preprocessing unit includes: A data cleaning module, which loads the historical data and real-time operation data, performs data cleaning on the historical data and real-time operation data, and obtains a data cleaning set; The spatio-temporal normalization module obtains the data cleaning set, eliminates the dimension and normalizes the data cleaning set based on the spatio-temporal normalization algorithm, and outputs the normalized set; The filtering processing module obtains the normalized set, performs filtering processing on the normalized set based on the RC low-pass filter, loads the normalized set after filtering processing, and combines the Chebyshev filter to suppress the noise of the normalized set to form a standardized local training set.

Citation Information

Patent Citations

  • A method and apparatus for detecting power data anomalies

    CN111738348B

Cited By

  • Abnormal detection method and system for collaborative operation of multiple robot dogs

    CN120541728A

  • Transformer operation fault detection method and system

    CN120632472A