Power transmission line fault identification method based on improved attention weight
By improving the attention weighting method, the problems of unreasonable feature weight allocation and overly strong feature independence assumptions in transmission line fault identification are solved, achieving accurate identification and improved interpretability of transmission line faults, and providing scientific fault diagnosis support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIYANG BUREAU OF CHINA SOUTHERN POWER GRID CO LTD EHV TRANSMISSION CO
- Filing Date
- 2025-12-09
- Publication Date
- 2026-05-05
AI Technical Summary
In existing transmission line fault identification technologies, unreasonable feature weight allocation and overly strong assumptions about feature independence limit classification accuracy and make it difficult to meet the higher requirements of modern smart grids for fault diagnosis.
An improved attention weighting method is adopted, which learns the feature weights of feature vectors through the attention mechanism, introduces regularization constraints on feature weight distribution, identifies feature interaction combinations, and constructs a classification module that integrates feature interaction combinations and interaction weights. A joint optimization objective is established, and a gradient optimization algorithm is used for end-to-end training to output the fault probability distribution.
It enables accurate identification of four types of faults: lightning strikes, wind deflection, tree obstruction, and wildfires, improving the accuracy and interpretability of fault identification and providing scientific fault diagnosis basis and decision support.
Smart Images

Figure CN121980375A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of transmission line fault identification technology, and in particular to a transmission line fault identification method based on improved attention weights. Background Technology
[0002] With the continuous expansion of the power system and the in-depth advancement of smart grid construction, transmission lines, as a crucial carrier of power transmission, directly affect the safety and stability of the power grid. Transmission lines are distributed across complex and diverse geographical environments and climatic conditions, facing various threats such as lightning strikes, wind deflection, tree obstruction, and wildfires. Accurately and quickly identifying the causes of transmission line faults not only provides scientific guidance for maintenance personnel and shortens power outage time, but also provides data support for optimizing line operation and maintenance strategies and risk early warning through fault mode analysis, which is of great significance for ensuring energy security and improving the intelligence level of the power grid.
[0003] Existing transmission line fault identification technologies are mainly based on expert experience rules and traditional machine learning methods, but they still face many technical challenges. First, the problem of unreasonable feature weight allocation is prominent: traditional methods, such as the composite algorithm, suffer from high computational complexity, slow convergence speed, and a tendency to get trapped in local optima when optimizing weights, making it difficult to accurately reflect the true contribution of different fault features to the classification results, thus limiting classification accuracy. Second, the overly strong assumption of feature independence restricts classification performance: classic methods such as Naive Bayes assume that each feature is conditionally independent, ignoring the important correlations between features such as weather and season, time period and reclosing success rate in actual fault scenarios, and failing to fully explore the synergistic effects between features.
[0004] Existing transmission line fault identification technologies suffer from two major problems: unreasonable feature weight allocation and overly strong assumptions about feature independence. As a result, their accuracy, reliability, and practicality are insufficient to meet the higher requirements of modern smart grids for fault diagnosis. Summary of the Invention
[0005] In order to overcome the above-mentioned shortcomings of the prior art, the purpose of this invention is to provide a transmission line fault identification method based on improved attention weights, which can adaptively learn the importance of features and effectively capture the interaction relationship between features, so as to solve the problems mentioned in the background art.
[0006] The technical solution adopted by this invention to solve its technical problem is: a method for identifying transmission line faults based on improved attention weights, comprising the following steps:
[0007] Historical fault data of transmission lines are collected, multiple fault features are extracted and encoded preprocessed to obtain numerical feature vectors.
[0008] The feature weights of the feature vector are learned through an attention mechanism, and regularization is introduced to constrain the distribution of the feature weights.
[0009] Identify and select feature interaction combinations with weights for each feature, assign interaction combination weights to each feature interaction combination, and construct a classification module that can incorporate feature interaction combinations and interaction weights.
[0010] A joint optimization objective is established, encompassing classification task loss, feature weight distribution constraints, and interaction weight distribution constraints. Based on this joint optimization objective, a gradient optimization algorithm is used to train the fault identification model end-to-end.
[0011] Historical fault data is used to train and validate the overall fault identification model, and the model parameters are optimized until convergence.
[0012] The fault characteristics of transmission lines collected in real time are input into the trained fault identification model to output the fault probability distribution, and the fault type is determined according to the preset decision rules of the fault probability distribution.
[0013] As a further improvement of the present invention: the fault characteristics include weather characteristics, time period characteristics, seasonal characteristics, reclosing characteristic characteristics, transition resistance value characteristics, transition resistance volt-ampere characteristic characteristics, zero-sequence current DC content characteristics, and zero-sequence current harmonic content characteristics;
[0014] The key feature interactions include: interactions between weather features and seasonal features, interactions between time period features and reclosing characteristic features, interactions between transition resistance value and transition resistance volt-ampere characteristic features, interactions between zero-sequence current DC content and zero-sequence current harmonic content, interactions between weather features and reclosing characteristic features, and interactions between seasonal features and reclosing characteristic features.
[0015] As a further improvement of the present invention: the process of obtaining the feature vector includes:
[0016] The acquired fault features are subjected to unified feature encoding processing, converting different types of features into unified numerical feature vectors;
[0017] The feature encoding process includes:
[0018] A three-class coding method is used for weather characteristics, with sunny days coded as 0, cloudy / rainy days coded as 1, and thunderstorms coded as 2.
[0019] A four-class coding method is used for time period characteristics, where midnight is coded as 0, early morning as 1, daytime as 2, and evening as 3;
[0020] A four-category coding method is used for seasonal characteristics, with spring coded as 0, summer as 1, autumn as 2, and winter as 3.
[0021] A binary classification coding method is used for reclosing characteristics, where success is coded as 1 and failure is coded as 0;
[0022] The magnitude of the transition resistance, the volt-ampere characteristic of the transition resistance, the DC content of the zero-sequence current, and the harmonic content of the zero-sequence current are all encoded using a binary encoding method. The low resistance, linearity, and low content characteristics are encoded as 0, while the high resistance, nonlinearity, and high content characteristics are encoded as 1.
[0023] As a further improvement of the present invention: the feature weights of the feature vector learned through the attention mechanism include:
[0024] For the input feature vector For each feature in the dataset, an importance score is calculated using a multilayer perceptron network. The calculation formula is as follows:
[0025] ;
[0026] in, For the first The weight parameters corresponding to each feature Indicates input The operation of a multilayer perceptron is applied. For the first The importance score corresponding to each feature Here, n is the number of critical fault features, which is the bias term. As the activation function, the range of the tanh function is ;
[0027] The importance scores of all features are normalized using the softmax function to obtain the feature weight of each feature. The calculation formula is as follows:
[0028] ;
[0029] Feature weights satisfy and This ensures the probability distribution characteristics of the feature weights.
[0030] As a further improvement of the present invention: the distribution of the introduced regularization constraint feature weights includes:
[0031] The weight distribution is constrained by an entropy regularization term, which is defined as follows:
[0032] ;
[0033] in, This is the regularization coefficient.
[0034] As a further improvement of the present invention: the step of learning the feature weights of the feature vector through an attention mechanism includes:
[0035] The weights of each feature interaction pair are calculated using an attention mechanism, and the formula is as follows:
[0036] ;
[0037] in, Indicates feature splicing, A multilayer perceptron for processing interactive features.
[0038] As a further improvement of the present invention: the classification module adopts an improved Bayesian classifier, and the probability calculation formula of the improved Bayesian classifier is as follows:
[0039] ;
[0040] in, Indicates the fault category, For single feature weights, For feature interaction weights;
[0041] The joint conditional probability is estimated using the Laplace smoothing method, and the calculation formula is as follows:
[0042] ;
[0043] Where α is the smoothing parameter and β is the adjustment factor.
[0044] As a further improvement of the present invention: the overall objective function of the joint optimization objective is defined as:
[0045] ;
[0046] in, The cross-entropy classification loss function is defined as follows:
[0047] ;
[0048] For feature weight entropy regularization, For interaction weight entropy regularization, it is defined as:
[0049] ;
[0050] ;
[0051] and This is the regularization coefficient.
[0052] As a further improvement of the present invention: the model training process uses mini-batch gradient descent for parameter optimization, and the parameter update formula is:
[0053] ;
[0054] in, For learning rate, A dynamic decay strategy is adopted. It contains parameters for all MLP networks.
[0055] As a further improvement of the present invention: the fault identification model outputs probability distributions for four fault types, including lightning strike faults, wind deflection faults, wildfire faults, and tree obstruction faults. The decision rule adopts the maximum probability principle and is defined as follows:
[0056] ;
[0057] It also outputs the feature weight vector and the feature interaction weight matrix to generate an interpretable analysis report.
[0058] Compared with the prior art, the beneficial effects of the present invention are:
[0059] This invention provides a transmission line fault identification method based on improved attention weights. This method extracts key fault features from transmission line fault recording data, meteorological information, and operating parameters. Then, an adaptive feature weight learning mechanism is designed, calculating the importance weights of each feature through a single-layer attention mechanism, replacing the iterative optimization process of traditional composite algorithms. Next, a feature interaction matrix is constructed to identify important feature interaction combinations, establishing a Bayesian classifier with enhanced feature interactions, overcoming the limitations of the Naive Bayes conditional independence assumption. Subsequently, the adaptively learned feature weights and interaction weights are integrated into the improved Bayesian classification model, achieving accurate identification of four types of fault causes: lightning strikes, wind deviation, tree obstruction, and wildfires. Finally, the model parameters are optimized using the training set, and the classification performance is verified on the test set. The method outputs a fault type probability distribution, a ranking of key feature weights, and a feature interaction relationship analysis report, providing maintenance personnel with scientific fault diagnosis basis and decision support, effectively improving the accuracy and interpretability of transmission line fault identification. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0061] Figure 2 This is a schematic diagram of the technical route of the present invention.
[0062] Figure 3 This is a flowchart of the adaptive feature weight learning process of the present invention.
[0063] Figure 4This is a flowchart of the decision-making process of the improved Bayesian classifier of the present invention. Detailed Implementation
[0064] In order to clearly and completely understand the technical solution, the present invention will be further described in conjunction with the embodiments and accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0066] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0067] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0068] like Figure 1 As shown, an embodiment of the present invention provides a method for identifying transmission line faults based on improved attention weights, comprising the following steps:
[0069] Historical fault data of transmission lines are collected, multiple fault features are extracted and encoded preprocessed to obtain numerical feature vectors.
[0070] The feature weights of the feature vector are learned through an attention mechanism, and regularization is introduced to constrain the distribution of the feature weights.
[0071] Identify and select feature interaction combinations with weights for each feature, assign interaction combination weights to each feature interaction combination, and construct a classification module that can incorporate feature interaction combinations and interaction weights.
[0072] A joint optimization objective is established, encompassing classification task loss, feature weight distribution constraints, and interaction weight distribution constraints. Based on this joint optimization objective, a gradient optimization algorithm is used to train the fault identification model end-to-end.
[0073] Historical fault data is used to train and validate the overall fault identification model, and the model parameters are optimized until convergence.
[0074] The fault characteristics of transmission lines collected in real time are input into the trained fault identification model to output the fault probability distribution, and the fault type is determined according to the preset decision rules of the fault probability distribution.
[0075] This technical solution improves the technical efficiency of transmission line fault identification by introducing an improved attention weighting mechanism and a feature interaction enhancement strategy. Its core function and working principle are as follows: First, through an adaptive feature weight learning module, the importance weights of each fault feature are calculated using the multilayer perceptron and normalization in the attention mechanism, replacing the iterative optimization process of traditional composite algorithms. This not only significantly reduces computational complexity and improves weight allocation efficiency, but also effectively avoids excessive weight concentration through entropy regularization constraints, resulting in a more reasonable and balanced weight distribution that reflects the contribution of different features to the classification results. Second, by constructing a feature interaction enhancement classification module, key feature interaction combinations (such as weather and season, time period and reclosing) are identified and quantified. Interaction weights and joint conditional probabilities are introduced into the improved Bayesian classifier, breaking through the strong assumption of feature conditional independence in traditional Naive Bayes methods. This fully explores the collaborative correlation information between features, enhancing the model's ability to represent complex fault modes. Finally, by establishing a joint optimization objective that integrates classification loss, weight regularization, and interaction regularization, and by adopting an end-to-end gradient training mechanism, we can achieve collaborative optimization of feature weight learning, interaction modeling, and classification decision-making. This enables the model to maintain high computational efficiency while possessing higher classification accuracy and robustness.
[0076] In one embodiment of the present invention, the fault characteristics include weather characteristics, time period characteristics, seasonal characteristics, reclosing characteristic characteristics, transition resistance value characteristics, transition resistance volt-ampere characteristic characteristics, zero-sequence current DC content characteristics, and zero-sequence current harmonic content characteristics.
[0077] Furthermore, the process of obtaining the feature vector includes:
[0078] The acquired fault features are subjected to unified feature encoding processing, converting different types of features into unified numerical feature vectors;
[0079] The feature encoding process includes:
[0080] A three-class coding method is used for weather characteristics, with sunny days coded as 0, cloudy / rainy days coded as 1, and thunderstorms coded as 2.
[0081] A four-class coding method is used for time period characteristics, where midnight is coded as 0, early morning as 1, daytime as 2, and evening as 3;
[0082] A four-category coding method is used for seasonal characteristics, with spring coded as 0, summer as 1, autumn as 2, and winter as 3.
[0083] A binary classification coding method is used for reclosing characteristics, where success is coded as 1 and failure is coded as 0;
[0084] The magnitude of the transition resistance, the volt-ampere characteristic of the transition resistance, the DC content of the zero-sequence current, and the harmonic content of the zero-sequence current are all encoded using a binary encoding method. The low resistance, linearity, and low content characteristics are encoded as 0, while the high resistance, nonlinearity, and high content characteristics are encoded as 1.
[0085] In this embodiment, for the mixed feature types in the tabular dataset, a unified feature encoding process is first performed. Let the transmission line fault sample set be... ,in Indicates the first An 8-dimensional feature vector of a sample. This is the corresponding fault category label.
[0086] For categorical features, a label encoding method is used:
[0087] weather: They represent sunny, cloudy / rainy, and thunderstorm respectively.
[0088] Time period characteristics: They represent midnight, early morning, daytime, and evening, respectively.
[0089] Seasonal characteristics: They represent spring, summer, autumn, and winter, respectively.
[0090] Reclosing characteristics: These represent success and failure, respectively.
[0091] For binary features, directly perform 0-1 encoding:
[0092] Transition resistance value: They represent low resistance and high resistance, respectively.
[0093] Transition resistance current-voltage characteristics: Representing linear and nonlinear respectively
[0094] Zero-sequence current DC content: They represent low and high respectively.
[0095] Zero-sequence current harmonic content: They represent low and high, respectively.
[0096] The key feature interactions include: interactions between weather features and seasonal features, interactions between time period features and reclosing characteristic features, interactions between transition resistance value and transition resistance volt-ampere characteristic features, interactions between zero-sequence current DC content and zero-sequence current harmonic content, interactions between weather features and reclosing characteristic features, and interactions between seasonal features and reclosing characteristic features.
[0097] In one embodiment of the present invention, learning the feature weights of the feature vector through an attention mechanism includes:
[0098] For the input feature vector For each feature in the dataset, an importance score is calculated using a multilayer perceptron network. The calculation formula is as follows:
[0099] ;
[0100] in, For the first The weight parameters corresponding to each feature Indicates input The operation of a multilayer perceptron is applied. For the first The importance score corresponding to each feature Here, n is the number of critical fault features, which is the bias term. As the activation function, the range of the tanh function is ;
[0101] The importance scores of all features are normalized using the softmax function to obtain the feature weight of each feature. The calculation formula is as follows:
[0102] ;
[0103] Feature weights satisfy and This ensures the probability distribution characteristics of the feature weights.
[0104] In one embodiment of the present invention, the distribution of the introduced regularization constraint feature weights includes:
[0105] The weight distribution is constrained by an entropy regularization term, which is defined as follows:
[0106] ;
[0107] in This is the regularization coefficient.
[0108] In one embodiment of the present invention, learning the feature weights of the feature vector through an attention mechanism includes:
[0109] The weights of each feature interaction pair are calculated using an attention mechanism, and the formula is as follows:
[0110] ;
[0111] in, Indicates feature splicing, A multilayer perceptron for processing interactive features.
[0112] In one embodiment of the present invention, the classification module employs an improved Bayesian classifier, and the probability calculation formula for the improved Bayesian classifier is as follows:
[0113] ;
[0114] in, Indicates the fault category, For single feature weights, For feature interaction weights;
[0115] The joint conditional probability is estimated using the Laplace smoothing method, and the calculation formula is as follows:
[0116] ;
[0117] Where α is the smoothing parameter and β is the adjustment factor.
[0118] In one embodiment of the present invention, the overall objective function of the joint optimization objective is defined as:
[0119] ;
[0120] in, The cross-entropy classification loss function is defined as follows:
[0121] ;
[0122] For feature weight entropy regularization, For interaction weight entropy regularization, it is defined as:
[0123] ;
[0124] ;
[0125] and This is the regularization coefficient.
[0126] In one embodiment of the present invention, the model training process employs mini-batch gradient descent for parameter optimization, and the parameter update formula is as follows:
[0127] ;
[0128] in, For learning rate, A dynamic decay strategy is adopted. It contains parameters for all MLP networks.
[0129] In one embodiment of the present invention, the fault identification model outputs probability distributions for four fault types, including lightning strike faults, wind deflection faults, wildfire faults, and tree obstruction faults. The decision rule adopts the maximum probability principle and is defined as follows:
[0130] ;
[0131] It also outputs the feature weight vector and the feature interaction weight matrix to generate an interpretable analysis report.
[0132] This invention proposes a transmission line fault identification method based on improved attention weights, which addresses the key problems of unreasonable feature weight allocation and overly strong assumptions about feature independence in traditional methods. First, the algorithm extracts eight key fault features from transmission line fault recording data, meteorological information, and operating parameters, including weather, time period, season, transition resistance characteristics, zero-sequence current characteristics, and reclosing status. Then, an adaptive feature weight learning mechanism is designed, using a single-head attention mechanism to calculate the importance weight of each feature, replacing the iterative optimization process of traditional composite algorithms. Next, a feature interaction matrix is constructed to identify important feature interactions such as weather × season and time period × reclosing, establishing a Bayesian classifier with enhanced feature interactions, overcoming the limitations of the Naive Bayes conditional independence assumption. Subsequently, the adaptively learned feature weights and interaction weights are integrated into the improved Bayesian classification model, achieving accurate identification of four types of fault causes: lightning strikes, wind deviation, tree obstruction, and wildfires. Finally, model parameters are optimized using the training set, and classification performance is verified on the test set. The algorithm outputs a fault type probability distribution, key feature weight ranking, and feature interaction relationship analysis report, providing maintenance personnel with scientific fault diagnosis basis and decision support, effectively improving the accuracy and interpretability of transmission line fault identification. The technical route is as follows: Figure 2 As shown.
[0133] In this embodiment of the invention, the attention weight calculation mechanism is specifically calculated as follows:
[0134] For the input feature vector The importance score for each feature is calculated using a single-layer MLP:
[0135] (1);
[0136] in, For the first The weight parameters corresponding to each feature For bias terms, This is the activation function. The formula maps the original feature values x₁₀ to importance scores. The range of the tanh function is It can effectively normalize eigenvalues of different dimensions, making them comparable.
[0137] The importance scores are normalized using the softmax function to obtain the final feature weights:
[0138] (2);
[0139] The weight satisfies and This ensures the probability distribution characteristics of the weights. The function of this formula is to transform the original feature values... Mapped to importance score The range of the tanh function is (-1, 1), which can effectively normalize eigenvalues of different dimensions, making them comparable.
[0140] To prevent excessive weight concentration on a few features, an entropy regularization term is introduced:
[0141] (3);
[0142] in, This is the regularization coefficient, which promotes a uniform distribution of weights by maximizing the entropy of the weight distribution.
[0143] Bayesian classifier with enhanced feature interactions:
[0144] Traditional Naive Bayes classifiers assume that features are conditionally independent, but in real-world power transmission line fault scenarios, there are often significant correlations between features. For example, thunderstorms are typically associated with summer, and wildfires are more likely to occur during the day. This invention proposes a Bayesian classifier with enhanced feature interactions, which overcomes the limitations of the conditional independence assumption by modeling second-order feature interaction terms.
[0145] Based on domain knowledge and data analysis, important feature interaction pairs were identified. Theoretically, a model can be constructed for the eight transmission line fault features. However, to avoid overfitting, this invention selects the following six most important interaction features in combination: (The original text contains several second-order interaction terms, but to avoid overfitting, it selects the following six most important interaction features in combination:)
[0146] Weather × Season Thunderstorms are more frequent in the summer;
[0147] Time period × reclosing characteristics Differences in the distribution of fault types across different time periods;
[0148] Transition resistance value × Transition resistance characteristics The coupling relationship between resistance value and characteristics;
[0149] Zero-sequence current DC content × Zero-sequence current harmonic content The correlation between the two current characteristics;
[0150] Weather × Reclosing Characteristics Severe weather conditions affect the success rate of reclosing.
[0151] Seasonal reclosing characteristics The impact of seasonal factors on reclosing.
[0152] Interactive enhanced probability calculation model:
[0153] like Figure 4 The decision-making process of the improved Bayesian classifier is shown below;
[0154] First, the improved formula for calculating the probability of the Bayesian classifier is:
[0155] (4);
[0156] in:
[0157] Indicates the first Fault categories (lightning strike, wind deflection, wildfire, tree obstruction);
[0158] These are the single feature weights learned using the method described in Section 2.2;
[0159] For the selected set of interaction feature pairs;
[0160] For feature interaction items The weights;
[0161] This represents the joint conditional probability for a given fault category.
[0162] Interaction Item Weights The calculation employs an attention mechanism similar to that used for single-feature weights:
[0163] (5);
[0164] in Indicates feature splicing, This is a multilayer perceptron specifically designed for handling interactive features. The formula learns a joint representation of feature pairs, assigning appropriate weights to each interaction term to ensure that important feature combinations receive higher attention.
[0165] For the interaction terms of discrete features, the joint conditional probability is estimated using frequency statistics:
[0166] (6);
[0167] in This indicates that the training set simultaneously possesses feature values. , And belong to the category The number of samples, For category The total number of samples.
[0168] To avoid the zero probability problem, Laplace smoothing is used:
[0169] (7);
[0170] in This is a smoothing parameter (usually set to 1). , Features , The number of possible values for . This formula learns the joint representation of feature pairs and assigns appropriate weights to each interaction term, ensuring that important feature combinations receive higher attention.
[0171] Model training and parameter optimization:
[0172] The objective function is jointly optimized, unifying feature weight learning and interaction weight learning into a single optimization framework. The overall objective function is:
[0173] (8);
[0174] in:
[0175] Cross-entropy loss is used to optimize classification accuracy.
[0176] Entropy regularization is applied to feature weights to prevent excessive weight concentration.
[0177] To regularize the interaction weight entropy and prevent excessive weight concentration.
[0178] The parameter update strategy employs mini-batch gradient descent to simultaneously optimize both feature weights and interaction weights.
[0179] (9);
[0180] in It contains parameters for all MLP networks. The learning rate is determined by an adaptive adjustment strategy.
[0181] Key parameter configuration: Learning rate scheduling: Initial learning rate The decay rate is 0.9 times every 50 rounds.
[0182] Regularization coefficient: ,
[0183] Batch size: 32 samples
[0184] Early stopping mechanism: Training is stopped if the validation set loss does not decrease for 10 consecutive rounds.
[0185] Through the synergistic effect of the two innovations mentioned above, the method of this invention can significantly improve the accuracy and interpretability of transmission line fault identification while maintaining computational efficiency, providing more intelligent technical support for power system operation and maintenance.
[0186] Attention weighting calculation mechanism:
[0187] The single-head attention mechanism designed in this invention learns the importance score of each feature through a multilayer perceptron (MLP) network and obtains the final weights by normalization using the softmax function.
[0188] This mechanism has the following technical advantages compared to traditional composite algorithms:
[0189] The computational efficiency is significantly improved. Traditional composite algorithms require iterative searches in a multi-dimensional weight space, and each iteration evaluates the classification performance of all samples, resulting in a time complexity of O(n log n). Where T is the number of iterations (usually requiring thousands), N is the number of samples, and M is the number of features. The attention mechanism of this invention uses gradient descent for direct optimization, resulting in fast convergence; it typically reaches a stable state in 200 iterations. Furthermore, each iteration only requires forward and backward propagation calculations, reducing the time complexity to [missing value]. Efficiency improvement of approximately In this application example, with a dataset of 268 samples and 8 features, the traditional composite algorithm takes about 5 minutes to complete weight optimization, while the attention mechanism only takes 15 seconds, improving efficiency by 20 times.
[0190] Avoiding the Local Optimality Trap. The composite algorithm, a heuristic search method, is prone to getting trapped in local optima, especially when the weight space has a high dimension, often failing to find the globally optimal weight configuration. The attention mechanism, employing gradient-based optimization combined with entropy regularization constraints (Equation 3), promotes a more uniform weight distribution, preventing excessive weight concentration on a few features, thus achieving a more reasonable and stable weight allocation. Experiments show that the weight distribution learned using the attention mechanism is more balanced; multiple features, such as weather features (0.183), seasonal features (0.156), and reclosing characteristics (0.145), all receive reasonable weights. In contrast, the composite algorithm often concentrates more than 50% of the weight on a single feature, causing other important features to be ignored.
[0191] Weight allocation is more precise. The attention mechanism learns the nonlinear mapping relationship between feature values and fault categories, enabling it to adaptively assign different feature weights to different fault scenarios. Specifically, the tanh activation function (Equation 1) in the MLP network captures the nonlinear variation pattern of feature values, while softmax normalization (Equation 2) ensures that the weights satisfy the probability distribution characteristics (summing to 1 and being non-negative). This adaptive learning capability allows the weights to truly reflect the contribution of each feature to fault classification. For example, in lightning strike faults, the weight of weather features (thunderstorms) automatically increases to 0.183, while in wildfire faults, the weights of time-of-day features (daytime) and seasonal features (dry season) automatically increase, fully reflecting the differences in feature importance among different fault types.
[0192] The entropy regularization term serves as a penalty in the overall objective function (Equation 8) and is jointly optimized with the classification loss. This mechanism effectively prevents model overfitting, avoids a single feature monopolizing weights while ignoring other useful features, thereby improving the generalization ability and robustness of the classifier.
[0193] In this application example, settings Afterwards, the weight distribution became more balanced, with the ratio of the highest weight (weather 0.183) to the lowest weight (time period 0.109) being only 1.68, whereas the ratio exceeded 5.0 without regularization. This indicates that the entropy constraint effectively promoted the rational allocation of weights.
[0194] The parameters are optimized using gradient descent, with a learning rate σ = 0.01 and a maximum number of iterations T = 200. Weights are initialized... Regularization coefficient: The logical process of adaptive feature weight learning is as follows: Figure 3 As shown.
[0195] The improved Bayesian classifier probability calculation formula has the following technical advantages:
[0196] This overcomes the limitations of the conditional independence assumption. The probability calculation formula of the traditional Naive Bayes method is... This formula implicitly assumes that the features are independent of each other under a given category condition, that is However, this assumption often fails in transmission line fault scenarios. For example, in lightning strike faults, the combined probability of thunderstorms (x1=2) and summer (x3=1) P(thunderstorm, summer|lightning strike) = 0.577 is much higher than the probability under the independent assumption P(thunderstorm|lightning strike) × P(summer|lightning strike) = 0.625 × 0.513 = 0.321, indicating a significant positive correlation between the two. Formula (4) introduces an interaction term. This approach directly models the joint conditional probabilities of feature pairs, thereby capturing the synergistic effects between features. In this application example, after adding six feature interaction terms, the classification accuracy improved from 84.6% with traditional Naive Bayes to 92.3%, an increase of 7.7 percentage points, fully demonstrating the effectiveness of feature interaction modeling.
[0197] The contributions of single features and interactive features are balanced through a weighting mechanism. In formula (4), wⱼ represents the weight of a single feature. This weighted design assigns importance to different features and interactions based on their contribution to the classification. For strongly correlated feature pairs, such as weather × season (…), the weighting is applied to each interaction. For feature pairs with a probability density function (=0.215), the model assigns higher interaction weights; while for feature pairs with weaker correlations, the interaction weights are relatively lower. This is achieved by adjusting the single feature probability. and interaction probability After weighting and multiplying separately, formula (4) can comprehensively consider the independent and collaborative contributions of features, achieving a more accurate probability estimate. Experimental results show that compared with unweighted Naive Bayes (84.6%) and methods that only weight a single feature (86.5%), the dual weighting mechanism of this invention further improves the accuracy to 92.3%, indicating that the weighting mechanism plays a key role in feature fusion.
[0198] This enhances the interpretability and decision support capabilities of fault identification. Formula (4) not only outputs the probability distribution of fault categories. It can also be achieved through feature weights and interaction weights The numerical values are used to explain the decision-making basis of the model to the operations and maintenance personnel.
[0199] In one application embodiment of the present invention
[0200] This application example uses historical fault data of transmission lines provided by a power grid company. The dataset contains 268 real fault samples, covering transmission lines of different voltage levels, including 500kV, 220kV, and 110kV. The dataset structure is as follows:
[0201] Total sample size: 268 failure cases
[0202] Feature Dimensions: 12 raw fields (serial number, voltage level, line name, date, etc.)
[0203] Effective features: 8 key features for classification
[0204] Target categories: 4 types of fault causes (lightning strike, wind deviation, wildfire, tree obstruction)
[0205] Detailed description of dataset fields:
[0206] Table 1. Description and values of dataset fields
[0207] Field Name Data types Range of values Sample Serial Number Integer 1-268 1,2,3... voltage level String 500kV / 220kV / 110kV 500kV Line Name String Specific route number Line XX date Date format yyyy / mm / dd 2023 / 06 / 15 weather Classification Sunny / Cloudy / Rainy / Thunderstorm thunderstorm Time period Classification Midnight / Early Morning / Daytime / Evening daytime season Classification Spring / Summer / Autumn / Winter summer Reclosing characteristics Two categories Success / Failure success Transition resistance value Two categories Low resistance / high resistance low resistance Transition resistance current-voltage characteristics Two categories Linear / Nonlinear linear Zero-sequence current DC content Two categories High / Low high Zero-sequence current harmonic content Two categories High / Low Low Cause of the fault Classification target Lightning strike / wind deviation / wildfire / tree obstruction Lightning strike
[0208] This dataset is derived from the transmission line fault statistics records of the Central China Power Grid from 2020 to 2023, and its application scenario is:
[0209] Real-time fault diagnosis: Quickly determine the cause of the fault after the line trips;
[0210] Operation and maintenance decision support: Provides emergency repair teams with fault type predictions;
[0211] Risk warning analysis: Predict potential failure risks based on historical patterns.
[0212] Data preprocessing and feature extraction:
[0213] From the original 268 samples, missing and outlier samples were removed, resulting in 260 valid samples. The sample distribution is as follows:
[0214] Lightning strike failure: 78 samples (30%)
[0215] Wind deflection fault: 65 samples (25%)
[0216] Tree obstruction fault: 71 samples (27.3%)
[0217] Wildfire-related issues: 46 samples (17.7%)
[0218] According to the encoding method, convert the categorical features into numerical values:
[0219] Example encoding result:
[0220] Sample 1: [2,2,1,1,0,0,1,0,1]# Thunderstorm, Daytime, Summer, Success, Low Resistance, Linear, High, Low, Lightning Strike;
[0221] Sample 2: [0,2,2,0,1,1,0,1,2]#Sunny,Daytime,Autumn,Unsuccessful,High Resistance,Nonlinear,Low,High,Wildfire;
[0222] Sample 3: [1,1,0,0,0,0,0,0,3]# Rainy, early morning, spring, unsuccessful, low resistance, linear, low, low, wind deflection;
[0223] Adaptive feature weight learning:
[0224] MLP network initialization: Initialize the parameters of a single-layer MLP network for each of the 8 features: Weight matrix: , dimension Bias term: Learning rate: Regularization coefficient: ;
[0225] Attention weight iterative optimization:
[0226] The weight calculation process is shown using sample 1 as an example:
[0227] Input features:
[0228] Initial iteration (t=1):
[0229] e1=tanh(0.05×2+0)=tanh(0.1)=0.0997
[0230] e2=tanh(-0.02×2+0)=tanh(-0.04)=-0.0400
[0231] e3=tanh(0.08×1+0)=tanh(0.08)=0.0799 ...
[0233] e8 = tanh(0.03 × 0 + 0) = tanh(0) = 0
[0234] Weight normalization:
[0235] w1=exp(0.0997) / ∑exp(eᵢ)=1.105 / 8.456=0.131
[0236] w2=exp(-0.0400) / 8.456=0.961 / 8.456=0.114
[0237] w3=exp(0.0799) / 8.456=1.083 / 8.456=0.128 ...
[0239] Convergence results
[0240] After 200 iterations, the feature weights converge to:
[0241] Table 2. Iterative Results of Feature Weights
[0242] feature weight value Importance ranking weather 0.183 1 season 0.156 2 Reclosing characteristics 0.145 3 Transition resistance value 0.132 4 Transition resistance current-voltage characteristics 0.128 5 Zero-sequence current DC content 0.118 6 Zero-sequence current harmonic content 0.115 7 Time period 0.109 8
[0243] Building a feature interaction-enhanced classifier:
[0244] Interaction Feature Weight Learning: Six important interaction feature pairs were selected, and the weight optimization results are as follows:
[0245] Table 3. Feature-weight optimization results
[0246] Interaction feature pairs weight value Typical pattern Weather × Season 0.215 Thunderstorms are more frequent in summer. Weather × Reclosing 0.198 Low reclosing success rate in severe weather Transition resistance value × characteristics 0.167 High resistance usually corresponds to nonlinear characteristics Zero-sequence DC × Harmonics 0.148 Coupling relationship between the two current characteristics Seasonal reclosing 0.135 The success rate of reclosing is low in winter. Time Period × Fault Mode 0.137 Differences in the distribution of fault types in different time periods
[0247] Joint conditional probability calculation
[0248] Taking the "weather × season" interaction item as an example, the joint conditional probability under each fault category is calculated:
[0249] P(Thunderstorm, Summer | Lightning Strike) = (Number of lightning strike samples in both thunderstorm and summer conditions) / (Total number of lightning strike samples) = 45 / 78 = 0.577
[0250] P(Thunderstorm, Summer | Wind Deflection) = 8 / 65 = 0.123
[0251] P(Thunderstorm, Summer | Tree Barrier) = 12 / 71 = 0.169
[0252] P(Thunderstorm, Summer | Wildfire) = 3 / 46 = 0.065
[0253] Model training:
[0254] Training set partitioning:
[0255] Training set: 208 samples (80%)
[0256] Test set: 52 samples (20%)
[0257] Model training results:
[0258] Number of training rounds: 200 rounds
[0259] Final training error: 0.078
[0260] Convergence time: Approximately 15 seconds
[0261] Comparison of classification results on the test set:
[0262] Table 4. Training results on the test set
[0263] method accuracy Accuracy Recall rate F1-Score Traditional Naive Bayes (NB) 84.6% 0.823 0.846 0.831 Weighted Naive Bayes (WNB) 86.5% 0.847 0.865 0.853 Complex shape optimization (CA_WNB) 88.5% 0.871 0.885 0.876 Method of the present invention 92.3% 0.915 0.923 0.918
[0264] In a specific implementation case verification
[0265] Case 1: A lightning strike fault on a 500kV line on July 15, 2023
[0266] Input features: [Thunderstorm, Evening, Summer, Success, Low Resistance, Linear, High, Low] Encoded as: [2,3,1,1,0,0,1,0]
[0267] Prediction results of each method:
[0268] Traditional NB prediction:
[0269] P(lightning strike|X)=0.612, P(wind deflection|X)=0.198, P(tree obstruction|X)=0.145, P(wildfire|X)=0.045
[0270] Prediction result: Lightning strike (61.2%)
[0271] The method of this invention predicts:
[0272] Feature weight contribution: w1×P(thunderstorm|lightning strike) + w3×P(summer|lightning strike) + ... = 0.724
[0273] Interaction item contribution: w 13 ×P(Thunderstorm, Summer | Lightning Strike)+w 18 ×P(Thunderstorm, Success | Lightning Strike) + ... = 0.186
[0274] Final probabilities: P(lightning strike|X) = 0.894, P(wind deviation|X) = 0.064, P(tree obstruction|X) = 0.031, P(wildfire|X) = 0.011
[0275] Prediction result: Lightning strike (89.4%)
[0276] Case 2: Wildfire fault on a 220kV power line on October 8, 2023
[0277] Input features: [Sunny day, daytime, autumn, unsuccessful, high resistance, nonlinear, low, high] Encoded as: [0,2,2,0,1,1,0,1]
[0278] The method of this invention predicts:
[0279] P(lightning strike|X)=0.087, P(wind deflection|X)=0.134, P(tree obstruction|X)=0.195, P(wildfire|X)=0.584
[0280] Forecast result: Wildfires (8.4%)
[0281] Actual cause of the malfunction: Wildfire
[0282] Experimental results show that the transmission line fault identification method based on improved attention weight proposed in this invention effectively solves the limitations of traditional methods in terms of feature weight allocation and feature independence assumptions through an adaptive feature weight learning mechanism and a Bayesian classifier with enhanced feature interaction. It achieves an accuracy of 92.3% on the test set, which is 7.7 percentage points higher than the traditional Naive Bayes method and 3.8 percentage points higher than the composite optimization method. It significantly improves the accuracy and reliability of transmission line fault identification and provides effective technical support for intelligent operation and maintenance of power systems.
[0283] In summary, after reading this invention document, those skilled in the art can make various other corresponding modifications to the technical solutions and concepts based on this invention without creative mental effort, and all of these modifications fall within the scope of protection of this invention.
Claims
1. A method for identifying transmission line faults based on improved attention weights, characterized in that, Includes the following steps: Historical fault data of transmission lines are collected, multiple fault features are extracted and encoded preprocessed to obtain numerical feature vectors. The feature weights of the feature vector are learned through an attention mechanism, and regularization is introduced to constrain the distribution of the feature weights. Identify and select feature interaction combinations with weights for each feature, assign interaction combination weights to each feature interaction combination, and construct a classification module that can incorporate feature interaction combinations and interaction weights. A joint optimization objective is established, encompassing classification task loss, feature weight distribution constraints, and interaction weight distribution constraints. Based on this joint optimization objective, a gradient optimization algorithm is used to train the fault identification model end-to-end. Historical fault data is used to train and validate the overall fault identification model, and the model parameters are optimized until convergence. The fault characteristics of transmission lines collected in real time are input into the trained fault identification model to output the fault probability distribution, and the fault type is determined according to the preset decision rules of the fault probability distribution.
2. The method for transmission line fault identification based on improved attention weights according to claim 1, characterized in that, The fault characteristics include weather characteristics, time period characteristics, seasonal characteristics, reclosing characteristics, transition resistance value characteristics, transition resistance volt-ampere characteristics, zero-sequence current DC content characteristics, and zero-sequence current harmonic content characteristics. The key feature interactions include: interactions between weather features and seasonal features, interactions between time period features and reclosing characteristic features, interactions between transition resistance value and transition resistance volt-ampere characteristic features, interactions between zero-sequence current DC content and zero-sequence current harmonic content, interactions between weather features and reclosing characteristic features, and interactions between seasonal features and reclosing characteristic features.
3. The method for transmission line fault identification based on improved attention weights according to claim 2, characterized in that, The process of obtaining the feature vector includes: The acquired fault features are subjected to unified feature encoding processing, converting different types of features into unified numerical feature vectors; The feature encoding process includes: A three-class coding method is used for weather characteristics, with sunny days coded as 0, cloudy / rainy days coded as 1, and thunderstorms coded as 2. A four-class coding method is used for time period characteristics, where midnight is coded as 0, early morning as 1, daytime as 2, and evening as 3; A four-category coding method is used for seasonal characteristics, with spring coded as 0, summer as 1, autumn as 2, and winter as 3. A binary classification coding method is used for reclosing characteristics, where success is coded as 1 and failure is coded as 0; The magnitude of the transition resistance, the volt-ampere characteristic of the transition resistance, the DC content of the zero-sequence current, and the harmonic content of the zero-sequence current are all encoded using a binary encoding method. The low resistance, linearity, and low content characteristics are encoded as 0, while the high resistance, nonlinearity, and high content characteristics are encoded as 1.
4. The method for transmission line fault identification based on improved attention weights according to claim 1, characterized in that, The feature weights learned through the attention mechanism for the feature vector include: For the input feature vector For each feature in the dataset, an importance score is calculated using a multilayer perceptron network. The calculation formula is as follows: ; in, For the first The weight parameters corresponding to each feature Indicates input The operation of a multilayer perceptron is applied. For the first The importance score corresponding to each feature Here, n is the number of critical fault features, which is the bias term. As the activation function, the range of the tanh function is ; The importance scores of all features are normalized using the softmax function to obtain the feature weight of each feature. The calculation formula is as follows: ; Feature weights satisfy and This ensures the probability distribution characteristics of the feature weights.
5. The method for transmission line fault identification based on improved attention weights according to claim 4, characterized in that, The distribution of the introduced regularization constraint feature weights includes: The weight distribution is constrained by an entropy regularization term, which is defined as follows: ; in This is the regularization coefficient.
6. The method for transmission line fault identification based on improved attention weights according to claim 2, characterized in that, The step of learning the feature weights of the feature vector through an attention mechanism includes: calculating the weights of each feature interaction pair using an attention mechanism, with the following formula: ; in, Indicates feature splicing, A multilayer perceptron for processing interactive features.
7. The method for transmission line fault identification based on improved attention weights according to claim 6, characterized in that, The classification module employs an improved Bayesian classifier, and the probability calculation formula for the improved Bayesian classifier is as follows: ; in, Indicates the fault category, For single feature weights, For feature interaction weights; The joint conditional probability is estimated using the Laplace smoothing method, and the calculation formula is as follows: ; Where α is the smoothing parameter and β is the adjustment factor.
8. The method for transmission line fault identification based on improved attention weights according to claim 6, characterized in that, The overall objective function of the joint optimization objective is defined as: ; in, The cross-entropy classification loss function is defined as follows: ; For feature weight entropy regularization, For interaction weight entropy regularization, it is defined as: ; ; and This is the regularization coefficient.
9. The method for identifying transmission line faults based on improved attention weights according to claim 1, characterized in that, The model training process employs mini-batch gradient descent for parameter optimization, and the parameter update formula is as follows: ; in, For learning rate, A dynamic decay strategy is adopted. It contains parameters for all MLP networks.
10. The method for identifying transmission line faults based on improved attention weights according to claim 1, characterized in that, The fault identification model outputs probability distributions for four fault types: lightning strike faults, wind deflection faults, wildfire faults, and tree obstruction faults. The decision rule adopts the maximum probability principle and is defined as follows: ; It also outputs feature weight vectors and feature interaction weight matrices to generate interpretable analysis reports.