Method, system and equipment for predicting concentration of dissolved gas in transformer oil and medium
By using the Transformer decoder model to predict dissolved gas concentration in transformer oil, the shortcomings of recurrent neural networks in parallel computing and training efficiency are solved, the accuracy and efficiency of prediction are improved, and long-term dependencies can be effectively handled.
Patent Information
- Application Number
- CN202411374146.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, recurrent neural networks cannot be calculated in parallel, and the training and inference efficiency is low, resulting in low accuracy in predicting dissolved gas concentration in transformer oil.
The Transformer decoder model is used to predict dissolved gas concentration in transformer oil. By constructing training sets, verification sets and test sets, the model is optimized and trained, and the self-attention mechanism is used to process long-term dependencies, supporting parallel computing.
It improves the accuracy and efficiency of the prediction of dissolved gas concentration in transformer oil, can effectively capture complex time series variation laws, and solves the difficulties of recurrent neural networks in long-term dependency processing.
Smart Images

Figure CN119271966A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of prediction of dissolved gas concentration in transformer oil, and in particular relates to a method, system, equipment and medium for predicting dissolved gas concentration in transformer oil. Background Art
[0002] As the core equipment of electric energy conversion, transformer plays a vital role in the power system. The safe and stable operation of transformer is closely related to whether the power grid can supply power reliably. Once the transformer fails, it will cause huge economic losses and serious social impact. Therefore, the research on transformer fault prediction is of great significance to improve the reliable operation of transformer.
[0003] Dissolved Gas Analysis (DGA) technology has the characteristics of not requiring the transformer to be taken out of operation, not being affected by electromagnetics, and being able to detect early transformer faults in a timely manner. It has become the most important technical means for transformer maintenance and fault diagnosis. The content of dissolved gas in oil is closely related to the operating status of the transformer. The changing trend of the content of dissolved gas in oil can be predicted through historical data analysis and data models, and further can characterize the close relationship between the content of dissolved gas in oil and the changes in the operating status and fault mode of the transformer. Based on the historical data of the volume fraction of dissolved gas in transformer oil provided by the online monitoring system, predicting the future gas volume fraction and development trend is not only the key to DGA fault prediction, but also a necessary supplement to online monitoring and an important means of early warning of transformer faults.
[0004] The methods currently used in the prior art to predict the concentration of dissolved gases in transformer oil are: 1) using traditional mathematical statistics methods (such as grey model and differential autoregressive moving average method) to predict the concentration of dissolved gases in transformer oil; 2) using classic machine learning algorithms (such as support vector machine regression model and artificial neural network) to predict the concentration of dissolved gases in transformer oil.
[0005] However, traditional mathematical statistics methods (such as the grey model and the differential autoregressive moving average method) have a single fitting function and require empirical support, resulting in low model complexity and difficulty in reflecting the data distribution law of the time series itself.
[0006] Classic machine learning algorithms (such as support vector machine regression models and artificial neural networks) are limited by the independent processing of time points and the inability to mine time-series dependency information. Although recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) have improved in processing time series data, they still have certain difficulties in processing long-term dependencies. In addition, recurrent neural networks cannot be calculated in parallel, and the training and reasoning efficiency is low, resulting in low accuracy in predicting dissolved gas concentration in transformer oil. Summary of the invention
[0007] The purpose of the present invention is to provide a method, system, device and medium for predicting the concentration of dissolved gas in transformer oil, which are used to solve the problem that the recurrent neural network cannot be calculated in parallel, the training and reasoning efficiency is low, and the prediction accuracy of the concentration of dissolved gas in transformer oil is not high.
[0008] In order to achieve the above object, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for predicting dissolved gas concentration in transformer oil, comprising the following steps: Acquire time series data of dissolved gas concentration in transformer oil, and preprocess the obtained time series data of dissolved gas concentration in transformer oil; The training set, validation set and test set are constructed using the preprocessed time series data of dissolved gas concentration in transformer oil. Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain a trained Transformer decoder model; The time series data of the concentration of dissolved gas in transformer oil to be predicted is input into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and the prediction result of the concentration of dissolved gas in transformer oil is obtained.
[0009] A further improvement of the present invention is that the preprocessing refers to first marking the abnormal values in the obtained time series data of the dissolved gas concentration in the transformer oil as missing values, then discarding or filling the missing values, and then performing normalization processing after the missing values are discarded or filled.
[0010] A further improvement of the present invention is that the calculation formula for the normalization process is:
[0011] in, is the size of the time series data of the concentration of dissolved gas in transformer oil after normalization, is the average value of the time series data of dissolved gas concentration in transformer oil, is the standard deviation; Average value of time series data of dissolved gas concentration in transformer oil The calculation formula is:
[0012] in, is the average value of the time series data of dissolved gas concentration in transformer oil, They are n Time series data of dissolved gas concentration in transformer oil, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number; Standard Deviation The calculation formula is:
[0013] in, is the standard deviation, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number, for n Time series data of dissolved gas concentration in transformer oil, is the average value of the time series data of dissolved gas concentration in transformer oil.
[0014] A further improvement of the present invention is that 60% of the time series data of the concentration of dissolved gas in the pre-processed transformer oil is used as a training set, 20% is used as a verification set, and 20% is used as a test set.
[0015] A further improvement of the present invention is that a grid search method is used to optimize the hyperparameters of the Transformer decoder model.
[0016] A further improvement of the present invention is that the hyperparameters include learning rate, batch size, hidden layer dimension, number of layers, number of attention heads and Dropout rate.
[0017] A further improvement of the present invention is that the Transformer decoder model is trained using an Adam optimizer and a mean square error loss function.
[0018] In a second aspect, the present invention provides a system for predicting dissolved gas concentration in transformer oil, including a data acquisition module, a data preprocessing module, a data set construction module, a Transformer decoder model training module, and a module for predicting dissolved gas concentration in transformer oil; The data acquisition module is used to acquire time series data of dissolved gas concentration in transformer oil; The data preprocessing module is used to preprocess the obtained time series data of dissolved gas concentration in transformer oil; The data set construction module is used to construct a training set, a validation set and a test set using the pre-processed time series data of dissolved gas concentration in transformer oil; The Transformer decoder model training module is used to construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, and test the Transformer decoder model training result based on the constructed test set to obtain a trained Transformer decoder model; The transformer oil dissolved gas concentration prediction module is used to input the time series data of the transformer oil dissolved gas concentration to be predicted into the trained Transformer decoder model to predict the transformer oil dissolved gas concentration, and obtain the transformer oil dissolved gas concentration prediction result.
[0019] In a third aspect, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for predicting dissolved gas concentration in transformer oil introduced above when executing the computer program.
[0020] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for predicting dissolved gas concentration in transformer oil introduced above.
[0021] Compared with the prior art, the present invention has the following beneficial effects: The present invention belongs to an improved invention. Compared with the existing prediction method for dissolved gas concentration in transformer oil, the prediction method for dissolved gas concentration in transformer oil proposed by the present invention inputs the time series data of the concentration of dissolved gas in transformer oil to be predicted into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and obtains the prediction result of the concentration of dissolved gas in transformer oil. It can be seen that the present invention adopts the Transformer decoder model to obtain the prediction result of the concentration of dissolved gas in transformer oil. On the one hand, the Transformer decoder model is different from the serial processing mode of the RNN model. The Transformer decoder model supports parallel computing, which greatly speeds up the speed of model training and prediction. On the other hand, the Transformer decoder model effectively solves the problem of long-term dependence through the self-attention mechanism, and can process long sequence data while ensuring the calculation efficiency. Moreover, the Transformer decoder model has a strong sequence modeling ability, which can capture the complex law of the concentration of dissolved gas in transformer oil changing with time, and improves the accuracy of prediction. Compared with the prior art, the present invention effectively solves the problem that the recurrent neural network in the prior art cannot be calculated in parallel, the training and reasoning efficiency is low, and the prediction accuracy of the concentration of dissolved gas in transformer oil is not high. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of a method for predicting dissolved gas concentration in transformer oil according to the present invention; Figure 2 Schematic diagram of a system for predicting dissolved gas concentration in transformer oil according to the present invention; Figure 3 Schematic diagram of the Transformer decoder model of the present invention; Figure 4 This is a comparison chart between the predicted value and the actual value of hydrogen concentration in the present invention; Figure 5 This is a comparison diagram of the predicted value and the actual value of methane concentration in the present invention; Figure 6 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0023] In order to further understand the content of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0024] The method for predicting the concentration of dissolved gas in transformer oil proposed by the present invention inputs the time series data of the concentration of dissolved gas in transformer oil to be predicted into a trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and obtains the prediction result of the concentration of dissolved gas in transformer oil. Compared with the prior art, the present invention effectively solves the problem that the recurrent neural network cannot be calculated in parallel, the training and reasoning efficiency is low, and the prediction accuracy of the concentration of dissolved gas in transformer oil is not high.
[0025] Embodiment 1: The flow chart of the method for predicting dissolved gas concentration in transformer oil of the present invention is as follows Figure 1 As shown, the method for predicting dissolved gas concentration in transformer oil of the present invention comprises the following steps: S1. Obtaining time series data of dissolved gas concentration in transformer oil, and preprocessing the obtained time series data of dissolved gas concentration in transformer oil.
[0026] S2. Use the preprocessed time series data of dissolved gas concentration in transformer oil to construct training set, validation set and test set.
[0027] S3. Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain a trained Transformer decoder model.
[0028] S4. Input the time series data of the concentration of dissolved gas in transformer oil to be predicted into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and obtain the prediction result of the concentration of dissolved gas in transformer oil.
[0029] Embodiment 2: The schematic diagram of the prediction system for dissolved gas concentration in transformer oil of the present invention is as follows Figure 2 As shown, the system for predicting dissolved gas concentration in transformer oil of the present invention includes a data acquisition module, a data preprocessing module, a data set construction module, a Transformer decoder model training module and a module for predicting dissolved gas concentration in transformer oil.
[0030] The data acquisition module is used to obtain the time series data of dissolved gas concentration in transformer oil.
[0031] The data preprocessing module is used to preprocess the obtained time series data of dissolved gas concentration in transformer oil.
[0032] The dataset construction module is used to construct training sets, validation sets, and test sets using the preprocessed time series data of dissolved gas concentration in transformer oil.
[0033] The Transformer decoder model training module is used to build a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, and test the Transformer decoder model training results based on the constructed test set to obtain a trained Transformer decoder model.
[0034] The transformer oil dissolved gas concentration prediction module is used to input the time series data of the transformer oil dissolved gas concentration to be predicted into the trained Transformer decoder model to predict the transformer oil dissolved gas concentration and obtain the transformer oil dissolved gas concentration prediction result.
[0035] Embodiment 3: S1. Obtaining time series data of dissolved gas concentration in transformer oil, and preprocessing the obtained time series data of dissolved gas concentration in transformer oil.
[0036] The time series data of the concentration of dissolved gas in transformer oil is obtained by using a transformer oil chromatography online monitoring device, and the obtained time series data of the concentration of dissolved gas in transformer oil is preprocessed.
[0037] The preprocessing refers to first marking the abnormal values in the time series data of the dissolved gas concentration in the transformer oil as missing values, then discarding or filling the missing values, and then performing normalization processing after the missing values are discarded or filled.
[0038] The specific process of marking the abnormal values in the obtained time series data of the concentration of dissolved gas in transformer oil as missing values and then discarding or filling the missing values is as follows: A. Verify the obtained time series data of dissolved gas concentration in transformer oil and mark abnormal values (such as negative values) as missing values (null); B. Discard or fill in the missing values in the time series data of dissolved gas concentration in transformer oil. Data that are missing for five or more consecutive time points are directly discarded, and the data at the corresponding time points are marked as nan. For other missing values, find the first two and last two normal data closest to their time, and fill in the missing value with the average of these four normal data.
[0039] The calculation formula for normalization is:
[0040] in, is the size of the time series data of the concentration of dissolved gas in transformer oil after normalization, is the average value of the time series data of dissolved gas concentration in transformer oil, is the standard deviation; Average value of time series data of dissolved gas concentration in transformer oil The calculation formula is:
[0041] in, is the average value of the time series data of dissolved gas concentration in transformer oil, They are n Time series data of dissolved gas concentration in transformer oil, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number; Standard Deviation The calculation formula is:
[0042] in, is the standard deviation, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number, for n Time series data of dissolved gas concentration in transformer oil, is the average value of the time series data of dissolved gas concentration in transformer oil.
[0043] S2. Use the preprocessed time series data of dissolved gas concentration in transformer oil to construct training set, validation set and test set.
[0044] The training set, validation set and test set are constructed using the time series data of the dissolved gas concentration in the pretreated transformer oil. 60% of the time series data of the dissolved gas concentration in the pretreated transformer oil is used as the training set, 20% as the validation set, and 20% as the test set. As other implementations, 60%, 20% and 20% in this step can be adjusted according to actual needs.
[0045] The specific construction process of the training set, validation set, and test set in this step is as follows: Constructing input features of data and its tags , the data of dissolved gas concentration in transformer oil are divided into time sequence using sliding window method. As input features , predict the target (i.e. label )for ,in For the Normalized concentration values of dissolved gases in 8 types of oil at time, is the width of the sliding window. Move the sliding window back one step, As input features , predict the target (i.e. label )for , and so on, to get the input features of all data and its tags .
[0046] S3. Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain a trained Transformer decoder model.
[0047] Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters (learning rate, batch size, hidden layer dimension, number of layers, number of attention heads, and Dropout rate) of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain the trained Transformer decoder model. The architecture of the Transformer decoder model is as follows: Figure 3 As shown, the specific process of training, optimization and testing is described as follows: First, the input features of the data are preprocessed and encoded. The embedding layer converts the data into a vector representation in a high-dimensional space to better capture the intrinsic features. The position encoding technique is then used to add position encoding and global time encoding to each element in the sequence to ensure that the model can understand the time series characteristics of the data. The above process is expressed as:
[0048] in, , , is the batch size, is the length of the input sequence, is the dimension of the encoded vector, is a one-dimensional convolution operation, is the position code, The calculation formula is:
[0049]
[0050] in, , For global time encoding, each moment (the finest granularity is minutes) is mapped to a corresponding time embedding vector through a learnable embedding matrix.
[0051] Next, the encoded features are sent to the multi-head self-attention layer for processing. Through the attention mechanism, associations are established between different positions to capture the complex dependencies between input features. In this process, each attention head will independently process the query, key, and value vectors, and then calculate the attention weight matrix, and perform weighted summation on the input features according to the weight matrix, and finally aggregate the outputs of all attention heads to obtain a more comprehensive feature representation. The above process is expressed as:
[0052]
[0053]
[0054] in, is the attention mechanism, is a multi-head attention mechanism, is the SoftMax activation function, is the vector concatenation operation, They are query matrix, key matrix and value matrix respectively. The self-attention mechanism is used here, so , is the number of attention heads, The transformation matrix , The transformation matrix , The transformation matrix , .
[0055] The output features of the multi-head self-attention layer are passed into the feedforward neural network to further extract high-dimensional features. The feedforward network consists of multiple fully connected layers, each of which performs linear transformation and nonlinear activation on the input data to enhance the expressiveness of the model. In order to improve the generalization ability of the model and prevent overfitting, this embodiment adds residual connections and layer normalization operations after the feedforward network. The residual connection adds the input directly to the output of the layer, alleviating the gradient vanishing problem, and layer normalization helps to accelerate model convergence and stabilize the training process. The above process is expressed as:
[0056]
[0057] in, For input, is the output of the multi-head self-attention layer, is the output of the Transformer decoder model of this layer, is a feed-forward neural network, is the layer normalization operation, It is a multi-head self-attention mechanism.
[0058] The above is the forward calculation process of one layer of the Transformer decoder model. N layers are stacked and similar forward calculations are performed iteratively for n rounds. The features output by the last layer are input into the fully connected layer, and an activation function (such as ReLU or Sigmoid) is applied to output the predicted value of the dissolved gas concentration in the transformer oil at the next moment. The above process can be expressed as:
[0059] in, and are the weight matrix and bias vector of the fully connected layer, respectively. is the activation function, is a layer in the Transformer decoder model.
[0060] Based on the training data labels , calculate the mean square error loss function, the mean square error loss function expression is:
[0061] in, is the mean square error loss function, is the true value, is the predicted value, is the number of data.
[0062] Use the back propagation algorithm and the chain rule to calculate the loss function from the output layer to the input layer. Gradient of each layer parameter . Use , to optimize the model parameters of the Transformer decoder. The general form of the model parameter update rule is:
[0063] in, For the The parameters for the iteration, For the The parameters for the iteration, is the learning rate, which controls the step size of parameter update.
[0064] In this step, the grid search method is used to optimize the hyperparameters of the Transformer decoder model. The specific optimization process is described as follows: First, define the hyperparameter space. The hyperparameter space is defined as follows: Learning rate: [0.001, 0.005, 0.01, 0.05], batch size: [32, 64], hidden layer dimension: [64, 128, 256], number of layers: [2, 4, 6], number of attention heads: [8, 16], and dropout rate: [0.1, 0.2].
[0065] Then all hyperparameter combinations are combined to generate a hyperparameter grid, which is a list containing all possible hyperparameter combinations. For the above hyperparameter space, there are A combination of hyperparameters.
[0066] Then, we perform a grid search. For each hyperparameter combination, we follow these steps: a. Initialize the Transformer decoder model and Adam optimizer using the current hyperparameter combination; b. During the training of the Transformer decoder model, the mean square error (MSE) is used as the loss function, and the MSE is calculated on the validation set and used as the evaluation indicator; c. Record the mean square error of the validation set under the current hyperparameter combination; d. Repeat steps ac until all hyperparameter combinations have been tested.
[0067] Finally, the hyperparameter combination with the smallest mean square error in the validation set is used as the optimal hyperparameter setting.
[0068] S4. Input the time series data of the concentration of dissolved gas in transformer oil to be predicted into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and obtain the prediction result of the concentration of dissolved gas in transformer oil.
[0069] The time series data of the concentration of dissolved gas in transformer oil to be predicted is input into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and the prediction result of the concentration of dissolved gas in transformer oil is obtained.
[0070] Specifically, the process of predicting the concentration of dissolved gas in transformer oil in this step is described as follows: According to the historical and current time series data of dissolved gas concentration in oil, the value of dissolved gas concentration in oil at the next moment is calculated. The calculation formula is as follows:
[0071] in, is the Transformer decoder model, is the normalized value of the dissolved gas concentration in the transformer oil at the next moment, From the first moment to the w Dissolved gas concentration in transformer oil at time.
[0072] The autoregressive decoding method is used to slide the input window backwards and continue to calculate the value of the dissolved gas concentration in the oil at subsequent moments. The calculation formula is as follows:
[0073] in, is the normalized value of the dissolved gas concentration in the transformer oil at the subsequent time, From the 2nd moment to the w+ Dissolved gas concentration in transformer oil at time 1.
[0074] Time The predicted values of the gas concentrations are as follows:
[0075] in, for Time Predicted values of dissolved gas concentration in transformer oil. for The output of the Transformer decoder model at time Normalized predicted value of dissolved gas concentration in transformer oil, For the Standard deviation of dissolved gas concentration in transformer oil, For the The average value of dissolved gas concentration in transformer oil.
[0076] In order to verify the effectiveness of the proposed method for predicting dissolved gas concentration in transformer oil, this embodiment is based on the real online monitoring data of dissolved gas concentration in power transformer oil (hydrogen H2 and methane CH4). The predicted gas concentration (H2 and CH4) and the actual gas (H2 and CH4) concentration are shown in Figure 2. Figure 4 and Figure 5 As shown. Figure 4 and Figure 5 It can be seen that the predicted results of dissolved gas concentration in transformer oil (predicted H2 and CH4) are not much different from the actual H2 and CH4 curves.
[0077] This embodiment also evaluates the prediction results of the dissolved gas concentration in the transformer oil by the mean absolute error (MAE), the mean absolute percentage error (MAPE) and the mean square error (MSE). The evaluation results are shown in Table 1.
[0078] Table 1 Evaluation results of mean absolute error, mean absolute percentage error and mean square error
[0079] It can be seen from the evaluation results in Table 1 that the MAE and MSE under H2 and CH4 gases are both less than 0.5, and the MAPE under H2 and CH4 gases are both less than 5%, which shows that the method for predicting the concentration of dissolved gas in transformer oil proposed in the present invention can accurately predict the concentration of dissolved gas in transformer oil.
[0080] Embodiment 4: See also Figure 6 As shown, the present invention also provides an electronic device 100 for predicting the dissolved gas concentration in transformer oil; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0081] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the method for predicting the concentration of dissolved gas in transformer oil described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0082] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0083] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for evaluating the storage life of an electronic device, and the processor 102 can execute the plurality of instructions to implement: Acquire time series data of dissolved gas concentration in transformer oil, and preprocess the obtained time series data of dissolved gas concentration in transformer oil; The training set, validation set and test set are constructed using the preprocessed time series data of dissolved gas concentration in transformer oil. Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain a trained Transformer decoder model; The time series data of the concentration of dissolved gas in transformer oil to be predicted is input into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and the prediction result of the concentration of dissolved gas in transformer oil is obtained.
[0084] Embodiment 5: If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0085] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting dissolved gas concentration in transformer oil, characterized in that: The following steps are involved: Acquire time series data of dissolved gas concentration in transformer oil, and preprocess the obtained time series data of dissolved gas concentration in transformer oil; The training set, validation set and test set are constructed using the preprocessed time series data of dissolved gas concentration in transformer oil. Construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, test the training results of the Transformer decoder model based on the constructed test set, and obtain a trained Transformer decoder model; The time series data of the concentration of dissolved gas in transformer oil to be predicted is input into the trained Transformer decoder model to predict the concentration of dissolved gas in transformer oil, and the prediction result of the concentration of dissolved gas in transformer oil is obtained.
2. The method for predicting dissolved gas concentration in transformer oil according to claim 1, characterized in that: The preprocessing refers to first marking the abnormal values in the obtained time series data of the dissolved gas concentration in the transformer oil as missing values, then discarding or filling the missing values, and then performing normalization processing after the missing values are discarded or filled.
3. The method for predicting dissolved gas concentration in transformer oil according to claim 2, characterized in that: The calculation formula for the normalization process is: in, is the size of the time series data of the concentration of dissolved gas in transformer oil after normalization, is the average value of the time series data of dissolved gas concentration in transformer oil, is the standard deviation; Average value of time series data of dissolved gas concentration in transformer oil The calculation formula is: in, is the average value of the time series data of dissolved gas concentration in transformer oil, They are n Time series data of dissolved gas concentration in transformer oil, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number; Standard Deviation The calculation formula is: in, is the standard deviation, n is the number of time series data of dissolved gas concentration in transformer oil, i is a natural number, for n Time series data of dissolved gas concentration in transformer oil, is the average value of the time series data of dissolved gas concentration in transformer oil.
4. The method for predicting dissolved gas concentration in transformer oil according to claim 1, characterized in that: 60% of the preprocessed time series data of dissolved gas concentration in transformer oil is used as a training set, 20% as a validation set, and 20% as a test set.
5. The method for predicting dissolved gas concentration in transformer oil according to claim 1, characterized in that: The grid search method is used to optimize the hyperparameters of the Transformer decoder model.
6. The method for predicting dissolved gas concentration in transformer oil according to claim 1 or 5, characterized in that: The hyperparameters include learning rate, batch size, hidden layer dimension, number of layers, number of attention heads, and dropout rate.
7. The method for predicting dissolved gas concentration in transformer oil according to claim 1, characterized in that: The Transformer decoder model is trained using the Adam optimizer and the mean squared error loss function.
8. A system for predicting dissolved gas concentration in transformer oil, characterized in that: It includes data acquisition module, data preprocessing module, data set construction module, Transformer decoder model training module and transformer oil dissolved gas concentration prediction module; The data acquisition module is used to acquire time series data of dissolved gas concentration in transformer oil. The data preprocessing module is used to preprocess the obtained time series data of dissolved gas concentration in transformer oil; The data set construction module is used to construct a training set, a validation set and a test set using the pre-processed time series data of dissolved gas concentration in transformer oil; The Transformer decoder model training module is used to construct a Transformer decoder model, train the Transformer decoder model based on the constructed training set, optimize the hyperparameters of the Transformer decoder model based on the constructed validation set, and test the Transformer decoder model training result based on the constructed test set to obtain a trained Transformer decoder model; The transformer oil dissolved gas concentration prediction module is used to input the time series data of the transformer oil dissolved gas concentration to be predicted into the trained Transformer decoder model to predict the transformer oil dissolved gas concentration, and obtain the transformer oil dissolved gas concentration prediction result.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for predicting dissolved gas concentration in transformer oil according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting dissolved gas concentration in transformer oil according to any one of claims 1 to 7 are implemented.