Switch cabinet temperature prediction method, device and equipment and storage medium

By introducing an attention mechanism network of inter-block attention and in-block attention in the temperature prediction model, the problem of inaccurate extraction of temperature timing feature information caused by gradient disappearance in the prior art is solved, and more accurate temperature prediction of long-time series data of the switch cabinet is achieved.

CN119961636APending Publication Date: 2025-05-09国网四川岷江供电有限责任公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411761160.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

Due to the gradient disappearance problem, the existing power switch cabinet temperature prediction method leads to inaccurate extraction of temperature timing feature information, making it difficult to effectively process the temperature prediction of long-time series data.

Method used

The temperature prediction model consisting of the input layer, attention mechanism network, feedforward neural network and normalization layer is adopted. The attention mechanism network extracts local trends and global periodic features through the attention and inter-block attention calculation modules and performs weighted fusion to improve the performance ability of the temperature prediction model.

Benefits of technology

By integrating attention mechanism networks that combine attention between blocks and attention within blocks, long-term dependencies in the historical temperature data of the switch cabinet can be extracted more accurately, improving the accuracy and effect of temperature prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961636A_ABST
    Figure CN119961636A_ABST
Patent Text Reader

Abstract

The invention discloses a switch cabinet temperature prediction method, device and equipment and a storage medium, and relates to the field of switch cabinet temperature prediction, and the key points of the technical scheme are that the method comprises the steps: obtaining historical temperature sequence data of a to-be-predicted switch cabinet; inputting the historical temperature sequence data into a pre-trained temperature prediction model, and generating a temperature prediction result of the to-be-predicted switch cabinet; wherein the temperature prediction model comprises an input layer, an attention mechanism network, a feedforward neural network and a normalization layer which are connected in sequence, the attention mechanism network is formed by stacking a plurality of attention layers, and each attention layer comprises an in-block attention calculation module and an inter-block attention calculation module. According to the method, the problem that temperature prediction of long-time sequence data cannot be well solved due to inaccurate temperature time sequence characteristic information extraction caused by gradient disappearance of an existing power switch cabinet temperature prediction method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of switch cabinet temperature prediction, and more specifically, to a switch cabinet temperature prediction method, device, equipment and storage medium. Background Art

[0002] High-voltage switchgear is widely used in substations, power plants and distribution stations. It has the characteristics of small size, sealing, strong load-bearing capacity and reliable operation. It is the main equipment of substation and distribution systems.

[0003] The switch cabinet has many internal devices and a complex mechanical structure. In addition, the switch cabinet is in a high current state for a long time, and its closed environment has poor heat dissipation conditions. This has led to an increasingly serious temperature rise problem. In addition, there are often temperature rise and heating failures caused by heavy overload of distribution network lines, oxidation of contact surfaces, lightning strikes, etc. In severe cases, fires may occur, leading to major safety accidents such as power outages. It can be seen that the operating status of the power switch cabinet directly affects the entire power transmission process and the normal power consumption of the majority of users. Therefore, how to efficiently and accurately realize switch cabinet temperature prediction and early warning is the key to ensuring the safe and normal operation of the power system.

[0004] Traditional detection of power switch cabinet temperature prediction and alarm uses manual data collection, and the risk of transformer failure is judged based on the experience of technicians for early warning. However, it is too dependent on the experience of technicians, and there is a risk of misjudgment or neglect of hidden dangers. In addition, fuzzy theory and chaotic time series methods are used to model and summarize the temperature change law of switch cabinets. It can better handle nonlinear problems and summarize complex temperature changes. However, chaotic time series are sensitive to initial conditions, easily disturbed by the external environment, overly dependent on the definition of rules and fuzzy sets, and may not be flexible enough in practical applications.

[0005] The most common temperature prediction method is the prediction method based on artificial intelligence. Such as the temperature prediction and early warning methods of CNN (convolutional neural network), RNN (recurrent neural network) and LSTM (long short-term neural network). It can use historical data for learning, find the potential laws of switchgear temperature changes, and achieve higher prediction accuracy than traditional methods. However, the amount of data of power switchgear is often large and the time span is large, and its temperature changes are characterized by non-stationarity and complex nonlinear dependencies. Due to the limitations of the limited size of CNN convolution kernels and the explosion and disappearance of RNN and LSTM gradients, existing methods are difficult to achieve accurate temperature prediction based on long time series data of switchgear. Summary of the invention

[0006] The purpose of the present invention is to provide a switch cabinet temperature prediction method, device, equipment and storage medium to solve the problem of inaccurate extraction of temperature time series feature information caused by gradient disappearance in the existing power switch cabinet temperature prediction method, thereby failing to solve the temperature prediction problem of long time series data well.

[0007] In a first aspect of the present application, a switch cabinet temperature prediction method is provided, the method comprising:

[0008] Obtain historical temperature series data of the switch cabinet to be predicted;

[0009] The historical temperature sequence data is input into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein, the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

[0010] In one implementation, the method further includes:

[0011] Obtain historical temperature data of the switch cabinet;

[0012] The initial temperature prediction model is trained using historical temperature data until the number of training iterations is reached or the loss function threshold condition is met, thereby obtaining a trained temperature prediction model.

[0013] In one implementation, the model training includes:

[0014] The input historical temperature data is divided into a plurality of data blocks through the input layer; wherein the size of each data block is consistent;

[0015] The intra-block attention feature of each data block is calculated by the intra-block attention calculation module, and the intra-block attention features are fused by a cascade operation to obtain a fused intra-block attention feature;

[0016] Calculate the inter-block attention features between each data block by the inter-block attention calculation module;

[0017] Perform weighted fusion on the fused intra-block attention features and inter-block attention features to obtain the attention features;

[0018] The attention features are forward propagated through a feedforward neural network to obtain prediction results;

[0019] The loss value between the prediction result and the historical temperature data is calculated, and the model parameters of the temperature prediction model are optimized and updated according to the loss value. When the number of training iterations is reached, the training of the initial temperature prediction model is completed.

[0020] In one implementation, the expression for calculating the intra-block attention feature of each data block is: in, The query matrix, key matrix, and value matrix representing the attention within the block, d m It represents the embedding dimension of intra-block attention data, i represents the data block number, and intra is the intra-block attention identifier.

[0021] In one implementation, the expression for calculating the inter-block attention feature between each data block is: Among them, Q inter , K inter , V inter Denote the query matrix, key matrix, and value matrix of inter-block attention, respectively, d′ m =S×d m , S represents the size of the data block, d′ m represents the embedding dimension of inter-block attention data, inter is the inter-block attention identifier, and T represents the matrix transpose operation.

[0022] In one implementation, the intra-block attention calculation module includes an embedding layer, a first linear layer, an intra-block attention calculation layer, and a second linear layer connected in sequence;

[0023] The inter-block attention calculation module includes a third linear layer, a position encoding layer, an inter-block attention calculation layer and a fourth linear layer connected in sequence;

[0024] The fused intra-block attention features and inter-block attention features are weighted fused through the fifth linear layer.

[0025] In one implementation, the feedforward neural network includes a sixth linear layer, an activation function layer, and a seventh linear layer connected in sequence.

[0026] In a second aspect of the present application, a switch cabinet temperature prediction device is provided, the device comprising:

[0027] A data acquisition module is used to acquire historical temperature series data of the switch cabinet to be predicted;

[0028] The temperature prediction module is used to input the historical temperature sequence data into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein, the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

[0029] The third aspect of the present application provides an electronic device, characterized in that the electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a switch cabinet temperature prediction method provided in the first aspect of the present application are implemented.

[0030] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of a switch cabinet temperature prediction method provided in the first aspect of the present application are implemented.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] The present invention provides a switch cabinet temperature prediction method. In view of the large time span, nonlinearity and non-stationarity of the temperature data of the switch cabinet, a temperature prediction model of an attention mechanism network that integrates inter-block attention and intra-block attention is introduced. The inter-block attention calculation module extracts global periodic features, and the intra-block attention calculation module extracts local trend features. Finally, the local trend and global periodic features are integrated to improve the performance of the temperature prediction model on long-term dependent data, and the long-term dependency relationship in the historical temperature data of the switch cabinet can be fully extracted to obtain better temperature prediction effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0034] Figure 1 A schematic diagram of a flow chart of a switch cabinet temperature prediction method provided by an embodiment of the present invention;

[0035] Figure 2 A network structure diagram of a temperature prediction model provided by an embodiment of the present invention;

[0036] Figure 3 A functional block diagram of a switch cabinet temperature prediction device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0038] It should be noted that the terms "include" or "may include" used in various embodiments of the present application indicate the presence of the function, operation or element applied for, and do not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items.

[0039] In various embodiments of the present application, the expression "or" or "at least one of B or / and C" includes any combination or all combinations of the words listed at the same time. For example, the expression "B or C" or "at least one of B or / and C" may include B, may include C, or may include both B and C.

[0040] It should be understood that terms such as "first", "second", etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly indicate the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0041] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a switch cabinet temperature prediction method provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0042] S101, obtaining historical temperature series data of the switch cabinet to be predicted.

[0043] In this embodiment, the real-time temperature data of the switch cabinet can be collected by the RFID temperature sensor. The switch cabinet can be divided into high-voltage switch cabinet, low-voltage switch cabinet lamp, and can also refer to incoming line cabinet, outgoing line cabinet, contact cabinet, metering cabinet, PT cabinet, capacitor cabinet, etc. These are common switch cabinets in the technical field, and no redundant description is made in this embodiment.

[0044] S102, inputting the historical temperature sequence data into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, the attention mechanism network is composed of a plurality of attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

[0045] In this embodiment, if Figure 2 As shown, the inter-block attention calculation module includes a third linear layer, a position encoding layer, an inter-block attention calculation layer and a fourth linear layer connected in sequence; the fused intra-block attention features and inter-block attention features are weighted fused through a fifth linear layer. The feedforward neural network includes a sixth linear layer, an activation function layer and a seventh linear layer connected in sequence.

[0046] Before the historical temperature series data is input into the pre-trained temperature prediction model, the temperature prediction model in the initial state does not have the temperature prediction capability. Therefore, it is necessary to train the temperature prediction model without temperature prediction capability to obtain the optimal temperature prediction model. The training process is as follows:

[0047] First, the historical temperature data of the switch cabinet is obtained; then, the initial temperature prediction model is trained with the historical temperature data until the number of training iterations is reached or the loss function threshold condition is met, and the trained temperature prediction model is obtained.

[0048] Specifically, the historical temperature data of the switch cabinet has missing values. The linear interpolation method is first used to fill the missing values, and then the zero-mean standardization is used to normalize the processed data. The processed historical temperature data is divided into training sets and test sets, and the training set and test set can be divided according to a ratio of 7 to 3.

[0049] For the temperature prediction model, based on the Transformer attention method, a temperature prediction model with a dual attention mechanism is constructed. In addition, the input training set is normalized. A fully connected layer is used to convert the data dimension for subsequent processing. Based on the historical temperature data obtained, the historical temperature data is preliminarily processed, and the frequency domain features of the historical temperature data time series are extracted using the Fourier transform method to obtain the periodicity and trend characteristics of the data.

[0050] The obtained feature data is input into the attention mechanism network, and normalization and residual connections are used between layers. The data time series feature representation is finally obtained through the inter-block attention calculation module and the intra-block attention calculation module. In this implementation, the historical temperature data is feature extracted, and the Fourier transform method is used to extract the periodic information in order to separate the global periodic features and the local trend features. Subsequently, the global periodic features are extracted through the inter-block attention, and the local trend features are extracted through the intra-block attention to improve the prediction accuracy.

[0051] Multiple attention layers are stacked and the resulting data representation is feature mapped to the target output, which is the temperature prediction for the future time step, through a linear layer.

[0052] Specifically, the Fourier transform method for extracting the frequency domain features of the historical temperature data time series includes: seasonal decomposition of the time series, and extracting the periodic pattern by converting the time series from the time domain to the frequency domain. The input time series X is decomposed into Fourier basis functions using discrete Fourier transform (DFT), expressed as DFT(X), and then the first K main frequency parts are selected for inverse transformation to obtain the periodic pattern X sea : Among them, the subscript K f By selecting the K with the largest amplitude f Fourier basis function, A represents the corresponding amplitude, and Φ represents the phase.

[0053] Based on Fourier decomposition, trend decomposition is performed, X rem =XX sea , and then take different sliding averages to extract trend patterns. For the results of different window sizes, a weighted operation is used to calculate the trend component X trend :

[0054]

[0055] in, represents the pooling function of the i-th kernel, N corresponds to the number of kernels, and Softmax(L(·)) controls the weights of different kernels. The seasonal pattern and trend pattern are added to the input sequence X, and the linear mapping Linear(·) is performed to transform and merge along the time dimension to obtain the result

[0056] The specific steps of constructing the attention mechanism network in this application are as follows: Use an input layer to receive input data. And embed the data so that the data dimension meets the model requirements. The size of the data block is set to S. For the input data Divide it into P data blocks P = H / S blocks, each data block is recorded as

[0057] The intra-block attention calculation module includes an embedding layer, a first linear layer, an intra-block attention calculation layer, and a second linear layer connected in sequence. The first linear layer is used to generate learnable encoding and embedding of the input blocks. where d m represents the embedding dimension.

[0058] Then loop through each block to perform internal attention calculation to obtain the intra-block attention features

[0059] in, The query matrix, key matrix, and value matrix representing the attention within the block, dm represents the embedding dimension of the intra-block attention data, i represents the data block number, and intra is the intra-block attention identifier. Finally, the combined output is obtained Finally, the intra-block attention features of each data block are fused through a cascade operation to obtain the fused intra-block attention features, that is, Among them, Concat() represents a cascade operation.

[0060] The input data is expanded into data blocks, and the inter-block attention calculation module captures the global correlation by establishing the relationship between blocks. The data block size S and embedding dimension d m Combine, get Among them, the inter-block attention dimension d′ m =S×d m , so that all time steps of the temperature data of each data block are merged into d′ m In the inter Perform linear mapping to obtain a learnable attention matrix Then calculate the attention Attn inter Modeling the global dependency between multiple blocks, i.e., inter-block attention features: Among them, Q inter , K inter , V inter Denote the query matrix, key matrix, and value matrix of inter-block attention, respectively, d′ m =S×d m , S represents the size of the data block, d′ m represents the embedding dimension of inter-block attention data, inter is the inter-block attention identifier, and T represents the matrix transpose operation.

[0061] The output of the attention mechanism network is obtained by weighted summing the outputs of the intra-block attention calculation module and the inter-block attention calculation module, i.e., the attention feature

[0062] Merged attention features After the normalized Dropout layer, it is processed by a feedforward neural network to further enhance the nonlinear expression ability of the model.

[0063] The final output will contain the original input information, as well as the enhanced features from two different attention mechanisms. This approach can effectively integrate local trends and global periodic features, improving the model's performance on long-term dependent data.

[0064] As for the attention mechanism network, it is obtained by stacking multiple attention layers, iterating several times in a loop to create multiple heavy attention layers. In each iteration, the attention layer is added to a list. Create a linear layer to map the features of the above output to a predefined output length. This linear layer is used for the final output to compress the model output to a specific dimension. Stacking multiple attention layers can increase the depth of the temperature prediction model. Each layer can learn features at different levels, which can enhance the expressiveness of the model and enable it to better extract the feature information of historical temperature data.

[0065] In some embodiments, the model training includes: dividing the input historical temperature data into a plurality of data blocks through the input layer; wherein each data block has the same size; calculating the intra-block attention feature of each data block through the intra-block attention calculation module, and fusing the intra-block attention features by a cascade operation to obtain the fused intra-block attention features;

[0066] Calculate the inter-block attention features between each data block by the inter-block attention calculation module;

[0067] Perform weighted fusion on the fused intra-block attention features and inter-block attention features to obtain the attention features;

[0068] The attention features are forward propagated through a feedforward neural network to obtain prediction results;

[0069] The loss value between the prediction result and the historical temperature data is calculated, and the model parameters of the temperature prediction model are optimized and updated according to the loss value. When the number of training iterations is reached, the training of the initial temperature prediction model is completed.

[0070] Specifically, set parameters such as the number of training times and select the optimizer and loss function. The number of training times is 20, the optimizer is Adam optimizer, the learning step size is 0.001, and the loss function is absolute error loss. The parameters can be adjusted later to make the model optimal.

[0071] Input historical temperature data for training, and perform forward propagation calculation and output for each batch of training data. Further, calculate the model loss based on the obtained prediction results and the real data in the training set, optimize the model parameters according to the loss value, and update the model parameters. Stop when the number of training steps is reached, otherwise execute the early stopping strategy. During the repeated model training process, if the model effect does not improve significantly with the increase in the number of training times, it means that the training effect is the best at this time, and the training is completed. Otherwise, return to the training process. The early stopping strategy can appropriately reduce the amount of resources consumed by training the model.

[0072] Use the test set to test the trained temperature prediction model, and use the MSE and MAE indicators to evaluate the temperature prediction effect of the model. Modify the set parameters, optimizer, and loss function to train the temperature prediction model multiple times, and compare the prediction effects between models. Select the model with the best prediction effect as the final temperature prediction model.

[0073] Secondly, this embodiment also provides a switch cabinet temperature early warning method, which uses the model to predict the future temperature data sequence of the power switch cabinet, compares the predicted temperature sequence with the actual temperature sequence, and issues reminders and warnings for situations that exceed the threshold. The specific implementation is as follows:

[0074] Step S501: Determine the data list storage length, temperature alarm threshold and pattern similarity threshold.

[0075] Step S502: According to the historical data sequence specified in step S501 and input into the model, obtain and record the future temperature prediction value. Record the real-time temperature of the power switch cabinet and add it to the list to obtain the actual operating temperature data sequence of the switch cabinet.

[0076] Step S503: Perform early warning judgment at each time step. First, determine whether the real-time temperature exceeds the threshold. If it exceeds the threshold, an alarm is issued. Otherwise, further determine whether the switch cabinet temperature pattern is abnormal. If the sequence similarity exceeds the threshold, an alarm is issued. If there is an alarm, reset step S501. If there is no alarm, repeat step S502.

[0077] In this embodiment, dual thresholds are used to monitor the operating status of the power switch cabinet, which can not only determine whether the real-time temperature exceeds expectations, but also determine whether the operating mode of the switch cabinet is abnormal. It can comprehensively realize the early warning of the long-term abnormal operation of the switch cabinet when the real-time temperature is not high. The early warning scheme can be flexibly set by adjusting the relevant thresholds, which is convenient for timely adjustment according to the actual situation.

[0078] Furthermore, the specific steps of step S503 are as follows:

[0079] Determine whether the real-time temperature exceeds the threshold. According to the technical specifications of the power switch cabinet, if the real-time temperature exceeds the specified temperature by 15%, an early warning will be issued. If it exceeds the threshold, an alarm will be issued, and the alarm level is "temperature abnormality".

[0080] Determine whether the switch cabinet temperature is too different from the historical operating temperature. Use the ratio of the temperature difference to the previous time step to make the judgment. If the relative temperature difference is greater than 20%, an alarm will be issued, and the alarm level is "relative abnormality".

[0081] Among them, T t is the actual temperature value, T t ′ is the predicted temperature value, T t-1 is the actual temperature value at the previous time step.

[0082] To determine whether the temperature operation sequence of the switch cabinet is abnormal, the real-time temperature and predicted temperature data of the specified segment are compared, and the sequence similarity is calculated using the DTW method. If the similarity difference exceeds the threshold, an alarm is triggered, and the alarm level is "mode abnormality".

[0083] Specifically, first calculate the distance between the ith position data in the actual operating temperature sequence T of the power cabinet and the predicted sequence T′:

[0084] d(t i ,t j′ )=|t i -t j′ |, and then calculate the minimum cumulative distance D[i][j] between the first i elements in the sequence T and the first j elements in the predicted sequence T′.

[0085] Initialize the first row and column:

[0086]

[0087] Fill the matrix D[i][j]: The final DTW distance is: DTW(T,T′)=D[N][N], where N is the sequence length.

[0088] In this embodiment, the above temperature prediction model will eventually be deployed on the visual edge device to perform temperature prediction and early warning on the power switch cabinet. The specific implementation is as follows: the visual edge device includes an RFID temperature sensor, which can sense and record temperature data and current value data at each time step. And there is a storage device that can store data from the sensor. And it can regularly back up data for model training. Deploying the model to the visual edge device can automatically predict data from the temperature data storage device. And make predictions. The device has an alarm and an indicator light, which can effectively respond and react to abnormal situations. After troubleshooting, a reset button or switch can be used to reset the device and continue to monitor the operation of the power switch cabinet.

[0089] Please refer to Figure 3 , Figure 3 A schematic diagram of a switch cabinet temperature prediction device provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device comprises:

[0090] The data acquisition module 310 is used to obtain the historical temperature sequence data of the switch cabinet to be predicted;

[0091] The temperature prediction module 320 is used to input the historical temperature sequence data into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein, the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, and the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

[0092] In a switch cabinet temperature prediction device provided by an embodiment of the present invention, in view of the characteristics of the switch cabinet temperature data having a large time span, nonlinearity, and non-stationarity, a temperature prediction model of an attention mechanism network that integrates inter-block attention and intra-block attention is introduced, wherein the inter-block attention calculation module extracts global periodic features, and the intra-block attention calculation module extracts local trend features. Finally, the local trend and global periodic features are integrated to improve the performance of the temperature prediction model on long-term dependent data, and the long-term dependency relationship in the historical temperature data of the switch cabinet can be fully extracted to obtain a better temperature prediction effect.

[0093] The embodiment of the present application also provides an electronic device, which includes a processor, a memory, a communication interface and at least one communication bus for connecting the processor, the memory and the communication interface. The memory includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM) or a portable CD-ROM, and the memory is used for related instructions and data.

[0094] The communication interface is used to receive and send data. The processor can be one or more CPUs. When the processor is a CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor in the electronic device is used to read one or more programs stored in the memory and perform the following operations: obtain the historical temperature sequence data of the switch cabinet to be predicted; input the historical temperature sequence data into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, and the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

[0095] It should be noted that the specific implementation of each operation can be Figure 1 The corresponding description of the method embodiment shown, the electronic device can be used to execute a switch cabinet temperature prediction method of the above method embodiment, which will not be described in detail here.

[0096] In the embodiments of the present disclosure, a computer-readable storage medium is also provided, and the computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a switch cabinet temperature prediction method in the above embodiment. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application 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 codes.

[0097] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A switch cabinet temperature prediction method, characterized in that the method include: Obtain historical temperature series data of the switch cabinet to be predicted; The historical temperature sequence data is input into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein, the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

2. A switch cabinet temperature prediction method according to claim 1, characterized in that: The method further comprises: Obtain historical temperature data of the switch cabinet; The initial temperature prediction model is trained using historical temperature data until the number of training iterations is reached or the loss function threshold condition is met, thereby obtaining a trained temperature prediction model.

3. A switch cabinet temperature prediction method according to claim 2, characterized in that: The model training includes: The input historical temperature data is divided into a plurality of data blocks through the input layer; wherein the size of each data block is consistent; The intra-block attention feature of each data block is calculated by the intra-block attention calculation module, and the intra-block attention features are fused by a cascade operation to obtain a fused intra-block attention feature; Calculate the inter-block attention features between each data block by the inter-block attention calculation module; Perform weighted fusion on the fused intra-block attention features and inter-block attention features to obtain the attention features; The attention features are forward propagated through a feedforward neural network to obtain prediction results; The loss value between the prediction result and the historical temperature data is calculated, and the model parameters of the temperature prediction model are optimized and updated according to the loss value. When the number of training iterations is reached or the loss function threshold condition is met, the training of the initial temperature prediction model is completed.

4. A switch cabinet temperature prediction method according to claim 3, characterized in that: The expression for calculating the intra-block attention feature of each data block is: in, The query matrix, key matrix, and value matrix representing the attention within the block, d m It represents the embedding dimension of intra-block attention data, i represents the data block number, and intra is the intra-block attention identifier.

5. A switch cabinet temperature prediction method according to claim 3, characterized in that: The expression for calculating the inter-block attention feature between each data block is: Among them, Q inter , K inter , V inter Denote the query matrix, key matrix, and value matrix of inter-block attention, respectively, d′ m =S×d m , S represents the size of the data block, d′ m represents the embedding dimension of inter-block attention data, inter is the inter-block attention identifier, and T represents the matrix transpose operation.

6. A switch cabinet temperature prediction method according to claim 3, characterized in that: The intra-block attention calculation module includes an embedding layer, a first linear layer, an intra-block attention calculation layer and a second linear layer connected in sequence; The inter-block attention calculation module includes a third linear layer, a position encoding layer, an inter-block attention calculation layer and a fourth linear layer connected in sequence; The fused intra-block attention features and inter-block attention features are weighted fused through the fifth linear layer.

7. A switch cabinet temperature prediction method according to claim 3, characterized in that: The feedforward neural network includes a sixth linear layer, an activation function layer and a seventh linear layer which are connected in sequence.

8. A switch cabinet temperature prediction device, characterized in that: The device includes: A data acquisition module is used to acquire historical temperature series data of the switch cabinet to be predicted; The temperature prediction module is used to input the historical temperature sequence data into the pre-trained temperature prediction model to generate the temperature prediction result of the switch cabinet to be predicted; wherein, the temperature prediction model includes an input layer, an attention mechanism network, a feedforward neural network and a normalization layer connected in sequence, the attention mechanism network is composed of multiple attention layers stacked, and the attention layer includes an intra-block attention calculation module and an inter-block attention calculation module.

9. An electronic device, characterized in that: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a switch cabinet temperature prediction method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of a switch cabinet temperature prediction method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and device for temperature rise prediction and dynamic current-carrying regulation of bus bar of array cabinet

    CN120831972A

  • Busbar temperature rise prediction and dynamic current regulation method and device for column head tank

    CN120831972B