Transformer temperature prediction method, system, device and medium based on dynamic segmentation
By dividing the transformer temperature prediction into stable and fluctuating segments and using one-dimensional convolution and Transformer networks for feature fusion and context interaction, the prediction accuracy problem of the Crossformer method under dynamic changes is solved, and higher prediction accuracy and stability are achieved.
Patent Information
- Application Number
- CN202510932911.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-08
AI Technical Summary
When processing transformer temperature series information, the existing Crossformer method cannot adapt to the dynamic changes of different variables or time periods, resulting in the destruction of local time series continuity and distortion of feature extraction, which reduces the prediction accuracy.
By traversing the time series to be processed in a fixed-size sliding window, dividing the sequence into stable and fluctuating segments based on the sequence variance value, merging adjacent stable segments and splitting fluctuating segments, obtaining subsequence features, and performing multidimensional feature fusion and context interaction through one-dimensional convolution, Transformer network and sparsification network processing, the transformer temperature prediction results are generated.
It improves the temporal consistency, anomaly sensitivity and accuracy of transformer temperature prediction, can better cope with complex and changing data patterns, and improves the accuracy and stability of prediction results.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical digital processing, in particular to a transformer temperature prediction method, system, device and medium based on dynamic segmentation. Background Art
[0002] Transformer temperature prediction is of great significance to the operating condition analysis and power distribution of power transformers. It can not only evaluate the health status of equipment and optimize operating performance through early abnormality identification, life loss quantification, thermal characteristics analysis, etc., but also prevent and control overload risks and respond to extreme operating conditions in terms of power grid security. In terms of power resource allocation, it can achieve coordinated scheduling of transformers and support the access of new energy. Through cross-analysis with other power data, it provides a decision-making basis for the entire chain of smart grids from equipment maintenance to resource scheduling. It is an important technical support for ensuring the safe, efficient and economical operation of the power grid.
[0003] Currently, transformer temperature data from the past period is often obtained as transformer temperature sequence information, and the Crossformer method is used for prediction analysis. However, when processing sequence information, the Crossformer method cannot adapt to the dynamic changes of different variables or time periods, resulting in the destruction of local temporal continuity and distortion of feature extraction, causing key features to be divided into different segments, thereby reducing prediction accuracy. Summary of the Invention
[0004] The purpose of the present invention is to provide a transformer temperature prediction method, system, device and medium based on dynamic segmentation.
[0005] The technical solutions of the present invention are as follows:
[0006] A transformer temperature prediction method based on dynamic segmentation includes the following operations:
[0007] S1. When a fixed-size sliding window is used to traverse the time series sequence to be processed, the sequence segments within each position sliding window are divided into stationary segments or fluctuating segments based on the sequence variance value. Adjacent stationary segments are merged and fluctuating segments are segmented to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features.
[0008] S2. After all subsequence features are standardized, they are constructed into a matrix to obtain a subsequence feature matrix; the subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence dimension reduction matrix; the subsequence dimension reduction matrix is processed by a trained sparsification network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution for each subsequence; in the sparse probability distribution of each subsequence, the trained feature prediction network corresponding to the processing probability value greater than the probability threshold is used as the corresponding preferred feature prediction network to process the corresponding subsequence to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain the subsequence multidimensional fusion prediction features of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their positions in the time series sequence to be processed to obtain the initial prediction sequence features;
[0009] S3. The initial prediction sequence features are interactively fused with hidden state features and context features several times to obtain the transformer temperature prediction result.
[0010] It is characterized in that, in S1, the embedding feature of the subsequence is obtained by performing one-dimensional convolution processing on the subsequence; the intra-sequence position feature of the subsequence is obtained by converting the subsequence position index into a vector of fixed dimension through trigonometric functions to obtain the relative position of the element in the subsequence; the inter-sequence position feature of the subsequence is obtained by calculating the position offset between the subsequence and the adjacent subsequence based on the moving step of the sliding window, and converting it into a feature vector; the global sequence position feature of the subsequence is obtained by assigning corresponding global time period labels to the subsequence based on the segmentation information of the time series sequence to be processed, and converting it into a feature vector through the embedding layer.
[0011] In the training sparsification network processing of S2: the subsequence dimensionality reduction matrix is processed by full connection and softmax function to obtain the initial probability distribution matrix; the initial probability distribution matrix is sparsified, retaining the first n maximum probability values and setting the rest to 0, to obtain the processing probability of each subsequence relative to several training feature prediction networks, forming a sparse probability distribution of each subsequence.
[0012] In S3, the operations of several interactive fusion processing of hidden states and context information are specifically as follows: the hidden state features of the initial prediction sequence features are processed with the initial prediction sequence features through context feature extraction to obtain a first interactive fusion result; the hidden state features of the first interactive fusion result are processed with the first interactive fusion result through context feature extraction to obtain a second interactive fusion result; the hidden state features of the second interactive fusion result are processed with the second interactive fusion result through context feature extraction to obtain a third interactive fusion result; and so on, until the last context feature extraction processing is completed, and the Nth interactive fusion result is obtained as the transformer temperature prediction result.
[0013] The operation of extracting hidden state features can be implemented through the encoder in the Transformer network, and the operation of extracting contextual features can be implemented through the decoder in the Transformer network.
[0014] The specific operation of extracting hidden state features is as follows: the input is processed by a long short-term memory network to obtain the initial hidden features; the input is processed by one-dimensional convolution and dilated convolution to obtain convolution features; the initial hidden features and convolution features are fused and processed by a feedforward neural network to obtain the output.
[0015] The specific operations for normalizing the subsequence features in S2 are as follows: obtaining the mean of the subsequence features, subtracting the mean from each element in the subsequence features to obtain the centered subsequence features; obtaining the variance of the centered subsequence features, dividing each element in the centered subsequence features by the variance to obtain the subsequence normalized features.
[0016] A transformer temperature prediction system based on dynamic segmentation, used to implement the above-mentioned transformer temperature prediction method based on dynamic segmentation, comprising:
[0017] The subsequence feature generation module is used to divide the sequence segments within each position sliding window into stable segments or fluctuating segments based on the sequence variance value when traversing the time series sequence to be processed with a fixed-size sliding window. Adjacent stable segments are merged and fluctuating segments are segmented to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features.
[0018] The initial prediction sequence feature generation module is used to construct a matrix after all subsequence features are standardized to obtain a subsequence feature matrix; the subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence reduced dimension matrix; the subsequence reduced dimension matrix is processed by a trained sparse network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution for each subsequence; the trained feature prediction network corresponding to the processing probability value greater than the probability threshold in the sparse probability distribution of each subsequence is used as the corresponding preferred feature prediction network to process the corresponding subsequence to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain the subsequence multidimensional fusion prediction features of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their position in the time series sequence to be processed to obtain the initial prediction sequence features;
[0019] The transformer temperature prediction result generation module is used to obtain the transformer temperature prediction result by interactively fusing the initial prediction sequence features with the hidden state features and context features for several times.
[0020] A transformer temperature prediction device based on dynamic segmentation includes a processor and a memory, wherein the processor implements the above-mentioned transformer temperature prediction method based on dynamic segmentation when executing a computer program stored in the memory.
[0021] A computer-readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the above-mentioned transformer temperature prediction method based on dynamic segmentation is implemented.
[0022] The beneficial effects of the present invention are:
[0023] The present invention provides a transformer temperature prediction method based on dynamic segmentation. First, when a sliding window traverses the time series to be processed, the degree of sequence fluctuation is measured by calculating the variance value in each sliding window, and the sequence fluctuation characteristics of different variables and time periods are automatically matched. Adjacent stable segments are merged and the fluctuation segments are divided to obtain several subsequences. Then, the embedded features of each subsequence reflecting its own numerical features are fused with multiple position features reflecting the time series structure information to obtain several subsequence features. Then, the subsequence features are standardized and then dimensionality reduced. The subsequence dimensionality reduction matrix is processed using a sparse network to obtain each subsequence. The processing probability of the subsequence relative to several trained feature prediction networks is calculated, and the corresponding preferred feature prediction network is selected for processing. Several subsequence prediction features are aggregated with the corresponding processing probability values and then spliced. Through multi-dimensional feature fusion and time series splicing, the advantages of multi-source features are aggregated to generate comprehensive initial prediction sequence features; finally, the initial prediction sequence features are interactively fused with several hidden state features and context features, and the temporal dependency information and global context association are continuously integrated to obtain the transformer temperature prediction results; used for transformer temperature prediction, it can improve the temporal consistency, abnormal sensitivity and accuracy and rationality of the prediction results. DETAILED DESCRIPTION
[0024] This embodiment provides a transformer temperature prediction method based on dynamic segmentation, including the following operations:
[0025] S1. When a fixed-size sliding window is used to traverse the time series sequence to be processed, the sequence segments within each position sliding window are divided into stationary segments or fluctuating segments based on the sequence variance value. Adjacent stationary segments are merged and fluctuating segments are segmented to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features.
[0026] S2. After all subsequence features are standardized, they are constructed into a matrix to obtain a subsequence feature matrix; the subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence dimension reduction matrix; the subsequence dimension reduction matrix is processed by a trained sparsification network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution for each subsequence; in the sparse probability distribution of each subsequence, the trained feature prediction network corresponding to the processing probability value greater than the probability threshold is used as the corresponding preferred feature prediction network to process the corresponding subsequence to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain the subsequence multidimensional fusion prediction features of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their positions in the time series sequence to be processed to obtain the initial prediction sequence features;
[0027] S3. The initial prediction sequence features are interactively fused with hidden state features and context features several times to obtain the transformer temperature prediction result.
[0028] The specific steps are detailed below.
[0029] S1. When a fixed-size sliding window traverses the time series sequence to be processed, the sequence segments within each position sliding window are divided into stationary segments or fluctuating segments based on the sequence variance value. Adjacent stationary segments are merged and fluctuating segments are divided to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features.
[0030] When a fixed-size sliding window traverses the time series to be processed, the degree of sequence fluctuation is measured by calculating the variance value in each sliding window, and the sequence fluctuation characteristics of different variables and time periods are automatically matched to obtain stable segments and fluctuating segments. Adjacent stable segments are merged and fluctuating segments are divided, so that the amount of calculation in the stable area is reduced and the ability to capture details in the fluctuating area is improved. The segmentation granularity can be dynamically adjusted according to the characteristics of the variables and time periods, thereby improving the adaptability of the time series and being more flexible in responding to complex and changeable data patterns in real scenarios to obtain several subsequences; and the embedded features of each subsequence reflecting its own numerical characteristics are fused with multiple position features reflecting the time series structure information to characterize the time series characteristics of each subsequence (such as trend, periodicity, local fluctuation), and obtain several subsequence features.
[0031] First, the transformer temperature data within a preset historical time range is obtained to form a sequence, thereby obtaining a time series sequence to be processed.
[0032] Then, to identify the stable temperature region and the temperature fluctuation region of the transformer in the time series to be processed, a fixed-size sliding window is used to traverse the time series to be processed. During the traversal process, the sequence segments within each position sliding window are divided into stable segments or fluctuating segments based on the sequence variance value. Specifically, during the traversal process, if the sequence variance value of the sequence segment within the current position sliding window is greater than the sequence variance threshold, the sequence segment within the current position sliding window is a fluctuating segment; if the sequence variance value of the sequence segment within the current position sliding window is not greater than the sequence variance threshold, the sequence segment within the current position sliding window is a stable segment; the sequence variance threshold is the product of the first value and the variance value of the time series to be processed.
[0033] Next, the adjacent stable segments are merged and the fluctuating segments are segmented to obtain several subsequences. The segmentation position is located at the midpoint of the fluctuating segment. In addition, to prevent the sequence from being too fragmented or too long, the lower limit of the subsequence length is L min =8, upper limit L max =64.
[0034] Finally, the embedded features of each subsequence reflecting its own numerical characteristics are fused with their respective intra-sequence position features reflecting the relative position information of the elements within the subsequence, inter-sequence position features reflecting the positional relationship of the subsequence relative to other subsequences, and global sequence position features reflecting the absolute position of the subsequence in the entire time series (this can be achieved through weighted fusion). This combines the subsequence numerical features with the time series structure information, characterizes the time series characteristics of each subsequence (such as trends, periodicity, and local fluctuations), and obtains several subsequence features.
[0035] The embedding features of the above-mentioned subsequences can be obtained by performing a one-dimensional convolution process on the subsequence with a convolution kernel size of k. The intra-sequence position feature of the subsequence is obtained by converting the subsequence position index into a vector of fixed dimension through a trigonometric function (preferably a cosine function) or a linear transformation to obtain the relative position of the element in the subsequence. The inter-sequence position feature of the subsequence is obtained by calculating the position offset between the subsequence and the adjacent subsequence based on the moving step of the sliding window and converting it into a feature vector. The sequence global position feature of the subsequence is based on the segmentation information of the time series sequence to be processed (for example, according to the preset sequence mean and / or variance value, the time series sequence to be processed is divided into peak period, trough period, and stable period), and each subsequence is assigned a corresponding global time period label, which is converted into a feature vector through the embedding layer.
[0036] S2. After all subsequence features are standardized, they are constructed into a matrix to obtain a subsequence feature matrix; the subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence reduced dimension matrix; the subsequence reduced dimension matrix is processed by a trained sparsification network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution of each subsequence; in the sparse probability distribution of each subsequence, the training feature prediction network corresponding to the processing probability value greater than the probability threshold is used as the corresponding preferred feature prediction network to process the corresponding subsequence to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain the subsequence multidimensional fusion prediction features of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their positions in the time series sequence to be processed to obtain the initial prediction sequence features.
[0037] The subsequence features are standardized and then dimensionally reduced to reduce information redundancy and highlight key information, thereby obtaining a subsequence dimension reduction matrix. The subsequence dimension reduction matrix is processed using a sparse network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, and the corresponding preferred feature prediction network is selected for processing, thereby dynamically matching the trained feature prediction network according to the fluctuation characteristics of different sequences, suppressing noise interference and enhancing the accuracy of sequence prediction results. Several subsequence prediction features are aggregated with the corresponding processing probability values and then spliced. Through multi-dimensional feature fusion and time series splicing, the advantages of multiple source features are aggregated, time series dependencies are retained, and comprehensive initial prediction sequence features are generated, which can significantly improve the accuracy and stability of transformer temperature prediction.
[0038] First, all subsequence features are normalized and constructed into a matrix, with each row corresponding to a subsequence and each column corresponding to a dimension, resulting in the subsequence feature matrix. The subsequence feature normalization process involves obtaining the mean of the subsequence feature and subtracting the mean from each element in the subsequence feature to obtain the centered subsequence feature; then obtaining the variance of the centered subsequence feature and dividing each element in the centered subsequence feature by the variance to obtain the subsequence-normalized feature.
[0039] Then, the subsequence feature matrix is processed by dimensionality reduction to obtain the subsequence reduced dimension matrix. The covariance matrix of the subsequence feature matrix is obtained and the eigenvalue decomposition is performed on the covariance matrix, which retains the main information (variance) of the original data while filtering out noise and redundant features, improving the efficiency and accuracy of subsequent analysis, and obtaining a diagonal matrix (the diagonal elements in the diagonal matrix are eigenvalues λ1≥λ2≥⋯≥λ p≥0) and the eigenvector matrix (the column vectors in the eigenvector matrix are the eigenvectors corresponding to the diagonal elements at the corresponding positions in the diagonal matrix); obtain the total number of eigenvalues whose cumulative eigenvalue contribution rate is greater than the contribution rate as the number of reduced dimensions; form a projection matrix with the eigenvectors corresponding to the largest eigenvalues of the first reduced dimensions; multiply the subsequence feature matrix by the projection matrix to project the subsequence feature matrix into the principal component space to obtain the subsequence reduced dimension matrix.
[0040] The above cumulative eigenvalue contribution rate is calculated by the following formula:
[0041] ,
[0042] for m The cumulative eigenvalue contribution rate of eigenvalues, For the j eigenvalues, p is the total number of eigenvalues.
[0043] Next, the subsequence dimensionality reduction matrix is processed by the trained sparsification network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution of each subsequence.
[0044] The method for obtaining the training sparsification network and the training feature prediction network is as follows: constructing a prediction model composed of the sparsification network and the feature prediction network, using a training set formed by several sequences, corresponding prediction network probability labels and corresponding real sequence prediction results, training the prediction model until a preset round is reached, and obtaining the training prediction model, and the training sparsification network and the training feature prediction network are extracted from the training prediction model.
[0045] In the process of training the sparse network, the subsequence dimension reduction matrix is processed by full connection and softmax function to obtain the initial probability distribution matrix (each row is a subsequence corresponding to the selection probability of several training feature prediction networks); the initial probability distribution matrix is sparsely processed, retaining the first n maximum probability values and setting the rest to 0, to obtain the processing probability of each subsequence relative to several training feature prediction networks, forming a sparse probability distribution of each subsequence. For example, there are 5 training feature prediction networks, i The initial probability distribution of the subsequence is 0, 0.85, 0.15, 0, 0 after sparseness, indicating that the i The subsequences are processed by the second training feature prediction network with a probability of 85%, by the third training feature prediction network with a probability of 15%, and the remaining training feature prediction networks have a probability of 0, reflecting sparsity.
[0046] Then, the training feature prediction network corresponding to the probability value greater than the probability threshold in the sparse probability distribution of each subsequence is processed as the corresponding preferred feature prediction network (for example, the training feature prediction network corresponding to 0.85 and 0.15 in the above example is processed as the first i The optimal feature prediction network for each subsequence is used to process the corresponding subsequences, and several subsequence prediction features are obtained for each subsequence. These features are aggregated with the corresponding processing probability values (0.85, 0.15) (which can be achieved through weighted fusion) to obtain the subsequence multidimensional fusion prediction features of each subsequence.
[0047] The functions of the aforementioned training feature prediction networks can be customized based on actual needs. In this embodiment, to better predict transformer temperature data, the selected training feature prediction networks include a residual-connected long short-term memory network (for processing and analyzing stable temperature sequences under normal operating conditions, suitable for subsequences with relatively stable data); a neural network formed by cascading a Transformer network and a gated convolutional network (the Transformer network captures the temporal dependencies before and after temperature surges, while the gated convolutional network enhances the analysis of the causal relationship between load surges and temperature rises, suitable for subsequences with temperature rises); and a neural network formed by cascading a variational autoencoder and an attention mechanism (the variational autoencoder learns the underlying distribution of normal fluctuations and detects abnormal deviations, while the attention mechanism focuses on the key time features of abnormal fluctuations, suitable for subsequences with small but fluctuating data). Through the design of these specialized feature prediction networks, accurate feature extraction of transformer temperature sequences can be achieved, providing high-quality multi-dimensional fusion features for transformer temperature prediction.
[0048] Finally, the multi-dimensional fusion prediction features of several subsequences are spliced according to their positions in the time series to be processed to obtain the initial prediction sequence features.
[0049] S3. The initial prediction sequence features are interactively fused with hidden state features and context features several times to obtain the transformer temperature prediction result.
[0050] The interactive fusion of hidden state features and contextual features is performed as follows: the hidden state features of the initial prediction sequence features are combined with the initial prediction sequence features through contextual feature extraction to obtain the first interactive fusion result; the hidden state features of the first interactive fusion result are combined with the first interactive fusion result through contextual feature extraction to obtain the second interactive fusion result; the hidden state features of the second interactive fusion result are combined with the second interactive fusion result through contextual feature extraction to obtain the third interactive fusion result; and so on, until the end of the last interactive fusion, obtaining the Nth interactive fusion result and the transformer temperature prediction result. The initial prediction sequence features continuously integrate temporal dependency information and global context associations in each round of processing. Each subsequent round further interacts with the hidden state of the previous fusion result and the deepened contextual features, gradually mining deep features such as long-range temperature variation trends, periodic patterns, and complex temperature correlations. This filter out noise and enhance key anomaly signals. This method accurately captures information such as diurnal periodic fluctuations and sudden changes in transformer temperature data, improving the temporal consistency, anomaly sensitivity, and physical rationality of transformer temperature prediction, significantly enhancing the accuracy of the prediction results.
[0051] The operation of extracting hidden state features can be implemented through the encoder in the Transformer network, and the operation of extracting contextual features can be implemented through the decoder in the Transformer network.
[0052] In this embodiment, in order to improve the accuracy and authenticity of the sequence prediction results, the following settings are made.
[0053] The specific operation of extracting hidden state features is as follows: the input (initial prediction sequence features, or the first interactive fusion result, or the N-1th interactive fusion result, etc.) is processed by the long short-term memory network, and the time series data is processed through the gating mechanism (forget gate, input gate, output gate) to effectively capture long-distance dependencies. The hidden state is iteratively updated with the sequence input, which is suitable for dynamic feature extraction of temperature series to obtain the initial hidden features; the input is processed by one-dimensional convolution and dilated convolution to capture the periodic patterns or mutation features in the temperature series to obtain the convolution features; the initial hidden features and convolution features are fused and then processed by the feedforward neural network to capture the long-distance dependencies of the sequence and obtain the output (hidden state features).
[0054] The specific operations of context feature extraction processing are as follows: the first input (initial prediction sequence features, or the first interactive fusion results, the N-1 interactive fusion results) is normalized to obtain normalized sequence features; the feature difference between adjacent time steps in the normalized sequence features is obtained to capture the immediate change rate of the sequence and obtain low-order sequence features; the feature difference between adjacent time steps in the low-order sequence features is obtained to capture the long-term dynamic trend of the sequence and obtain high-order sequence features; the normalized sequence features, low-order sequence features and high-order sequence features are dimensionally spliced to obtain sequence composite features; the normalized sequence features are processed by one-dimensional convolution to capture local features and obtain normalized sequence convolution features; the low-order sequence features are processed by Fourier transform to obtain high-frequency mutation information of the sequence, which is fused with the normalized sequence convolution features to obtain local features of the sequence; the second input is used as the query feature, the local features of the sequence are used as the key features, and the high-order sequence features are used as the value features for attention processing, focusing on key time points, improving the sensitivity of abnormal sequence fluctuation features, focusing on local key information, and obtaining the output (the first interactive fusion result, or the Nth interactive fusion result, etc.).
[0055] This embodiment further provides a transformer temperature prediction system based on dynamic segmentation, which is used to implement the above-mentioned transformer temperature prediction method based on dynamic segmentation, including:
[0056] The subsequence feature generation module is used to divide the sequence segments within each position sliding window into stable segments or fluctuating segments based on the sequence variance value when traversing the time series sequence to be processed with a fixed-size sliding window. Adjacent stable segments are merged and fluctuating segments are segmented to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features.
[0057] The initial prediction sequence feature generation module is used to construct a matrix after all subsequence features are standardized to obtain a subsequence feature matrix; the subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence reduced dimension matrix; the subsequence reduced dimension matrix is processed by a trained sparse network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution for each subsequence; the trained feature prediction network corresponding to the processing probability value greater than the probability threshold in the sparse probability distribution of each subsequence is used as the corresponding preferred feature prediction network to process the corresponding subsequence to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain the subsequence multidimensional fusion prediction features of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their position in the time series sequence to be processed to obtain the initial prediction sequence features;
[0058] The transformer temperature prediction result generation module is used to obtain the transformer temperature prediction result by interactively fusing the initial prediction sequence features with the hidden state features and context features for several times.
[0059] This embodiment further provides a transformer temperature prediction device based on dynamic segmentation, comprising a processor and a memory, wherein the processor implements the above-mentioned transformer temperature prediction method based on dynamic segmentation when executing a computer program stored in the memory.
[0060] This embodiment further provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned transformer temperature prediction method based on dynamic segmentation is implemented.
[0061] This embodiment provides a transformer temperature prediction method based on dynamic segmentation. First, when a sliding window traverses the time series to be processed, the variance value in each sliding window is calculated to measure the degree of sequence fluctuation, automatically matching the sequence fluctuation characteristics of different variables and time periods, merging adjacent stable segments, and dividing the fluctuation segments to obtain several subsequences; then, the embedded features of each subsequence reflecting its own numerical features are fused with multiple position features reflecting the time series structure information to obtain several subsequence features; then, the subsequence features are standardized and then dimensionality reduced, and the subsequence dimensionality reduction matrix is processed using a sparse network to obtain the subsequence features of each subsequence. The processing probability of a subsequence relative to several trained feature prediction networks is calculated, and the corresponding preferred feature prediction network is selected for processing. Several subsequence prediction features and corresponding processing probability values are aggregated and spliced. Through multi-dimensional feature fusion and time series splicing, the advantages of multi-source features are aggregated to generate comprehensive initial prediction sequence features; finally, the initial prediction sequence features are interactively fused with several hidden state features and context features, and the temporal dependency information and global context association are continuously integrated to obtain the transformer temperature prediction result; used for transformer temperature prediction, it can improve the temporal consistency, abnormal sensitivity and accuracy and rationality of the prediction results.
Claims
1. A transformer temperature prediction method based on dynamic segmentation, characterized in that: The following operations are included: S1. Obtain transformer temperature data within a preset historical time range, form a sequence, and obtain a time series sequence to be processed; When a fixed-size sliding window traverses the time series to be processed, the sequence segments within each position sliding window are divided into stationary segments or fluctuating segments based on the sequence variance value. Adjacent stationary segments are merged and fluctuating segments are split to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features. S2. After all subsequence features are standardized, they are constructed into a matrix to obtain the subsequence feature matrix; The subsequence feature matrix is processed by dimensionality reduction to obtain a subsequence reduced dimensionality matrix; The subsequence dimension reduction matrix is processed by the trained sparsification network to obtain the processing probability of each subsequence relative to several training feature prediction networks, forming a sparse probability distribution for each subsequence; In the sparse probability distribution of each subsequence, the trained feature prediction network corresponding to the processing probability value greater than the probability threshold is used as the corresponding preferred feature prediction network, and the corresponding subsequence is processed to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability value to obtain the subsequence multi-dimensional fusion prediction feature of each subsequence; The multi-dimensional fusion prediction features of several subsequences are spliced according to their positions in the time series to be processed to obtain the initial prediction sequence features; S3. The initial prediction sequence features are interactively fused with hidden state features and context features several times to obtain the transformer temperature prediction result.
2. The transformer temperature prediction method based on dynamic segmentation according to claim 1 is characterized in that: In S1, The embedded features of the subsequence are obtained by performing one-dimensional convolution on the subsequence; The position feature of a subsequence is obtained by converting the subsequence position index into a vector of fixed dimension through trigonometric functions to obtain the relative position of the element in the subsequence; The inter-sequence position feature of a subsequence is obtained by calculating the position offset between the subsequence and the adjacent subsequence based on the moving step of the sliding window and converting it into a feature vector; The global position feature of the subsequence is obtained by assigning corresponding global time period labels to the subsequence based on the segmentation information of the time series to be processed, and converting it into a feature vector through the embedding layer.
3. The transformer temperature prediction method based on dynamic segmentation according to claim 1 is characterized in that: During the training and sparse network processing of S2: The subsequence dimensionality reduction matrix is processed by full connection and softmax function to obtain the initial probability distribution matrix; the initial probability distribution matrix is sparsely processed, retaining the first n maximum probability values and setting the rest to 0, to obtain the processing probability of each subsequence relative to several training feature prediction networks, forming a sparse probability distribution of each subsequence.
4. The transformer temperature prediction method based on dynamic segmentation according to claim 1 is characterized in that: In S3, the operations of interactive fusion of hidden states and context information are as follows: The hidden state features of the initial prediction sequence features and the initial prediction sequence features are processed through context feature extraction to obtain a first interactive fusion result; the hidden state features of the first interactive fusion result and the first interactive fusion result are processed through context feature extraction to obtain a second interactive fusion result; The hidden state features of the second interactive fusion result are processed with the context feature extraction of the second interactive fusion result to obtain the third interactive fusion result; and so on, until the last context feature extraction processing is completed, the Nth interactive fusion result is obtained as the transformer temperature prediction result.
5. The transformer temperature prediction method based on dynamic segmentation according to claim 4 is characterized in that: The operation of extracting hidden state features can be implemented through the encoder in the Transformer network, and the operation of extracting contextual features can be implemented through the decoder in the Transformer network.
6. The transformer temperature prediction method based on dynamic segmentation according to claim 4 is characterized in that: The specific operation of extracting hidden state features is as follows: the input is processed by a long short-term memory network to obtain the initial hidden features; the input is processed by one-dimensional convolution and dilated convolution to obtain convolution features; the initial hidden features and convolution features are fused and processed by a feedforward neural network to obtain the output.
7. The transformer temperature prediction method based on dynamic segmentation according to claim 1, characterized in that: In S2, the specific operations of normalizing the subsequence features are as follows: obtaining the mean of the subsequence features, subtracting the mean from each element in the subsequence features to obtain the centered subsequence features; obtaining the variance of the centered subsequence features, dividing each element in the centered subsequence features by the variance to obtain the subsequence normalized features.
8. A transformer temperature prediction system based on dynamic segmentation, used to implement the transformer temperature prediction method based on dynamic segmentation according to claim 1, characterized in that: include: A subsequence feature generation module is used to obtain transformer temperature data within a historical preset time range, form a sequence, and obtain a time series sequence to be processed; When a fixed-size sliding window traverses the time series to be processed, the sequence segments within each position sliding window are divided into stationary segments or fluctuating segments based on the sequence variance value. Adjacent stationary segments are merged and fluctuating segments are split to obtain several subsequences. The embedded features of each subsequence are fused with the respective intra-sequence position features, inter-sequence position features, and sequence global position features to obtain several subsequence features. The initial prediction sequence feature generation module is used to construct a matrix after all subsequence features are standardized to obtain the subsequence feature matrix; The subsequence feature matrix is subjected to dimensionality reduction processing to obtain a subsequence dimensionality reduction matrix; the subsequence dimensionality reduction matrix is processed by a trained sparsification network to obtain the processing probability of each subsequence relative to several trained feature prediction networks, forming a sparse probability distribution of each subsequence; the trained feature prediction network corresponding to the processing probability value greater than the probability threshold in the sparse probability distribution of each subsequence is used as the corresponding preferred feature prediction network, and the corresponding subsequence is processed to obtain several respective subsequence prediction features, which are aggregated with the corresponding processing probability values to obtain a subsequence multidimensional fusion prediction feature of each subsequence; several subsequence multidimensional fusion prediction features are spliced according to their position in the time series sequence to be processed to obtain the initial prediction sequence feature; The transformer temperature prediction result generation module is used to obtain the transformer temperature prediction result by interactively fusing the initial prediction sequence features with the hidden state features and context features for several times.
9. A transformer temperature prediction device based on dynamic segmentation, characterized in that: The system comprises a processor and a memory, wherein when the processor executes the computer program stored in the memory, the transformer temperature prediction method based on dynamic segmentation according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the transformer temperature prediction method based on dynamic segmentation according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Improved Transform-based power grid flood prevention risk probability prediction method and system
CN116151459A
Pig house temperature prediction method fused with resonance sparse Transform network
CN118277959A
