Transformer oil temperature prediction method and device, storage medium and computer equipment
By combining the KAN network and the improved Transformer model, the problem of insufficient accuracy of traditional transformer oil temperature prediction methods under complex oil temperature change patterns is solved, high-precision oil temperature prediction is achieved, the risk of equipment failure is reduced, and the safety and reliability of the power system are improved.
Patent Information
- Application Number
- CN202510892843.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-03
AI Technical Summary
Traditional transformer oil temperature prediction methods lack accuracy under complex oil temperature change patterns, making it difficult to meet actual needs. They are also highly dependent on data quality, increasing the risk of equipment failure.
The KAN network is combined with an improved Transformer model. The KAN network improves prediction accuracy through convolution operations and adaptive attention mechanisms. The improved Transformer model abandons the position encoder and decoder and adopts convolution layers and global average pooling structures to capture the spatial characteristics and temporal dependencies in oil temperature changes.
It significantly improves the accuracy and reliability of transformer oil temperature prediction, can handle complex oil temperature change patterns, reduce equipment failures caused by overheating or insulation performance degradation, and improve the stability and safety of the power system.
Smart Images

Figure CN120744375A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power equipment monitoring, and in particular to a transformer oil temperature prediction method, device, storage medium, and computer equipment. Background Art
[0002] Transformer insulating oil temperature prediction plays a crucial role in the safe and stable operation of power systems and equipment maintenance and management. Accurate transformer oil temperature prediction enables in-depth analysis of transformer operating conditions, effectively preventing equipment failures caused by overheating and insulation degradation. This not only helps ensure the safety of power transmission and distribution but also significantly reduces operation and maintenance costs. However, a lack of accurate oil temperature prediction or insufficient prediction capabilities increases the risk of transformer failure, posing potential safety risks.
[0003] Traditional transformer oil temperature prediction methods offer advantages in model building and computational efficiency, but they rely on the quality and integrity of input data, placing high demands on prediction effectiveness. However, as oil temperature patterns become increasingly complex, the accuracy and reliability of traditional methods are increasingly insufficient to meet practical needs. Summary of the Invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect in the prior art that as the oil temperature change pattern becomes increasingly complex, the prediction accuracy and reliability of traditional methods are gradually unable to meet actual needs.
[0005] In a first aspect, the present application provides a transformer oil temperature prediction method, the method comprising:
[0006] Get historical transformer oil temperature;
[0007] Determine the pre-trained target oil temperature prediction model, which consists of a KAN network and an improved Transformer model. The improved Transformer model does not include a positional encoder and decoder, but contains convolutional layers and a global average pooling structure.
[0008] The historical transformer oil temperature is input into the target oil temperature prediction model to obtain the predicted transformer oil temperature corresponding to the historical transformer oil temperature.
[0009] In one embodiment, the formula corresponding to the KAN network is:
[0010]
[0011] in, Indicates the The one-dimensional function of the layer, Indicates the The variable index of the layer, Indicates the The total number of variables in the layer, Represents the input vector The elements.
[0012] In one embodiment, the activation function of the KAN network is:
[0013]
[0014] in, is the basis function, is the spline function, and is the weight, is the sum of the basis function and the spline function.
[0015] In one embodiment, the improved Transformer model includes an encoding layer and an output layer;
[0016] The encoding layer includes multiple linear layers, multi-head attention layers, residual connections and layer normalization, and convolutional layers. The convolutional layers include the first one-dimensional convolutional layer, the dropout layer, and the second one-dimensional convolutional layer. The linear layer is used to receive the output data of the KAN network.
[0017] The output layer includes a global average pooling structure, a first fully connected layer, a concatenation layer, and a second fully connected layer in sequence. The global average pooling structure is used to receive the output data of the encoding layer, and the second fully connected layer is used to output the predicted transformer oil temperature.
[0018] In one embodiment, the self-attention mechanism formula of the improved Transformer model is:
[0019]
[0020] in, , , , is the input matrix, for Dimensions, 、 and are the weight matrices for query vector, key vector, and value vector respectively, represents the transpose of the key vector, and softmax represents the probability function.
[0021] In one embodiment, the multi-head attention mechanism function of the improved Transformer model is:
[0022]
[0023] in, , is the weight of the last fully connected layer, 、 and Respectively The weight matrix of the query vector, key vector and value vector of each head.
[0024] In one embodiment, the target oil temperature prediction model training process includes:
[0025] Determine a sample transformer oil temperature training set and a sample transformer oil temperature test set;
[0026] The pre-built initial oil temperature prediction model is trained based on the sample transformer oil temperature training set, and the trained initial oil temperature prediction model is evaluated using the sample transformer oil temperature test set until the trained initial oil temperature prediction model meets the preset training end conditions and the target oil temperature prediction model is obtained.
[0027] In a second aspect, the present application provides a transformer oil temperature prediction device, the device comprising:
[0028] Historical transformer oil temperature acquisition module, used to obtain historical transformer oil temperature;
[0029] The target oil temperature prediction model determination module is used to determine the pre-trained target oil temperature prediction model. The target oil temperature prediction model consists of a KAN network and an improved Transformer model. The improved Transformer model does not contain a position encoder and decoder, but contains a convolutional layer and a global average pooling structure.
[0030] The predicted transformer oil temperature acquisition module is used to input the historical transformer oil temperature into the target oil temperature prediction model to obtain the predicted transformer oil temperature corresponding to the historical transformer oil temperature.
[0031] In a third aspect, the present application provides a storage medium: the storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the transformer oil temperature prediction method as described in any one of the above embodiments.
[0032] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0033] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of any transformer oil temperature prediction method in the above embodiments are performed.
[0034] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0035] The transformer oil temperature prediction method, device, storage medium and computer equipment provided by the present application, by combining the KAN network with the improved Transformer model, can effectively solve the problem of insufficient prediction accuracy of traditional methods under complex oil temperature change patterns. First, the introduction of the KAN network algorithm into transformer oil temperature prediction can improve the prediction accuracy and better adapt to the complexity of oil temperature changes. Secondly, the improved Transformer model abandons the traditional position encoder and decoder and adopts a convolutional layer and a global average pooling structure, so that it can better capture the spatial characteristics and temporal dependencies in the oil temperature changes, thereby improving the computational efficiency and prediction accuracy of the model. Then, by inputting the historical transformer oil temperature into the model, the future oil temperature trend can be accurately predicted, thereby effectively avoiding equipment failures caused by overheating or degradation of insulation performance. This method can handle complex oil temperature change patterns, solves the problems of high dependence on data quality and insufficient prediction accuracy of traditional prediction methods, and significantly improves the accuracy and reliability of transformer oil temperature prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 A flow chart of a transformer oil temperature prediction method provided in an embodiment of the present application;
[0038] Figure 2 This is an example diagram of the structure of the target oil temperature prediction model provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of the structure of a transformer oil temperature prediction device provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0042] The present application provides a transformer oil temperature prediction method. The following embodiments are described using the method applied to a computer device as an example. It is understood that the computer device can be any device with data processing capabilities, including but not limited to a single server, a server cluster, a personal laptop computer, a desktop computer, etc. Figure 1 As shown, the present application provides a chat corpus annotation method, the method comprising:
[0043] S101: Obtain historical transformer oil temperature.
[0044] Among them, the historical transformer oil temperature refers to the oil temperature data of the transformer in the past period of time. These data record the changes in the transformer oil temperature over time.
[0045] In this step, oil temperature data can be collected in real time by a temperature sensor. First, the temperature sensor monitors the transformer's oil temperature in real time and records the data. This data can be stored in a local device database or uploaded to the cloud via the network.
[0046] Furthermore, the operation of obtaining historical oil temperature can send a request to the storage system, such as retrieving oil temperature records within a specific time period from the database through a SQL query, or obtaining data from a remote server through an API interface. If the oil temperature data is stored in the file system, the log file or data file is read, and after filtering the historical records based on the timestamp, a list or dataset containing the historical oil temperature data is returned. This data can be used as input for the subsequent oil temperature prediction model.
[0047] S102: Determine a pre-trained target oil temperature prediction model, where the target oil temperature prediction model is composed of a KAN network and an improved Transformer model. The improved Transformer model does not include a position encoder and a decoder, but includes a convolutional layer and a global average pooling structure.
[0048] The target oil temperature prediction model is a specially designed and trained model used to predict future oil temperature changes in transformers. This model analyzes historical oil temperature data to provide predictions of future oil temperature trends. The KAN (Kolmogorov-Arnold Network) is a deep learning model architecture based on the Kolmogorov-Arnold representation theorem, which states that any continuous function can be represented by a finite-dimensional combination of functions. This allows the KAN network to efficiently extract features from complex input data. KAN networks typically combine convolutional kernel operations with an adaptive attention mechanism to enhance the model's ability to represent complex patterns and focus on key features. The Transformer is a deep learning model widely used for processing time series data. In the standard Transformer, the positional encoder provides the model with sequential information about the input data, while the decoder generates the output. The improved Transformer model removes the traditional positional encoder and decoder, adopting a convolutional layer and global average pooling structure to improve spatial feature extraction and computational efficiency when processing time series data. A convolutional layer is an operation in a neural network that primarily extracts local features from input data. Specifically, it extracts local patterns of oil temperature fluctuations from historical oil temperature data. Global average pooling is a pooling operation that averages all values in each feature map, reducing its size and computational complexity while retaining the most important feature information.
[0049] In this step, first, select and load the trained target oil temperature prediction model. This can be done by retrieving the storage path of the target oil temperature prediction model, calling the corresponding model file or database record, and loading it into memory. At the same time, ensure that the model runs in the correct computing environment so that it can promptly process the historical oil temperature data to be input. The target oil temperature prediction model consists of a KAN network and an improved Transformer model. After receiving the input data and completing the data processing, the KAN network outputs the data to the improved Transformer model. For the improved Transformer model, the original Transformer model architecture file can be modified or the network configuration can be updated, the position encoder and decoder can be removed, and the convolution layer and pooling layer can be integrated into the original Transformer model to obtain the improved Transformer model. This allows the Transformer model to better capture the spatial characteristics of oil temperature changes, effectively handle long-term dependencies, and reduce computational complexity. In this way, the Transformer model not only improves computational efficiency but also enhances its adaptability to complex oil temperature fluctuations.
[0050] It's understandable that the purpose of establishing a pre-trained target oil temperature prediction model and utilizing an architecture consisting of a KAN network and an improved Transformer model is to improve the accuracy and efficiency of oil temperature prediction. Based on the Kolmogorov-Arnold representation theorem, the KAN network captures complex patterns in oil temperature data by combining local features and nonlinear mapping. Through convolution operations and an adaptive attention mechanism, the model focuses on key changing features, enabling high-precision predictions even in the face of complex fluctuations. The improved Transformer model, by abandoning the traditional positional information encoder and decoder and adopting convolutional layers and a global average pooling structure, enhances the ability to capture spatial features of time series data while improving computational efficiency. This architectural combination enables more accurate prediction of transformer oil temperature changes, reduces equipment failures caused by overheating or insulation problems, and improves the stability and security of the power system.
[0051] S103: Inputting the historical transformer oil temperature into a target oil temperature prediction model to obtain a predicted transformer oil temperature corresponding to the historical transformer oil temperature.
[0052] Transformer oil temperature prediction refers to the process by which the target oil temperature prediction model extrapolates and estimates future oil temperatures based on historical oil temperature data. The predicted value, output by the target oil temperature prediction model, supports transformer maintenance and fault warnings.
[0053] In this step, the historical transformer oil temperature first needs to be input into the target oil temperature prediction model. Then, the historical transformer oil temperature can be preprocessed and converted to ensure that it can be smoothly passed to the model for processing. At this time, the target oil temperature prediction model will conduct an in-depth analysis of the input historical transformer oil temperature, and through its internal computing architecture, use previous learning and training to predict the trend of oil temperature changes based on time series data. As the data flows into the target oil temperature prediction model, the target oil temperature prediction model begins to calculate, combining its existing parameters and network structure to generate future oil temperature prediction values. In this process, the target oil temperature prediction model obtains accurate oil temperature predictions through understanding the oil temperature change pattern and the operation of the prediction algorithm. In this way, the historical transformer oil temperature is efficiently converted into an estimate of the future transformer oil temperature, thereby providing key support for the safe operation of the transformer.
[0054] It's understandable that inputting historical transformer oil temperatures into the target oil temperature prediction model and obtaining the corresponding predicted oil temperatures is intended to accurately estimate future transformer oil temperatures and support safe operation of transformer equipment. Inputting historical transformer oil temperatures is a prerequisite for the target oil temperature prediction model to make predictions based on past trends, ensuring that the target oil temperature prediction model understands the context and patterns of oil temperature fluctuations. The predicted transformer oil temperature obtained through calculations by the target oil temperature prediction model provides an estimate of future transformer oil temperature fluctuations.
[0055] In the above embodiment, by combining the KAN network with the improved Transformer model, the problem of insufficient prediction accuracy of the traditional method under complex oil temperature change patterns can be effectively solved. First, the introduction of the KAN network algorithm into the transformer oil temperature prediction can improve the prediction accuracy and better adapt to the complexity of oil temperature changes. Secondly, the improved Transformer model abandons the traditional position encoder and decoder and adopts a convolutional layer and a global average pooling structure, which can better capture the spatial characteristics and temporal dependencies in the oil temperature changes, thereby improving the computational efficiency and prediction accuracy of the model. Then, by inputting the historical transformer oil temperature into the model, the future oil temperature trend can be accurately predicted, thereby effectively avoiding equipment failures caused by overheating or degradation of insulation performance. This method can handle complex oil temperature change patterns, solves the problems of high dependence on data quality and insufficient prediction accuracy of traditional prediction methods, and significantly improves the accuracy and reliability of transformer oil temperature prediction.
[0056] In one embodiment, the formula corresponding to the KAN network is:
[0057]
[0058] in, Indicates the The one-dimensional function of the layer, Indicates the The variable index of the layer, Indicates the The total number of variables in the layer, Represents the input vector The elements.
[0059] Specifically, if F is a continuous function of multiple variables defined over a bounded domain, then F can be written as a finite combination of continuous functions of single variables and the binary operation of addition:
[0060]
[0061] Among them, x is the input of n dimensions, and the output is the summed value. and are all one-dimensional functions, , The formula corresponding to the KAN network can be obtained by summing up the function L times.
[0062] In this embodiment, the formula simplifies the model structure and enhances the model's ability to fit complex functions by decomposing complex multivariable functions into a limited combination of single-variable functions. In transformer oil temperature prediction, this decomposition method enables the model to more accurately capture the complex patterns of oil temperature variations, improving prediction accuracy and reliability while reducing reliance on data quality.
[0063] In one embodiment, the activation function of the KAN network is:
[0064]
[0065] in, is the basis function, is the spline function, and is the weight, is the sum of the basis function and the spline function.
[0066] Specifically, the basis functions The silu (also known as swish) activation function is a self-gating mechanism that automatically adjusts the activation level according to the input value, which helps the network learn nonlinear relationships. In most cases is the sum of B-spline functions, , is a trainable value that allows the network to flexibly fit complex data distributions.
[0067] In this example, the self-gating properties of the SILU function and the flexibility of the B-spline function are combined to enable the KAN network to more effectively capture complex nonlinear relationships in the data, improving the model's expressiveness and generalization performance. This helps the network more accurately simulate and predict the dynamic characteristics of oil temperature changes when handling complex tasks such as transformer oil temperature prediction, thereby improving the accuracy and reliability of predictions.
[0068] In one embodiment, the improved Transformer model includes an encoding layer and an output layer;
[0069] The encoding layer includes multiple linear layers, multi-head attention layers, residual connections and layer normalization, and convolutional layers. The convolutional layers include the first one-dimensional convolutional layer, the dropout layer, and the second one-dimensional convolutional layer. The linear layer is used to receive the output data of the KAN network.
[0070] The output layer includes a global average pooling structure, a first fully connected layer, a concatenation layer, and a second fully connected layer in sequence. The global average pooling structure is used to receive the output data of the encoding layer, and the second fully connected layer is used to output the predicted transformer oil temperature.
[0071] It is understandable that since the positional encoding is of low effectiveness and does not require the decoder structure for parallel computing, the original Transformer model is improved by removing the positional encoding and decoder parts, adjusting the internal structure of the model, adding convolutional layers and global average pooling structures, and using fully connected layers for result output, thereby improving the prediction effect. Figure 2 As shown in Figure 1, the target oil temperature prediction model composed of the KAN network and the improved transformer model.
[0072] Specifically, the improved Transformer model aims to improve the accuracy and efficiency of transformer oil temperature prediction by integrating the encoding layer and the output layer. The encoding layer consists of multiple linear layers, a multi-head attention layer, residual connections, and layer normalization, which work together to extract features from the input data. Next, the convolutional layer further extracts local features through one-dimensional convolution operations, and a dropout layer reduces the risk of overfitting. The output layer integrates the output of the encoding layer through a global average pooling structure. Fully connected layers and concatenation layers further process and integrate the features, ultimately outputting the prediction result.
[0073] In this embodiment, the improved Transformer model enhances feature extraction and processing capabilities by combining multi-head attention mechanism, residual connection, layer normalization and convolutional layer technologies, improves the model's prediction accuracy and generalization ability for transformer oil temperature changes, and reduces the risk of overfitting and computational complexity, thereby demonstrating higher reliability and efficiency in practical applications.
[0074] In one embodiment, the self-attention mechanism formula of the improved Transformer model is:
[0075]
[0076] in, , , , is the input matrix, for Dimensions, 、 and are the weight matrices for query vector, key vector, and value vector respectively, represents the transpose of the key vector, and softmax represents the probability function.
[0077] Specifically, this formula describes the self-attention mechanism in the improved Transformer model, which is a mechanism that allows the model to pay attention to information at different positions in the input sequence. In the formula, Q, K, and V represent query, key, and value, respectively. They are all input matrix X through different weight matrices. 、 and The self-attention mechanism is obtained by calculating the dot product between the query vector and all key vectors and then dividing it by Scaling is performed to avoid vanishing gradients due to excessively large dot products. The scaled dot product is then converted to a probability distribution using the Softmax function. This probability distribution represents the importance of each position in the input sequence. Finally, this probability distribution is multiplied by the value vector V to produce a weighted value output vector, which represents the model's focus on the input sequence.
[0078] In this embodiment, the self-attention mechanism enables the model to adaptively focus on the part of the input sequence that is most relevant to the current prediction, thereby capturing long-distance dependencies in the sequence data, enhancing the model's ability to recognize complex patterns, and improving the performance of sequence prediction tasks.
[0079] In one embodiment, the multi-head attention mechanism function of the improved Transformer model is:
[0080]
[0081] in, , is the weight of the last fully connected layer, 、 and Respectively The weight matrix of the query vector, key vector and value vector of each head.
[0082] Specifically, this formula describes the multi-head attention mechanism in the improved Transformer model, which passes the input matrix X through different weight matrices 、 and Mapped to query, key, and value space, then calculate self-attention for each head separately, and concatenate the outputs of all heads, and finally pass through a fully connected layer Perform linear transformation to obtain the final output.
[0083] In this embodiment, the multi-head attention mechanism enables the Transformer model to simultaneously capture different relationships and features in the input data by processing multiple attention heads in parallel, thereby enhancing the expressiveness and flexibility of the model, improving the recognition and prediction accuracy of complex patterns, and improving computational efficiency and model robustness.
[0084] In one embodiment, the target oil temperature prediction model training process includes:
[0085] Determine a sample transformer oil temperature training set and a sample transformer oil temperature test set;
[0086] The pre-built initial oil temperature prediction model is trained based on the sample transformer oil temperature training set, and the trained initial oil temperature prediction model is evaluated using the sample transformer oil temperature test set until the trained initial oil temperature prediction model meets the preset training end conditions and the target oil temperature prediction model is obtained.
[0087] The sample transformer oil temperature training set refers to the dataset used to train the oil temperature prediction model. It contains sample data of historical transformer oil temperatures, which is used to help the model learn patterns in oil temperature fluctuations. The sample transformer oil temperature test set refers to the dataset used to evaluate the performance of the oil temperature prediction model. It contains independent transformer oil temperature sample data to verify the model's prediction accuracy and generalization ability. The initial oil temperature prediction model refers to the oil temperature prediction model constructed before training begins. This model has not yet been trained and requires optimization of its parameters by learning from the training set data.
[0088] Specifically, the training and test sets can be determined through data preprocessing, for example, through data cleaning, feature selection, and data segmentation. The training set data is then used to adjust the model parameters. Forward propagation can be used to calculate predicted values, and the model weights are then updated using a backpropagation algorithm based on the loss function. For example, the model can be built and trained using the TensorFlow or PyTorch framework. The test set data is then used to evaluate model performance, which can be accomplished by calculating the error between the predicted and actual values. Model performance is continuously evaluated during the training process until the model reaches a predetermined end-of-training condition, such as a performance metric or the number of training rounds.
[0089] In this embodiment, by determining the sample transformer oil temperature training set and test set, it is possible to ensure that the model is trained and evaluated on independent data, thereby improving the generalization ability of the model. The training process enables the model to learn the patterns and regularities in the data, while the evaluation process ensures that the model not only performs well on the training data, but also makes accurate predictions on new, unseen data. Meeting the preset training end conditions is to strike a balance between model performance and training costs, avoiding overfitting and unnecessary waste of computing resources. In this way, the accuracy and reliability of the target oil temperature prediction model are ensured, which can provide a scientific basis for the maintenance and management of transformers, prevent equipment failures caused by abnormal oil temperatures, and thus improve the stability and safety of the power system.
[0090] The following describes the transformer oil temperature prediction device provided by the embodiment of the present application. The transformer oil temperature prediction device described below and the transformer oil temperature prediction method described above can be referred to in correspondence with each other. Figure 3 As shown, the present application provides a transformer oil temperature prediction device, the device comprising:
[0091] The historical transformer oil temperature acquisition module 201 is used to acquire the historical transformer oil temperature;
[0092] A target oil temperature prediction model determination module 202 is used to determine a pre-trained target oil temperature prediction model, where the target oil temperature prediction model is composed of a KAN network and an improved Transformer model. The improved Transformer model does not include a position encoder and a decoder, but includes a convolutional layer and a global average pooling structure.
[0093] The predicted transformer oil temperature acquisition module 203 is used to input the historical transformer oil temperature into the target oil temperature prediction model to obtain the predicted transformer oil temperature corresponding to the historical transformer oil temperature.
[0094] In one embodiment, the formula corresponding to the KAN network is:
[0095]
[0096] in, Indicates the The one-dimensional function of the layer, Indicates the The variable index of the layer, Indicates the The total number of variables in the layer, Represents the input vector The elements.
[0097] In one embodiment, the activation function of the KAN network is:
[0098]
[0099] in, is the basis function, is the spline function, and is the weight, is the sum of the basis function and the spline function.
[0100] In one embodiment, the improved Transformer model includes an encoding layer and an output layer;
[0101] The encoding layer includes multiple linear layers, multi-head attention layers, residual connections and layer normalization, and convolutional layers. The convolutional layers include the first one-dimensional convolutional layer, the dropout layer, and the second one-dimensional convolutional layer. The linear layer is used to receive the output data of the KAN network.
[0102] The output layer includes a global average pooling structure, a first fully connected layer, a concatenation layer, and a second fully connected layer in sequence. The global average pooling structure is used to receive the output data of the encoding layer, and the second fully connected layer is used to output the predicted transformer oil temperature.
[0103] In one embodiment, the self-attention mechanism formula of the improved Transformer model is:
[0104]
[0105] in, , , , is the input matrix, for Dimensions, 、 and are the weight matrices for query vector, key vector, and value vector respectively, represents the transpose of the key vector, and softmax represents the probability function.
[0106] In one embodiment, the multi-head attention mechanism function of the improved Transformer model is:
[0107]
[0108] in, , is the weight of the last fully connected layer, 、 and Respectively The weight matrix of the query vector, key vector and value vector of each head.
[0109] In one embodiment, the target oil temperature prediction model determination module 202 includes:
[0110] A training set determination unit, used to determine a sample transformer oil temperature training set and a sample transformer oil temperature test set;
[0111] The model training unit is used to train the pre-built initial oil temperature prediction model based on the sample transformer oil temperature training set, and evaluate the trained initial oil temperature prediction model using the sample transformer oil temperature test set until the trained initial oil temperature prediction model meets the preset training end conditions and obtains the target oil temperature prediction model.
[0112] In one embodiment, the present application further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the transformer oil temperature prediction method as described in any of the above embodiments.
[0113] In one embodiment, the present application further provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the transformer oil temperature prediction method as described in any one of the above embodiments.
[0114] Schematically, as Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 can be provided as a server. Figure 4 Computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions executable by processing component 302, such as application programs. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, processing component 302 is configured to execute the instructions to perform the transformer oil temperature prediction method according to any of the above-described embodiments.
[0115] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or the like.
[0116] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0117] Finally, it should be noted that, in this article, relational terms such as first and second are merely used to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. Without further restriction, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element. Herein, "one," "said," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. A plurality refers to at least two, such as 2, 3, 5, or 8. "And / or" includes any and all combinations of the relevant listed items.
[0118] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.
[0119] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A transformer oil temperature prediction method, characterized in that: The method comprises: Get historical transformer oil temperature; Determining a pre-trained target oil temperature prediction model, wherein the target oil temperature prediction model is composed of a KAN network and an improved Transformer model, wherein the improved Transformer model does not include a position encoder and a decoder, and includes a convolutional layer and a global average pooling structure; The historical transformer oil temperature is input into the target oil temperature prediction model to obtain a predicted transformer oil temperature corresponding to the historical transformer oil temperature.
2. The transformer oil temperature prediction method according to claim 1, characterized in that: The formula corresponding to the KAN network is: in, Indicates the The one-dimensional function of the layer, Indicates the The variable index of the layer, Indicates the The total number of variables in the layer, Represents the input vector The elements.
3. The transformer oil temperature prediction method according to claim 2, characterized in that: The activation function of the KAN network is: in, is the basis function, is the spline function, and is the weight, is the sum of the basis function and the spline function.
4. The transformer oil temperature prediction method according to claim 1, characterized in that: The improved Transformer model includes an encoding layer and an output layer; The encoding layer sequentially includes multiple linear layers, multi-head attention layers, residual connections and layer normalization, and convolutional layers, wherein the convolutional layers sequentially include a first one-dimensional convolutional layer, a dropout layer, and a second one-dimensional convolutional layer, and the linear layer is used to receive the output data of the KAN network; The output layer includes a global average pooling structure, a first fully connected layer, a splicing layer, and a second fully connected layer in sequence. The global average pooling structure is used to receive the output data of the encoding layer, and the second fully connected layer is used to output the predicted transformer oil temperature.
5. The transformer oil temperature prediction method according to claim 4, characterized in that: The self-attention mechanism formula of the improved Transformer model is: in, , , , is the input matrix, for Dimensions, 、 and are the weight matrices for query vector, key vector, and value vector respectively, represents the transpose of the key vector, and softmax represents the probability function.
6. The transformer oil temperature prediction method according to claim 5, characterized in that: The multi-head attention mechanism function of the improved Transformer model is: in, , is the weight of the last fully connected layer, 、 and Respectively The weight matrix of the query vector, key vector and value vector of each head.
7. The transformer oil temperature prediction method according to any one of claims 1 to 6, characterized in that: The training process of the target oil temperature prediction model includes: Determine a sample transformer oil temperature training set and a sample transformer oil temperature test set; The pre-constructed initial oil temperature prediction model is trained based on the sample transformer oil temperature training set, and the trained initial oil temperature prediction model is evaluated using the sample transformer oil temperature test set until the trained initial oil temperature prediction model meets the preset training end condition and the target oil temperature prediction model is obtained.
8. A transformer oil temperature prediction device, characterized in that: The device comprises: Historical transformer oil temperature acquisition module, used to obtain historical transformer oil temperature; A target oil temperature prediction model determination module is used to determine a pre-trained target oil temperature prediction model, wherein the target oil temperature prediction model is composed of a KAN network and an improved Transformer model. The improved Transformer model does not include a position encoder and a decoder, and includes a convolutional layer and a global average pooling structure. The predicted transformer oil temperature acquisition module is used to input the historical transformer oil temperature into the target oil temperature prediction model to obtain the predicted transformer oil temperature corresponding to the historical transformer oil temperature.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, which, when executed by one or more processors, enable the one or more processors to perform the steps of the transformer oil temperature prediction method according to any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the transformer oil temperature prediction method according to any one of claims 1 to 7 are performed.