Abnormity detection method and device for double-branch transformer, and medium

By employing a feature fusion method with a dual-branch structure, utilizing long short-term memory networks and the Transformer model, the complex correlation and multi-scale feature fusion problems of multi-source heterogeneous sensor data were solved, enabling high-precision detection and early warning of transformer faults.

CN121637033APending Publication Date: 2026-03-10STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate the complex correlations and multi-scale features in multi-source heterogeneous sensor data, resulting in insufficient accuracy in transformer fault detection and early warning capabilities.

Method used

By employing a dual-branch structure and combining a long short-term memory network and a Transformer model, dynamic gating coefficients are generated by calculating feature similarity, thereby achieving adaptive nonlinear fusion of local transient features and global associated features.

Benefits of technology

It significantly improves the accuracy of transformer fault symptom detection and early warning capability, enhances the model's generalization ability and robustness, and reduces the impact of data distribution drift and environmental changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637033A_ABST
    Figure CN121637033A_ABST
Patent Text Reader

Abstract

The invention relates to a double-branch transformer anomaly detection method and device and a medium, and the method comprises the steps: carrying out the processing of a multi-dimensional time series data set through a long-short-term memory network branch, and extracting a short-term transient feature representing the short-term dynamic change of the operation state of a transformer; processing the multi-dimensional time sequence data set through a Transform encoder branch, and extracting long-range correlation characteristics representing the long-distance dependency relationship of the operation state of the transformer; based on the short-term transient feature and the long-range correlation feature, calculating a similarity matrix between the features and generating a dynamic gating coefficient, and performing nonlinear interaction and weighted fusion on the two branch features through the dynamic gating coefficient to generate a fusion feature; and finally outputting an abnormal state classification result of the transformer. Compared with the prior art, the method has the advantages of high accuracy, high real-time performance, high information utilization rate and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent diagnostic technology, and in particular to a method, device and medium for detecting anomalies in a dual-branch transformer. Background Technology

[0002] With the continuous expansion and increasing complexity of power systems, transformers, as key equipment in the power grid, require intelligent monitoring of their operating status and fault early warning systems to ensure the safe and stable operation of the power grid. Currently, various technical solutions for transformer condition detection and fault early warning have been proposed and applied in practical engineering projects.

[0003] Existing technologies mainly fall into the following categories: First, monitoring methods based on single parameters or expert rules are widely used. These methods typically determine the state based on comparisons between single physical quantities such as oil temperature, current, and voltage and preset thresholds, triggering an alarm when the detected value exceeds the threshold. While simple to implement and fast-responding, these methods can only identify single anomalies and struggle to capture the synergistic effects of multiple parameters and early fault signs under complex operating conditions, resulting in high false alarm and false negative rates. Second, detection methods based on traditional statistical analysis and machine learning have also been extensively studied. These methods typically rely on manually constructed features, such as mean, extreme values, slope, and spectrum, combined with traditional classification algorithms like support vector machines, decision trees, and random forests to identify and classify transformer operating conditions. Although they offer stronger feature representation capabilities compared to threshold methods, these methods heavily rely on expert experience, making them unsuitable for large-scale automated processing of multi-source data, and have limited ability to model dynamic trends and complex correlations in time-series data.

[0004] In recent years, state recognition methods based on single deep learning models have been gradually applied to the field of intelligent transformer monitoring. For example, models such as recurrent neural networks and long short-term memory networks are used to automatically extract features from time-series sensor data to identify the operating status of equipment; some studies have also attempted to introduce models based on self-attention mechanisms, such as Transformers, to capture global features. However, most of the above methods adopt a single-path structure, focusing either on capturing short-term or local temporal dependencies or on global correlations, making it difficult to balance the advantages of both. Especially when dealing with multi-source heterogeneous sensor data, the expressive power of a single model path is limited, resulting in unsatisfactory fusion effects.

[0005] In addition, some existing technologies attempt to fuse different features through simple splicing or average weighting. However, such fusion methods are usually static and pre-set, and cannot adaptively adjust the importance of each feature branch according to the actual working conditions. This results in a weak dynamic fusion capability for multi-branch, multi-source, and multi-scale information, and limited improvement in the generalization ability, accuracy, and robustness of the overall model.

[0006] Therefore, how to effectively model the complex correlations and multi-scale features in multi-source sensor time-series data, adaptively fuse features, give full play to the advantages of different branch models, reduce the impact of data distribution drift and environmental changes on detection results, and improve the generalization ability and early warning capability of the model are technical problems that need to be solved. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method, device and medium for detecting anomalies in dual-branch transformers. By introducing a dynamic gating fusion mechanism based on the similarity of output features of long short-term memory network and Transformer, the fusion weights of local transient features and global correlation features can be adaptively adjusted, thereby significantly improving the accuracy of capturing complex fault symptoms of transformers and the ability to provide early warning.

[0008] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for detecting anomalies in a dual-branch transformer is provided, the specific steps of which include: S1. Collect time-series data from multi-source heterogeneous sensors during transformer operation, including voltage, current, temperature, vibration signals, and oil chromatography gas concentration data; S2. Perform outlier cleaning, interpolation completion, and standardization on the time-series data of multi-source heterogeneous sensors to form a standardized multi-dimensional time-series dataset. S3. The multidimensional time-series dataset is processed through a Long Short-Term Memory (LSTM) network branch to extract short-term transient features that characterize the short-term dynamic changes in the transformer's operating state; the multidimensional time-series dataset is processed through a Transformer encoder branch to extract long-range correlation features that characterize the long-distance dependencies in the transformer's operating state. S4. The short-term transient features and long-range correlation features are used to calculate the similarity matrix between the features and generate dynamic gating coefficients. The two branches of features are nonlinearly interacted and weighted through the dynamic gating coefficients to generate fused features. S5. Flatten the fused features and perform fully connected network processing to finally output the abnormal state classification results of the transformer.

[0009] Furthermore, the input features of the long short-term memory network in S3 include first-order differential signals of current and voltage, vibration signals processed by bandpass filtering, and differential rate of change signals of temperature and oil chromatographic gas concentration, which are used to jointly capture transient electrical shocks, mechanical vibration transients, and slow thermal and chemical change trends during transformer operation.

[0010] Furthermore, when obtaining the global attention features of the transformer, the standardized multi-dimensional time-series dataset is processed on multiple scales, specifically including: aligning the high-frequency path data representing transient electrical and vibration characteristics with the low-frequency path data representing temperature rise and oil gas dissolution trends on time scales and splicing features to obtain a unified feature representation that simultaneously reflects both rapid events and long-term slow processes of the transformer.

[0011] Furthermore, the Transformer encoder employs a multi-head self-attention mechanism, introducing a modulation matrix based on the historical covariance relationship between sensor channels of different physical quantities of the transformer when calculating attention weights.

[0012] Furthermore, the adaptive feature fusion step specifically includes: The interaction similarity is calculated based on the short-term transient features output by the Long Short-Term Memory network branch and the long-range association features output by the Transformer branch. Based on the interaction similarity and the characteristics of the two-branch output, gating coefficients are generated for dynamically weighing the importance of transient events and long-term trends; Based on the gating coefficient, the components representing synergistic effects and the components representing complementary differences in the two-branch features are fused to generate fused features that include local details and global situation.

[0013] Furthermore, the interaction similarity The expression is: + ), in, The weight matrix is ​​a learnable weight matrix; This is the output feature of the Long Short-Term Memory (LSTM) network branch, i.e., short-term transient features; Output features for the Transformer branch, namely long-range correlation features; tanh is the element-wise product; tanh is the hyperbolic tangent activation function. The gating coefficient The expression is: ]+ ), in, For the fusion weight matrix; ] indicates a feature concatenation operation; For bias terms; This is the Sigmoid function.

[0014] Furthermore, the fusion features generated based on the gating coefficients The expression is: , in, The gating factor; , and For weighting; This is the output feature of the Long Short-Term Memory (LSTM) network branch, i.e., short-term transient features; The output features for the Transformer branch are long-range correlation features.

[0015] Furthermore, the category probability distribution output by the fully connected network corresponds to the three discrete states of the transformer in actual operation and maintenance: normal, abnormal warning, and fault.

[0016] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.

[0017] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0018] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention improves the intelligence and adaptability of feature fusion by introducing a similarity-based dynamic gating fusion mechanism, thereby enhancing the accuracy of anomaly detection. By calculating the similarity matrix between the short-term transient features output by the Long Short-Term Memory Network branch and the long-range correlation features output by the Transformer branch, dynamic gating coefficients are generated accordingly. Then, nonlinear interaction and weighted fusion of the two branch features are performed. The contribution ratio of local details and global situation features in the fusion is automatically and dynamically adjusted according to the input data. This overcomes the feature conflict or information loss problems caused by simple splicing or static weighting in the prior art, so that the final generated fusion features can more accurately represent the real operating state of the transformer. In practical applications, the classification results of normal, abnormal warning and fault states are more reliable.

[0019] (2) This invention significantly improves the ability to capture complex fault symptoms by extracting multi-scale features through a dual-branch structure, thereby achieving earlier anomaly warning. The LSTM branch is used to specifically capture short-term dynamic features such as transient current and voltage impacts and short-term changes in vibration signals. At the same time, the Transformer branch is used to focus on long-range correlation features such as slow temperature rise and long-term trend of gas concentration in oil. Through targeted division of labor design, the model can simultaneously and keenly perceive the rapidly changing electromechanical events and the slowly developing chemical and thermal degradation process in transformer operation. It can identify early weak fault symptoms caused by the synergistic effect of multiple parameters that are difficult to detect by a single model path, and ultimately provide a longer response time for preventive maintenance in actual operation and maintenance.

[0020] (3) This invention improves the model’s utilization efficiency of domain-specific information by using specific preprocessing and feature enhancement for multi-source physical quantities of transformers, thereby enhancing the model’s generalization ability. Before feature extraction, targeted preprocessing is performed on different sensor data. For example, the first-order difference is calculated for electrical quantities and vibration signals to highlight transients, and the trend processing is performed on temperature and gas concentration to obtain the rate of change. In the Transformer branch, a modulation matrix based on the historical covariance relationship between sensor channels is introduced to enhance attention to channels with physical correlation. These technical means closely coupled with the field of transformer monitoring make the model input and internal calculation more in line with the physical evolution law of transformer faults, reduce the model’s sensitivity to irrelevant noise, and ultimately make the trained model exhibit stronger stability and generalization performance when facing data from different operating conditions and different transformers. Attached Figure Description

[0021] Figure 1 This is a method for detecting anomalies in a two-branch transformer. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] Example 1 Existing transformer anomaly detection methods mostly employ single-path deep learning models or simple feature splicing and fusion, which struggle to consider both local transient and global trend features. Furthermore, the fixed fusion methods result in insufficient modeling of complex correlations in multi-source heterogeneous time-series data, limiting detection accuracy and early warning capabilities. To address this, this embodiment proposes a transformer anomaly detection method based on LSTM and Transformer. By calculating the similarity of the output features from the two branches and generating dynamic gating coefficients, it achieves adaptive nonlinear fusion of local details and global situation, effectively improving the completeness and specificity of feature representation, thereby enhancing the ability to identify complex fault symptoms and the timeliness of early warning.

[0024] like Figure 1 As shown, this embodiment provides a method for detecting anomalies in a dual-branch transformer. The specific steps include: S1. Collect time-series data from multi-source heterogeneous sensors during transformer operation, including voltage, current, temperature, vibration signals, and oil chromatography gas concentration data; S2. Perform outlier cleaning, interpolation completion, and standardization on the time-series data of multi-source heterogeneous sensors to form a standardized multi-dimensional time-series dataset. S3. Process the multidimensional time series dataset through the Long Short-Term Memory network branch to extract short-term transient features that characterize the short-term dynamic changes of the transformer's operating state; process the multidimensional time series dataset through the Transformer encoder branch to extract long-range correlation features that characterize the long-distance dependencies of the transformer's operating state. S4. Short-term transient features and long-term correlation features are used to calculate the similarity matrix between features and generate dynamic gating coefficients. The two branches of features are nonlinearly interacted and weighted through dynamic gating coefficients to generate fused features. S5. Flatten the fused features and process them with a fully connected network to finally output the abnormal state classification results of the transformer.

[0025] The sensor data used for data acquisition is collected at a uniform sampling frequency of 1kHz to form multi-dimensional time-series data, ensuring the time synchronization of various types of data. By simultaneously integrating multiple data sources such as vibration signals and oil chromatography gas concentrations, the ability to detect potential faults is improved.

[0026] In S2, to eliminate the differences in dimensions and scales of data from various sensors, the mean of time-series data from all multi-source heterogeneous sensors is calculated separately on the training set. μ and standard deviation σ The standardized processing expression is: , in, These are the original input data points; The data is standardized. The mean of this feature in the training set; The standard deviation of this feature in the training set is used. The obtained standardized parameters, namely the mean and standard deviation, are kept consistent during model validation and testing to ensure the uniformity of the model's input data distribution.

[0027] To make the Long Short-Term Memory (LSTM) network branch more closely resemble actual transformer monitoring applications, with the primary goal of capturing short / medium-term dynamic changes and transient pulses, priority is given to processing sensor signals sensitive to local temporal changes, such as current, voltage, and vibration. Slow trend compensation and differential processing are applied to temperature and gas concentration in oil to highlight information about the rate of change.

[0028] After completing the timing synchronization and standardization of the timing data from the multi-source heterogeneous sensors, the input features of the long short-term memory network in S3 include first-order differential signals of current and voltage, vibration signals processed by bandpass filtering, and differential rate of change signals of temperature and oil chromatographic gas concentration. These are used to jointly capture transient electrical shocks, mechanical vibration transients, and slow thermal and chemical change trends during transformer operation. Among them, the first-order differential signals of current and voltage are used to capture transient electrical shocks, and the differential rate of change signal is used to reflect slow thermal and chemical change trends.

[0029] To further enhance the characterization of transient mechanical vibrations, short-time energy is calculated from the bandpass-filtered vibration signal. The expression is: , in, The window length, ranging from 50 to 200 milliseconds, is used as an additional feature input. This is the vibration signal after bandpass filtering.

[0030] The input features are standardized using the training mean and standard deviation to ensure a consistent distribution of the input data. The preprocessed features are then concatenated to form the final input tensor of the LSTM branch. The expression is: ], The specific steps of long short-term memory network branching processing include: The current and voltage signals in the standardized multidimensional time-series dataset are subjected to first-order differential processing to generate current differential signals and voltage differential signals. Bandpass filtering is performed on the vibration signals in the standardized multidimensional time-series dataset to extract vibration components in a specific frequency band. The differential change rate is calculated for the temperature signal and the oil chromatography gas concentration signal in the standardized multidimensional time-series dataset to obtain the temperature change rate and the gas concentration change rate. The current differential signal, voltage differential signal, bandpass filtered vibration signal, temperature change rate, and gas concentration change rate are used as input features and input into a long short-term memory network for temporal feature extraction. The input gate of the Long Short-Term Memory network controls the degree of input of current feature information, the forget gate controls the degree of retention of historical memory states, and the output gate controls the degree of output of feature information. The final output characterizes the short-term transient features of the transformer's operating state under short-term dynamic changes.

[0031] For each time step, the LSTM branch consists of an LSTM first layer and an LSTM second layer. The LSTM first layer contains 128 units and prioritizes modeling transient and high-frequency characteristics; the LSTM second layer contains 64 units and is responsible for aggregating and outputting stable temporal features across short time windows.

[0032] The input gate controls the extent to which new observations at the current moment, such as sudden current pulses or sudden increases in gas concentration, enter the memory cell, helping the model identify abrupt events.

[0033] The forgetting gate determines the degree to which memories from the previous moment are retained, such as the previous vibrational peaks, which can suppress misjudgments caused by short-term noise.

[0034] In the output gate, observable features of the output are controlled based on the current fine-grained information and used for subsequent fusion and classification.

[0035] The memory unit represents the memory of the current short-to-medium-term state of the transformer, carrying aggregated information on continuous signals ranging from hundreds of milliseconds to several seconds.

[0036] For each time t, the LSTM calculation process is as follows: , , , , , , in, Input the feature vector at the current time step; This is the hidden state from the previous moment; , , These are the input gate, forget gate, and output gate, respectively. Candidate memory states; This represents the current state of the memory cell. These are the weight matrices corresponding to the inputs; These are the hidden layer weight matrices; For bias terms; Use the Sigmoid activation function; This indicates the Hadamard element-wise product operation; t represents the time step index.

[0037] In S3, long-distance correlations across time scales and sensors are captured through the Transformer encoder branch, such as the relationship between long-term temperature rise and periodic small current shifts, or the linkage between long-term increases in oil gas concentration and recurring short-term vibration patterns. The input of the Transformer encoder branch employs upsizing, relative position encoding, and multi-scale downsampling strategies to improve sensitivity to slow variables and cross-sensor interactions.

[0038] In the short-term transient feature sequence output by the Long Short-Term Memory network branch, the 64-dimensional vector at each time step encodes the short-term fault clues at that time step, such as the pulse amplitude, pulse duration, and accompanying temperature rise rate, which are tightly coupled information and are easy to complement the global features of the Transformer.

[0039] When obtaining the global attention features of the transformer, the standardized multi-dimensional time series dataset is processed on multiple scales. Specifically, the high-frequency path data representing transient electrical and vibration characteristics is aligned with the low-frequency path data representing temperature rise and oil gas dissolution trends, and the features are stitched together to obtain a unified feature representation that simultaneously reflects the transformer's fast events and long-term slow processes.

[0040] The Transformer encoder employs a multi-head self-attention mechanism, which introduces a modulation matrix based on the historical covariance relationship between sensor channels of different physical quantities of the transformer when calculating attention weights.

[0041] In the Transformer encoder branch, the standardized multidimensional time-series dataset is processed on multiple scales, dividing the data into two paths. For the high-frequency path, the high-frequency components of the current, voltage, and vibration signals are retained, with a sampling frequency of 1kHz. For the low-frequency path, the temperature signal T(t) and the oil chromatography gas concentration signal G(t) are downsampled and trend filtered to obtain a slow variable sequence. The high-frequency path data and the low-frequency path data are aligned to the same sequence length L on the time scale using an interpolation method, and then concatenated in the feature dimension.

[0042] Features after splicing Perform linear embedding processing and calculate embedding features: , in It is a linear mapping matrix. For bias terms, This is the aligned feature matrix.

[0043] Add positional encoding to the embedded features and calculate the positional encoding PE: , , , in, For time step position index; Encode the dimension index for the location; Indicates positional encoding; , These are the sine and cosine functions, respectively.

[0044] The positional encoding is added to the embedded features to obtain the encoder input. : , The attention output is calculated using a multi-head self-attention mechanism. First, the query matrix Q, key matrix K, and value matrix V are calculated: , in, , , These represent the query, key, and value matrices, respectively.

[0045] Calculate standard attention output: , in, The dimension of the key vector; This represents an exponentially weighted function normalized by row. This is the attention output matrix.

[0046] Introducing a modulation matrix based on the historical covariance relationship between sensor channels of different physical quantities of a transformer. To enhance historically relevant inter-channel attention, calculate the modulated attention output: , in, A learnable scaling factor; It is obtained by channel correlation projection.

[0047] The modulated attention output is processed through a feedforward neural network, and the final output shape is... Long-range correlation features The 128-dimensional vector at each time step encodes long-distance dependencies across time scales and sensors, such as the combined signal of slow temperature rise trends and repetitive micro-discharge patterns.

[0048] In S4, the adaptive feature fusion step specifically includes: The interaction similarity is calculated based on the short-term transient features output by the Long Short-Term Memory network branch and the long-range association features output by the Transformer branch. Based on the interaction similarity and the characteristics of the two-branch output, gating coefficients are generated for dynamically weighing the importance of transient events and long-term trends. Based on the gating coefficient, the components representing synergistic effects and complementary differences in the two-branch features are fused to generate fused features that include local details and global situation.

[0049] Interaction similarity The expression is: + ), in, The weight matrix is ​​a learnable weight matrix; This is the output feature of the Long Short-Term Memory (LSTM) network branch, i.e., short-term transient features; Output features for the Transformer branch, namely long-range correlation features; tanh is the element-wise product; tanh is the hyperbolic tangent activation function. Gating coefficient The expression is: ]+ ), in, For the fusion weight matrix; ] indicates a feature concatenation operation; For bias terms; This is the Sigmoid function.

[0050] Fusion features generated by gating coefficients The expression is: , in, The gating factor; , and For weighting; This is the output feature of the Long Short-Term Memory (LSTM) network branch, i.e., short-term transient features; The output features for the Transformer branch are long-range correlation features.

[0051] In S5, the category probability distribution output by the fully connected network corresponds to three discrete states of the transformer in actual operation and maintenance: normal, abnormal warning, and fault. The specific steps of S5 include: Fusion features Flattening or pooling is performed along the sequence dimension to aggregate overall temporal information; The processed features are input into the first fully connected layer for calculation: , in This is the first layer weight matrix. For the first-level bias term, It is a linear rectification activation function; The output of the first fully connected layer is input into the second fully connected layer to calculate the class probability distribution: , in, This is the weight matrix for the second layer. For the second-level bias term, It is a normalized exponential function.

[0052] The output category probability distribution corresponds to three discrete states of the transformer in actual operation and maintenance: normal, abnormal warning, and fault.

[0053] The model is trained using a multi-class cross-entropy loss function, which is defined as follows: , in, The overall loss function; This represents the number of training samples; Number of categories; The true label for sample i; This represents the class probabilities predicted by the model.

[0054] In this embodiment, the dataset is divided into training, validation, and test sets in a 7:1:2 ratio. After each training round, the model is evaluated on the validation set. Training is stopped early if there is no improvement after 10 consecutive rounds to prevent overfitting. The dataset consists of actual operating data from 10 110kV power transformers and publicly available multi-source sensor anomaly detection datasets. The collected data includes 15 features: voltage, current, temperature, triaxial vibration, and oil chromatography gases (H2, CO, C2H2, etc.). The sampling frequency is 1kHz, and the collection period is 90 days. Data labels are divided into three categories: "Normal," "Anomaly Warning," and "Fault," and are labeled by experts based on maintenance records. The sample size is approximately 1.5 million records, with abnormal operating conditions accounting for approximately 10%.

[0055] This embodiment comprehensively evaluates each model using multiple mainstream classification performance metrics, including: Accuracy: Accuracy = Number of correctly predicted samples / Total number of samples; Recall: For each category, recall = number of samples correctly identified as belonging to that category / number of samples actually belonging to that category, reflecting the model's ability to identify a few categories such as anomalies; F1 score: F1 = 2 × (precision × recall) / (precision + recall). It comprehensively reflects the model's accuracy and recall capabilities and is suitable for imbalanced datasets.

[0056] This embodiment compares the traditional feature engineering + SVM model, single LSTM time series model, single Transformer model with the LSTM + Transformer dual-branch adaptive fusion model proposed in this invention through simulation. The comparison results are shown in Table 1.

[0057] Table 1. Comparison of simulation results between the method in this embodiment and other methods. As can be seen, in the scenario of abnormal trend (early anomaly) detection, the average early warning time of the method of the present invention is improved by about 35%, and the false negative rate is reduced by about 50% compared with the single path model.

[0058] Example 2 This embodiment provides a system for anomaly detection of a two-branch transformer based on the method of Embodiment 1, including a data acquisition module, a data preprocessing module, a two-branch feature extraction module, an adaptive feature fusion module, and a classification output module.

[0059] The data acquisition module is used to collect time-series data from multiple heterogeneous sensors during transformer operation. The data includes voltage, current, temperature, vibration signals, and oil chromatography gas concentration data.

[0060] The data preprocessing module is connected to the data acquisition module and is used to perform outlier detection and cleaning, missing data interpolation and completion, and standardization processing on the acquired multi-source heterogeneous sensor time series data to form a standardized multi-dimensional time series dataset.

[0061] The dual-branch feature extraction module is connected to the data preprocessing module and includes an LSTM branch and a Transformer branch; The LSTM branch is used to process the standardized multidimensional time series dataset and extract short-term transient features that characterize the short-term dynamic changes of the transformer's operating state. Its input features are specifically preprocessed, including first-order differential signals of current and voltage, vibration signals filtered by bandpass, and differential change rate signals of temperature and oil chromatographic gas concentration. The Transformer branch is used to perform multi-scale processing and feature extraction on the standardized multi-dimensional time-series dataset to obtain long-range correlation features that characterize the long-distance dependence of transformer operating status. When calculating attention weights, it introduces a modulation matrix based on the historical covariance relationship between sensor channels.

[0062] The adaptive feature fusion module is connected to the dual-branch feature extraction module. It is used to receive the short-term transient features and long-range correlation features, calculate the interaction similarity matrix between features and generate dynamic gating coefficients, and then perform nonlinear interaction and weighted fusion on the two-branch features to output fused features that have both local details and global situation.

[0063] The classification output module is connected to the adaptive feature fusion module and is used to flatten the fused features and classify them through a fully connected network. Finally, it outputs the classification result corresponding to the actual operation and maintenance status of the transformer, i.e., normal, abnormal warning or fault.

[0064] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0065] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0066] Multiple components in the device are connected to an I / O interface, including: input units such as a keyboard, mouse, etc.; output units such as various types of displays, speakers, etc.; storage units such as disks, optical disks, etc.; and communication units such as network interface cards, modems, wireless transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks. The processing unit performs the various methods and processes described above, such as the method of the present invention. For example, in some embodiments, the method of the present invention may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or the communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method of the present invention described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute the method of the present invention by any other suitable means (e.g., by means of firmware).

[0067] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0068] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0069] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0070] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A two-legged transformer anomaly detection method, characterized by, The specific steps include: S1, collecting multi-source heterogeneous sensor time series data of transformer operation, including voltage, current, temperature, vibration signal and oil chromatographic gas concentration data; S2, performing outlier cleaning, interpolation completion and standardization processing on the multi-source heterogeneous sensor time series data to form a standardized multi-dimensional time series data set; S3, processing the multi-dimensional time series data set through a long short-term memory network branch to extract short-term transient features representing short-term dynamic changes of transformer operating state; processing the multi-dimensional time series data set through a Transformer encoder branch to extract long-range association features representing long-distance dependence relationship of transformer operating state; S4, calculating the similarity matrix between the short-term transient features and the long-range association features and generating dynamic gating coefficients, and performing nonlinear interaction and weighted fusion of the two branch features through the dynamic gating coefficients to generate fusion features; S5, performing flattening and fully connected network processing on the fusion features, and finally outputting the abnormal state classification result of the transformer.

2. The method of claim 1, wherein, The input features of the long short-term memory network in S3 include first-order differential signals of current and voltage, band-pass filtered vibration signals, and differential change rate signals of temperature and oil chromatographic gas concentration, which are used to jointly capture transient electrical shock, mechanical vibration transient and slow thermal and chemical change trends in transformer operation.

3. The method of claim 1, wherein the method further comprises: In S3, when obtaining transformer global attention features, the standardized multi-dimensional time series data set is processed in multiple scales, specifically including: aligning the time scale and splicing the features of the high-frequency path data representing transient electrical and vibration characteristics with the low-frequency path data representing temperature rise and oil gas dissolution trend, to obtain a unified feature representation reflecting both fast events and long-term slow changes of the transformer.

4. The method of claim 1, wherein, In S3, the Transformer encoder adopts a multi-head self-attention mechanism, and introduces a modulation matrix based on the historical covariance relationship between different physical quantity sensor channels of the transformer when calculating the attention weight.

5. The method of claim 1, wherein, In S4, The adaptive feature fusion step specifically includes: calculating the interaction similarity based on the short-term transient features output by the long short-term memory network branch and the long-range association features output by the Transformer branch; generating gating coefficients for dynamically weighing the importance of transient events and long-term trends based on the interaction similarity and the features output by the two branches; based on the gating coefficients, fusing the components representing synergistic action and the components representing complementary difference in the features of the two branches to generate fusion features including local details and global situation.

6. The method of claim 5, wherein the method further comprises: The interaction similarity The expression is: + ), wherein, is a learnable weight matrix; is a long short-term memory network branch output feature, i.e., a short-term transient feature; is a Transformer branch output feature, i.e., a long-range association feature; is an element-wise product; tanh is a hyperbolic tangent activation function; The gating coefficients The expression for the gating coefficients is: ]+ ), wherein, is a fusion weight matrix; represents a feature concatenation operation; is a bias term; is a Sigmoid function.

7. The method of claim 6, wherein the method further comprises: Fused features generated according to the gating coefficients The expression is: , wherein, is a gating coefficient; , and is a fusion weight; is a long short-term memory network branch output feature, i.e., a short-term transient feature; is a Transformer branch output feature, i.e., a long-range association feature.

8. The method of claim 1, wherein, In S5, the class probability distribution output by the fully connected network corresponds to three discrete states of normal, abnormal warning and fault of the transformer in actual operation and maintenance.

9. An electronic device comprising a memory and a processor, said memory having stored thereon a computer program, characterized in that, The processor executes the program to implement the method of any one of claims 1-8.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-8.