Power transformer long time sequence temperature prediction method and related equipment

By using a hierarchical attention mechanism, long-term temperature data of power transformers is divided into multiple short sequences. Multi-head self-attention and cross-attention mechanisms are employed to solve the problems of high computational complexity and low efficiency in long-term temperature prediction, thus achieving efficient and accurate temperature prediction.

CN122045876APending Publication Date: 2026-05-15STATE GRID INFORMATION & TELECOMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID INFORMATION & TELECOMM GRP CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies have high computational complexity in long-term temperature prediction of power transformers. The number of model parameters increases quadratically with the length of the sequence, making it difficult to effectively capture multi-scale features and long-distance dependencies, resulting in low computational efficiency.

Method used

A hierarchical attention mechanism is adopted to split long-term temperature data into multi-level short sequences. Through multi-head self-attention and cross-attention mechanisms, local and global features are dynamically aggregated, and temperature prediction is performed by combining linear regression.

Benefits of technology

It reduces computational complexity, improves computational efficiency, and can accurately capture multi-scale features and long-distance dependencies, thereby enhancing the accuracy and generalization ability of temperature prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045876A_ABST
    Figure CN122045876A_ABST
Patent Text Reader

Abstract

The invention provides a long-time-sequence temperature prediction method for a power transformer and related equipment. The prediction method comprises the following steps: acquiring intra-day temperature sequence data of a previous day of the power transformer and annual temperature sequence data including the intra-day temperature data of the previous day; on the basis of the learnable classification mark and the intraday temperature sequence data, an intraday feature aggregation vector and an intraday feature matrix of the intraday temperature sequence data are calculated through a multi-head self-attention mechanism; calculating an annual feature matrix of annual temperature sequence data through a multi-head self-attention mechanism based on the intra-day feature aggregation vector in the year; on the basis of the intra-day feature matrix and the annual feature matrix of the previous day, a predicted temperature feature matrix is obtained through calculation through a cross attention mechanism; and calculating to obtain intra-day temperature prediction data of the current day of the power transformer through linear regression based on the prediction temperature characteristic matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system equipment condition monitoring technology, and in particular to a long-term temperature prediction method and related equipment for power transformers. Background Technology

[0002] As a core piece of equipment in the power transmission and distribution chain, the operating temperature of transformers directly affects equipment lifespan and system safety and stability. Temperature prediction typically relies on continuous monitoring data of transformers, which exhibits typical long-term characteristics because it is usually collected at a frequency of minutes or hours. Therefore, the cumulative time span of continuous monitoring data used for temperature prediction can reach several months or even years, with sequence lengths often ranging from thousands to tens of thousands of steps. Summary of the Invention

[0003] In view of this, the purpose of this application is to propose a long-term temperature prediction method and related equipment for power transformers.

[0004] This application proposes a long-term temperature prediction method for power transformers, comprising: Acquire the intraday temperature sequence data of the power transformer for the previous day, as well as the annual temperature sequence data including the intraday temperature data of the previous day; the intraday temperature sequence data is a sequence data composed of temperature data at multiple times. The annual temperature series data is divided into multiple intraday temperature series data. Based on the learnable classification label and the intraday temperature series data, a feature matrix of the intraday temperature series data is calculated through a multi-head self-attention mechanism. The feature matrix includes an intraday feature aggregation vector corresponding to the classification label, and an intraday feature matrix corresponding to the temperature data at the multiple times. Based on the intraday feature aggregation vectors within the year, the annual feature matrix of the annual temperature series data is calculated through a multi-head self-attention mechanism; the annual feature matrix contains the annual-level variation trend features of the intraday temperature series data and the correlation between all intraday feature aggregation vectors within the year. Based on the intraday feature matrix of the previous day and the annual feature matrix, a predicted temperature feature matrix is ​​calculated using a cross-attention mechanism; based on the predicted temperature feature matrix, the intraday temperature prediction data of the power transformer for the current day is calculated using linear regression.

[0005] In some embodiments, the feature matrix of the intraday temperature series data, calculated based on learnable classification labels and the intraday temperature series data through a multi-head self-attention mechanism, includes: Add time sequence information to the temperature data at each moment in the intraday temperature sequence data; Add the classification label to the intraday temperature series data; perform a linear transformation on the temperature data of multiple times in the intraday temperature series data and the classification label to obtain the intraday query matrix, the intraday key matrix and the intraday value matrix. The intraday attention weight matrix is ​​obtained by calculating and normalizing the matrix product of the intraday query matrix and the transposed intraday key matrix through a multi-head self-attention mechanism. The matrix product of the intraday attention weight matrix and the intraday value matrix is ​​calculated using a multi-head self-attention mechanism, and the feature matrix is ​​obtained through a feedforward neural network.

[0006] In some embodiments, the learnable parameters of multiple intraday feature extraction encoders corresponding to the multiple intraday temperature sequence data are shared.

[0007] In some embodiments, the calculation of the annual feature matrix of the annual temperature series data based on the intraday feature aggregation vector within the year, through a multi-head self-attention mechanism, includes: The multiple intraday feature aggregation vectors corresponding to the annual temperature series data are constructed into an input matrix in chronological order; Add time sequence information to each intraday feature aggregation vector in the input matrix; The input matrix is ​​linearly transformed to obtain the annual query matrix, the annual key matrix, and the annual value matrix. By using a multi-head self-attention mechanism, the matrix product of the annual query matrix and the transposed annual key matrix is ​​calculated and normalized to obtain the annual attention weight matrix. The annual attention weight matrix and the annual value matrix are multiplied by a multi-head self-attention mechanism, and the annual feature matrix is ​​obtained by a feedforward neural network.

[0008] In some embodiments, the calculation of the predicted temperature feature matrix based on the previous day's intraday feature matrix and the annual feature matrix through a cross-attention mechanism includes: The query matrix is ​​obtained by performing a linear transformation on the intraday feature matrix of the previous day. The annual feature matrix is ​​linearly transformed to obtain the key matrix and the value matrix; By using the cross-attention mechanism, the matrix product of the query matrix and the transposed key matrix is ​​calculated and normalized to obtain the predicted temperature attention weight matrix. The matrix product of the predicted temperature attention weight matrix and the value matrix is ​​calculated using a cross-attention mechanism, and the predicted temperature feature matrix is ​​obtained through a feedforward neural network.

[0009] In some embodiments, the step of calculating the intraday temperature forecast data of the power transformer for the current day through linear regression based on the predicted temperature feature matrix includes: Each vector in the predicted temperature feature matrix is ​​mapped to its corresponding predicted temperature value through a linear transformation to obtain the intraday temperature prediction data of the power transformer for the current day.

[0010] In some embodiments, the temperature data includes power transformer oil temperature, high-voltage active load, high-voltage reactive load, medium-voltage active load, medium-voltage reactive load, low-voltage active load, and low-voltage reactive load.

[0011] In some embodiments, the intraday temperature forecast data includes power transformer oil temperatures at multiple times.

[0012] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the methods described in any of the preceding embodiments.

[0013] This application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the methods described in any of the preceding embodiments.

[0014] This application also provides a computer program product, including computer program instructions, which, when run on a computer, cause the computer to perform the methods described in any of the preceding embodiments.

[0015] This application's embodiments employ a hierarchical attention architecture design: using a hierarchical structure of local and global attention, the original long time-series annual temperature series data is split into multi-level short sequences of daily intraday temperature series data, achieving flexible aggregation of multi-scale features and efficient parallel computation. Through classification labeling and feature aggregation vector design: CLS tokens are inserted before the local sequences in the form of intraday temperature series data. A self-attention mechanism dynamically aggregates the intraday temperature series data to obtain CLS vectors of local key features, which are then input into the annual trend analysis encoder. Through a decoder cross-attention mechanism input design: by using the intraday feature matrix of the previous day's intraday temperature series data and the annual feature matrix of the annual intraday temperature data, a coupling relationship between local and global features is constructed, enabling accurate prediction of the entire day's temperature. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the transformer long-term temperature prediction method based on hierarchical attention mechanism according to an embodiment of this application.

[0018] Figure 2 This is an architecture diagram of the encoder and decoder in an embodiment of this application.

[0019] Figure 3 This is a schematic diagram of the data processing flow of the transformer long-term temperature prediction method based on hierarchical attention mechanism according to an embodiment of this application.

[0020] Figure 4 This is a structural diagram of the Long Short-Term Memory (LSTM) network.

[0021] Figure 5 This is a structural diagram of a one-dimensional convolutional neural network.

[0022] Figure 6 This is a core structural diagram of the attention mechanism.

[0023] Figure 7 This is a schematic diagram of the hardware structure of an electronic device. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0025] Attention mechanisms originated in the field of Natural Language Processing (NLP) to address the difficulty of capturing long-range dependencies in sequence modeling. The Transformer architecture, proposed in recent years, is the first to completely abandon recurrent or convolutional structures, relying solely on attention mechanisms and feedforward neural networks to achieve sequence modeling. This architecture, with its parallel computing power based on self-attention mechanisms and its advantage in capturing long-term temporal information, has rapidly replaced recurrent neural networks (RNNs, LSTMs, etc.) as the mainstream approach in tasks such as machine translation and text generation.

[0026] Long Short-Term Memory (LSTM) networks are a commonly used technique for time series forecasting. Through their gating mechanism, they can effectively learn and capture long- and short-term dependencies in time series data. The structure of an LSTM can be as follows: Figure 4As shown, the structure of an LSTM can include a forget gate, an input gate, and an output gate. The forget gate determines which information to discard from the previous cell state. The input gate determines which information of the cell state will be updated based on the current input. The output gate determines the output of the next hidden state based on the current cell state. The advantage of LSTM is that, through its gating mechanism, it solves the gradient explosion and vanishing problems of traditional recurrent neural networks (RNNs), capturing long-term dependencies in sequences. The disadvantages of LSTM are its low computational efficiency, making parallelization difficult; its simple structure, making it difficult to capture multi-scale features; and its static gating mechanism, lacking dynamic focusing capabilities. In time series prediction tasks, convolutional neural networks (CNNs) extract local temporal patterns by sliding one-dimensional convolutional kernels along the time dimension. The structure of a one-dimensional convolutional neural network (1D-CNN) is as follows: Figure 5 As shown, the core of 1D-CNN consists of convolutional layers and pooling layers. The convolutional layers use one-dimensional convolutional kernels to perform sliding computation on the input sequence, extracting local features and aggregating information. The pooling layers downsample the convolutional results, preserving key features and reducing parameters. The advantages of 1D-CNN are its strong ability to extract local features, efficiently capturing local dependencies and patterns in the sequence. The convolutional kernels share weights on the input sequence, resulting in high computational efficiency. The disadvantages of 1D-CNN are its limited receptive field, making it difficult to capture long-distance dependencies in the sequence. Pooling layers may lose some detailed information. Convolutional operations are insensitive to the position of the sequence, ignoring positional information.

[0027] With the development of technology, attention mechanisms have been widely applied to time series forecasting, such as power load forecasting, wind power forecasting, and traffic flow forecasting. The core advantage of attention mechanisms lies in their ability to dynamically measure the importance of historical data to the current forecast through attention weights, without needing to preset a fixed window or rely on local patterns. This makes them suitable for processing industrial time series data with complex periodicity, abrupt changes, and long-term dependencies.

[0028] When processing sequential data, the attention mechanism does not assign equal weight to information from all historical moments. Instead, it dynamically calculates attention weights based on the current task requirements, thus focusing on key information. The attention mechanism boasts advantages such as strong long-distance dependency capture capability, able to capture the dependency relationship between any two time steps, strong focusing ability, dynamic allocation of attention weights, and high parallel computing efficiency.

[0029] However, traditional attention mechanisms suffer from high computational complexity and a quadratic increase in the number of model parameters when used for processing long-term continuous monitoring data for temperature prediction.

[0030] In view of this, this application provides a transformer long-time-series temperature prediction method based on a hierarchical attention mechanism. This method splits the long sequence into multiple levels of short sequences, avoiding the quadratic increase in the number of parameters in traditional attention mechanisms and reducing computational resource consumption. This application can capture long-distance dependencies: it directly models the correlation at any time step through the attention mechanism, eliminating the need for serial gating message passing like LSTM, and overcoming the limitation of the limited receptive field of 1D-CNN. Simultaneously, dynamic attention can accurately capture important features, avoiding redundant information interference. This application can extract multi-scale features: it adopts a hierarchical attention structure, with local attention focusing on fine-grained local features within short time windows, and global attention aggregating coarse-grained global features across time windows. This allows for flexible adaptation to multi-scale dynamic changes, solving the problem of LSTM and 1D-CNN having a single structure and difficulty in capturing multi-granular features. This application also improves computational efficiency: by dividing the original long sequence into multiple levels of short sequences through hierarchical design, it avoids the quadratic increase in the number of attention parameters with the sequence length, achieving efficient parallel computation of long sequences and overcoming the computational efficiency problems of basic attention mechanisms and LSTM.

[0031] See Figure 1 The long-term temperature prediction method for power transformers provided in this application embodiment may include: Step S100: Obtain the intraday temperature sequence data of the power transformer for the previous day, and the annual temperature sequence data including the intraday temperature data of the previous day; the intraday temperature sequence data is a sequence data composed of temperature data at multiple times; the temperature data includes power transformer oil temperature, high-voltage active load, high-voltage reactive load, medium-voltage active load, medium-voltage reactive load, low-voltage active load, and low-voltage reactive load. Step S200: Divide the annual temperature series data into multiple intraday temperature series data; based on the learnable classification label and the intraday temperature series data, calculate the feature matrix of the intraday temperature series data through a multi-head self-attention mechanism; the feature matrix includes an intraday feature aggregation vector and an intraday feature matrix; the intraday feature aggregation vector corresponds to the learnable classification label; the intraday feature matrix corresponds to the intraday temperature series data; Step S300: Based on the intraday feature aggregation vectors within the year, the annual feature matrix of the intraday temperature data is calculated through a multi-head self-attention mechanism; the annual feature matrix contains the annual-level trend features of the temperature sequence data and the correlation between all intraday feature aggregation vectors within the year. Step S400: Based on the intraday feature matrix of the previous day and the annual feature matrix, a predicted temperature feature matrix is ​​calculated using a cross-attention mechanism; based on the predicted temperature feature matrix, the predicted temperature data of the power transformer for the current day is calculated using linear regression.

[0032] This application employs a hierarchical attention mechanism to obtain an aggregated vector of intraday features from intraday temperature sequence data; and to derive an annual feature matrix from the annual temperature sequence data (i.e., the annual intraday temperature data) using daily intraday temperature sequence data. This effectively addresses the key bottleneck of traditional attention mechanisms in long-term temperature prediction. It reduces computational complexity through hierarchical attention construction and parameter sharing among multiple intraday feature extractors, avoiding the problem of model parameters increasing quadratically with sequence length. Compared to LSTM, it overcomes the issues of low computational efficiency and difficulty in parallelization. Compared to 1D-CNN, it overcomes the limitations of restricted receptive field and position insensitivity, capturing long-distance dependencies through self-attention and preserving temporal positional information using positional encoding.

[0033] In some embodiments, in step S100, to predict the future intraday temperature sequence data of the power transformer (e.g., intraday temperature sequence data for day t / tomorrow), it is necessary to obtain intraday temperature sequence data for at least one full year, with day t-1 as the last day. Typically, intraday temperature sequence data requires collecting temperature data at multiple times within the same day to obtain the intraday temperature sequence data for that day. For example, temperature data can be collected at each moment of each hour, resulting in a sequence of 96 temperature data points for the day. Typically, the temperature data can include data from seven dimensions: oil temperature, high-voltage active load, high-voltage reactive load, medium-voltage active load, medium-voltage reactive load, low-voltage active load, and low-voltage reactive load.

[0034] It should be understood that training typically requires collecting intraday temperature series data for more than one year, such as one, two, three, or more full years of intraday temperature series data. Annual temperature series data can also be non-full-year data; for example, it could include data from one year plus approximately 80 days, including the previous day. However, each training iteration is based on the intraday temperature series data of the day preceding the date of prediction, as well as the full year's temperature data including that previous day's intraday temperature series data.

[0035] In some embodiments, in step S200, the annual temperature series data (i.e., the annual intraday temperature series data), including the intraday temperature data of the previous day, can be divided into multiple intraday temperature series data. Typically, this can be 365 intraday temperature series data. For the daily intraday temperature series data, a learnable classification token (CLS token) can be used to capture the dynamic fluctuation patterns of intraday temperature and its influencing factors, obtaining a discriminative intraday feature representation, i.e., obtaining an intraday feature aggregation vector.

[0036] In some embodiments, for daily intraday temperature sequence data, a feature matrix of the daily intraday temperature sequence data can be output by a corresponding intraday feature extraction encoder. The output feature matrix of the daily intraday temperature sequence data includes a CLS Vector intraday feature aggregation vector learned from a learnable classification tag CLS Token, and corresponding intraday feature matrices learned from temperature data at multiple times of the day. That is, the feature matrix includes both the intraday feature matrix and the intraday feature aggregation vector.

[0037] In some embodiments, the architecture of the intraday feature extraction encoder can be as follows: Figure 2 As shown. Each intraday feature extraction encoder can include modules such as multi-head attention, feedforward neural network, and normalization. Each intraday feature extraction encoder can employ a self-attention mechanism for corresponding data processing. For example, Figure 6 As shown, the attention mechanism consists of three parts: query (Q), key (K), and value (V). The attention mechanism model can generate corresponding attention weights by calculating the similarity between the query vector at the current time and the key vector at a historical time, and then perform a weighted summation on the historical value vectors. Multi-head attention projects the query, key, and value to multiple different subspaces and performs attention calculations in parallel, thereby capturing multiple temporal dependency patterns.

[0038] In some embodiments, for daily intraday temperature series data, a learnable classification token (CLS Token) interacts with the temperature data of all moments in the intraday temperature series through a multi-head self-attention mechanism, dynamically aggregating intraday feature information, and finally outputting a CLS Vector (i.e., an intraday feature aggregation vector) containing key features. The feature matrix of the intraday temperature series data can be obtained through the following methods: Add time sequence information to each temperature data point in the intraday temperature series data. This ensures that the temperature data at each moment in the intraday temperature series data has a time sequence information.

[0039] Add the classification tag (e.g., CLS Token) to the intraday temperature series data. Perform a linear transformation on the temperature data at multiple times in the intraday temperature series data and the classification tag to obtain the intraday query matrix, intraday key matrix, and intraday value matrix. For example, the intraday temperature series data... Perform a linear transformation to generate a query ( ),key( ) and value ( )matrix. .in, x i This represents temperature data at a specific moment. , as well as These are the learnable parameters.

[0040] By employing a multi-head self-attention mechanism, the matrix product of the intraday query matrix and the transposed intraday key matrix is ​​calculated and normalized to obtain the intraday attention weight matrix.

[0041] A multi-head self-attention mechanism is used to calculate the matrix product of the intraday attention weight matrix and the intraday value matrix, and a feature matrix is ​​obtained through a feedforward neural network. The feature matrix includes the intraday feature aggregation vector (e.g., CLS Vector) corresponding to the classification label, and the intraday feature matrix corresponding to the temperature data at the multiple time points. The intraday feature aggregation vector can be based on the formula... Perform the calculations. Among them, The intraday attention weight matrix (i.e., dot product similarity) between the query vector labeled for classification and the key vector of the temperature data at each time point in the intraday temperature series data.

[0042] It should be understood that for the temperature data at each moment in the daily intraday temperature series data, data interaction is performed with the temperature data of the remaining moments in the intraday temperature series data and the learnable classification tag CLS Token to dynamically aggregate intraday feature information and obtain the corresponding feature aggregation vector. The process of data interaction and dynamic aggregation of intraday feature information can be the same as the process of obtaining the intraday feature aggregation vector. When calculating the attention weights, a self-attention mechanism is used to calculate the attention weights of the query vector of the current moment's temperature data, the key vectors of the remaining moments' temperature data in the intraday temperature series data, and the key vector of the classification tag; then, a weighted sum is performed based on the attention weights and the value vectors of the corresponding remaining moments' temperature data in the intraday temperature series data to obtain the corresponding feature aggregation vector. In this way, the intraday feature matrix corresponding to the temperature data at multiple moments in the intraday temperature series data and the intraday feature aggregation vector corresponding to the classification tag are obtained.

[0043] In some of these embodiments, please refer to Figure 3 The learnable parameters of daily intraday temperature series data within a year are shared. This can be understood as the learnable parameters of the corresponding intraday feature extraction encoder being the same for each day's intraday temperature series data within a year; that is, the learnable parameters of multiple intraday feature extraction encoders (e.g., ...) are shared. , as well as It is shared, enabling consistent representational capabilities for data from different dates during feature extraction.

[0044] In some embodiments, in step S300, the annual feature matrix of the annual intraday temperature data can be obtained through an annual trend analysis encoder. The annual trend analysis encoder can take the intraday feature aggregation vector (e.g., CLS Vector) corresponding to the daily intraday temperature sequence data as input and analyze the annual feature evolution pattern through a multi-head self-attention mechanism. Returning to... Figure 2 The annual trend analysis encoder can include modules such as multi-head attention, feedforward neural networks, and normalization. The annual trend analysis encoder can employ a self-attention mechanism for data processing.

[0045] In some embodiments, the calculation of the annual feature matrix of the annual temperature series data based on the intraday feature aggregation vectors within the year (i.e., multiple intraday feature aggregation vectors corresponding to the annual temperature series data) through a multi-head self-attention mechanism may include: The annual temperature series data is aggregated into multiple intraday feature vectors and constructed into an input matrix in chronological order. The chronological order can be a natural time order, such as the order of dates.

[0046] Temporal order information is added to each intraday feature aggregation vector in the input matrix. This ensures that the intraday feature aggregation vector at each location has its own temporal order information. Position encoding can be used to preserve the temporal information of the sequence.

[0047] A linear transformation is performed on the input matrix to obtain the annual query matrix, the annual key matrix, and the annual value matrix. That is, after the linear transformation, the corresponding query (Q), key (K), and value (V) matrices can be generated.

[0048] The multi-head self-attention mechanism calculates and normalizes the matrix product of the annual query matrix and the transposed annual key matrix to obtain the annual attention weight matrix. In this mechanism, a second attention weight is obtained by calculating the correlation between any two intraday temperature data points. Each self-attention head can learn a different subspace representation. Each self-attention head has different learnable parameters. Thus, each self-attention head can learn different long-term dependencies, such as seasonal cyclical changes and annual cyclical trends.

[0049] The annual attention weight matrix and the annual value matrix are multiplied by a multi-head self-attention mechanism, and the annual feature matrix is ​​obtained through a feedforward neural network. The annual feature matrix output by the final annual trend analysis encoder contains both the annual trend information of intraday temperature series data and retains the correlation between the intraday feature aggregation vectors of each intraday temperature series data, which can provide multi-scale contextual support for the prediction of subsequent intraday temperature series data.

[0050] In some embodiments, in step S400, the intraday feature matrix of the previous day's intraday temperature sequence data can be used as a query (Q) input by the all-day temperature prediction decoder, and dynamically correlated with the annual feature matrix output by the annual trend analysis encoder through a cross-attention mechanism to obtain the coupling relationship between the previous day's intraday feature matrix and the annual feature matrix of the annual temperature sequence data. Please continue reading Figure 2 The all-day temperature forecast decoder can include modules such as multi-head attention, feedforward neural networks, and normalization. The all-day temperature forecast decoder can use a cross-attention mechanism for corresponding data processing. Its query (Q) input is the query matrix of the intraday feature matrix output by the intraday feature extraction encoder on day t, and the key (K) and value (V) inputs are the key matrix and value matrix of the annual feature matrix output by the annual trend analysis encoder, respectively.

[0051] In some embodiments, the calculation of the predicted temperature feature matrix based on the intraday feature matrix of the previous day's intraday temperature series data and the annual feature matrix of the annual temperature series data through a cross-attention mechanism may include: A query matrix is ​​obtained by linearly transforming the intraday feature matrix of the previous day's intraday temperature series data. After the linear transformation, the feature matrix of the previous day's intraday temperature series data can be projected into the query matrix.

[0052] A linear transformation is performed on the annual feature matrix of the annual temperature series data to obtain the key matrix and value matrix. After the linear transformation, the annual feature matrix of the intraday temperature can be projected into the key matrix and value matrix.

[0053] By using a cross-attention mechanism, the matrix product of the query matrix and the transposed key matrix is ​​calculated and normalized to obtain the attention weight matrix for predicted temperature.

[0054] The predicted temperature feature matrix is ​​obtained by multiplying the predicted temperature attention weight matrix and the value matrix using a cross-attention mechanism and then passing the result through a feedforward neural network. The number of temperature features in the resulting predicted temperature feature matrix is ​​the same as the number of temperature features in the previous day's intraday temperature sequence data. This allows for the prediction of temperature data at multiple times throughout the day, with each time point's temperature data represented as an independent feature.

[0055] In some embodiments, after obtaining the predicted temperature feature matrix, intraday temperature prediction data for the entire day can be generated through linear regression. A linear regression layer can be used to map the features in the predicted temperature feature matrix to actual temperature values, thus completing temperature predictions for multiple times throughout the day. The step of calculating the current day's temperature prediction data for the power transformer based on the predicted temperature feature matrix through linear regression can include: Each vector in the predicted temperature feature matrix is ​​mapped to its corresponding predicted temperature value through a linear transformation, thus obtaining the intraday temperature prediction data for the power transformer for the current day. This completes the hourly temperature prediction for the current day (and the future).

[0056] It should be understood that the specific training methods for the intraday feature extraction encoder, annual trend analysis encoder, and all-day temperature prediction decoder in this application are the same as those for the long-term temperature prediction method for power transformers in this application. The only difference is that in the training method, after each prediction of the current day's temperature data for the power transformer is obtained, a loss function needs to be calculated when training the intraday feature extraction encoder, annual trend analysis encoder, and all-day temperature prediction decoder. However, in the long-term temperature prediction method for power transformers, it is not necessary to calculate the loss function.

[0057] The long-term temperature prediction method for power transformers in this application supports long-term data modeling and prediction. Through a hierarchical attention structure, it effectively captures multi-scale temporal dependencies from the time-to-time level to the year-to-year level, overcoming the limitations of LSTM in modeling ultra-long sequences and the limited receptive field of 1D-CNN. It can accurately characterize the intraday fluctuations and interannual trends of transformer temperature. It significantly reduces computational complexity and training time: by splitting long sequences into multiple levels of short sequences, it avoids the quadratic increase in parameters of traditional attention mechanisms and supports efficient parallel computing, significantly reducing computational resource consumption and improving training efficiency. It improves prediction accuracy and generalization ability: local attention focuses on fine-grained dynamic features, while global attention captures macroscopic patterns such as seasonality and periodicity. The fusion of these two approaches enables collaborative modeling of multi-granular features, improving the accuracy of transformer temperature prediction, especially in complex scenarios such as load mutations and seasonal fluctuations.

[0058] Therefore, the long-term temperature prediction method for power transformers in this application avoids the problems of low computational efficiency caused by the serial calculation mode based on the loop structure in LSTM-based transformer temperature prediction schemes, and the difficulty of dynamically focusing key features and effectively modeling long-term temporal dependencies due to the static gating mechanism. It also avoids the problems of limited and fixed receptive field range in 1D-CNN-based transformer temperature prediction schemes, which cannot capture long-distance temporal dependencies, and the single convolutional structure is difficult to adapt to multi-scale feature changes, resulting in insufficient prediction accuracy in complex scenarios. Furthermore, it avoids the problems of transformer temperature prediction schemes based on ordinary attention mechanisms, where the number of parameters increases quadratically with the sequence length, resulting in excessive computational resource consumption and inability to adapt to long-term massive time-series data; and the difficulty in distinguishing between intraday and annual feature matrices, leading to insufficient adaptability to multi-granularity dynamic changes.

[0059] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the long-term temperature prediction method for power transformers described in any of the above embodiments.

[0060] Figure 7 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0061] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0062] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0063] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0064] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0065] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0066] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0067] The electronic devices described above are used to implement the corresponding long-term temperature prediction method for power transformers in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0068] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the long-term temperature prediction method for power transformers as described in any of the above embodiments.

[0069] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0070] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the long-term temperature prediction method for power transformers as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0071] Based on the same inventive concept, corresponding to the long-term temperature prediction method for power transformers described in any of the above embodiments, this disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to execute the long-term temperature prediction method for power transformers. Corresponding to the execution entity for each step in each embodiment of the long-term temperature prediction method for power transformers, the processor executing the corresponding step can belong to the corresponding execution entity.

[0072] The computer program product of the above embodiments is used to enable the computer and / or the processor to execute the long-term temperature prediction method for power transformers as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0073] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0074] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description.

[0075] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for long-term temperature prediction of power transformers, characterized in that, include: Obtain the intraday temperature sequence data of the power transformer for the previous day, as well as the annual temperature sequence data including the intraday temperature data of the previous day. The intraday temperature sequence data is a sequence of temperature data from multiple time points; The annual temperature series data is divided into multiple intraday temperature series data; Based on the learnable classification labels and the intraday temperature series data, the feature matrix of the intraday temperature series data is calculated through a multi-head self-attention mechanism. The feature matrix includes an intraday feature aggregation vector corresponding to the classification label, and an intraday feature matrix corresponding to the temperature data at the multiple times. Based on the intraday feature aggregation vectors within the year, the annual feature matrix of the annual temperature series data is calculated through a multi-head self-attention mechanism; the annual feature matrix contains the annual-level variation trend features of the intraday temperature series data and the correlation between all intraday feature aggregation vectors within the year. Based on the intraday feature matrix of the previous day and the annual feature matrix, a predicted temperature feature matrix is ​​calculated using a cross-attention mechanism; based on the predicted temperature feature matrix, the intraday temperature prediction data of the power transformer for the current day is calculated using linear regression.

2. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The feature matrix of the intraday temperature series data, calculated using a multi-head self-attention mechanism based on the learnable classification labels and the intraday temperature series data, includes: Add time sequence information to the temperature data at each moment in the intraday temperature sequence data; Add the classification label to the intraday temperature series data; perform a linear transformation on the temperature data of multiple times in the intraday temperature series data and the classification label to obtain the intraday query matrix, the intraday key matrix and the intraday value matrix. The intraday attention weight matrix is ​​obtained by calculating and normalizing the matrix product of the intraday query matrix and the transposed intraday key matrix through a multi-head self-attention mechanism. The matrix product of the intraday attention weight matrix and the intraday value matrix is ​​calculated using a multi-head self-attention mechanism, and the feature matrix is ​​obtained through a feedforward neural network.

3. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The learnable parameters of the multiple intraday feature extraction encoders corresponding to the multiple intraday temperature sequence data are shared.

4. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The annual feature matrix of the annual temperature series data, calculated using a multi-head self-attention mechanism based on the intraday feature aggregation vector within the year, includes: The multiple intraday feature aggregation vectors corresponding to the annual temperature series data are constructed into an input matrix in chronological order; Add time sequence information to each intraday feature aggregation vector in the input matrix; The input matrix is ​​linearly transformed to obtain the annual query matrix, the annual key matrix, and the annual value matrix. By using a multi-head self-attention mechanism, the matrix product of the annual query matrix and the transposed annual key matrix is ​​calculated and normalized to obtain the annual attention weight matrix. The annual attention weight matrix and the annual value matrix are multiplied by a multi-head self-attention mechanism, and the annual feature matrix is ​​obtained by a feedforward neural network.

5. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The predicted temperature feature matrix, calculated using a cross-attention mechanism based on the previous day's intraday feature matrix and the annual feature matrix, includes: The query matrix is ​​obtained by performing a linear transformation on the intraday feature matrix of the previous day. The annual feature matrix is ​​linearly transformed to obtain the key matrix and the value matrix; By using the cross-attention mechanism, the matrix product of the query matrix and the transposed key matrix is ​​calculated and normalized to obtain the predicted temperature attention weight matrix. The matrix product of the predicted temperature attention weight matrix and the value matrix is ​​calculated using a cross-attention mechanism, and the predicted temperature feature matrix is ​​obtained through a feedforward neural network.

6. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The method of calculating the intraday temperature forecast data of the power transformer for the current day through linear regression based on the predicted temperature feature matrix includes: Each vector in the predicted temperature feature matrix is ​​mapped to its corresponding predicted temperature value through a linear transformation to obtain the intraday temperature prediction data of the power transformer for the current day.

7. The long-term temperature prediction method for power transformers according to claim 1, characterized in that, The temperature data includes power transformer oil temperature, high-voltage active load, high-voltage reactive load, medium-voltage active load, medium-voltage reactive load, low-voltage active load, and low-voltage reactive load; the intraday temperature prediction data includes power transformer oil temperature at multiple times.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 7.

9. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.

10. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 7.