Power equipment fault diagnosis method based on multi-dimensional feature attention enhancement
By combining multi-scale spatiotemporal feature extraction, dual-stage attention mechanism and long-term memory network module in the ground current prediction network model, the problem of ground current prediction accuracy is solved, and early detection and quantification of power equipment failures is realized, and the stable operation of the power system is ensured.
Patent Information
- Application Number
- CN202510155359.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to achieve accurate prediction of grounding current, resulting in the inability to determine potential faults of power equipment and poses safety hazards.
The fault diagnosis method of power equipment based on multi-dimensional characteristics is adopted to enhance attention, and the ground current prediction network model is used to process it. The model includes a multi-scale spatiotemporal feature extraction module, a dual-stage attention mechanism module and a long-term and short-term memory network module. It uses multi-level feature extraction and attention mechanism to establish high-order dependencies and output accurate ground current prediction data.
It significantly improves the prediction accuracy of grounding current timing data, can detect potential faults of power equipment in advance, quantify faults, reduce losses caused by equipment failures, and ensure the stable operation of the power system.
Smart Images

Figure CN119622318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ground current detection, and in particular to a method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention. Background Art
[0002] Ground current refers to the current that flows into the earth due to a fault. In the power system, ground current is an important indicator for monitoring the operating status of equipment, especially in key facilities such as substations. The dynamic changes of ground current directly reflect the health of the equipment. In order to improve the operating efficiency of power equipment, prevent potential faults, and ensure the stable operation of the system, it is necessary to detect the ground current of power equipment.
[0003] In the detection of grounding current, in addition to real-time monitoring of grounding current, it is also possible to model and analyze historical data of the docking location to predict the future situation of grounding current, so as to determine whether the power equipment has failed based on the predicted grounding current data, and provide key decision support for the future operation of the power system.
[0004] However, the prediction of grounding current faces many challenges. Among them, how to effectively capture and model these spatiotemporal dependencies is a major problem in grounding current prediction. In the power system, there are complex coupling effects in the current transmission paths between different grounding points, which causes the data to show highly dynamic spatiotemporal correlations. The difficulty in modeling this spatiotemporal dependency exacerbates the complexity of grounding current prediction, making it difficult to accurately predict grounding current, which in turn makes it impossible to determine potential faults in power equipment, posing a safety hazard. Summary of the invention
[0005] An embodiment of the present invention provides a method for diagnosing faults of power equipment based on multi-dimensional features to enhance attention, which at least solves the problem that the prior art is difficult to achieve accurate prediction of grounding current, which in turn leads to the inability to determine potential faults of power equipment and the existence of safety hazards. Accurate grounding current prediction data is obtained through a grounding current prediction network model, which can prevent and eliminate potential faults of power equipment.
[0006] The present invention provides a method for diagnosing faults of electric power equipment based on multi-dimensional feature enhanced attention, comprising: obtaining first historical grounding current time series data; wherein the first historical grounding current time series data is the grounding current time series data of a first historical time period; preprocessing the first historical grounding current time series data to obtain a first preprocessing time series matrix; inputting the first preprocessing time series matrix into a trained grounding current prediction network model, and using the grounding current prediction network model to output corresponding predicted grounding current time series data; wherein the predicted grounding current time series data is the grounding current time series data of a target time period after the first historical time period; the grounding current prediction network model is obtained by training based on a plurality of training data, and the training data includes the grounding current time series data; the grounding current prediction network model includes a multi-scale spatiotemporal feature extraction module, a dual-stage attention mechanism module and a long short-term memory network module, and the loss function of the grounding current prediction network model includes classification loss and prediction error loss; comparing a preset fault interval with the predicted grounding current time series data, and if the predicted grounding current time series data is in the preset fault interval, it is determined that the electric power equipment has a fault.
[0007] In one embodiment of the present invention, the first preprocessed time series matrix is input into a trained ground current prediction network model, and the ground current prediction network model is used to output corresponding predicted ground current time series data, including: inputting the first preprocessed time series matrix into the multi-scale space-time feature extraction module, extracting the space-time features of the first preprocessed time series matrix at different scales through the multi-scale space-time feature extraction module, and obtaining a first multi-scale space-time feature; transmitting the first multi-scale space-time feature to the dual-stage attention mechanism module, processing the first multi-scale space-time feature through the dual-stage attention mechanism module, establishing a high-order dependency of the first multi-scale space-time feature, and obtaining a second multi-scale space-time feature; transmitting the second multi-scale space-time feature to the long short-term memory network module, iterating the second multi-scale space-time feature through the long short-term memory network module, and obtaining the predicted ground current time series data.
[0008] In one embodiment of the present invention, the first multi-scale spatiotemporal features are processed by the dual-stage attention mechanism module to establish high-order dependencies of the first multi-scale spatiotemporal features and obtain second multi-scale spatiotemporal features, including: linearly mapping the first multi-scale spatiotemporal features into a first query matrix, a first key matrix and a first value matrix; processing the first query matrix, the first key matrix and the first value matrix using a normalized exponential function to obtain time dimension attention weights; weighted summing the time dimension attention weights to obtain a first output feature; nonlinearly mapping the first output feature into a time series feature matrix, linearly mapping the time series feature matrix into a second query matrix, a second key matrix and a second value matrix; processing the second query matrix, the second key matrix and the second value matrix using a normalized exponential function to obtain feature dimension attention weights; weighted summing the feature dimension attention weights to obtain the second multi-scale spatiotemporal features.
[0009] In one embodiment of the present invention, the first multi-scale spatiotemporal features are linearly mapped into a first query matrix, a first key matrix and a first value matrix by the following formula:
[0010] ,
[0011] ,
[0012] ,
[0013] in, is the first multi-scale spatiotemporal feature, , is the total number of time steps, is the feature dimension, is the number of convolution kernels, , , are all learnable linear mapping matrices, , , , is the first query matrix, is the first bond matrix, is the first value matrix;
[0014] The time dimension attention weight is obtained by processing the first query matrix, the first key matrix and the first value matrix using a normalized exponential function through the following formula:
[0015] ,
[0016] in, is the time step For other time steps The time dimension attention weight, ; is the number of non-overlapping time slices during preprocessing, Function is the normalized exponential function, For the first query matrix No. OK, The first bond matrix No. OK, is the feature dimension of the key vector or query vector;
[0017] The time dimension attention weights are weighted and summed by the following formula to obtain the first output feature:
[0018] ,
[0019] in, is the first output feature, is the first value matrix OK;
[0020] The first output feature is nonlinearly mapped to a time series feature matrix by the following formula:
[0021] ,
[0022] in, is the time series feature matrix, , is the feature dimension after transformation, The function is a nonlinear activation function. is the linear mapping matrix, , is the bias vector, ;
[0023] The time series feature matrix is linearly mapped into a second query matrix, a second key matrix, and a second value matrix by the following formula:
[0024] ,
[0025] ,
[0026] ,
[0027] in, , , are all learnable linear mapping matrices, , , , is the second query matrix, is the second bond matrix, is the second value matrix;
[0028] The second query matrix, the second key matrix, and the second value matrix are processed by a normalized exponential function using the following formula to obtain the feature dimension attention weight:
[0029] ,
[0030] in, is the feature dimension attention weight, is the time step The query vector on the feature dimension of is the feature dimension The key vector of ;
[0031] The second multi-scale spatiotemporal feature is obtained by weighted summing the feature dimension attention weights through the following formula:
[0032] ,
[0033] in, is the second multi-scale spatiotemporal feature, is the total dimension of the feature, is the projected eigenvector.
[0034] In one embodiment of the present invention, the multi-scale spatiotemporal feature extraction module is used to extract the spatiotemporal features of the first preprocessed time series matrix at different scales to obtain the first multi-scale spatiotemporal features, including: performing a fast Fourier transform on the first preprocessed time series matrix to obtain a frequency domain time series matrix; reconstructing and initializing the frequency domain time series matrix to obtain a re-initialized frequency domain time series matrix; and using a two-dimensional convolutional network to extract the local spatiotemporal features of the re-initialized frequency domain time series matrix to obtain the first multi-scale spatiotemporal features.
[0035] In one embodiment of the present invention, the first preprocessing time series matrix is subjected to a fast Fourier transform by the following formula to obtain a frequency domain time series matrix:
[0036] ,
[0037] in, is the frequency domain timing matrix, , is the total number of time steps, is the feature dimension, The function is the fast Fourier transform function, is the first preprocessing timing matrix;
[0038] The following formula is used to extract the local spatiotemporal features of the re-initialized frequency domain time series matrix using a two-dimensional convolutional network to obtain the first multi-scale spatiotemporal features: :
[0039] ,
[0040] in, The function is a two-dimensional convolution function. is the re-initialized frequency domain timing matrix, .
[0041] In one embodiment of the present invention, before the first preprocessing timing matrix is input into the trained ground current prediction network model and the corresponding predicted ground current timing data is outputted using the ground current prediction network model, it also includes: obtaining training data, the training data including second historical ground current timing data, third historical ground current timing data and historical status categories, the second historical ground current timing data is the ground current timing data of the second historical time period, the third historical ground current timing data is the ground current timing data of the target time period after the second historical time period, and the historical status category is the device status category corresponding to the third historical ground current timing data; preprocessing the second historical ground current timing data to obtain a second preprocessing timing matrix; inputting the second preprocessing timing matrix into the pre-constructed ground current prediction network model to be trained to obtain a predicted training value; determining the predicted status category according to the predicted training value; obtaining the loss value of the training data using the loss function according to the third historical ground current timing data corresponding to the predicted training value and the historical status category corresponding to the predicted status category; judging whether the loss value meets the preset requirements, if so, the training of the ground current prediction network model is completed.
[0042] In one embodiment of the present invention, according to the third historical ground current time series data corresponding to the predicted training value and the historical state category corresponding to the predicted state category, using the loss function to obtain the loss value of the training data includes: calculating the prediction error loss according to the predicted training value and the third historical ground current time series data by the following formula:
[0043] ,
[0044] in, is the prediction error loss, is the sample size, is the third historical ground current time series data, is the predicted training value;
[0045] The classification loss is calculated according to the category probability distribution of the predicted state category and the category probability distribution of the historical state category by the following formula:
[0046] ,
[0047] in, is the classification loss, is the total number of categories, is the category probability distribution of the historical state category, is the category probability distribution of the predicted state category;
[0048] The prediction error loss and the classification loss are weighted and summed to calculate the loss value using the following formula:
[0049] ,
[0050] in, is the loss value, and are all weight parameters.
[0051] In one embodiment of the present invention, the first historical ground current timing data is preprocessed to obtain a first preprocessed timing matrix, including: locally time slicing the first historical ground current timing data to obtain multiple non-overlapping time slices; respectively calculating the mean and standard deviation of each of the time slices, and normalizing the mean and standard deviation of each of the time slices to obtain preprocessed timing data; integrating the preprocessed timing data according to different dimensions to obtain the first preprocessed timing matrix.
[0052] In one embodiment of the present invention, the first historical ground current time series data is locally time sliced to obtain non-overlapping time slices, expressed as:
[0053] ,
[0054] in, is the time slice, ; Each of the time slices contains time steps; the ground current timing data is , is the total number of time steps;
[0055] The mean of each time slice is calculated by the following formula: and standard deviation :
[0056] ,
[0057] ,
[0058] in, ;
[0059] The mean and standard deviation of each time slice are normalized by the following formula to obtain the preprocessed time series data: :
[0060] ,
[0061] in, A constant used to prevent division by zero errors.
[0062] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0063] The method for diagnosing faults of electric equipment based on multi-dimensional features and enhancing attention described in the present invention, in actual use, inputs the first historical ground current time series data obtained into the ground current prediction network model, and is processed by the multi-scale spatiotemporal feature extraction module, the two-stage attention mechanism module and the long short-term memory network module of the ground current prediction network model. Since the ground current prediction network model effectively combines the advantages of each module, it can significantly improve the accuracy of the prediction of the ground current time series data, and is particularly suitable for situations where there are complex spatiotemporal dependencies such as ground current, and outputs accurate predicted ground current time series data. Since the predicted ground current time series data is more accurate, when diagnosing electric equipment, first, the potential faults of the electric equipment can be discovered in advance, providing time for taking preventive measures; second, the faults can be quantified and it is convenient to make reasonable decisions based on the faults; finally, it can also effectively reduce the losses caused by equipment failures and ensure the stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work. In the drawings:
[0065] Figure 1 It is a flow chart of a method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention in a preferred embodiment of the present invention.
[0066] Figure 2It is a schematic diagram of the framework of the method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention in a preferred embodiment of the present invention.
[0067] Figure 3 It is a schematic diagram of the architecture of the ground current prediction network model in the preferred embodiment of the present invention. DETAILED DESCRIPTION
[0068] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0069] It should be noted that, in the current application scenarios of power systems, data prediction is mainly focused on power quality and power load. Common deep learning methods can be roughly divided into two categories: one is a model based on the Recurrent Neural Network (RNN) architecture, such as RNN, LSTM (Long Short-Term Memory) and its variants; the other is the Transformer model based on the encoder-decoder structure and its derivative versions. Although RNN and its variants have good performance in modeling the time dependency of time series data and can capture the potential laws in the time dimension, they often face problems such as gradient explosion or gradient disappearance in long-term series prediction, making it difficult to perform long-term prediction tasks. The Transformer model, relying on its self-attention mechanism, performs well in capturing long-term series dependencies and is widely used in long-term series prediction tasks. However, most of the current time series prediction models based on the attention mechanism rely on a single linear layer to fit the dependencies between multiple variables, and fail to fully capture the potential nonlinear relationships between variables, limiting the effect of multivariate time series prediction.
[0070] Although previous studies have attempted to improve the prediction accuracy of models by adding prior information containing variable relationships to time series prediction, these methods perform poorly when dealing with multivariate time series prediction tasks that lack explicit correlations between variables, especially in complex scenarios such as ground current prediction. In these tasks, the nonlinear and implicit dependencies between variables are difficult to model with simple prior information. In addition, many existing single prediction models have difficulty in simultaneously handling multiple subsequences with different volatilities, which limits the prediction performance of the models.
[0071] In order to solve the problem that the ground current in the prior art is difficult to accurately predict, which leads to the inability to determine the potential fault of the power equipment and the existence of safety hazards, refer to Figure 1 As shown, the present invention provides a method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention, comprising:
[0072] Obtain first historical ground current time series data. The first historical ground current time series data is the ground current time series data of the first historical time period. How to obtain the ground current time series data belongs to the prior art and will not be described in detail.
[0073] Preprocess the first historical ground current time series data to obtain a first preprocessed time series matrix. In the prior art, the methods for preprocessing time series data include outlier processing, missing value processing, etc. By preprocessing the first historical ground current time series data, the accuracy of the prediction result can be improved. Preferably, preprocessing is performed by Slicing Adaptive Normalization (SAN).
[0074] The first preprocessing time series matrix is input into the trained ground current prediction network model, and the ground current prediction network model is used to output corresponding predicted ground current time series data.
[0075] Among them, the predicted ground current time series data is the ground current time series data of the target time period after the first historical time period. After obtaining the predicted ground current time series data, the preset fault interval and the predicted ground current time series data are compared. If the predicted ground current time series data is in the preset fault interval, it can be determined that the power equipment has failed, and timely measures can be taken to prevent and eliminate potential faults and ensure the stable operation of the power system. Exemplarily, the preset fault interval is set to the ground current continuously exceeding 0.5A for a period of time.
[0076] The ground current prediction network model is trained based on a plurality of training data, wherein the training data includes ground current time series data.
[0077] The ground current prediction network model includes a multi-scale spatiotemporal feature extraction module, a two-stage attention mechanism module and a long short-term memory network module. Among them, the main goal of the multi-scale spatiotemporal feature extraction module is to capture the periodic changes and dynamic spatiotemporal features in the ground current data. The core idea of the multi-scale spatiotemporal feature extraction module is to transform the one-dimensional time series data into a two-dimensional spatiotemporal feature matrix, which is convenient for simultaneous feature extraction in the frequency domain and the spatial domain. The main goal of the two-stage attention mechanism module is to capture the multi-level dependencies in the ground current data by applying the attention mechanism in the time dimension and the feature dimension respectively. The two-stage attention mechanism module extracts the long-term dependencies between different time steps in the time series data through the multi-head self-attention mechanism (Temporal Attention) in the time dimension, and handles the complex correlations between features through the attention mechanism (Variable Attention) in the feature dimension, which helps to model the local and global dependencies of spatiotemporal features in multivariate time series data and further improve the prediction accuracy. The main goal of the long short-term memory network module is to capture the long-term dependency characteristics in the ground current data. The LSTM network module controls the inflow, storage and output of input information by designing input gates, forget gates and output gates, thereby effectively avoiding the problem of gradient vanishing in traditional RNNs. The uniqueness of the LSTM network module is that it can selectively remember historical information and filter out unnecessary information, which makes it very effective in processing data with long-term dependencies.
[0078] The loss function of the ground current prediction network model includes classification loss and prediction error loss, so as to reduce the impact of prediction error and classification error on the prediction and improve the accuracy of the prediction, so as to prevent and eliminate potential failures of power equipment.
[0079] The method for diagnosing faults of electric equipment based on multi-dimensional features and enhancing attention described in the present invention, in actual use, inputs the first historical ground current time series data obtained into the ground current prediction network model, and is processed by the multi-scale spatiotemporal feature extraction module, the two-stage attention mechanism module and the long short-term memory network module of the ground current prediction network model. Since the ground current prediction network model effectively combines the advantages of each module, it can significantly improve the accuracy of the prediction of the ground current time series data, and is particularly suitable for situations where there are complex spatiotemporal dependencies such as ground current, and outputs accurate predicted ground current time series data. Since the predicted ground current time series data is more accurate, when diagnosing electric equipment, first, the potential faults of the electric equipment can be discovered in advance, providing time for taking preventive measures; second, the faults can be quantified and it is convenient to make reasonable decisions based on the faults; finally, it can also effectively reduce the losses caused by equipment failures and ensure the stable operation of the power system.
[0080] It should be noted that ground current data is easily affected by external factors such as weather and temperature, and exhibits strong nonlinear and high-frequency noise characteristics. Such complex characteristics place extremely high demands on traditional prediction models, making it difficult to guarantee the accuracy and stability of predictions. When dealing with non-stationary data, traditional normalization methods often assume that the entire time series has the same statistical characteristics. This assumption is not completely true for actual power system ground current data.
[0081] To solve this problem, refer to Figure 2 As shown, the method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to the present invention, in some embodiments, preprocesses the first historical ground current time series data to obtain a first preprocessed time series matrix, including:
[0082] The first historical ground current time series data is locally time sliced to obtain a plurality of non-overlapping time slices. Perform local time slicing to obtain non-overlapping time slices .in, Each time slice Include time steps, , The first historical ground current time series data is sliced locally so that each time slice can be locally normalized later, thereby avoiding the prediction deviation caused by the difference in data distribution in different time periods in global normalization, and better capturing the change law of ground current in different periods.
[0083] Calculate each time slice separately The mean and standard deviation Specifically, the following formula is used to calculate each time slice: The mean :
[0084] .
[0085] Each time slice is calculated using the following formula Standard Deviation :
[0086] .
[0087] in, .
[0088] Then, the mean and standard deviation of each time slice are normalized to obtain the preprocessed time series data. Through this step, the stability and consistency of the ground current data are guaranteed, and the prediction performance of the model is further improved, so as to prevent and eliminate potential failures of power equipment and ensure the stable operation of the power system.
[0089] Specifically, the mean and standard deviation of each time slice are normalized using the following formula:
[0090] .
[0091] in, is a very small constant used to prevent division by zero errors.
[0092] Finally, preprocess the time series data Integrate according to different dimensions to obtain the first preprocessing time series matrix .in, is the total number of time steps, is the feature dimension, that is, the number of variables contained in each time step.
[0093] Preferably, on this basis, the size and position of the time slice are adjusted in real time according to the dynamic changes of the input first historical ground current time series data. Exemplarily, by introducing a sliding window mechanism, the window size is , each move time steps. For the data in each sliding window, the mean and standard deviation are calculated respectively, and the above normalization formula is used to standardize them. The design of the sliding window can be adjusted according to different prediction task requirements to better capture the local changes in ground current data. When facing time periods with different feature distributions and change patterns, the processing strategy can be adjusted more flexibly, thereby improving the robustness of the model to non-stationary data, so as to prevent and eliminate potential failures of power equipment and ensure the stable operation of the power system.
[0094] The power equipment fault diagnosis method based on multi-dimensional feature enhanced attention described in the present invention can effectively process non-stationary ground current data through adaptive normalization, reducing the prediction error caused by data fluctuations and changes in the external environment. It ensures that accurate prediction results can still be given when the ground current data fluctuates greatly or there are abnormal values, ensuring the accuracy and stability of the prediction results, and further improving the prediction performance of the model, so as to prevent and eliminate potential faults of power equipment and ensure the stable operation of the power system.
[0095] Reference Figure 2 and Figure 3As shown, the method for diagnosing faults of electric power equipment based on multi-dimensional feature enhanced attention of the present invention, in some embodiments, inputs the first preprocessing time series matrix into a trained ground current prediction network model, and uses the ground current prediction network model to output corresponding predicted ground current time series data, including:
[0096] First, the first preprocessed time series matrix is input into the multi-scale space-time feature extraction module, and the space-time features of the first preprocessed time series matrix at different scales are extracted through the multi-scale space-time feature extraction module to obtain the first multi-scale space-time feature. Among them, the main goal of the multi-scale space-time feature extraction module is to capture the periodic changes and dynamic space-time features in the ground current data. The core idea is to convert the one-dimensional time series data into a two-dimensional space-time feature matrix, which is convenient for simultaneous feature extraction in the frequency domain and the spatial domain.
[0097] Secondly, the first multi-scale spatiotemporal features are transmitted to the dual-stage attention mechanism module, which processes the first multi-scale spatiotemporal features, establishes high-order dependencies of the first multi-scale spatiotemporal features, and obtains the second multi-scale spatiotemporal features. Among them, the main goal of the dual-stage attention mechanism module is to capture the multi-level dependencies in the ground current data by applying the attention mechanism in the time dimension and the feature dimension respectively. The dual-stage attention mechanism module extracts the long-term dependencies between different time steps in the time series data through the multi-head self-attention mechanism (Temporal Attention) in the time dimension, and processes the complex correlations between features through the attention mechanism (Variable Attention) in the feature dimension, which helps to model the local and global dependencies of spatiotemporal features in multivariate time series data and further improve the prediction accuracy.
[0098] Finally, the second multi-scale spatiotemporal features are transmitted to the long short-term memory network module, and the second multi-scale spatiotemporal features are iterated through the long short-term memory network module to obtain the predicted ground current time series data. Among them, the main goal of the long short-term memory network module is to capture the long-term dependency characteristics in the ground current data. It controls the inflow, storage and output of input information by designing input gates, forget gates and output gates, thereby effectively avoiding the problem of gradient disappearance in traditional RNNs. The uniqueness of the long short-term memory network module is that it can selectively remember historical information and filter out unnecessary information, which makes it very effective when processing data with long-term dependencies.
[0099] The power equipment fault diagnosis method based on multi-dimensional feature enhanced attention and the ground current prediction network model of the present invention are designed for processing complex power system ground current time series data. The ground current prediction network model utilizes the advantages of the multi-scale spatiotemporal feature extraction module, the dual-stage attention mechanism module and the long short-term memory network module to process the periodic characteristics, cross-variable dependencies and long-term time dependencies in the data respectively, and gradually extracts and processes features, thereby achieving more accurate and efficient short-term and long-term predictions.
[0100] Further, see Figure 2 and Figure 3 As shown, the power equipment fault diagnosis method based on multi-dimensional feature enhanced attention of the present invention, in some embodiments, inputs the first pre-processed time series matrix into the multi-scale spatio-temporal feature extraction module, extracts the spatio-temporal features of the first pre-processed time series matrix at different scales through the multi-scale spatio-temporal feature extraction module, and obtains the first multi-scale spatio-temporal features, including:
[0101] First, the first preprocessing time series matrix Perform fast Fourier transform to obtain the frequency domain time series matrix Specifically, the fast Fourier transform is performed using the following formula:
[0102] ,
[0103] in, , is the total number of time steps, is the feature dimension. The function is a fast Fourier transform function. By performing fast Fourier transform on the first preprocessed time series matrix and converting the data from the time domain to the frequency domain, the periodic characteristics in the grounding current can be revealed, and the efficient frequency domain decoupling in the original time series data can be performed.
[0104] Secondly, the frequency domain time series matrix is reconstructed and initialized to obtain a re-initialized frequency domain time series matrix. Specifically, the frequency domain time series matrix is normalized to reduce the impact of noise interference while maintaining important frequency domain features. Preferably, it also includes adjustment of feature dimensions and initialization of weight parameters to ensure rapid convergence of the model in subsequent convolution operations.
[0105] Finally, a two-dimensional convolutional network (2D-CNN) is used to extract the initial frequency domain timing matrix. The local spatiotemporal features of the first multi-scale spatiotemporal features are obtained Specifically, the extraction is performed using the following formula:
[0106] ,
[0107] in, , is the total number of time steps, is the feature dimension, is the number of convolution kernels; The function is a two-dimensional convolution function. The two-dimensional convolution network can extract local spatiotemporal features based on frequency domain features, including the changes of ground current at different time and space scales. This design effectively realizes the multi-level extraction of spatiotemporal features to address the complex coupling effect of ground current between different grounding points and the high-frequency noise problem of time series data. It can not only identify the significant periodicity of ground current, but also extract more comprehensive spatiotemporal features, providing richer input for the subsequent attention mechanism.
[0108] The electric power equipment fault diagnosis method based on multi-dimensional feature enhanced attention described in the present invention, the multi-scale spatiotemporal feature extraction module combines fast Fourier transform (FFT) and two-dimensional convolutional neural network (2D-CNN). The module can identify the periodic characteristics of grounding current at different time scales and spatial scales, and generate multi-dimensional feature expressions, and can better cope with the nonlinear fluctuations and spatiotemporal coupling complexity problems existing in grounding current prediction, thereby improving the accuracy and stability of the prediction and improving the adaptability to variable data.
[0109] Further, see Figure 2 and Figure 3 As shown, the method for diagnosing faults of electric power equipment based on multidimensional feature enhanced attention of the present invention, in some embodiments, processes the first multi-scale spatiotemporal features through a dual-stage attention mechanism module, establishes the high-order dependency of the first multi-scale spatiotemporal features, and obtains the second multi-scale spatiotemporal features, including:
[0110] First, a multi-head self-attention mechanism is applied in the time dimension to extract the long-term dependencies between different time steps in the time series data. Specifically, first, the first multi-scale spatiotemporal features are linearly mapped into the first query matrix, the first key matrix, and the first value matrix, which are expressed as:
[0111] ,
[0112] ,
[0113] ,
[0114] in, is the first multi-scale spatiotemporal feature, , is the total number of time steps, is the feature dimension, is the number of convolution kernels. , , are all learnable linear mapping matrices, , , .
[0115] Secondly, the attention score in the time dimension is calculated. Specifically, the first query matrix, the first key matrix and the first value matrix are processed using the normalized exponential function to obtain the attention weight in the time dimension. Specifically, it is:
[0116] ,
[0117] in, is the time step For other time steps The time dimension attention weight, . is the number of non-overlapping time slices during preprocessing, The function is a normalized exponential function. is the first query matrix No. OK, is the first bond matrix No. OK, is the feature dimension of the key vector or query vector, used to scale the attention score.
[0118] Finally, the time dimension attention weights are weighted and summed to obtain the first output feature . Specifically:
[0119] ,
[0120] in, is the first value matrix OK.
[0121] Secondly, the attention mechanism on the feature dimension is used to handle the complex correlation between features, which helps to model the local and global dependencies of spatiotemporal features in multivariate time series data and improve the accuracy of prediction. Specifically, first, the first output feature is nonlinearly mapped to a time series feature matrix. Specifically, it is:
[0122] ,
[0123] in, is the time series feature matrix, , is the feature dimension after transformation. The function is a nonlinear activation function, which is used to enhance the feature expression ability. is the linear mapping matrix, , is the bias vector, .
[0124] Secondly, the time series feature matrix Linear mapping to the second query matrix , the second key matrix and the second value matrix Specifically, it is:
[0125] ,
[0126] ,
[0127] ,
[0128] in, , , are all learnable linear mapping matrices, , , .
[0129] Next, the normalized exponential function is used to process the second query matrix, the second key matrix, and the second value matrix to obtain the feature dimension attention weights. Specifically, it is:
[0130] ,
[0131] in, is the feature dimension attention weight, is the time step The query vector on the feature dimension of is the feature dimension The key vector of .
[0132] Finally, the feature dimension attention weights are weighted and summed to obtain the second multi-scale spatiotemporal features. Specifically,
[0133] ,
[0134] in, is the second multi-scale spatiotemporal feature, is the total dimension of the feature, is the projected eigenvector.
[0135] Further, see Figure 2 and Figure 3 As shown, in the method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention described in the present invention, in some embodiments, the long short-term memory network module performs calculations through the following steps.
[0136] Forget gate calculation: The forget gate determines the information that needs to be discarded in the current state. Given the hidden state of the previous step and the current input , the calculation of the forget gate is:
[0137] ,
[0138] in, is the weight matrix of the forget gate, is the bias term, and σ is the sigmoid activation function. Equal to the second multi-scale spatiotemporal feature output by the two-stage attention mechanism module in the previous stage .
[0139] Input gate calculation: The input gate determines the new information that needs to be remembered at the current time step. The calculation of the input gate is:
[0140]
[0141]
[0142] in, is the output of the input gate, which represents the weight of the new information that needs to be remembered at the current time step. is the weight matrix of the input gate, which is used to transform the hidden state and the current input Projected to the output of the input gate. is the bias vector of the input gate, which is used to adjust the output of the input gate. is the state of the memory unit, indicating the memory content of the current time step, is the bias vector used for candidate memory cell calculation.
[0143] Memory cell update: Update the memory cell by combining the output of the forget gate and the output of the input gate :
[0144]
[0145] Output gate calculation: The output gate controls the information output of the current memory unit. The calculation of the output gate is:
[0146]
[0147]
[0148] in, is the output of the output gate, which controls which parts of the current memory unit need to be output. is the weight matrix of the output gate, is the bias vector of the output gate, As the hidden state of the current time step is passed to the next time step, the iteration of LSTM will terminate after the time series is traversed. At this time, you can choose to use the last hidden state As a feature representation of the entire sequence.
[0149] Reference Figure 2 and Figure 3 As shown, the method for diagnosing faults of electric power equipment based on multi-dimensional feature enhanced attention of the present invention, in some embodiments, inputting the first preprocessing time series matrix into the trained ground current prediction network model, and using the ground current prediction network model to output the corresponding predicted ground current time series data, further includes:
[0150] Acquire training data. The training data includes the second historical ground current time series data, the third historical ground current time series data, and the historical status category. The second historical ground current time series data is the ground current time series data of the second historical time period. The third historical ground current time series data is the ground current time series data of the target time period after the second historical time period. The historical status category is the device status category corresponding to the third historical ground current time series data, and the device status category includes fault and normal.
[0151] The second historical ground current time series data is preprocessed to obtain a second preprocessed time series matrix. This step is similar to the processing method of the first historical ground current time series data, and will not be described in detail.
[0152] The second preprocessing time sequence matrix is input into the pre-built ground current prediction network model to be trained to obtain the predicted training value. This step is similar to the processing method of the first preprocessing time sequence matrix and will not be described in detail.
[0153] The predicted state category is determined according to the predicted training value. Exemplarily, the corresponding power equipment is determined to be normal or faulty.
[0154] The loss value of the training data is obtained by using a loss function according to the third historical ground current time series data corresponding to the predicted training value and the historical state category corresponding to the predicted state category.
[0155] Specifically, first, the prediction error loss is calculated based on the prediction training value and the third historical ground current time series data. It is expressed as:
[0156] ,
[0157] in, is the prediction error loss, is the sample size, is the third historical ground current time series data, is the predicted training value.
[0158] Secondly, the classification loss is calculated based on the category probability distribution of the predicted state category and the category probability distribution of the historical state category. It is expressed as:
[0159] ,
[0160] in, is the classification loss, is the total number of categories, is the category probability distribution of the historical state category, is the category probability distribution of the predicted state category.
[0161] Finally, the prediction error loss and classification loss are weighted and summed to calculate the loss value. It is expressed as:
[0162] ,
[0163] in, is the loss value, and are all weight parameters. and Those skilled in the art can adjust according to actual application requirements. For example, if a balance between the two is required, and Set them to 0.5 respectively.
[0164] Determine whether the loss value meets the preset requirements. If so, the ground current prediction network model training is completed. If not, readjust the model training data or optimize the model structure, and continue training by increasing the training rounds, expanding the data set, resetting the loss function weight, etc. until the loss value meets the preset requirements.
[0165] It should be noted that the term "including" and its variations used in the embodiments of the present invention are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present invention are illustrative and not restrictive. Those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more".
[0166] The various steps described in the method implementation methods provided by the embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.
[0167] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments refer to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.
[0168] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the attached claims.
Claims
1. A method for fault diagnosis of electric power equipment based on multi-dimensional features to enhance attention, characterized in that: include: Acquire first historical grounding current time series data; wherein the first historical grounding current time series data is the grounding current time series data of a first historical time period; Preprocessing the first historical ground current time series data to obtain a first preprocessing time series matrix; The first preprocessing time series matrix is input into the trained ground current prediction network model, and the ground current prediction network model is used to output the corresponding predicted ground current time series data; wherein the predicted ground current time series data is the ground current time series data of the target time period after the first historical time period; the ground current prediction network model is trained based on a plurality of training data, and the training data includes the ground current time series data; the ground current prediction network model includes a multi-scale spatiotemporal feature extraction module, a dual-stage attention mechanism module and a long short-term memory network module, and the loss function of the ground current prediction network model includes classification loss and prediction error loss; The preset fault interval is compared with the predicted ground current time series data, and if the predicted ground current time series data is in the preset fault interval, it is determined that the power equipment has a fault.
2. The method for diagnosing faults of electric power equipment based on multidimensional features to enhance attention according to claim 1 is characterized in that: Inputting the first preprocessing time series matrix into a trained ground current prediction network model, and using the ground current prediction network model to output corresponding predicted ground current time series data, includes: Inputting the first preprocessed time series matrix into the multi-scale spatiotemporal feature extraction module, extracting the spatiotemporal features of the first preprocessed time series matrix at different scales through the multi-scale spatiotemporal feature extraction module, and obtaining a first multi-scale spatiotemporal feature; Transmitting the first multi-scale spatiotemporal feature to the dual-stage attention mechanism module, processing the first multi-scale spatiotemporal feature through the dual-stage attention mechanism module, establishing a high-order dependency of the first multi-scale spatiotemporal feature, and obtaining a second multi-scale spatiotemporal feature; The second multi-scale spatiotemporal feature is transmitted to the long short-term memory network module, and the second multi-scale spatiotemporal feature is iterated by the long short-term memory network module to obtain the predicted ground current time series data.
3. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 2 is characterized in that: Processing the first multi-scale spatiotemporal features through the dual-stage attention mechanism module, establishing a high-order dependency of the first multi-scale spatiotemporal features, and obtaining a second multi-scale spatiotemporal features, including: Linearly mapping the first multi-scale spatiotemporal features into a first query matrix, a first key matrix, and a first value matrix; Processing the first query matrix, the first key matrix, and the first value matrix using a normalized exponential function to obtain a time dimension attention weight; Performing weighted summation on the time dimension attention weights to obtain a first output feature; Non-linearly mapping the first output feature into a time series feature matrix, and linearly mapping the time series feature matrix into a second query matrix, a second key matrix, and a second value matrix; Processing the second query matrix, the second key matrix, and the second value matrix using a normalized exponential function to obtain feature dimension attention weights; The attention weights of the feature dimensions are weighted summed to obtain the second multi-scale spatiotemporal feature.
4. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 3 is characterized in that: The first multi-scale spatiotemporal features are linearly mapped into a first query matrix, a first key matrix, and a first value matrix by the following formula: , , , in, is the first multi-scale spatiotemporal feature, , is the total number of time steps, is the feature dimension, is the number of convolution kernels, , , are all learnable linear mapping matrices, , , , is the first query matrix, is the first bond matrix, is the first value matrix; The time dimension attention weight is obtained by processing the first query matrix, the first key matrix and the first value matrix using a normalized exponential function through the following formula: , in, is the time step For other time steps The time dimension attention weight, ; is the number of non-overlapping time slices during preprocessing, Function is the normalized exponential function, The first query matrix No. OK, The first bond matrix No. OK, is the feature dimension of the key vector or query vector; The time dimension attention weights are weighted and summed by the following formula to obtain the first output feature: , in, is the first output feature, is the first value matrix OK; The first output feature is nonlinearly mapped to a time series feature matrix by the following formula: , in, is the time series feature matrix, , is the feature dimension after transformation, The function is a nonlinear activation function. is the linear mapping matrix, , is the bias vector, ; The time series feature matrix is linearly mapped into a second query matrix, a second key matrix, and a second value matrix by the following formula: , , , in, , , are all learnable linear mapping matrices, , , , is the second query matrix, is the second bond matrix, is the second value matrix; The second query matrix, the second key matrix, and the second value matrix are processed by a normalized exponential function using the following formula to obtain the feature dimension attention weight: , in, is the feature dimension attention weight, is the time step The query vector on the feature dimension of is the feature dimension The key vector of ; The second multi-scale spatiotemporal feature is obtained by weighted summing the feature dimension attention weights through the following formula: , in, is the second multi-scale spatiotemporal feature, is the total dimension of the feature, is the projected eigenvector.
5. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 2, characterized in that: Extracting the spatiotemporal features of the first preprocessed time series matrix at different scales through the multi-scale spatiotemporal feature extraction module to obtain a first multi-scale spatiotemporal feature includes: Performing a fast Fourier transform on the first preprocessing time series matrix to obtain a frequency domain time series matrix; Reconstructing and initializing the frequency domain timing matrix to obtain a re-initialized frequency domain timing matrix; A two-dimensional convolutional network is used to extract local spatiotemporal features of the re-initialized frequency domain time series matrix to obtain the first multi-scale spatiotemporal features.
6. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 5 is characterized in that: The first preprocessing time series matrix is subjected to fast Fourier transform by the following formula to obtain a frequency domain time series matrix: , in, is the frequency domain timing matrix, , is the total number of time steps, is the feature dimension, The function is the fast Fourier transform function, is the first preprocessing timing matrix; The following formula is used to extract the local spatiotemporal features of the re-initialized frequency domain time series matrix using a two-dimensional convolutional network to obtain the first multi-scale spatiotemporal features: : , in, The function is a two-dimensional convolution function. is the re-initialized frequency domain timing matrix, .
7. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 1, characterized in that: Before inputting the first preprocessing time series matrix into a trained ground current prediction network model and using the ground current prediction network model to output corresponding predicted ground current time series data, the method further includes: Acquire training data, wherein the training data includes second historical grounding current time series data, third historical grounding current time series data, and historical status categories, wherein the second historical grounding current time series data is the grounding current time series data of the second historical time period, the third historical grounding current time series data is the grounding current time series data of the target time period after the second historical time period, and the historical status category is the device status category corresponding to the third historical grounding current time series data; Preprocessing the second historical ground current time series data to obtain a second preprocessing time series matrix; Inputting the second preprocessing time series matrix into a pre-built ground current prediction network model to be trained to obtain a prediction training value; Determining a prediction state category according to the prediction training value; According to the third historical ground current time series data corresponding to the predicted training value and the historical state category corresponding to the predicted state category, using the loss function to obtain the loss value of the training data; It is determined whether the loss value meets the preset requirements. If so, the ground current prediction network model training is completed.
8. The method for diagnosing faults of electric power equipment based on multi-dimensional features and enhancing attention according to claim 7 is characterized in that: According to the third historical ground current time series data corresponding to the predicted training value and the historical state category corresponding to the predicted state category, using the loss function to obtain the loss value of the training data includes: The prediction error loss is calculated according to the prediction training value and the third historical ground current time series data by the following formula: , in, is the prediction error loss, is the sample size, is the third historical ground current time series data, is the predicted training value; The classification loss is calculated according to the category probability distribution of the predicted state category and the category probability distribution of the historical state category by the following formula: , in, is the classification loss, is the total number of categories, is the category probability distribution of the historical state category, is the category probability distribution of the predicted state category; The prediction error loss and the classification loss are weighted and summed to calculate the loss value using the following formula: , in, is the loss value, and are all weight parameters.
9. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 1, characterized in that: Preprocessing the first historical ground current time series data to obtain a first preprocessing time series matrix includes: Performing local time slicing on the first historical ground current time series data to obtain a plurality of non-overlapping time slices; The mean and standard deviation of each time slice are calculated respectively, and the mean and standard deviation of each time slice are normalized to obtain preprocessed time series data; The preprocessed time series data are integrated according to different dimensions to obtain the first preprocessed time series matrix.
10. The method for diagnosing faults of electric power equipment based on multi-dimensional features to enhance attention according to claim 9, characterized in that: The first historical ground current time series data is sliced locally to obtain non-overlapping time slices, expressed as: , in, is the time slice, ; Each of the time slices contains time steps; the ground current timing data is , is the total number of time steps; The mean of each time slice is calculated by the following formula: and standard deviation : , , in, ; The mean and standard deviation of each time slice are normalized by the following formula to obtain the preprocessed time series data: : , in, A constant used to prevent division by zero errors.
Citation Information
Patent Citations
Method for predicting product quality of industrial nonlinear dynamic process by using long-short-term memory network based on space and time attention
CN110705692A
Wind driven generator fault diagnosis method based on multi-scale space-time convolution deep belief network
CN111426950A
Facial expression recognition method based on multi-scale feature extraction and multi-attention mechanism modeling
CN113420703A
Probability-oriented power load prediction method based on graph convolutional network model
CN116960991A
Satellite sequence image moving small target detection method based on space-time fusion
CN117351189A
Cited By
Intelligent arc detection and power failure early warning method and system
CN120044368A
Fault diagnosis method and system for networking type energy storage system based on multi-modal characteristics
CN120180105A
Turbine high control valve fault detection method based on improved attention mechanism
CN120654149A
Turbine high throttle fault detection method based on improved attention mechanism
CN120654149B