Oil-immersed transformer fault diagnosis method and system based on feature enhancement and deep isomerism

By employing feature enhancement and deep heterogeneous integration, the problems of sample imbalance and limited model generalization performance in oil-immersed transformer fault diagnosis are solved, achieving high-precision fault identification and rapid response.

CN121525536AActive Publication Date: 2026-02-13YANTAI UNIV

Patent Information

Application Number
CN202610062973.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-02-13
Estimated Expiration
2046-01-19

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for oil-immersed transformers suffer from uneven distribution of fault samples, insufficient utilization of feature information, and limited model generalization performance, resulting in a high misjudgment rate and making it difficult to meet the rapid response requirements of power grid expansion.

Method used

A fault diagnosis method based on feature enhancement and deep heterogeneity is adopted. New samples that meet physical constraints are generated by minority class oversampling, deep features are generated by combining autoencoder VAE, shallow relationships are captured by LightGBM, local features are identified by 1D-CNN, global dependencies are established by Transformer, and the output weights of the model are adjusted by dynamic fusion mechanism.

Benefits of technology

It significantly improves the robustness and diagnostic accuracy of fault gas characteristics, enhances the model's ability to identify complex faults, reduces the false positive rate, and meets the needs of rapid power grid response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525536A_ABST
    Figure CN121525536A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of oil-immersed transformer fault diagnosis, in particular to an oil-immersed transformer fault diagnosis method and system based on feature enhancement and deep isomerism. The method comprises the steps that a minority class oversampling method is used for synthesizing minority fault sample data into new samples conforming to physical constraints; an enhanced input space is constructed based on deep features generated by an auto-encoder VAE, and deep features of fault gas in a new sample are fully extracted; based on the extracted deep features, using a heterogeneous integrated model to simulate a lightweight gradient elevator Light GBM to capture a shallow relationship of the deep features; using a convolutional neural network 1D-CNN to identify local features of the fault gas; establishing a global dependency relationship on the basis of a Transform model; the robustness of the model is remarkably enhanced through a dynamic weighting mode, and therefore it is guaranteed that reliable and stable diagnosis results are continuously output in various complex and high-uncertainty practical application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil-immersed transformer fault diagnosis, and in particular to an oil-immersed transformer fault diagnosis method and system based on feature enhancement and deep heterogeneity. BACKGROUND

[0002] Oil-immersed transformers have the advantages of good heat dissipation, low load loss, and low initial cost, and are widely used in power grid transmission, steel, chemical industry and other industrial fields, especially in high-voltage and extra-high-voltage transmission fields. When the insulation oil filled in the oil-immersed transformer is cracked and aged, hydrogen (H2), acetylene (C2H2), ethylene (C2H4), ethane (C2H6), carbon monoxide (CO) and other gases will be dissolved in the oil. By analyzing the types and contents of the dissolved gases, the internal state of the transformer can be determined. At present, the relatively mature oil-immersed transformer diagnosis method is the dissolved gas analysis method (DGA), but it can only diagnose three types of faults and has a high misjudgment rate for mixed faults, which cannot meet the demand for rapid response to faults after the expansion of the power grid.

[0003] Artificial intelligence algorithms can be deployed on edge computing devices or cloud servers to analyze and diagnose real-time collected transformer operation data in real time, discover potential faults in time and issue warning signals, thereby significantly improving the reliability and safety of transformer operation. As a core component of modern artificial intelligence, machine learning has the ability of self-optimization and continuous performance improvement. Due to the scarcity of oil-immersed transformer fault samples, the generalization ability of deep learning is limited. First, (1) the existing methods have weak fault gas feature extraction ability, and are mostly limited to simple judgment or ratio calculation based on static concentration threshold, the feature processing method is relatively simple, and there is a lack of deep mining and fusion of multi-dimensional feature space. In complex fault scenarios, traditional methods cannot fully capture the time sequence dynamic characteristics hidden in fault gases, resulting in insufficient fault recognition sensitivity and high misjudgment rate.

[0004] (2) Existing researches mostly rely on single machine learning model, which limits the model generalization ability and makes it difficult to cope with complex and variable actual scenarios. Once the data distribution deviates or there is noise, the model performance will decrease sharply, and it lacks robustness and explainability, cannot effectively fuse multi-source information, is prone to overfitting, and ultimately limits the prediction accuracy and practical application value.

[0005] In view of the problems of uneven sample distribution, insufficient feature information utilization and limited model generalization performance in current oil-immersed transformer fault diagnosis, it is urgent to propose a fault diagnosis model based on mixed feature enhancement and deep heterogeneity integration. SUMMARY

[0006] In order to solve the problems of uneven sample distribution, insufficient feature information utilization and limited model generalization performance in current oil-immersed transformer fault diagnosis, the application provides an oil-immersed transformer fault diagnosis method and system based on feature enhancement and deep heterogeneity.

[0007] In the first aspect, the application provides an oil-immersed transformer fault diagnosis method based on feature enhancement and deep heterogeneity, which adopts the following technical scheme: An oil-immersed transformer fault diagnosis method based on feature enhancement and deep heterogeneity comprises: Obtaining a small number of fault sample data of an oil-immersed transformer; Constructing an oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneity integration, wherein a small number of fault sample data is synthesized into new samples conforming to physical constraints by using a small class oversampling method; Based on the deep features generated by the autoencoder VAE, an enhanced input space is constructed to fully extract the deep features of the fault gas in the new samples; Based on the extracted deep features, a heterogeneous integrated model is used to simulate a LightGBM to capture the shallow relationships of deep features, a 1D-CNN is used to identify the local features of the fault gas, and a Transformer model is used to establish global dependencies; Based on a dynamic fusion mechanism, the output weight of the model is adjusted; The constructed oil-immersed transformer fault diagnosis model is optimized; The optimized fault diagnosis model is used to output fault diagnosis results.

[0008] Further, the construction of the oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneity integration comprises the following steps: an adaptive sample generation method is adopted, the neighborhood parameters are dynamically adjusted based on the distribution characteristics of the small class samples, new samples conforming to physical constraints are synthesized to ensure that the gas concentration is non-negative and the original data distribution rules are maintained; then a ten-dimensional expert knowledge system is constructed on the feature engineering, the five gas concentrations of the existing data are fused, and the fault feature ratio, the discharge indicator ratio, the thermal fault ratio and the total hydrocarbon concentration are introduced, the 4-dimensional deep features generated by the variational autoencoder VAE are coupled, and finally a 14-dimensional enhanced input space is formed; then a model architecture of heterogeneous integration is used to fuse three types of learners: the first branch simulates LightGBM to capture the shallow relationships of features; the second branch uses a one-dimensional convolutional neural network 1D-CNN to identify the local features of the fault gas; the third branch is based on the Transformer model to establish global dependencies, and finally a dynamic fusion mechanism is used to realize the cooperation of the three models through attention weighting.

[0009] Furthermore, the method of synthesizing new samples that conform to physical constraints from minority fault sample data using minority class oversampling includes introducing the SMOTE oversampling algorithm based on dynamic adjustment of k-nearest neighbors. This algorithm mitigates the class imbalance problem in the original data by adaptively generating synthetic samples. The SMOTE algorithm avoids overfitting risk by generating synthetic samples through interpolation, and is expressed as: Let the minority sample set S = {xi ∈ R} d |i=1,…,N s}, where d is the feature dimension; for Calculate its k-nearest neighbor set N k (x i )={x i (1) ,…,x i (k) The distance metric used is Mahalanobis distance. Σ is the covariance matrix of the minority class samples; finally, linear interpolation is performed: from N k Randomly select a nearest neighbor sample x nn Generate a new sample x new : ,in, , which is a random interpolation number that controls the position of the new sample in the feature space.

[0010] Furthermore, the deep feature construction based on the autoencoder VAE enhances the input space, fully extracting the deep features of the fault gas in the new samples. This includes supplementing the original feature gas with five-dimensional features to weaken the type confusion problem and enhance the representation ability of minority fault samples. To eliminate dimensional differences, the original gas concentration and construction ratio are Z-score standardized. In the formula: μ is the mean of the x dataset; σ is the standard deviation of the dataset elements; x' is the standardized result of x; then, the variational autoencoder (VAE) is used to perform feature extraction and data augmentation while learning the data distribution. The VAE consists of an encoder, a decoder, and a reparameterization process. The encoder maps the input data to the latent space to obtain the mean and variance; the decoder maps the samples in the latent space back to the data space to reconstruct the input data; the reparameterization process introduces randomness to enable the model to learn feature representations, expressed as: first, the encoder maps the input data x to the mean μ and variance logσ of the latent space. 2 : ,in, This represents the encoder parameters; to backpropagate gradients during training, a reparameterization technique is introduced, represented as: ,in, is a random variable sampled from the standard normal distribution N(0, 1), and denotes element-wise multiplication; then the decoder is used to map the latent space sample z back to the data space to reconstruct the input data x: where denotes the parameters of the decoder; finally, the loss function is calculated, and the loss function of VAE consists of two parts, reconstruction loss and KL divergence, which is denoted as: , where β is a hyperparameter to balance the reconstruction loss and KL divergence.

[0011] Further, the heterogeneous ensemble model is used to simulate the LightGBM to capture the shallow relationship of deep features, including using a fully connected network to simulate gradient boosting decision trees to effectively capture high-order nonlinear interaction between features, wherein the LightGBM branch module is used to simulate the decision logic of LightGBM, and a multi-layer fully connected neural network structure is used, specifically including two hidden layers, each layer uses a ReLU activation function to introduce nonlinearity, and the input feature vector is x∈R d , and the output is o∈R c , where d is the input dimension, c is the number of categories, and the forward propagation process is represented as: , , , where W1∈R 256×d , W2∈R 128×256 , W3∈R c×128 are weight matrices, and b1∈R 256 , b2∈R 128 , b3∈R c are bias vectors.

[0012] Further, the 1D-CNN is used to identify the local features of the fault gas, including using 1D-CNN to extract local features in sequence data, wherein in the oil-immersed transformer fault diagnosis, the DGA data is regarded as a time series signal, and the 1D-CNN is used to capture the change pattern of gas concentration over time, and the 1D-CNN branch contains two convolutional layers and one pooling layer, first, the input features are expanded into a single-channel sequence, and then the features are extracted through a convolution kernel: , , where W1∈R 128×1×3 , W2∈R 64×128×3 are convolution kernel weights, and b1∈R 128, b2∈R 64 is the bias, after the convolution operation, the feature map is compressed to a fixed length using an adaptive max-pooling layer, denoted as: , Finally, the output is obtained through the full connection layer: , where W3∈R c×64 is the weight matrix, b3∈R c is the bias vector.

[0013] Further, the global dependency relationship is established based on the Transformer model, which includes capturing the long-term dependency relationship between different time points of DGA data in oil-immersed transformer fault diagnosis by using Transformer, and the Transformer branch contains multiple layers of Transformer encoder, and each layer of encoder includes a multi-head self-attention mechanism and a feedforward neural network. For the input sequence X={x1,x2,…,x n}, where x i ∈R d , the calculation of the multi-head self-attention mechanism is represented as: first, the input sequence is mapped to the query (Q), key (K) and value (V) space: where W Q ,W K ,W V ∈R d×dk are weight matrices, and d k is the dimension of attention; then the attention score is calculated and normalized: , ; then the value vector is weighted and summed: , and finally the features are further processed by the feedforward neural network, denoted as: where W1∈R d×dff , W2∈R d×dff are weight matrices, b1∈R dff , b2∈R d are biases, and d ff is the hidden layer dimension of the feedforward network; after obtaining the output of the encoder, the final output is obtained through global average pooling and full connection layer: , where W3∈R c×d is the weight matrix, and b3∈R c is the bias vector.

[0014] Further, the adjusting model output weight based on the dynamic fusion mechanism comprises adopting an attention fusion mechanism to dynamically adjust the contribution to the final prediction result by calculating the weight of each model output, wherein the output of each model is denoted as o i ∈R c where c is the number of categories, the output is first spliced into a vector: ; and then mapped to a low-dimensional space by a fully connected layer: where W1∈R 64×3c is a weight matrix, b1∈R 64 is a bias vector, and then the weight of each model is calculated: where W2∈R 3×64 is a weight matrix, b2∈R 3 is a bias vector, and finally the final output is obtained by weighted summation: , where w i is the weight of the i-th model.

[0015] Further, the oil-immersed transformer fault diagnosis model is optimized, including adopting a feature engineering method to construct four new ratio features, including C2H2 / C2H4, CH4 / H2, C2H2 / C2H6, and C2H4 / C2H6, expanding the original 8-dimensional feature space to a 12-dimensional feature space, setting the sample number batch size to 64 for each model training, and configuring the total number of iterations epochs to 500 rounds during training; the latent dimension of the VAE feature extractor is set to 4, in the power grid fault diagnosis architecture based on multi-model hybrid driving, the input dimension after feature fusion is set to 16, including 12-dimensional original features + 4-dimensional VAE features, and the number of heads of the Transformer branch is set to 4, and the hidden layer dimension of the attention mechanism is 64, to enhance the feature fusion capability of the model; finally, the learning rate of the model is set to 0.001, and the AdamW optimizer is used to control the update speed of the model parameters, so as to make the model stably converge to the optimal solution during training.

[0016] In a second aspect, an oil-immersed transformer fault diagnosis system based on feature enhancement and deep heterogeneity comprises: A data acquisition module configured to acquire a small number of fault sample data of an oil-immersed transformer; A model construction module configured to construct an oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneity integration, wherein a small number of fault sample data is synthesized into new samples conforming to physical constraints by using a minority class oversampling method; The feature enhancement module is configured to construct an enhanced input space based on deep features generated by the autoencoder VAE, and sufficiently extract deep features of the fault gas in the new sample. The feature extraction module is configured to simulate a light gradient boosting machine LightGBM to capture shallow relationships of the deep features based on the extracted deep features by using a heterogeneous integrated model; a convolutional neural network 1D-CNN is used to identify local features of the fault gas; and a global dependency relationship is established based on a Transformer model. The fusion module is configured to adjust model output weights based on a dynamic fusion mechanism. The optimization module is configured to optimize the constructed oil-immersed transformer fault diagnosis model. The diagnosis module is configured to output a fault diagnosis result by using the optimized fault diagnosis model.

[0017] In a third aspect, the present application provides a computer-readable storage medium, wherein a plurality of instructions are stored in the computer-readable storage medium, and the instructions are suitable for being loaded by a processor of a terminal device and executing the feature enhancement and deep heterogeneous oil-immersed transformer fault diagnosis method.

[0018] In a fourth aspect, the present application provides a terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions, and the computer-readable storage medium is used to store a plurality of instructions, and the instructions are suitable for being loaded by the processor and executing the feature enhancement and deep heterogeneous oil-immersed transformer fault diagnosis method.

[0019] In summary, the present application has the following beneficial technical effects: (1) In order to sufficiently extract the fault gas features, a mixed feature enhancement method of increasing fault feature dimension, VAE feature extraction and splicing is adopted. Firstly, the fault type ratio features with physical significance are artificially constructed according to the expert knowledge and mechanism model, and the original signal is retained for explainability. Then, the VAE is used to learn the low-dimensional latent distribution while retaining the reconstruction ability, and the implicit mode that is difficult to express explicitly by the original features is captured. Finally, the artificial features and VAE latent features are adaptively spliced and normalized to form an enhanced feature vector with physical explainability and high discriminability, thereby significantly improving the robustness and classification accuracy of the subsequent model on dynamic fault data.

[0020] (2) In order to improve the model's ability to mine fault gas information, a diagnostic architecture based on deep heterogeneous integration is innovatively designed and implemented. The core of the architecture is composed of three complementary branch models: the LightGBM branch fully utilizes its advantages in efficiently processing structured data and is specially used to capture the complex nonlinear mapping relationship and the interaction between key features in the original sensor data or feature engineering generated data; the one-dimensional convolutional neural network (1D-CNN) branch focuses on extracting local feature patterns with diagnostic significance from the time series of gas sensor responses using its inherent convolution operation; the Transformer branch relies on its powerful self-attention mechanism to effectively model and understand the global long-range dependencies within the sensor signal sequence, which is crucial for capturing the complete evolution of potential fault patterns on the time scale. Through this heterogeneous integration strategy, the model integrates the core modeling capabilities of tree models, convolution operations, and self-attention mechanisms, significantly improving the all-around representation and mining ability of hidden diagnostic signals in fault gases.

[0021] (3) In view of the inherent defects of traditional fusion strategies such as simple average fusion or artificial setting of fixed weights, which can easily lead to insufficient information utilization or misjudgment when integrating heterogeneous diagnostic models, an attention mechanism is innovatively introduced and designed. This mechanism can adaptively adjust the weight distribution ratio of each component module within the heterogeneous model according to the specific characteristics and context of the input data. This dynamic weighting method significantly enhances the robustness of the model, ensuring that it consistently outputs reliable and stable diagnostic results in various complex and highly uncertain application scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is a schematic diagram of the fault diagnosis model of embodiment 1 of the present application; Figure 2 is a schematic diagram of the dual-path feature enhancement module of embodiment 1 of the present application; Figure 3 is a schematic diagram of the Transformer model Encoder structure of embodiment 1 of the present application; Figure 4 is a schematic diagram of the comparative experiment of embodiment 1 of the present application; Figure 5 is an ablation experiment schematic diagram of embodiment 1 of the present application. DETAILED DESCRIPTION

[0023] The present application will be further described in detail below with reference to the accompanying drawings.

[0024] Embodiment 1 Reference Figure 1The embodiment of the application is a fault diagnosis method for oil-immersed transformers based on feature enhancement and deep heterogeneity, which comprises the following steps: 1. Firstly, in view of the inherent imbalance characteristics of industrial data, the adaptive sample generation (smote algorithm) technology is adopted. This method dynamically adjusts the neighborhood parameters based on the distribution characteristics of the minority class samples, synthesizes new samples conforming to the physical constraints, ensures that the gas concentration is non-negative and maintains the original data distribution rule, and effectively alleviates the class imbalance problem. Secondly, a ten-dimensional expert knowledge system is constructed on the feature engineering: the five gas concentrations of the existing data are fused, and the fault feature ratio, the discharge indication ratio, the thermal fault ratio and the total hydrocarbon concentration are innovatively introduced. The feature set is coupled with the 4-dimensional deep features generated by the variational autoencoder (VAE), and finally a 14-dimensional enhanced input space is formed to achieve the purpose of fully extracting deep features of fault gases.

[0025] Subsequently, a heterogeneous integrated model architecture is adopted, which innovatively fuses three types of learners: the first branch simulates LightGBM to capture the shallow relationship of features; the second branch uses a one-dimensional convolutional neural network (1D-CNN) to focus on identifying local features of fault gases; and the third branch is based on the Transformer model to establish global dependency relationships. This multi-level learning strategy ensures comprehensive extraction of fault information. However, this complex multi-branch model may have a serious impact on the fault diagnosis of feature gases if the learning weights are not allocated well. Therefore, after using the heterogeneous model, a dynamic fusion mechanism is adopted to achieve the synergy of the three models through attention weighting. This mechanism automatically evaluates the contribution of each learner in different fault scenarios and generates an adaptive weight allocation scheme. The model proposed in this paper breaks through the limitations of traditional diagnostic models: it solves the problem of sample scarcity through generative data augmentation, improves information utilization through multi-source feature fusion, and enhances model generalization through heterogeneous integration architecture, ultimately achieving accurate differentiation of complex fault patterns. The overall structure of the model is shown in Figure 1 .

[0026] 2. Data synthesis module, Because training a machine learning model often requires a large amount of data as support, but in transformer fault diagnosis, transformer faults are low-probability events with very low occurrence frequency, so it is very difficult to collect a large amount of balanced fault data. In oil-immersed transformer fault diagnosis, the proportion of serious fault samples such as discharge and high-energy discharge is usually low, which leads to the problem that traditional classification models such as support vector machine (SVM) Decision trees and similar algorithms often exhibit majority-class bias due to sample imbalance. Traditional oversampling (such as random copying) can easily lead to overfitting, while undersampling results in the loss of effective information, severely impacting the accuracy of fault identification. To address this issue, this study introduces Synthetic Minority Oversampling Technique (SMOTE), aiming to improve the representativeness of the decision space for minority class samples. The SMOTE algorithm generates synthetic samples through interpolation, rather than simple copying, thus avoiding the risk of overfitting. Its mathematical process is as follows: (1) Let the minority sample set S = {xi∈R} d |i=1,…,N s}, where d is the feature dimension.

[0027] (2) To Calculate its k-nearest neighbor set N k (x i )={x i (1) ,…,x i (k) The distance metric used is Mahalanobis distance (to eliminate the influence of feature correlation). Σ is the covariance matrix of the minority class samples.

[0028] (3) Linear interpolation: from N k Randomly select a nearest neighbor sample x nn Generate a new sample x new : in, , which is a random interpolation number that controls the position of the new sample in the feature space.

[0029] 3. Dual-path feature enhancement module, In fault diagnosis of oil-immersed transformers, the following challenges are faced: First, the traditional DGA gas ratio can only characterize typical fault modes, lacking sensitivity to complex faults and having limited physical characteristics. Second, the nonlinear correlations in the fault evolution process cannot be fully expressed through artificially constructed features. To address these issues, this paper expands the complementarity of physical features and deep feature extraction, constructing a more discriminative feature space. A dual-path feature enhancement module, such as... Figure 2 .

[0030] On the basis of the original characteristic gases, according to the International Electrotechnical Commission (IEC) established "Mineral oil immersed electrical equipment dissolved gas analysis guide" and the principle of chemical thermodynamics, five-dimensional characteristics are supplemented to weaken the type confusion problem in the traditional method and enhance the representation ability of the minority class fault samples. The supplemented five-dimensional physical characteristics are: C2H2 / C2H4, CH4 / H2, total hydrocarbon, C2H2 / C2H6 and C2H4 / C2H6. In order to eliminate the dimension difference, the original gas concentration and the constructed ratio are standardized by Z-score: In the formula: μ is the mean of the x data set; σ is the standard deviation of the data set elements; x' is the result after x is standardized.

[0031] In transformer fault diagnosis, dissolved gas analysis (DGA) data has the characteristics of multi-class fault, class imbalance and limited data volume. In order to improve the accuracy of fault diagnosis, effective feature extraction and enhancement are needed. Traditional feature extraction methods often have difficulty in capturing the complex distribution and potential features of data, while variational autoencoder (VAE) as a generative model can learn data distribution while extracting features and enhancing data. VAE consists of an encoder, a decoder and a reparameterization process. The encoder maps the input data to the latent space to obtain the mean and variance; the decoder maps the latent space samples back to the data space to reconstruct the input data; the reparameterization process introduces randomness to make the model learn more robust feature representation. The mathematical process is as follows: (1) Encoder: the encoder is a neural network that maps the input data x to the mean μ and variance logσ of the latent space 2 : Wherein, represents the parameters of the encoder.

[0032] (2) Reparameterization: in order to backpropagate the gradient in the training process, reparameterization technique is introduced: Wherein, is a random variable sampled from the standard normal distribution N(0,1), and ⊙ represents element-level multiplication.

[0033] (3) Decoder: the decoder is also a neural network that maps the latent space sample z back to the data space to reconstruct the input data x: Wherein, θ represents the parameters of the decoder.

[0034] (4) Loss function: The loss function of VAE consists of two parts: reconstruction loss and KL divergence.

[0035] where the reconstruction loss measures the difference between the reconstructed data and the original data, the KL divergence measures the difference between the latent space distribution and the prior distribution (usually standard normal distribution), and β is a hyperparameter to balance the reconstruction loss and the KL divergence.

[0036] In this module, the physical expansion of the characteristic gas dimension is used to increase the expression ability of the data, and then the standardized data is input into the VAE, and through the encoder of the VAE, the original data is mapped to the latent space to obtain low-dimensional feature representation, and these features are combined with the original features to enhance the model's understanding ability and diagnostic performance.

[0037] 3.4 Oil-immersed transformer fault diagnosis module based on heterogeneous model, The core challenge of oil-immersed transformer fault diagnosis lies in the diversity and complexity of fault modes, such as fuzzy decision boundary and serious feature space fragmentation. Traditional single models cannot well solve these problems, and their comprehensive ability in problem solving is lacking. Therefore, this paper proposes a heterogeneous ensemble model to achieve complementary advantages by integrating multiple models. Specifically, the full connection network of the simulated LightGBM is used to learn the decision boundary; the 1D-CNN time series feature extractor is used to capture the time series features; and the Transformer context modeling module is used to build global feature dependency.

[0038] The design inspiration of the heterogeneous ensemble model comes from the "diversity" principle in "ensemble learning". Single models often perform well on specific types of data or tasks, but their generalization ability is limited when faced with complex, multi-source, and nonlinear data. By introducing multiple sub-models with different structures and training methods, complementarity can be formed in feature extraction, pattern recognition, and context modeling, thereby improving the robustness and accuracy of the overall model. This "divide and conquer" strategy has been widely used in image recognition and natural language processing, and this paper first systematically introduces it into the field of oil-immersed transformer fault diagnosis.

[0039] The fuzzy decision boundary is caused by the non-simple one-to-one correspondence between fault symptoms and fault types. For example, different faults may produce similar gas ratio, and the same fault may have significantly different gas characteristics at different development stages. Feature space fragmentation means that normal and fault data points are scattered in high-dimensional feature space, and there are many areas that cannot be separated by linear or simple nonlinear models. The core advantage of heterogeneous ensemble model is its "divide and conquer" strategy. Instead of trying to solve all problems with a complex universal model, it divides the complex fault diagnosis task into three sub-tasks and assigns the most suitable sub-model to solve them: one model is responsible for learning static and structured feature combination rules; one model is responsible for capturing short-term and local temporal patterns; one model is responsible for understanding long-term and global context associations. The final diagnosis result is the collaborative output of the three models.

[0040] In practical applications, fuzzy decision boundary and feature space fragmentation often lead to good performance on the training set but poor performance on the test set or actual running data, i.e., "overfitting" or "poor generalization". For example, some models may misjudge "partial discharge" and "arc discharge" as the same fault because they show similar gas ratios (such as C2H2 / H2) in DGA data. However, through the heterogeneous ensemble model, the LightGBM module can learn the subtle differences between different fault types in structured features, the 1D-CNN can identify local trends in gas concentration changes, and the Transformer can model long-term dependencies between different time points, effectively distinguishing these " seemingly similar" fault patterns.

[0041] The decision boundary fuzziness can be quantified by the margin distribution: The experiment shows that a single LightGBM has M(0.1)=18.4% on the DGA dataset, while the heterogeneous ensemble reduces to 7.2%, which intuitively shows that the boundary is clearer.

[0042] The margin is an important indicator of measuring the confidence of the classifier. A larger margin usually means better generalization ability. The indicator function II(·) in the formula is used to count the proportion of samples with a classification margin less than the threshold ε. The smaller M(ε) is, the fewer confused samples there are near the classification boundary, and the clearer the classification boundary is. Experimental results show that the heterogeneous ensemble model reduces M(0.1) from 18.4% to 7.2%, indicating that it has a significant advantage in handling boundary fuzzy samples. This improvement is mainly due to the multi-model collaborative decision mechanism: when a model has low confidence in classifying a sample, other models can provide supplementary information through their unique feature extraction capabilities, thereby improving the overall classification confidence.

[0043] LightGBM is an efficient Gradient Boosting Decision Tree (GBDT) algorithm, which is widely used in classification and regression tasks of structured data. In oil-immersed transformer fault diagnosis, LightGBM can effectively handle high-dimensional features and learn complex patterns of data through boosting methods. The LightGBM branch module in this paper simulates the decision logic of LightGBM, using a multi-layer fully connected neural network structure, specifically including two hidden layers containing 256 and 128 neurons respectively, and using ReLU activation function after each layer to introduce nonlinearity. Mathematically, assuming the input feature vector is x∈R d , the output is o∈R c , where d is the input dimension and c is the number of classes. The forward propagation process can be represented as: where W1∈R 256×d , W2∈R 128×256 , W3∈R c×128 are weight matrices and b1∈R 256 , b2∈R 128 , b3∈R c are bias vectors.

[0044] Although LightGBM is essentially a decision tree-based model, this paper simulates its "residual fitting" and "boosting" ideas through a fully connected neural network, which is a "neural networked" approximation. The advantage of this approach is that it can be seamlessly integrated with CNN, Transformer and other modules to form an end-to-end trainable system. The introduction of the ReLU activation function not only increases the non-linear expression ability, but also effectively alleviates the gradient vanishing problem. The hidden layer dimensions of 256 and 128 are the result of a trade-off between model complexity and computational efficiency. Experiments show that this structure maintains high accuracy while meeting the real-time requirements of online monitoring in terms of inference speed.

[0045] To explicitly simulate the residual fitting idea of GBDT, we append a residual connection (ResidualConnection) after equation (9): where W skip ∈R c×d .

[0046] This design allows the network to obtain an identity path when backpropagating, alleviating the vanishing gradient problem, while making the fully connected network closer to the additive model in the function space, consistent with the boosting mechanism of GBDT.

[0047] Residual connection was first proposed by ResNet to address the gradient degradation problem in deep networks. In this paper, residual connection not only stabilizes training, but also simulates the core idea of fitting residual in GBDT. Specifically, GBDT learns the residual of the previous model at each tree, while the residual connection here allows the network to directly map input features to the output space, making it easier to learn the residual between input and output. This design is structurally closer to the additive model, where the final output is the sum of multiple sub-model outputs, and is highly consistent with the boosting idea. The selection of hidden layer dimension is based on the conservation of Glorot initialization variance: Glorot initialization (also known as Xavier initialization) is a commonly used weight initialization method designed to maintain the stability of signal variance during forward and backward propagation. The formula β = 0.5 is an empirical parameter used to adjust the ratio between the hidden layer dimension and the input dimension. By initializing in this way, we can effectively avoid the problem of gradient explosion or vanishing, which is particularly important in deep networks. In this paper, the selection of hidden layer dimension 256 not only considers the stability of initialization, but also takes into account the model capacity and computational efficiency.

[0048] 1D-CNN is good at extracting local features from sequence data and performs well in time series data analysis. In oil-immersed transformer fault diagnosis, DGA data can be regarded as a time series signal, and 1D-CNN can capture the pattern of gas concentration changes over time. The 1D-CNN branch designed in this paper contains two convolutional layers and one pooling layer. First, the input features are expanded into a single-channel sequence, and then the convolution kernel is used to extract features: where W1∈R 128×1×3 , W2∈R 64×128×3 are the convolution kernel weights, and b1∈R 128 , b2∈R 64 are the biases.

[0049] After convolution, an adaptive max-pooling layer is used to compress the feature map to a fixed length: Finally, the output is obtained through the fully connected layer: where W3∈R c×64 is the weight matrix, and b3∈R c is the bias vector.

[0050] 1D-CNN has the advantages of translation invariance and local receptive field when processing time series data. The convolution kernel size is 3, which means that the output of each time step only depends on the input of the current step and the previous and next steps. This local connection method is very suitable for capturing short-term mutation features. Adaptive max pooling solves the problem of inconsistent input sequence length, allowing the model to process DGA data sequences of different lengths. Compared with traditional RNN or LSTM, 1D-CNN has obvious advantages in training speed and parallel computing, especially suitable for embedded device deployment.

[0051] The convolution kernel size is fixed at 3, which can capture gas mutations within a 7-day sliding window corresponding to the minimum wavelet support ψ(2t-l). The dilated convolution (Dilated Convolution) experiment shows that when dilation=2, the receptive field R=2×(3-1)×2+1=9 can cover two weeks of trends, but the parameter amount increases by 1.8×. Finally, dilation=1 is selected to balance efficiency. The adaptive pooling output length is set to L=16, which ensures that when the input sequence length T∈[30,180], a fixed-size feature vector can be obtained, facilitating subsequent concatenation.

[0052] Dilated Convolution is an effective method to expand the receptive field without increasing the parameter amount. In this paper, although dilation=2 can cover a longer time range, it also introduces more noise and computational overhead. The final choice of dilation=1 is a trade-off between model complexity, computational efficiency, and feature expression ability. The choice of adaptive pooling output length L=16 is based on experimental verification of different length sequences, which can maintain feature expression ability while ensuring consistent input dimensions for subsequent modules.

[0053] The Transformer architecture has an advantage in handling data that requires long-term dependencies due to its strong context modeling ability. In oil-immersed transformer fault diagnosis, there may be long-term dependencies between DGA data at different time points, and Transformer can capture these relationships to improve diagnostic accuracy. The decoder structure of Transformer is as follows: Figure 3 .

[0054] The Transformer was initially applied in the field of natural language processing. Its core advantage lies in modeling the dependencies between any two positions in a sequence through a self-attention mechanism, without relying on a recursive structure. This allows the Transformer to avoid the vanishing gradient problem in RNNs when processing long sequences and also provides higher parallelization capabilities. In DGA data, certain fault types (such as partial discharge) may initially exhibit weak gaseous characteristics, which gradually worsen over weeks or months. The Transformer can identify these weak signal correlations across time through its self-attention mechanism, thereby improving the accuracy of early fault diagnosis.

[0055] Long-term dependency strength can be measured by maximum mutual information (MaxMI): The experiment measured MaxMI = 0.47 nats, which is significantly higher than 0.12 nats for random sequences, proving that there is a nonlinear dependence of gas concentration across months, providing necessary evidence for Transformer.

[0056] This embodiment designs a Transformer branch containing multiple Transformer encoders. Each encoder layer includes a multi-head self-attention mechanism and a feedforward neural network. For the input sequence X={x1,x2,…,x…}, the input sequence is... n}, where x i ∈R d The calculation process of the multi-head self-attention mechanism is as follows: First, map the input sequence to query (Q), key (K), and value (V) spaces: Among them, W Q W K W V ∈R d×dk It is the weight matrix, d k This is the dimension of attention. Then, the attention score is calculated and normalized: Then, a weighted summation is performed on the value vector: Finally, the features are further processed using a feedforward neural network: Where W1∈R d×dff W2∈R d×dff It is a weight matrix, b1∈R dff, b2∈R d is the bias, d ff is the hidden layer dimension of the feed-forward network. After obtaining the output of the encoder, we get the final output through global average pooling and fully connected layer: where W3∈R c×d is the weight matrix, b3∈R c is the bias vector.

[0057] The multi-head self-attention mechanism maps the input to multiple subspaces (heads), allowing the model to simultaneously focus on different types of information at different positions in the sequence. This mechanism greatly enhances the expressive power of the model. The scaling factor in equation (15) is to prevent the dot product value from being too large, causing the softmax function to saturate. The feed-forward network (FFN) part adopts a two-layer fully connected structure, the first layer expands the dimension to 4 times, and the second layer compresses it back to the original dimension. This "expansion-compression" structure helps the model learn more complex nonlinear mappings.

[0058] The number of multi-head h=8 satisfies d k =d / h=32, so that the dot product scaling factor d k =42 matches the gradient scale; the feed-forward dimension adopts the four-fold expansion rule d ff =4d=256, consistent with BERT-base, with a parameter quantity of 8d 2 =1.05M, and an inference delay of 8.7ms on an embedded GPU (Jetson Xavier), meeting the online monitoring requirement of ≤10ms. The position encoding uses 1D-learned instead of sinusoidal, as the sampling interval of DGA is non-uniform (7-30 days), and the learned position vector PE∈R T×d automatically adapts to the non-periodic time pattern through backpropagation.

[0059] In summary, the heterogeneous ensemble model proposed in this section integrates the decision logic of LightGBM, the local feature extraction capability of 1D-CNN, and the context modeling capability of Transformer, aiming to comprehensively capture the complex patterns in oil-immersed transformer DGA data and improve the accuracy and robustness of fault diagnosis. The proposal of the heterogeneous ensemble model not only enhances the diagnostic ability of traditional single models but also explores the balance between "model interpretability" and "engineering practicality". The LightGBM module provides strong interpretability (such as feature importance), the 1D-CNN module provides sensitivity to local mutation patterns, and the Transformer module provides modeling capability for long-term evolution trends. The synergy of the three enables the model not only to "diagnose faults" but also to "understand the evolution process of faults", providing more forward-looking decision support for maintenance personnel. In the future, this framework can be extended to fault diagnosis tasks of other power equipment, with broad engineering application prospects.

[0060] 3.5 Attention Fusion Module, To integrate the three heterogeneous models of LightGBM, 1D-CNN, and Transformer, this section designs an attention fusion module. This module dynamically adjusts the contribution of each model output to the final prediction result by calculating the weight of each model output, enabling the model to better leverage the strengths of each branch.

[0061] The core idea of the attention fusion module is to assign weights based on the confidence of each model output. Specifically, we learn these weights through an attention network. The input of the attention network is the output of each model, which is passed through a fully connected layer and an activation function to output the weight of each model. These weights are normalized by the Softmax function so that their sum is 1. In mathematical expression, assuming the output of each model is o i ∈R c (where c is the number of classes), we first concatenate these outputs into a vector: Then, map it to a low-dimensional space through a fully connected layer: where W1∈R 64×3c is the weight matrix and b1∈R 64 is the bias vector. Next, calculate the weight of each model: where W2∈R 3×64 is the weight matrix and b2∈R 3is the bias vector. Here 3 represents three models. Finally, the final output is obtained by weighted summation: where w i is the weight of the i-th model.

[0062] The outputs of the three heterogeneous models designed in Section 3.4 are integrated by the attention fusion module in this section. Specifically, the outputs of each branch are stacked into a tensor and then input into the attention fusion module to calculate the weights: Then, the weights are calculated by the attention fusion module: Finally, the final output is obtained by weighted summation: Through the attention fusion module, the three heterogeneous models of LightGBM, 1D-CNN, and Transformer can be effectively integrated. This integration method fully utilizes the advantages of each model, improving the accuracy and robustness of oil-immersed transformer fault diagnosis. The introduction of the attention mechanism enables the model to dynamically adjust the contribution of each branch, thereby achieving good diagnostic results under different fault types and data distributions.

[0063] 4、Experiment, To verify the performance of the oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneous integration proposed in this paper, a large number of experiments are conducted. This paper uses a 500KV oil-immersed transformer as the fault diagnosis dataset. The experimental part of this paper mainly includes data preprocessing, parameter setting, baseline model, experimental results, comparative experiment, and ablation experiment. In the following chapters, this paper will introduce each step of the experiment in detail.

[0064] 4.1 Data Preprocessing, To verify the effectiveness of the model proposed in this paper, the fault data of a 500KV oil-immersed transformer is used as the dataset for experiments. This dataset has two tables. Table one contains the content indicators of different gas components in the transformer oil, including H2, CH4, C2H4, C2H2, CO, CO2, THC, and C2H6. Table two indicates the fault types of the fault code column in table one, which has a total of six categories: medium-low temperature overheating, high temperature overheating, partial discharge, low energy discharge, high energy discharge, and normal. Table one has 1094 samples, and part of the sample data is shown in Table 1.

[0065] Table 1 Partial Sample Data H2 CH4 C2H4 C2H2 CO CO2 THC C2H6 Fault code 17.2 2.9 0.6 0 222 428.9 3.7 0.2 1 18.9 2.6 0.6 0 189.1 357.5 3.3 0.1 2 21.88 2.17 0.67 0 154.11 323.51 2.95 0.11 3 28.87 2.1 0.16 0 115.68 231.39 2.27 0 4 The number of fault samples is shown in Table 2.

[0066] Table 2 Number of fault samples Fault code Fault type Fault sample number 1 Low and medium temperature overheating 211 2 High temperature overheating 181 3 Partial discharge 186 4 Low energy discharge 258 5 High energy discharge 123 6 Normal 135 Total 1094 As can be seen from Table 2, there are more low-energy discharges and medium-low temperature overheating, and fewer normal and high-energy discharges, which fully reflects the sample imbalance problem in oil-immersed transformer fault diagnosis.

[0067] In this paper, the smote algorithm is used for data expansion and balancing operation, and the sample conforming to the physical constraint is generated by dynamically adjusting the k-nearest neighbor algorithm parameters. The original sample is spliced with the synthesized sample, so that the number of each fault category reaches 300, and the total data sample quantity after balancing is 1800. Each kind of fault sample is divided into training set and test set in the ratio of 8:2.

[0068] 4.2 Parameter setting, In this section, we will show some cases and results. The training and testing process of the example is carried out on a Windows PC equipped with an NVIDIA GeForce GTX 3090 GPU processor and an Intel Core i910900 3.70 GHz CPU processor. This paper uses Python programming language and Pycharm development environment, and builds a model based on Pytorch. The model parameters are shown in Table 3.

[0069] Table 3 Model parameters Parameter Description Value Epoch Model training times 500 η Learning rate 0.001 d_latent VAE latent space dimension 4 d_fused Feature fusion dimension 16 β KL divergence coefficient 0.5 k CNN convolution kernel scale 3 h Number of attention heads 4 Specifically, in this experiment, we used feature engineering methods to construct four new ratio features (C2H2 / C2H4, CH4 / H2, C2H2 / C2H6, C2H4 / C2H6) during data processing, expanding the original 8-dimensional feature space to a 12-dimensional feature space. The number of samples passed in each model training (batch size) is set to 64, and the total number of iterations (epochs) during training is configured to 500 rounds. The latent dimension of the VAE feature extractor is set to 4, and in the multi-model hybrid-driven power grid fault diagnosis architecture, we set the input dimension after feature fusion to 16 (12-dimensional original features + 4-dimensional VAE features). In addition, the number of heads of the Transformer branch is set to 4, and the hidden layer dimension of the attention mechanism is set to 64 to enhance the feature fusion capability of the model. Finally, the learning rate of the model is set to 0.001, which will control the update speed of the model parameters through the AdamW optimizer, prompting the model to converge to the optimal solution stably during training. Through the above parameter configuration, it is expected to train a hybrid model with strong feature extraction capability and high classification accuracy, thereby providing reliable technical support for oil-immersed transformer fault diagnosis tasks.

[0070] 4.3 Experimental results, To verify the performance of the oil-immersed transformer fault diagnosis model based on hybrid feature enhancement and deep heterogeneous integration proposed in this paper, a large number of experiments were conducted based on the fault data collected from 500kv transformers, and the experimental results are shown in Table 4.

[0071] Table 4 Experimental results

[0072] From the overall performance, the model performs very well on the test set, with an accuracy of 98.89%, and the macro average and weighted average F1 scores also reach 98.89%, indicating that the model has strong overall generalization ability. The model performs very evenly on the six fault types, with F1 scores for each category above 0.98. The main errors are concentrated in the misjudgment of high-energy discharge (predicting other categories as high-energy discharge). Each category has 60 samples, and the total number of samples is 360, and the model only misclassifies 4 samples, verifying the generalization ability and reliability of the model.

[0073] 4.4 Comparative experiment, To prove the effectiveness of the model proposed in this paper, four models are selected as comparative experiments, and experimental comparisons are carried out with the model proposed in this paper. The descriptions of these 4 baseline models are as follows: NRBO-XGBoost model

[37] : NRBO-XGBoost model based on rough set feature selection, edge deployment + SHAP explainable, accuracy 88.33%.

[0074] MRVM-MSVM-BPNN model

[38] : multi-probability output model fusion improved DS evidence theory, accuracy 72.20%.

[0075] CVAE-CNN model

[39] : VAE data augmentation + 1D-CNN classifier, solve small sample problem, accuracy 82.20%. ResVAE-Bagging ensemble model

[34] : ResVAE self-enhancement + Bagging ensemble, pre-training processing multi-class imbalance, accuracy 81.10%.

[0076] The comparative experimental results are shown in Figure 4

[0077] The experimental results show that the proposed model is superior to other comparative models in accuracy (98.89%) and F1 score (0.9889), where the second place NRBO-XGBoost model has an accuracy and F1 score of 88.33% and 0.8227, respectively. We believe that this advantage comes from the mixed feature enhancement and dynamic fusion of multiple models, which can adjust the model weight according to the data at any time, so as to better capture the complex features of transformer fault. In summary, we believe that the model designed in this paper has excellent diagnostic effect in oil-immersed transformer fault diagnosis and has strong practical value.

[0078] 4.5 Ablation experiments, The model designed in this paper is a combination of three modules: a simulated LightGBM fully connected network, a 1D-CNN time series feature extractor, and a Transformer context modeling module. Among them, the simulated LightGBM fully connected network learns the decision boundary; the 1D-CNN time series feature extractor captures the time series features; and the Transformer context modeling module constructs the global feature dependency relationship. In order to further explore the contribution of each module to the performance of the model and verify its effectiveness, this section designs 6 groups of ablation experiments. These experiments correspond to the following module combinations: only using the LightGBM module, only using the 1D-CNN module, only using the Transformer module, fusing the LightGBM module and the 1D-CNN module, fusing the LightGBM module and the Transformer module, and fusing the 1D-CNN module and the Transformer module.

[0079] ​From the experimental results of Figure 5, the proposed complete model achieves an accuracy of 98.89%, which is significantly higher than the model combinations using only a single module or combining two modules. Specifically, the model using only the LightGBM module has an accuracy of 97.78%, the model using only the 1D-CNN module has an accuracy of 97.50%, and the model using only the Transformer module has an accuracy of 95.83%. In the two-module combinations, the combination of LightGBM and 1D-CNN has an accuracy of 97.22%, the combination of LightGBM and Transformer has an accuracy of 96.94%, and the combination of 1D-CNN and Transformer has an accuracy of 96.67%. These results fully demonstrate that the integrated model designed in this paper can more comprehensively mine feature information in the data by combining the advantages of the three modules, thereby achieving higher classification accuracy, effectively verifying the synergistic effect of the model modules and the superiority of the overall architecture.

[0080] With the high-quality development of society, the power grid structure is becoming more and more complex, and the load of transformers is rapidly expanding. It is difficult to make accurate and effective diagnoses when facing unbalanced sample data, and it is difficult to meet the requirements of actual complex large-scale power equipment fault diagnosis. This study proposes an innovative oil-immersed transformer fault diagnosis method based on hybrid feature enhancement and heterogeneous model integration, aiming to address the complexity of transformer fault features and the challenge of diagnosis accuracy. By artificially constructing multi-dimensional features and combining the feature extraction capability of variational autoencoder (VAE), the fault features are fully extracted, and the synergistic modeling advantages of multi-branch neural networks (LightGBM, 1D-CNN, Transformer) are utilized. Finally, the attention fusion mechanism dynamically weights and integrates the outputs of the three branches to make optimal decisions, significantly improving the precision and robustness of fault diagnosis. Experimental results show that the method proposed in this paper performs well in processing 500KV dissolved gas analysis (DGA) data and extracting key fault features. However, there is still room for improvement: first, the computational complexity of the Transformer branch is high, which poses a challenge for edge device deployment; second, for some rare fault types (such as arc discharge with overheating), the lack of samples limits the recognition accuracy; finally, feature engineering relies on domain knowledge, and the automation level needs to be improved. Overall, the hybrid feature enhancement and heterogeneous model integration diagnosis framework proposed in this paper provides a new technical path for intelligent operation and maintenance of power transformer equipment, promoting the digitalization and intelligent operation and maintenance of power systems. In the future, we will further collect more rich data, including transformer runtime, transformer operating temperature and humidity, etc., to realize multi-modal transformer fault diagnosis and provide more solid technical support for the smooth operation of power transformers.

[0081] Embodiment 2 The embodiment provides an oil-immersed transformer fault diagnosis system based on feature enhancement and deep heterogeneity, comprising: A data acquisition module configured to acquire a few fault sample data of an oil-immersed transformer; A model construction module configured to construct an oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneity integration, wherein a few-class oversampling method is used to synthesize new samples conforming to physical constraints from the few fault sample data; A feature enhancement module configured to construct an enhanced input space based on deep features generated by a self-encoder VAE, and sufficiently extract deep features of fault gases in the new samples; A feature extraction module configured to simulate a light gradient boosting machine LightGBM to capture shallow relationships of deep features based on the extracted deep features by using a heterogeneity integration model; use a convolutional neural network 1D-CNN to identify local features of fault gases; and establish global dependency relationships based on a Transformer model; A fusion module configured to adjust model output weights based on a dynamic fusion mechanism; An optimization module configured to optimize the constructed oil-immersed transformer fault diagnosis model; A diagnosis module configured to output a fault diagnosis result by using the optimized fault diagnosis model.

[0082] A computer-readable storage medium, wherein a plurality of instructions are stored, the instructions being adapted to be loaded by a processor of a terminal device and to execute a kind of oil-immersed transformer fault diagnosis method based on feature enhancement and deep heterogeneity.

[0083] A terminal device, comprising a processor and a computer-readable storage medium, the processor is used to realize each instruction, and the computer-readable storage medium is used to store a plurality of instructions, the instructions are adapted to be loaded by the processor and to execute a kind of oil-immersed transformer fault diagnosis method based on feature enhancement and deep heterogeneity.

[0084] The above are preferred embodiments of the present application, not limited to the protection scope of the present application, therefore: any equivalent changes made according to the structure, shape, principle of the present application should be covered in the protection scope of the present application.

Claims

1. A fault diagnosis method for oil-immersed transformers based on feature enhancement and deep heterogeneity, characterized by, The method comprises the following steps: acquiring a few fault sample data of an oil-immersed transformer; constructing an oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneous integration, wherein a few-class oversampling method is used to synthesize new samples conforming to physical constraints from the few fault sample data; constructing an enhanced input space based on deep features generated by a self-encoder VAE to fully extract deep features of fault gases in the new samples; based on the extracted deep features, using a heterogeneous integration model to simulate a light gradient boosting machine LightGBM to capture shallow relationships of the deep features, using a convolutional neural network 1D-CNN to identify local features of the fault gases, and based on a Transformer model to establish global dependency relationships; adjusting the output weight of the model based on a dynamic fusion mechanism; optimizing the constructed oil-immersed transformer fault diagnosis model; outputting fault diagnosis results by using the optimized fault diagnosis model.

2. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 1, characterized in that, The method for constructing the oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneous integration comprises the following steps: an adaptive sample generation method is used to dynamically adjust the neighborhood parameters based on the distribution characteristics of the few-class samples, new samples conforming to physical constraints are synthesized to ensure that the gas concentration is non-negative and the original data distribution rules are maintained; then a ten-dimensional expert knowledge system is constructed on the feature engineering, the five gas concentrations of the existing data are fused, and the fault feature ratio, the discharge indicator ratio, the thermal fault ratio and the total hydrocarbon concentration are introduced, the four-dimensional deep features generated by the variational autoencoder VAE are coupled, and finally a fourteen-dimensional enhanced input space is formed; then a heterogeneous integration model architecture is used to fuse three types of learners: the first branch simulates the LightGBM to capture the shallow relationships of the features; the second branch uses the one-dimensional convolutional neural network 1D-CNN to identify the local features of the fault gases; the third branch is based on the Transformer model to establish the global dependency relationships, and finally the dynamic fusion mechanism is used to realize the cooperation of the three models through attention weighting.

3. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 2, characterized in that, The method of synthesizing new samples that conform to physical constraints from minority faulty sample data using minority class oversampling includes introducing the SMOTE oversampling algorithm based on dynamic adjustment of k-nearest neighbors. This algorithm mitigates the class imbalance problem in the original data by adaptively generating synthetic samples. The SMOTE algorithm avoids overfitting risk by generating synthetic samples through interpolation. This can be expressed as: Let the minority sample set S = {xi ∈ R} d |i=1,…,N s }, where d is the feature dimension; for Calculate its k-nearest neighbor set N k (x i )={x i (1) ,…,x i (k) The distance metric used is Mahalanobis distance. Σ is the covariance matrix of the minority class samples; finally, linear interpolation is performed: from N k Randomly select a nearest neighbor sample x nn Generate a new sample x new : ,in, , which is a random interpolation number that controls the position of the new sample in the feature space.

4. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 3, characterized in that, The deep feature generation based on the autoencoder VAE constructs an enhanced input space, fully extracting the deep features of fault gases in new samples. This includes supplementing the original feature gases with five-dimensional features to reduce type confusion and enhance the representation ability of minority fault samples. To eliminate dimensional differences, the original gas concentration and construction ratio are Z-score standardized. In the formula: μ is the mean of the x dataset; σ is the standard deviation of the dataset elements; x' is the standardized result of x; then, the variational autoencoder (VAE) is used to perform feature extraction and data augmentation while learning the data distribution. The VAE consists of an encoder, a decoder, and a reparameterization process. The encoder maps the input data to the latent space to obtain the mean and variance; the decoder maps the samples in the latent space back to the data space to reconstruct the input data; the reparameterization process introduces randomness to enable the model to learn feature representations, expressed as: first, the encoder maps the input data x to the mean μ and variance logσ of the latent space. 2 : ,in, This represents the encoder parameters; to backpropagate gradients during training, a reparameterization technique is introduced, represented as: ,in, The input data x is a random variable sampled from the standard normal distribution N(0,1), where ⊙ represents element-wise multiplication. The decoder then maps the samples z from the latent space back to the data space, reconstructing the input data x. Where θ represents the parameters of the decoder; finally, the loss function is calculated. The VAE loss function consists of two parts: reconstruction loss and KL divergence, expressed as: , Wherein, β is a hyperparameter used to balance the reconstruction loss and the KL divergence.

5. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 4, characterized in that, The heterogeneous integrated model simulates the shallow relationship of capturing deep features of the LightGBM, including using a fully connected network to simulate gradient boosting decision trees to effectively capture high-order nonlinear interaction relationships between features, wherein the LightGBM branch module is used to simulate the decision logic of LightGBM, and a multi-layer fully connected neural network structure is used, specifically including two hidden layers, each layer uses a ReLU activation function to introduce nonlinearity, and the input feature vector is x∈R d , and the output is o∈R c , wherein d is the input dimension, c is the number of categories, and the forward propagation process is represented as: , , , where W1∈R 256×d , W2∈R 128×256 , W3∈R c×128 is a weight matrix, b1∈R 256 , b2∈R 128 , b3∈R c is a bias vector.

6. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 5, characterized in that, The method for identifying the local features of the fault gases by using the convolutional neural network 1D-CNN comprises the following steps: the 1D-CNN is used to extract the local features in the sequence data, wherein in the oil-immersed transformer fault diagnosis, the DGA data is regarded as a time series signal, the 1D-CNN is used to capture the change pattern of the gas concentration over time, the 1D-CNN branch contains two convolutional layers and one pooling layer, first, the input features are expanded into a single-channel sequence, and then the features are extracted by the convolution kernel: , , where W1∈R 128×1×3 , W2∈R 64×128×3 are convolution kernel weights, b1∈R 128 , b2∈R 64 are biases, and after the convolution operation, an adaptive max-pooling layer is used to compress the feature map to a fixed length, denoted as , Finally, the output is obtained through the fully connected layer: , where W3∈R c×64 is a weight matrix, and b3∈R c is a bias vector.

7. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 6, characterized in that, The establishment of global dependencies based on the Transformer model includes using Transformer to capture long-term dependencies between DGA data at different time points in oil-immersed transformer fault diagnosis. The Transformer branch contains multi-layer Transformer encoders, each layer including a multi-head self-attention mechanism and a feedforward neural network. For the input sequence X={x1,x2,…,x…} n }, where x i ∈R d The computational representation of the multi-head self-attention mechanism is as follows: First, the input sequence is mapped to the query (Q), key (K), and value (V) spaces: Among them, W Q W K W V ∈R d×dk It is the weight matrix, d k This is the dimension of attention; then the attention score is calculated and normalized: , Then, a weighted summation is performed on the value vector: Finally, the features are further processed through a feedforward neural network, and are represented as follows: , where W1∈R d×dff W2∈R d×dff It is a weight matrix, b1∈R dff b2∈R d It is a bias, d ff This refers to the hidden layer dimension of the feedforward network; after obtaining the encoder's output, the final output is obtained through global average pooling and fully connected layers. , where W3∈R c×d is a weight matrix, and b3∈R c is a bias vector.

8. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 7, characterized in that, The model output weight is adjusted based on a dynamic fusion mechanism, including adopting an attention fusion mechanism to dynamically adjust the contribution to the final prediction result by calculating the weight of each model output, wherein the output of each model is denoted as o i ∈R c where c is the number of categories, the output is first spliced into a vector: ; then it is mapped to a low-dimensional space through a fully connected layer: where W1∈R 64×3c is a weight matrix, b1∈R 64 is a bias vector, and then the weight of each model is calculated: where W2∈R 3×64 is a weight matrix, b2∈R 3 is a bias vector, and finally the final output is obtained by weighted summation: , where w i is the weight of the ith model.

9. The oil-immersed transformer fault diagnosis method based on feature enhancement and depth heterogeneity according to claim 8, characterized in that, The oil-immersed transformer fault diagnosis model is optimized, including adopting a feature engineering method to construct four new ratio features, including C2H2 / C2H4, CH4 / H2, C2H2 / C2H6, and C2H4 / C2H6, expanding the original 8-dimensional feature to a 12-dimensional feature space, setting the sample size batch size to 64 for each model training, and configuring the total number of iterations epochs to 500 rounds during training; the latent dimension of the VAE feature extractor is set to 4, in the power grid fault diagnosis architecture based on multi-model hybrid driving, the input dimension after feature fusion is set to 16, including 12-dimensional original features + 4-dimensional VAE features, and the number of heads of the Transformer branch is set to 4, and the hidden layer dimension of the attention mechanism is 64, to enhance the feature fusion capability of the model; finally, the learning rate of the model is set to 0.001, and the AdamW optimizer is used to control the update speed of the model parameters, so that the model converges to the optimal solution stably during training.

10. A feature enhancement and depth heterogeneous based oil-immersed transformer fault diagnosis system, characterized in that, Comprise: A data acquisition module configured to acquire oil-immersed transformer minority fault sample data; A model construction module configured to construct an oil-immersed transformer fault diagnosis model based on mixed feature enhancement and deep heterogeneous integration, wherein a minority class oversampling method is used to synthesize new samples conforming to physical constraints from the minority fault sample data; A feature enhancement module configured to construct an enhanced input space based on deep features generated by a self-encoder VAE to fully extract deep features of fault gases in the new samples; A feature extraction module configured to extract deep features based on the extracted deep features, use a heterogeneous integration model to simulate a light gradient boosting machine LightGBM to capture shallow relationships of deep features, use a convolutional neural network 1D-CNN to identify local features of fault gases, and establish global dependency relationships based on a Transformer model; A fusion module configured to adjust model output weights based on a dynamic fusion mechanism; An optimization module configured to optimize the constructed oil-immersed transformer fault diagnosis model; A diagnosis module configured to output fault diagnosis results using the optimized fault diagnosis model.

Citation Information

Patent Citations

  • Fault data generation method of deep SMOTE integrated with HCFF

    CN118940124A

  • Multi-modal data fusion GIS fault prediction method and system

    CN120030464A

  • Rotary machinery data enhancement method based on SCF-CVAE-GAN network

    CN120541522A

  • Analog circuit early fault diagnosis method based on subsequence division and Transform

    CN120951916A

  • Fault detection method for refrigeration units based on improved deep learning model

    US12442551B1

Cited By

  • A method and system for predicting gas content in oil of an oil-immersed transformer

    CN122241132A