Long-term prediction method for concentration of dissolved gas in transformer oil

Multi-grain size features are extracted through the seasonal component channels and trend component channels of the dual-view Transformer model, and the information is fusion using the dual-view correlation estimation module, solving the limitations of the existing technology in long-term prediction and achieving high-precision prediction of dissolved gas concentration.

CN119848774APending Publication Date: 2025-04-18HENAN UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411952824.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing dissolved gas prediction models have limitations in long-term prediction, and it is difficult to fully capture the complex dependencies and multi-particle size time information between multivariables.

Method used

Using the dual-view Transformer model, multi-grained features are extracted through seasonal component channels and trend component channels, and the dual-view correlation estimation module adaptively fuses this information to generate long-term prediction results.

Benefits of technology

It significantly improves the long-term prediction accuracy of dissolved gas concentration, can effectively capture the complex coupling between multi-particle time dependencies and variables, and supports efficient maintenance of equipment and intelligent operation and maintenance of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848774A_ABST
    Figure CN119848774A_ABST
Patent Text Reader

Abstract

The invention discloses a long-term prediction method for the concentration of dissolved gas in transformer oil, and belongs to the field of health state monitoring of power equipment, and the method comprises the steps: collecting historical data of the dissolved gas; a double-view Transform model used for long-term prediction of the dissolved gas is constructed; the dual-view Transform model comprises a self-adaptive multi-granularity detector, a plurality of kernel correction attention modules and a dual-view correlation estimation module; the method comprises the following steps: according to historical data of dissolved gas, training a double-view Transform model to obtain a trained double-view Transform model; and obtaining to-be-tested data, and obtaining a prediction result of the to-be-tested data by using the trained double-view Transform model. According to the method, the problems that a current method is difficult to comprehensively capture a complex dependency relationship among multiple variables, and particularly has significant limitation when processing highly nonlinear and multi-granularity time information are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of health status monitoring of electric power equipment, and in particular relates to a long-term prediction method for dissolved gas concentration in transformer oil. Background Art

[0002] Dissolved gas analysis (DGA) in transformer oil is a widely recognized diagnostic technique for detecting potential faults in oil-immersed transformers. By analyzing the concentration of gas dissolved in the insulating oil, abnormal conditions of the transformer can be effectively identified. However, to achieve predictive maintenance and early fault warning, it is not enough to rely solely on historical data of dissolved gas, and accurate prediction of future trends in gas concentration is also crucial. At present, although a variety of time series prediction models have been developed for dissolved gas concentration prediction, the application of most models is mainly focused on short-term prediction (such as changes within a day). In contrast, long-term prediction is of great significance for improving the cost-effective management of transformers and optimizing maintenance strategies. Therefore, achieving long-term prediction while ensuring prediction accuracy has become a core challenge in the field of dissolved gas concentration prediction.

[0003] Existing dissolved gas prediction models usually use statistical and machine learning methods to process time series data of dissolved gas in transformer oil. These methods include gray model (GM), artificial neural network (ANN) and autoregressive integrated moving average (ARIMA) model. However, these methods have certain limitations when processing long sequence data. For example, GM needs to rely on manual feature engineering to extract relevant information in time series; ANN and ARIMA have low prediction accuracy in long-term prediction due to the accumulation of recursive errors and insufficient processing ability for nonlinear data. The rise of deep learning provides a new solution to these problems. For example, the time fusion transformer (TFT) model combines the self-attention mechanism and the long short-term memory (LSTM) network to simultaneously capture the long-term and short-term dependencies between different time steps. However, LSTM may face the problem of gradient vanishing or exploding when processing long sequences, which limits its extrapolation ability. In addition, most existing methods rely on single-granularity pattern representation, which makes it difficult to simultaneously capture high-frequency local patterns and long-term trend information. High-frequency local patterns can improve the ability of refined modeling, while long-term trends are crucial to understanding the global state of the system. Nevertheless, existing models still perform poorly in learning multi-granularity temporal dependencies and complex couplings between variables, making it difficult to effectively support long-term forecasting.

[0004] Although existing models have achieved certain results in short-term prediction, long-term prediction still faces major challenges. Current methods are difficult to fully capture the complex dependencies between multiple variables, especially when dealing with highly nonlinear and multi-granularity time information. Therefore, in long-term prediction tasks, how to effectively capture multi-granularity time dependencies and complex coupling between variables is still an important issue that needs to be solved in the field of dissolved gas prediction. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a long-term prediction method for dissolved gas concentration in transformer oil, which solves the problem that current methods are difficult to fully capture the complex dependencies between multiple variables, especially the significant limitations when processing highly nonlinear and multi-granularity time information.

[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for long-term prediction of dissolved gas concentration in transformer oil, comprising:

[0007] Collecting historical data of dissolved gas in transformer oil, extracting trend component data and seasonal component data of the historical data of dissolved gas, and constructing the trend component data and seasonal component data into a matrix to obtain a trend component matrix and a seasonal component matrix;

[0008] A dual-view Transformer model for long-term prediction of dissolved gas is constructed; the dual-view Transformer model includes a seasonal component channel, a trend component channel and a dual-view correlation estimation module; the seasonal component channel and the trend component channel both include an adaptive multi-granularity detector and a plurality of stacked kernel correction attention modules;

[0009] The seasonal component channel is used to use the seasonal component matrix as an input matrix, extract multi-granularity information of the input matrix using an adaptive multi-granularity detector, and obtain a multi-granularity feature representation of the introduced position information of the seasonal component; and obtain a seasonal component representation using a stacked kernel correction attention module based on the multi-granularity feature representation of the introduced position information of the seasonal component;

[0010] The trend component channel is used to use the trend component matrix as an input matrix, use an adaptive multi-granularity detector to extract multi-granularity information of the input matrix, and obtain a multi-granularity feature representation of the introduction position information of the trend component; and according to the multi-granularity feature representation of the introduction position information of the trend component, use a stacked kernel correction attention module to obtain the trend component representation;

[0011] The dual-view correlation estimation module is used to adaptively fuse the trend component representation and the seasonal component representation to generate a final prediction result;

[0012] The dual-view Transformer model is trained using the historical data of dissolved gas in transformer oil to obtain a trained dual-view Transformer model.

[0013] Obtain the data to be tested, and use the trained dual-view Transformer model to obtain the prediction results of the data to be tested.

[0014] Furthermore, the expression of the input matrix is:

[0015]

[0016] Among them, X in is the input matrix; is the concentration value of the Cth gas at time point T; T is the number of time steps; C is the number of gas types.

[0017] Furthermore, the method utilizes an adaptive multi-granularity detector to extract multi-granularity information of an input matrix, and obtains a multi-granularity feature representation of the introduced position information of a seasonal component. Specifically, each sequence in the input matrix is ​​reversibly normalized to obtain standardized data; the standardized data is segmented in a channel-independent manner to generate a number of patches; multi-scale convolution is performed on each patch to extract features of different scales to obtain a convolution output; the convolution output is deeply mapped through a multi-layer perceptron to obtain embedded features; the embedded features are weightedly fused to obtain a multi-granularity feature representation; position information is added to the multi-granularity feature representation using position encoding to obtain a multi-granularity feature representation of the introduced position information of a seasonal component.

[0018] Furthermore, the expression of the standardized data is:

[0019]

[0020]

[0021]

[0022] in, is the gas sequence x of the i-th gas (i) Normalized data; γ and β are learnable affine transformation parameters; A constant to prevent division by zero; E[x (i) ] is the gas sequence x (i) The mean of Var[x (i) ] is the gas sequence x (i) The variance of ; T is the number of time steps; j is the time step index; is the concentration of the i-th gas at time point j.

[0023] Furthermore, the expression of multi-granularity feature representation of the seasonal component introducing position information is:

[0024]

[0025]

[0026]

[0027]

[0028]

[0029]

[0030]

[0031]

[0032] in, Multi-granularity feature representation that introduces location information for seasonal components; is the multi-granularity feature representation of the seasonal component; E pos is the position encoding matrix; D is the embedding dimension; pos is the position; i' is the dimension; K is the total number of scales; k is the index of the scale; W k is the fusion weight matrix of the kth scale; is the bias vector; is the embedding feature of the kth scale; is the MLP weight parameter of the kth scale; MLP k is the multi-layer perceptron of the kth scale; GELU is the activation function; Conv1D is the convolution output of the kth scale; (k) is the convolution operation of the kth scale; is the convolution kernel parameter of the kth scale; for The Nth patch after segmentation; is the gas sequence x of the i-th gas in the input matrix (i) Normalized data; MGPatchify is patch segmentation; P is the length of the patch; S is the step size; T is the number of time steps; To round down.

[0033] Furthermore, the seasonal component representation is obtained by using a stacked kernel correction attention module based on the multi-granular feature representation of the introduced position information of the seasonal component, specifically: the multi-granular feature representation of the introduced position information of the seasonal component is converted into In the stacked kernel correction attention module, for each attention head, The projection is into query matrix, key matrix and value matrix; according to the query matrix, key matrix and value matrix, the kernel function and Kronecker Delta function are introduced to dynamically adjust the attention weights; the dynamically adjusted attention weights are input into the multi-head self-attention mechanism, and the outputs of each attention head are merged to obtain the merged output, and the merged output is input into the next kernel correction attention module to obtain the seasonal component representation.

[0034] Furthermore, the expression of the combined output is:

[0035]

[0036]

[0037]

[0038]

[0039] Among them, KD-MSA(H) is the merged output; Concat is the connection on the last dimension; H is the number of attention heads; W O is the output projection matrix; is the dynamically adjusted attention weight corresponding to the i1th attention head; ⊙ is the element-wise multiplication; Softmax is the activation function; is the query matrix corresponding to the i1th attention head; is the transpose of the key matrix corresponding to the i1th attention head; is the kernel function; is the Kronecker Delta function; d k is the dimension of the key; is the value matrix corresponding to the i1th attention head; σ is the bandwidth parameter of the kernel function; is the vector representation of the query matrix; is the vector representation of the key matrix; i1 and j1 are the attention head indices; ||·|| is the L2 norm.

[0040] Furthermore, in the stacked kernel correction attention modules, residual connections and layer normalization are used to stabilize the training process:

[0041]

[0042] Among them, Z l is the final output feature of the l-th layer kernel correction attention module; FFN is a feed-forward neural network; LN is a layer normalization operation; The attention enhancement feature of the kernel correction attention module in the lth layer after multi-head self-attention; KD-MSA (LN (H l-1 )) is the kernel-corrected multi-head self-attention; H l-1 Correct the input features of the attention module for the l-1th layer kernel.

[0043] Furthermore, the adaptive fusion of the trend component representation and the seasonal component representation to generate the final prediction result is specifically: the trend component representation and the seasonal component representation are projected into the prediction space through linear mapping to obtain and calculate and The mean μ and standard deviation σ of and Weighted fusion to get the predicted value The predicted value Perform denormalization to obtain the final prediction result

[0044]

[0045]

[0046] logλ=MLP(μ,σ)

[0047]

[0048]

[0049]

[0050]

[0051] in, For the gas sequence x (i) The final prediction result of (i) is the gas sequence of the ith gas; Var[x (i) ] is the gas sequence x (i) The variance of ;ò is a constant to prevent division by zero; For the gas sequence x (i) The predicted value of E[x (i) ] is the gas sequence x (i) ; γ and β are both learnable affine transformation parameters; The seasonal component represents the result of projection into the prediction space; is the result of projecting the trend component onto the prediction space; L is the number of predicted time steps; j' is the predicted time step index; The seasonal component represents the result of projecting the j'th forecast time step into the forecast space; The trend component represents the result of projecting the j'th predicted time step into the prediction space; is the trend component representation; is expressed as seasonal component; is the projection matrix represented by the seasonal component; is the projection matrix of the trend component.

[0052] Furthermore, the loss function of the dual-view Transformer model is expressed as:

[0053] L=L MSE +L MAE

[0054]

[0055]

[0056] Among them, L is the loss function; L MSE is the mean square error; L MAE is the mean absolute error; C is the number of gas types; i is the gas type index; For the gas sequence x (i) The final prediction result of (i) is the gas sequence of the i-th gas; y (i) For the gas sequence x (i) The true result; ||·||2 is the L2 norm; ||·||1 is the L1 norm.

[0057] The beneficial effects of the present invention are as follows: the present invention effectively solves the limitations of multi-granularity trend and seasonal component cointegration modeling, overcomes the bias problem in the traditional attention mechanism, fully exploits the dual-view correlation of time series data, significantly improves the prediction accuracy, and shows a wide range of application prospects. By accurately modeling the long-term trend and high-frequency changes of dissolved gas concentration, the present invention can achieve long-term prediction of dissolved gas concentration, support efficient maintenance of equipment, extend the service life of equipment, and reduce power supply interruptions caused by equipment failures. It has important practical value in the intelligent operation and maintenance and reliability assurance of power systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 The present invention is a flow chart of the method.

[0059] Figure 2 A structural diagram of the dual-view Transformer architecture.

[0060] Figure 3 Schematic diagram of the structure of the adaptive multi-granularity detector.

[0061] Figure 4 Schematic diagram of the structure of the kernel correction attention module. DETAILED DESCRIPTION

[0062] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0063] like Figure 1 As shown, in one embodiment of the present invention, a method for long-term prediction of dissolved gas concentration in transformer oil comprises:

[0064] Collecting historical data of dissolved gas in transformer oil, extracting trend component data and seasonal component data of the historical data of dissolved gas, and constructing the trend component data and seasonal component data into a matrix to obtain a trend component matrix and a seasonal component matrix;

[0065] A dual-view Transformer model for long-term prediction of dissolved gas is constructed; the dual-view Transformer model includes a seasonal component channel, a trend component channel and a dual-view correlation estimation module; the seasonal component channel and the trend component channel both include an adaptive multi-granularity detector and a plurality of stacked kernel correction attention modules;

[0066] The seasonal component channel is used to use the seasonal component matrix as an input matrix, extract multi-granularity information of the input matrix using an adaptive multi-granularity detector, and obtain a multi-granularity feature representation of the introduced position information of the seasonal component; and obtain a seasonal component representation using a stacked kernel correction attention module based on the multi-granularity feature representation of the introduced position information of the seasonal component;

[0067] The trend component channel is used to use the trend component matrix as an input matrix, use an adaptive multi-granularity detector to extract multi-granularity information of the input matrix, and obtain a multi-granularity feature representation of the introduction position information of the trend component; and according to the multi-granularity feature representation of the introduction position information of the trend component, use a stacked kernel correction attention module to obtain the trend component representation;

[0068] The dual-view correlation estimation module is used to adaptively fuse the trend component representation and the seasonal component representation to generate a final prediction result;

[0069] The dual-view Transformer model is trained using the historical data of dissolved gas in transformer oil to obtain a trained dual-view Transformer model.

[0070] Obtain the data to be tested, and use the trained dual-view Transformer model to obtain the prediction results of the data to be tested.

[0071] In this embodiment, by introducing an adaptive multi-granularity detector and a kernel-corrected attention module, the dual-view Transformer model is able to learn from multi-granularity temporal information and simultaneously capture long-term and short-term dependencies and coupling relationships between multiple variables. In addition, the dual-view Transformer model uses a dual-view correlation estimation module to adaptively refine the output of the kernel-corrected attention module, hierarchically modeling the trend and detail information of the future curve from the trend component and the seasonal component, thereby maximizing information gain. The specific steps are as follows:

[0072] Step S1: Collect historical data of dissolved gas in transformer oil to construct input matrix X in , and input it into the dual-view Transformer model. The input data includes C dissolved gas concentrations (such as H2, CH4, and C2H6, etc.), and long-term prediction is performed based on the historical T time points. The goal is to predict the dissolved gas concentration at the next L time points.

[0073] Step S2: Construct an adaptive multi-granularity detector to extract multi-granularity temporal information. The adaptive multi-granularity detector module first divides the time series data into multi-granularity sequence blocks, which are used to capture local high-frequency patterns and long-term seasonal trends respectively. Furthermore, by performing multi-granularity segmentation and convolution operations on the input data, the adaptive multi-granularity detector can generate multi-granularity embedding features for capturing multi-scale information.

[0074] Step S3: The kernel-corrected attention module is used to learn the long-term dependencies between multiple variables. The kernel-corrected attention module calculates the dynamic scaling factor by combining the kernel function and the Kronecker Delta function, avoiding the additional bias problem introduced by the traditional attention mechanism. Furthermore, through the multi-head self-attention mechanism, the kernel-corrected attention module can effectively extract the long-term dependencies in the trend component and the seasonal component.

[0075] Step S4: Use the dual-view correlation estimation module to perform hierarchical information fusion on the output of the kernel correction attention module. The dual-view correlation estimation module learns the fusion factor λ based on the statistical characteristics of the trend component and the seasonal component to achieve hierarchical modeling of future curve trends and details. Further, the dual-view representation vector is projected into the prediction space, and the weighted relationship between the trend and seasonal components is learned through a multi-layer perceptron to finally generate the prediction results of future gas concentrations.

[0076] Step S5: Predictions are made using the trained optimal network, and the predicted results are compared with the actual results using error evaluation indicators. The loss function includes the mean square error (MSE) and the mean absolute error (MAE), each with a ratio of 1:1, to balance the performance of the model in terms of accuracy and error sensitivity and maximize the prediction effect of the model.

[0077] In this embodiment, Figure 2 The figure shows the structure of the dual-view Transformer model. This figure shows how the dual-view Transformer model extracts multi-granularity features through an adaptive multi-granularity detector, uses the kernel correction attention module to model long-term dependencies across variables, and finally generates prediction results through dual-view correlation estimation.

[0078] The expression of the input matrix is:

[0079]

[0080] Among them, X in is the input matrix; is the concentration value of the Cth gas at time point T; T is the number of time steps; C is the number of gas types.

[0081] In this embodiment, the historical data is represented as

[0082] The method utilizes an adaptive multi-granularity detector to extract multi-granularity information of an input matrix and obtain a multi-granularity feature representation of the introduced position information of a seasonal component. Specifically, each sequence in the input matrix is ​​reversibly normalized to obtain standardized data; the standardized data is segmented in a channel-independent manner to generate a plurality of patches; multi-scale convolution is performed on each patch to extract features of different scales to obtain a convolution output; the convolution output is deeply mapped through a multi-layer perceptron to obtain embedded features; the embedded features are weightedly fused to obtain a multi-granularity feature representation; position information is added to the multi-granularity feature representation using position encoding to obtain a multi-granularity feature representation of the introduced position information of the seasonal component.

[0083] In this embodiment, the process of obtaining the multi-granularity feature representation of the introduced position information of the trend component is the same as the multi-granularity feature representation of the introduced position information of the seasonal component.

[0084] The expression of the standardized data is:

[0085]

[0086]

[0087]

[0088] in, is the gas sequence x of the i-th gas (i) Normalized data; γ and β are learnable affine transformation parameters; A constant to prevent division by zero; E[x (i) ] is the gas sequence x (i) The mean of Var[x (i) ] is the gas sequence x (i) The variance of ; T is the number of time steps; j is the time step index; is the concentration of the i-th gas at time point j.

[0089] In this embodiment, the adaptive multi-granularity detector is designed to extract multi-granularity features in time series data, including local high-frequency patterns and long-term seasonal trends. First, in order to reduce the impact of data non-stationarity, for each gas sequence x (i) Perform a reversible instance normalization (Reversible Instance Normalization, RevIN) operation.

[0090] The expression of the multi-granularity feature representation of the seasonal component with introduced position information is:

[0091]

[0092]

[0093]

[0094]

[0095]

[0096]

[0097]

[0098]

[0099] in, Multi-granularity feature representation that introduces location information for seasonal components; is the multi-granularity feature representation of the seasonal component; E pos is the position encoding matrix; D is the embedding dimension; pos is the position; i' is the dimension; K is the total number of scales; k is the index of the scale; W k is the fusion weight matrix of the kth scale; is the bias vector; is the embedding feature of the kth scale; is the MLP weight parameter of the kth scale; MLP k is the multi-layer perceptron of the kth scale; GELU is the activation function; Conv1D is the convolution output of the kth scale; (k) is the convolution operation of the kth scale; is the convolution kernel parameter of the kth scale; for The Nth patch after segmentation; is the gas sequence x of the i-th gas in the input matrix (i) Normalized data; MGPatchify is patch segmentation; P is the length of the patch; S is the step size; T is the number of time steps; To round down.

[0100] In this embodiment, Figure 3 The schematic diagram of the adaptive multi-granularity detector shows the temporal block structure of the input data after multi-granularity segmentation, and shows how channel-independent processing can model local and global dependencies.

[0101] The seasonal component representation is obtained by using a stacked kernel correction attention module based on the multi-granular feature representation of the introduced position information of the seasonal component, specifically: the multi-granular feature representation of the introduced position information of the seasonal component is converted into In the stacked kernel correction attention module, for each attention head, The projection is into query matrix, key matrix and value matrix; according to the query matrix, key matrix and value matrix, the kernel function and Kronecker Delta function are introduced to dynamically adjust the attention weights; the dynamically adjusted attention weights are input into the multi-head self-attention mechanism, and the outputs of each attention head are merged to obtain the merged output, and the merged output is input into the next kernel correction attention module to obtain the seasonal component representation.

[0102] In this embodiment, the number of layers of the stacked core attention modules in the trend component channel is less than that in the seasonal component channel.

[0103] The expression of the combined output is:

[0104]

[0105]

[0106]

[0107]

[0108] Among them, KD-MSA(H) is the merged output; Concat is the connection on the last dimension; H is the number of attention heads; W O is the output projection matrix; is the dynamically adjusted attention weight corresponding to the i1th attention head; ⊙ is the element-wise multiplication; Softmax is the activation function; is the query matrix corresponding to the i1th attention head; is the transpose of the key matrix corresponding to the i1th attention head; is the kernel function; is the Kronecker Delta function; d k is the dimension of the key; is the value matrix corresponding to the i1th attention head; σ is the bandwidth parameter of the kernel function; is the vector representation of the query matrix; is the vector representation of the key matrix; i1 and j1 are the attention head indices; ||·|| is the L2 norm.

[0109] In the stacked kernel correction attention modules, residual connections and layer normalization are used to stabilize the training process:

[0110]

[0111]

[0112] Among them, Z l is the final output feature of the l-th layer kernel correction attention module; FFN is a feed-forward neural network; LN is a layer normalization operation; The attention enhancement feature of the kernel correction attention module in the lth layer after multi-head self-attention; KD-MSA (LN (H l-1 )) is the kernel-corrected multi-head self-attention; H l-1 Correct the input features of the attention module for the l-1th layer kernel.

[0113] In this embodiment, Figure 4This is a schematic diagram of the structure of the kernel correction attention module. It shows in detail how the kernel correction attention module calculates the dynamic attention score through the kernel function and the Kronecker Delta function, and captures long-term dependencies through the multi-head self-attention mechanism.

[0114] In this embodiment, the kernel correction attention module is used to capture the long-term dependencies between multiple variables. For each attention head i1, the input feature (Seasonal component) is projected into a query, key, value matrix:

[0115]

[0116]

[0117]

[0118] in, is the projection matrix of the i1th attention head.

[0119] In order to solve the possible deviation problem of attention scores in the traditional attention mechanism, kernel function and Kronecker Delta function are introduced to dynamically adjust the attention weight.

[0120] In this embodiment, the feedforward neural network is usually composed of two fully connected layers and an activation function.

[0121] The method of adaptively fusing the trend component representation and the seasonal component representation to generate the final prediction result is as follows: the trend component representation and the seasonal component representation are projected to the prediction space through linear mapping to obtain and calculate and The mean μ and standard deviation σ of and Weighted fusion to get the predicted value The predicted value Perform denormalization to obtain the final prediction result

[0122]

[0123]

[0124] logλ=MLP(μ,σ)

[0125]

[0126]

[0127]

[0128]

[0129] in, For the gas sequence x (i) The final prediction result of (i) is the gas sequence of the ith gas; Var[x (i) ] is the gas sequence x (i) The variance of A constant to prevent division by zero; For the gas sequence x (i) The predicted value of E[x (i) ] is the gas sequence x (i) ; γ and β are both learnable affine transformation parameters; The seasonal component represents the result of projection into the prediction space; is the result of projecting the trend component onto the prediction space; L is the number of predicted time steps; j' is the predicted time step index; The seasonal component represents the result of projecting the j'th forecast time step into the forecast space; The trend component represents the result of projecting the j'th predicted time step into the prediction space; is the trend component representation; is expressed as seasonal component; is the projection matrix represented by the seasonal component; is the projection matrix of the trend component.

[0130] In this embodiment, the dual-view correlation estimation module is used to adaptively fuse the information of the trend component and the seasonal component to generate the final prediction result.

[0131] The loss function of the dual-view Transformer model is expressed as:

[0132] L=L MSE +L MAE

[0133]

[0134]

[0135] Among them, L is the loss function; L MSE is the mean square error; L MAE is the mean absolute error; C is the number of gas types; i is the gas type index; For the gas sequence x (i) The final prediction result of(i) is the gas sequence of the i-th gas; y (i) For the gas sequence x (i) The true result; ||·||2 is the L2 norm; ||·||1 is the L1 norm.

Claims

1. A method for long-term prediction of dissolved gas concentration in transformer oil, characterized in that: include: Collecting historical data of dissolved gas in transformer oil, extracting trend component data and seasonal component data of the historical data of dissolved gas, and constructing the trend component data and seasonal component data into a matrix to obtain a trend component matrix and a seasonal component matrix; A dual-view Transformer model for long-term prediction of dissolved gas is constructed; the dual-view Transformer model includes a seasonal component channel, a trend component channel and a dual-view correlation estimation module; the seasonal component channel and the trend component channel both include an adaptive multi-granularity detector and a plurality of stacked kernel correction attention modules; The seasonal component channel is used to use the seasonal component matrix as an input matrix, and use an adaptive multi-granularity detector to extract multi-granularity information of the input matrix to obtain a multi-granularity feature representation of the introduced position information of the seasonal component; And according to the multi-granular feature representation of the introduced position information of the seasonal component, the seasonal component representation is obtained by using the stacked kernel-corrected attention module; The trend component channel is used to use the trend component matrix as an input matrix, and use an adaptive multi-granularity detector to extract multi-granularity information of the input matrix to obtain a multi-granularity feature representation of the introduction position information of the trend component; And according to the multi-granularity feature representation of the introduced position information of the trend component, the trend component representation is obtained by using the stacked kernel correction attention module; The dual-view correlation estimation module is used to adaptively fuse the trend component representation and the seasonal component representation to generate a final prediction result; The dual-view Transformer model is trained using the historical data of dissolved gas in transformer oil to obtain a trained dual-view Transformer model. Obtain the data to be tested, and use the trained dual-view Transformer model to obtain the prediction results of the data to be tested.

2. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 1, characterized in that: The expression of the input matrix is: Among them, X in is the input matrix; is the concentration value of the Cth gas at time point T; T is the number of time steps; C is the number of gas types.

3. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 1, characterized in that: The method uses an adaptive multi-granularity detector to extract multi-granularity information of the input matrix to obtain a multi-granularity feature representation of the introduced position information of the seasonal component. Specifically, each sequence in the input matrix is ​​reversibly normalized to obtain standardized data; the standardized data is segmented in a channel-independent manner to generate a plurality of patches; multi-scale convolution is performed on each patch to extract features of different scales to obtain a convolution output; and the convolution output is deeply mapped through a multi-layer perceptron to obtain an embedded feature. Perform weighted fusion on the embedded features to obtain multi-granularity feature representation; Position encoding is used to add position information to the multi-granularity feature representation, and a multi-granularity feature representation of the seasonal component with introduced position information is obtained.

4. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 3, characterized in that: The expression of the standardized data is: in, is the gas sequence x of the i-th gas (i) Normalized data; γ and β are learnable affine transformation parameters; ò is a constant to prevent division by zero; E[x (i) ] is the gas sequence x (i) The mean of Var[x (i) ] is the gas sequence x (i) The variance of ; T is the number of time steps; j is the time step index; is the concentration of the i-th gas at time point j.

5. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 3, characterized in that: The expression of the multi-granularity feature representation of the seasonal component with introduced position information is: in, Multi-granularity feature representation that introduces location information for seasonal components; is the multi-granularity feature representation of the seasonal component; E pos is the position encoding matrix; D is the embedding dimension; pos is the position; i' is the dimension; K is the total number of scales; k is the index of the scale; W k is the fusion weight matrix of the kth scale; is the bias vector; is the embedding feature of the kth scale; is the MLP weight parameter of the kth scale; MLP k is the multi-layer perceptron of the kth scale; GELU is the activation function; Conv1D is the convolution output of the kth scale; (k) is the convolution operation of the kth scale; is the convolution kernel parameter of the kth scale; for The Nth patch after segmentation; is the gas sequence x of the i-th gas in the input matrix (i) Normalized data; MGPatchify is patch segmentation; P is the length of the patch; S is the step size; T is the number of time steps; To round down.

6. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 1, characterized in that: The seasonal component representation is obtained by using a stacked kernel correction attention module based on the multi-granular feature representation of the introduced position information of the seasonal component, specifically: the multi-granular feature representation of the introduced position information of the seasonal component is converted into In the stacked kernel correction attention module, for each attention head, The projection is into query matrix, key matrix and value matrix; according to the query matrix, key matrix and value matrix, the kernel function and Kronecker Delta function are introduced to dynamically adjust the attention weight; The dynamically adjusted attention weights are input into the multi-head self-attention mechanism, and the outputs of each attention head are merged to obtain the merged output, which is then input into the next kernel-corrected attention module to obtain the seasonal component representation.

7. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 6, characterized in that: The expression of the combined output is: Among them, KD-MSA(H) is the merged output; Concat is the connection on the last dimension; H is the number of attention heads; W O is the output projection matrix; is the dynamically adjusted attention weight corresponding to the i1th attention head; ⊙ is the element-wise multiplication; Softmax is the activation function; is the query matrix corresponding to the i1th attention head; is the transpose of the key matrix corresponding to the i1th attention head; is the kernel function; is the Kronecker Delta function; d k is the dimension of the key; is the value matrix corresponding to the i1th attention head; σ is the bandwidth parameter of the kernel function; is the vector representation of the query matrix; is the vector representation of the key matrix; i1 and j1 are the attention head indices; ||·|| is the L2 norm.

8. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 6, characterized in that: In the stacked kernel correction attention modules, residual connections and layer normalization are used to stabilize the training process: Among them, Z l is the final output feature of the l-th layer kernel correction attention module; FFN is a feed-forward neural network; LN is a layer normalization operation; The attention enhancement feature of the kernel correction attention module in the lth layer after multi-head self-attention; KD-MSA (LN (H l-1 )) is the kernel-corrected multi-head self-attention; H l-1 Correct the input features of the attention module for the l-1th layer kernel.

9. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 1, characterized in that: The method of adaptively fusing the trend component representation and the seasonal component representation to generate the final prediction result is as follows: the trend component representation and the seasonal component representation are projected to the prediction space through linear mapping to obtain and calculate and The mean μ and standard deviation σ of , and the fusion factor λ is learned through a multi-layer perceptron; Using the fusion factor λ and Weighted fusion to get the predicted value The predicted value Perform denormalization to obtain the final prediction result logλ=MLP(μ,σ) in, For the gas sequence x (i) The final prediction result of (i) is the gas sequence of the ith gas; Var[x (i) ] is the gas sequence x (i) The variance of ;ò is a constant to prevent division by zero; For the gas sequence x (i) The predicted value of E[x (i) ] is the gas sequence x (i) ; γ and β are both learnable affine transformation parameters; The seasonal component represents the result of projection into the prediction space; is the result of projecting the trend component onto the prediction space; L is the number of predicted time steps; j' is the predicted time step index; The seasonal component represents the result of projecting the j'th forecast time step into the forecast space; The trend component represents the result of projecting the j'th predicted time step into the prediction space; is the trend component representation; is expressed as seasonal component; is the projection matrix represented by the seasonal component; is the projection matrix of the trend component.

10. The method for long-term prediction of dissolved gas concentration in transformer oil according to claim 1, characterized in that: The loss function of the dual-view Transformer model is expressed as: L=L MSE +L MAE Among them, L is the loss function; L MSE is the mean square error; L MAE is the mean absolute error; C is the number of gas types; i is the gas type index; For the gas sequence x (i) The final prediction result of (i) is the gas sequence of the i-th gas; y (i) For the gas sequence x (i) The true result; ||·||2 is the L2 norm; ||·||1 is the L1 norm.

Citation Information

Cited By

  • Gas concentration prediction method based on static spectrum characteristics

    CN120703178A