A power grid fault diagnosis method based on time constraints and improved Time-ConvNeXt network
By using a time-constrained and improved Time-ConvNeXt network approach, the problem of insufficient fusion of time-series features in power grid fault diagnosis is solved, achieving efficient and accurate power grid fault diagnosis and improving power grid operation efficiency and reliability.
Patent Information
- Application Number
- CN202510240808.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-03-03
AI Technical Summary
Existing power grid fault diagnosis methods rely on human experience, resulting in slow diagnosis speed, difficulty in handling complex multi-fault scenarios, insufficient exploitation of spatiotemporal correlation features in alarm information, and lack of efficient fusion capability of existing deep learning models, thus limiting diagnostic accuracy and robustness.
A time-constrained and improved Time-ConvNeXt network-based approach is adopted. By generating an alarm event encoding matrix and introducing time decay weights, a recurrent temporal attention module is added, and depthwise separable convolution and GELU activation function are combined to achieve efficient fusion of temporal features.
It improves the efficiency and accuracy of power grid fault diagnosis, reduces the single diagnosis time to the millisecond level, increases the accuracy rate by 11.2%, and increases the F1 value to 95.2%. It also reduces the reliance on expert knowledge and improves the objectivity and consistency of diagnostic results.
Smart Images

Figure CN120177932B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid fault diagnosis technology for smart grids, and particularly to a power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network. Background Technology
[0002] With the rapid development of smart grids, the demand for accuracy and real-time performance in grid fault diagnosis is increasing. Traditional fault diagnosis methods mainly rely on expert systems and fuzzy Petri nets, which suffer from problems such as dependence on human experience, slow diagnosis speed, and difficulty in handling complex multi-fault scenarios. In addition, existing methods do not make sufficient use of time-series information, resulting in limited diagnostic accuracy and robustness when facing dynamically changing grid faults.
[0003] Current power grid fault diagnosis models are typically based on electrical and switching quantity data, but they do not fully exploit the spatiotemporal correlation features in alarm information. For example, alarm data provided by SCADA systems contains a large amount of redundant information, and traditional methods struggle to effectively filter out interference, and they do not incorporate the temporal constraints of historical fault events into the model design. In recent years, although deep learning technologies (such as convolutional neural networks) have been introduced into the field of fault diagnosis, existing models still lack the ability to efficiently fuse temporal features, limiting their application in real-time diagnosis.
[0004] Therefore, how to provide a power grid fault diagnosis method based on time constraints and improved Time-ConvNeXt network that can achieve efficient fusion of time-series characteristics in the power grid fault diagnosis process and further improve the efficiency and accuracy of power grid fault diagnosis is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention proposes a power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network includes:
[0008] Step 1: Extract and filter key features from power grid fault alarm texts, generate alarm event coding matrix, and introduce exponential decay weights that decay over time to obtain time coding matrix;
[0009] Step 2: Add a recurrent temporal attention module to the ConvNeXt network to obtain an improved Time-ConvNeXt network, and input the time encoding matrix to train the end-to-end power grid fault diagnosis model and extract spatiotemporal features;
[0010] Step 3: Input the test set into the trained power grid fault diagnosis model, and the fully connected layer outputs the probability of power grid fault type.
[0011] Optionally, in step 1, key features in the power grid fault alarm text are extracted and filtered based on the maximum correlation and minimum redundancy criterion.
[0012] Optionally, the alarm event encoding matrix generated in step 1 is as follows:
[0013]
[0014] Among them, D A For alarm event coding matrix; a ij The encoding value of the feature in the i-th row and j-th column of the alarm event, with priority decreasing from top left to bottom right.
[0015] Optionally, in step 1, the exponentially decaying weights that decay over time are as follows:
[0016] w decay (t)=e -αt ;
[0017] t=|T current -T past |;
[0018] Among them, T past Timestamps for historical alarm events; T current t is the timestamp of the current alarm event; t is the time difference between the historical alarm events and the current alarm event; w decay (t) represents the weight of historical alarm events; α is the decay factor, used to control the degree of influence of time difference on the weight.
[0019] Optionally, in step 1, the time encoding matrix is as follows:
[0020]
[0021] Among them, D A (t) is the time encoding matrix; a ij The encoding value of the feature in the i-th row and j-th column of the alarm event, with priority decreasing from top left to bottom right; w decay (t) represents the weight of historical alarm events.
[0022] Optionally, in step 2, a recurrent temporal attention module is added to the ConvNeXt network, specifically as follows:
[0023] Channel attention weights are allocated through global flat pooling and fully connected layers, specifically as follows:
[0024] The input features are processed by global average pooling to obtain a reduced spatial dimension feature representation, which is used to further extract channel-level features. This is then transformed by a fully connected layer to obtain the attention weights for each channel, as follows:
[0025] W ds =FC(GAP(F));
[0026] Among them, W ds Here, F represents the attention weights for each channel; GAP is the global average pooling operation, which yields the global average value for each channel; FC is a fully connected layer used to convert the global average value into the attention weights for each channel.
[0027] The residual mechanism is used to iteratively update the features, specifically as follows:
[0028] The attention weights are multiplied by the input features and then added to the original input features to achieve a residual connection. This process is repeated R times, as follows:
[0029] F ds =F+F⊙W ds ;
[0030] F ds =update(F) i ,for i∈R;
[0031] Among them, F ds represents the updated feature tensor; ⊙ represents element-wise multiplication; update represents the iterative update operation.
[0032] Optionally, in step 2, the Time-ConvNeXt network is improved by including: depthwise separable convolution, layer normalization, and the GELU activation function.
[0033] Optionally, depthwise separable convolution decomposes standard convolution into pointwise convolution and depthwise convolution.
[0034] Optional GELU activation function, as follows:
[0035]
[0036] Where GELU(x) is the output of the GELU activation function; x is the input of the GELU activation function; and tanh is the hyperbolic tangent function.
[0037] Optionally, it also includes using cross-entropy as the loss function for the power grid fault diagnosis model.
[0038] As can be seen from the above technical solutions, compared with the prior art, this invention proposes a power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network. By introducing time decay weights and time difference features, the encoding matrix is expanded to fuse the time dependencies of historical fault events. Furthermore, a recurrent temporal attention module (RSE) is added to the ConvNeXt network to enhance the model's ability to capture temporal fault features, achieving efficient fusion of temporal features in the power grid fault diagnosis process, and further improving the efficiency and accuracy of power grid fault diagnosis. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0040] Figure 1 Schematic diagram of the method of the present invention.
[0041] Figure 2 This is a schematic diagram of the improved Time-ConvNeXt network structure of the present invention. Detailed Implementation
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] Example 1:
[0044] Embodiment 1 of this invention discloses a power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network, such as... Figure 1 Shown, including:
[0045] Step 1: Extract and filter key features from power grid fault alarm texts, generate an alarm event coding matrix, and introduce an exponential decay weight that decays over time to obtain a time coding matrix.
[0046] The power grid fault alarm text is obtained from the SCADA system, and the power grid fault alarm text is standardized before key feature extraction.
[0047] Based on the maximum correlation minimum redundancy criterion (mRMR), key features in power grid fault alarm texts are extracted and filtered.
[0048] The generated alarm event encoding matrix is as follows:
[0049]
[0050] Among them, D A For alarm event coding matrix; a ij The encoding value of the feature in the i-th row and j-th column of the alarm event, with priority decreasing from top left to bottom right.
[0051] To reduce the impact of historical events on current events over time, the weights of historical events in the encoding matrix are adjusted by introducing exponentially decaying weights that decay over time, as follows:
[0052] w decay (t)=e -αt ;
[0053] t=|T current -T past |;
[0054] Among them, T past Timestamps for historical alarm events; T current t is the timestamp of the current alarm event; t is the time difference between the historical alarm events and the current alarm event; w decay (t) represents the weight of historical alarm events; α is the decay factor, used to control the degree of influence of time difference on the weight.
[0055] The time encoding matrix is as follows:
[0056]
[0057] Among them, D A (t) is the time encoding matrix; a ij The encoding value of the feature in the i-th row and j-th column of the alarm event, with priority decreasing from top left to bottom right; w decay (t) represents the weight of historical alarm events.
[0058] Step 2: Add a recurrent temporal attention module (RSE) to the ConvNeXt network to obtain an improved Time-ConvNeXt network, and input the time encoding matrix to train the end-to-end power grid fault diagnosis model and extract spatiotemporal features.
[0059] Improve the Time-ConvNeXt network structure, such as Figure 2 As shown.
[0060] A recurrent temporal attention module is added to the ConvNeXt network, specifically as follows:
[0061] Channel attention weights are allocated through Global Flat Pooling (GAP) and Fully Connected Layer (FC), specifically as follows:
[0062] The input features are processed by global average pooling to obtain a reduced spatial dimension feature representation, which is used to further extract channel-level features. This is then transformed by a fully connected layer to obtain the attention weights for each channel, as follows:
[0063] W ds =FC(GAP(F));
[0064] Among them, W ds Here, F represents the attention weights for each channel; GAP is the global average pooling operation, which yields the global average value for each channel; FC is a fully connected layer used to convert the global average value into the attention weights for each channel.
[0065] Employing a residual mechanism for iterative feature updates effectively enhances the ability to capture temporal dependencies. Furthermore, the residual connection design not only alleviates the vanishing gradient problem but also effectively combines the original input information with attention-weighted features, enhancing the model's ability to transfer and learn features. The residual mechanism for iterative feature updates is specifically as follows:
[0066] The attention weights are multiplied by the input features and then added to the original input features to achieve a residual connection. This process is repeated R times, as follows:
[0067] F ds =F+F⊙W ds ;
[0068] F ds =update(F) i ,for i∈R;
[0069] Among them, F ds represents the updated feature tensor; ⊙ represents element-wise multiplication; update represents the iterative update operation. Repeating the update process R times enhances the understanding of faults at different time points and the ability to express the relationship between features and time. Furthermore, the iterative mechanism allows the model to process temporal information multiple times, thereby better capturing long-term dependencies.
[0070] Improvements to the Time-ConvNeXt network include: depthwise separable convolutions, layer normalization (LayerNorm), and the GELU activation function.
[0071] Depthwise separable convolution is an important component of the ConvNeXt network. It decomposes standard convolution into pointwise convolution (1×1 convolution) and depthwise convolution (3×3 convolution), reducing computational cost and improving network efficiency. Depthwise separable convolution can effectively extract both local and global information from features.
[0072] After depthwise separable convolution, the features are normalized using LayerNorm. LayerNorm stabilizes the model's training process, mitigates internal covariate shift issues, and improves the model's robustness and convergence speed.
[0073] Finally, the GELU activation function is used as the non-linear activation unit. The GELU activation function is a smooth activation function. The GELU activation function is as follows:
[0074]
[0075] Where GELU(x) is the output of the GELU activation function; x is the input of the GELU activation function; and tanh is the hyperbolic tangent function.
[0076] Step 3: Input the test set into the trained power grid fault diagnosis model, and the fully connected layer outputs the probability of power grid fault type.
[0077] It also includes using cross-entropy as the loss function for power grid fault diagnosis models.
[0078] This invention discloses a power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network. In terms of accuracy, the time-constrained encoding matrix used in this invention enhances the model's adaptability to dynamic faults by quantifying the temporal correlation of historical events. The RSE module captures long-term temporal dependencies through a recurrent attention mechanism, improving the discrimination accuracy of complex fault scenarios. This results in an accuracy (ACC) of 97.7% on the test set, an improvement of 11.2% compared to the traditional ResNet. Regarding real-time performance, the end-to-end design reduces intermediate processing steps, shortening the single diagnosis time to the millisecond level, meeting the real-time fault diagnosis requirements of modern smart grids and significantly improving the operating efficiency and reliability of the power grid. In terms of robustness, the time decay mechanism used in this invention effectively suppresses redundant alarm interference, increasing the F1 score to 95.2%. This indicates that the invention maintains high diagnostic accuracy and stability when handling complex multi-fault scenarios, significantly improving the model's robustness. Regarding reliance on expert knowledge, this invention reduces reliance on expert knowledge by automatically extracting features and temporal dependencies, reducing subjective errors in the diagnosis process and improving the objectivity and consistency of the diagnostic results. In terms of feature extraction, the improved Time-ConvNeXt network used in this invention combines depthwise separable convolution and cyclic temporal attention modules to achieve efficient spatiotemporal feature extraction. This enables the model to quickly and accurately identify fault types when processing large-scale power grid data, significantly improving diagnostic efficiency.
[0079] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0080] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network, characterized in that, include: Step 1: Extract and filter key features from power grid fault alarm texts, generate alarm event coding matrix, and introduce exponential decay weights that decay over time to obtain time coding matrix; Step 2: Add a recurrent temporal attention module to the ConvNeXt network to obtain an improved Time-ConvNeXt network, and input the time encoding matrix to train the end-to-end power grid fault diagnosis model and extract spatiotemporal features; Step 3: Input the test set into the trained power grid fault diagnosis model, and the fully connected layer outputs the probability of power grid fault type; In step 1, the exponentially decaying weight that decays over time is as follows: in, Timestamps for historical alarm events; The timestamp of the current alarm event; The time difference between historical alarm events and the current alarm event; Weights for historical alarm events; This is a decay factor used to control the degree of influence of the time difference on the weight; In step 2, a recurrent temporal attention module is added to the ConvNeXt network, specifically as follows: Channel attention weights are distributed through global average pooling and fully connected layers, specifically as follows: The input features are processed by global average pooling to obtain a reduced spatial dimension feature representation, which is used to further extract channel-level features. This is then transformed by a fully connected layer to obtain the attention weights for each channel, as follows: in, The attention weights for each channel; A tensor for the input features; This is a global average pooling operation, which yields the global average value for each channel; It is a fully connected layer used to convert the global average value into attention weights for each channel; The residual mechanism is used to iteratively update the features, specifically as follows: The attention weights are multiplied by the input features and then added to the original input features to achieve a residual connection. This process is repeated R times, as follows: in, For the updated feature tensor; For element-wise multiplication; This is a cyclical update operation.
2. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 1, characterized in that, In step 1, key features in power grid fault alarm texts are extracted and screened based on the maximum correlation and minimum redundancy criterion.
3. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 1, characterized in that, In step 1, the generated alarm event encoding matrix is as follows: in, An alarm event encoding matrix; The first alarm incident Line 1 The coded values of column features have decreasing priority from top left to bottom right.
4. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 1, characterized in that, In step 1, the time encoding matrix is as follows: in, This is the time encoding matrix; The first alarm incident Line 1 The coded values of column features have decreasing priority from top left to bottom right; Weighting of historical alarm events.
5. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 1, characterized in that, In step 2, the Time-ConvNeXt network is improved by including depthwise separable convolution, layer normalization, and the GELU activation function.
6. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 5, characterized in that, The depthwise separable convolution is to decompose the standard convolution into pointwise convolution and depthwise convolution.
7. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 5, characterized in that, The GELU activation function is as follows: in, The output of the GELU activation function; This is the input to the GELU activation function; It is the hyperbolic tangent function.
8. The power grid fault diagnosis method based on time constraints and an improved Time-ConvNeXt network according to claim 1, characterized in that, Also includes: Cross-entropy is used as the loss function in the power grid fault diagnosis model.
Citation Information
Patent Citations
CNN (Convolutional neural network) based early-stage fault classification method and device of power distribution network
CN109444667A
Power distribution network fault diagnosis and positioning method based on super-resolution and graph neural network
CN114779015A