Time sequence prediction method and device based on period embedding and multi-scale features
By using periodic embedding and multi-scale features in time series prediction, the shortcomings of the prior art in capturing complex dynamic periodic features and frequency domain features are solved, and higher prediction stability and accuracy are achieved.
Patent Information
- Application Number
- CN202510156571.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-13
AI Technical Summary
Existing time series prediction methods have shortcomings in capturing complex dynamic periodic features and frequency domain features, and it is difficult to adapt to the dynamic changes of data, especially in long-term series prediction.
The time series prediction method based on periodic embedding and multi-scale features is adopted, and periodic patterns in the sub-sequence are extracted by overlapping block processing, periodic features and non-periodic residual features are separated, and frequency domain features are strengthened through wavelet transformation and wavelet channel attention mechanism. At the same time, the adaptive adjacency matrix and graph convolution network are used to dynamically capture the space-time dependencies, and the prediction accuracy is improved through residual connections and periodic corrections.
It improves the stability and accuracy of time series prediction, enhances the feature correlation and prediction accuracy of multivariate sequences, and ensures that the prediction results are more in line with the periodic changes of the data.
Smart Images

Figure CN119622319A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time series prediction, and specifically relates to a time series prediction method and device based on period embedding and multi-scale features. Background Art
[0002] Time series forecasting (TSF) plays an important role in weather forecasting, traffic forecasting, financial analysis, and energy management. From the perspective of feature decomposition, time series data usually contains trends, seasonality, periodicity, and other potential patterns. Especially in high-frequency volatile data, periodicity is crucial to improving the stability and accuracy of predictions. However, existing methods have limitations in dealing with complex dynamic patterns and are difficult to effectively adapt to the dynamic changes of data. Especially in long time series forecasting, the interweaving of trend, periodicity, and frequency domain features makes modeling extremely challenging.
[0003] Traditional methods such as autoregression (AR), exponential smoothing, and seasonal decomposition rely on manually set feature rules and are insufficient in capturing long-term dependencies and handling complex nonlinear dynamic changes. In recent years, deep learning methods have gradually been introduced into the field of time series prediction, such as convolutional neural networks (CNNs) that capture temporal patterns by extracting local features, long short-term memory networks (LSTMs) that model long-term dependencies through memory units, and gated recurrent units (GRUs) that reduce computational complexity while maintaining model capabilities. These methods have made significant progress in the long-series prediction task of transformer temperature data in industrial substations, but they are still insufficient in modeling complex dynamic periodic features.
[0004] In order to make up for the above defects, graph neural networks (GNNs) have attracted attention due to their ability to model spatial and temporal dependencies. Compared with traditional methods, GNNs effectively capture the causal relationship between time series nodes through a directed graph topology and dynamically adjust the adjacency relationship. However, most existing GNN methods focus on capturing static features, such as trends and seasonality, while having limited modeling capabilities for periodic and frequency domain features. For example, methods such as Autoformer (Auto-Correlation Mechanism) handle long-term dependencies through trend decomposition, but they perform poorly when faced with multi-frequency features and complex periodic patterns.
[0005] Modeling periodic features is another key challenge in time series forecasting, reflecting the long-term dependencies of data. Traditional periodic modeling methods such as Fourier transform and moving average decomposition work well in dealing with simple periodic patterns, but have limited performance in modeling complex periodic behaviors, especially when faced with highly nonlinear and multi-frequency features, and lack flexibility and adaptability.
[0006] In short, as the complexity of time series forecasting tasks increases, the limitations of traditional methods in capturing periodicity and frequency domain characteristics become increasingly apparent. Summary of the invention
[0007] In order to overcome the problems in the prior art, the present invention proposes a time series prediction method and device based on period embedding and multi-scale features.
[0008] The technical solution of the present invention to solve the above technical problems is as follows: In a first aspect, the present invention provides a time series prediction method based on period embedding and multi-scale features, comprising the following steps: S1: preprocessing the input historical observation time series of temperature changes of electric transformers in industrial substations, wherein the preprocessing includes overlapping and blocking the historical observation time series to obtain a plurality of subsequences of fixed length; S2: extract the periodic pattern in the subsequence and calculate the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features; S3: decomposing the non-periodic residual feature into a low-frequency component and a high-frequency component by discrete wavelet transform; S4: Calculate the weights according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features, and fuse the weighted optimized frequency domain features to obtain multi-scale features; S5: construct two embedding parameter matrices and generate an adaptive adjacency matrix; S6: Input the multi-scale features and the adaptive adjacency matrix into the graph convolutional network to obtain the output features of the graph convolutional network; S7: Perform residual connection between the output features of the graph convolutional network and the multi-scale features to calculate the fused features; S8: Generate the prediction result of the time series based on the fused features, that is, the predicted value of the time series; S9: Correct the predicted value of the time series; S10: Output the time series prediction results after periodic correction.
[0009] Furthermore, the overlapping block processing of the historical observation time series to obtain a number of subsequences of fixed length includes: extracting subsequences of length w from the historical observation time series in a sliding window manner, each window partially overlapping with the previous window, and obtaining a number of subsequences of fixed length.
[0010] Furthermore, the step S2 extracts the periodic pattern in the subsequence and calculates the non-periodic residual features of the subsequence to separate the periodic features from the non-periodic residual features, specifically including: S201: Construct a periodic embedding matrix P(t) based on the subsequence: ; Among them, t is the current time step, and τ is the set cycle length; S202: Based on the periodic embedding matrix, a non-periodic residual part is calculated to separate the periodic feature from the subsequence. The calculation formula of the non-periodic residual part is as follows: ; Among them, R(t) represents the non-periodic residual, and X(t) represents the original value of the input subsequence.
[0011] Furthermore, in S3, the non-periodic residual feature is decomposed into a low-frequency component and a high-frequency component by discrete wavelet transform, which specifically includes: The non-periodic residual R(t) is decomposed into multi-scales using discrete wavelet transform on the time series data, and the wavelet basis function is selected to convert the non-periodic residual R(t) into low-frequency components and high-frequency components. The low-frequency components represent the long-term trend and global change pattern of the time series, and the high-frequency components capture short-term fluctuations and detail features. The specific calculation formula is: ; in, represents the low-frequency wavelet basis function, Wavelet basis functions representing high frequencies; Represents the wavelet decomposition coefficients corresponding to the low-frequency wavelet basis function, The wavelet decomposition coefficients corresponding to the wavelet basis functions representing the high frequencies.
[0012] Furthermore, in S4, weights are calculated according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features, and the frequency domain features obtained by weighted optimization are fused to obtain multi-scale features, which specifically includes: S401: Performing statistical analysis on the channel values of the low-frequency component and the high-frequency component to obtain the energy value of each channel; ; in, and Respectively represent the significance of low-frequency channel j and high-frequency channel k, N is the length of each channel; S402: Based on the energy value of each channel, an attention weight is assigned to each channel and normalized; the channel-assigned attention weight calculation formula is: ; in, and are the normalized weights of low-frequency and high-frequency channels, respectively; S403: Apply the normalized attention weights to the low-frequency features and high-frequency features, and perform weighted optimization on the discrete wavelet transform results. The weighted optimization formula is: ; in, represents the low-frequency features after weighted optimization, Represents the high-frequency features after weighted optimization; S404: The weighted optimized low-frequency features are combined with the weighted optimized high-frequency features to obtain multi-scale features : .
[0013] Furthermore, in S5, two embedding parameter matrices are constructed to generate an adaptive adjacency matrix, which specifically includes: Construct two embedding parameter matrices and , represents the input embedding of the time series node, represents the output embedding of a time series node; The initial adjacency matrix is generated by the product of the two embedding parameter matrices : ; Use the Sigmoid function to normalize and get the final adaptive adjacency matrix : .
[0014] Furthermore, in S6, the multi-scale features and the adaptive adjacency matrix are input into the graph convolutional network to obtain the output features of the graph convolutional network, which specifically includes: S601: Symmetrically normalize the adaptive adjacency matrix to generate a propagation matrix , and its calculation formula is: ; Where D is the adjacency matrix The degree matrix is used to standardize the connection relationship of nodes; S602: Using the propagation matrix and multi-scale features , update the node features through graph convolution operation, the specific formula is: ; in, Represents the output features of the graph convolutional network, W is the learnable weight matrix of the graph convolution, and ReLU is the activation function.
[0015] Furthermore, in S7, the output features of the graph convolutional network are residually connected with the multi-scale features to calculate the fused features, which specifically includes: Using the residual connection mechanism, multi-scale features And the output features of the graph convolutional network Addition: ,in, Represents the fused features.
[0016] Furthermore, the predicted value of the time series is corrected in S9, specifically including: The predicted value of the time series is corrected using the periodic characteristic value, that is, the periodic characteristic value is added to the predicted value of the time series.
[0017] In a second aspect, the present invention further provides a time series prediction device based on period embedding and multi-scale features, the device comprising: a block module, a period embedding module, a wavelet decomposition module, a wavelet channel attention module, an adaptive adjacency matrix generation module, a graph convolution module, a residual connection module, a backbone network prediction module, a period feature correction module and an output module; The block module is used to preprocess the input historical observation time series of temperature changes of electric transformers in industrial substations, wherein the preprocessing includes overlapping block processing of the historical observation time series to obtain a plurality of subsequences of fixed length; The periodic embedding module is used to extract the periodic pattern in the subsequence and calculate the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features; The wavelet decomposition module is used to perform multi-scale wavelet decomposition on the non-periodic residual features to decompose them into low-frequency components and high-frequency components; The wavelet channel attention module is used to calculate weights according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features; the frequency domain features obtained by weighted optimization are fused to obtain multi-scale features; The adaptive adjacency matrix generation module is used to generate an adaptive adjacency matrix through learning; The graph convolution module is used to input multi-scale features and adaptive adjacency matrix into the graph convolution network to obtain graph convolution network output features; The residual connection module is used to perform residual connection on the output features of the graph convolutional network and the multi-scale features to calculate the fused features; The backbone network prediction module is used to generate a prediction result of the time series, that is, a predicted value of the time series, by using the fused features; The period feature correction module is used to correct the prediction result in combination with the period embedding feature; The output module is used to output the final prediction result after periodic correction.
[0018] Compared with the prior art, the present invention has the following technical effects: (1) The present invention separates periodic features from non-periodic features, so that the model can model the two types of features separately, thereby improving the stability and accuracy of the prediction; (2) The present invention decomposes the time series into low-frequency and high-frequency components through wavelet transform, and dynamically adjusts the weights in combination with the wavelet channel attention mechanism to strengthen the expression of key features and suppress noise; (3) The present invention uses adaptive adjacency matrix and graph convolutional network to dynamically capture implicit spatiotemporal dependencies in time series, enhance feature correlation, and improve the prediction accuracy of multivariate series; (4) The present invention retains the original features through residual connections to prevent information degradation. At the same time, periodic correction makes the prediction results more consistent with the periodic changes of data, further improving the prediction accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a flow chart of the time series prediction method based on period embedding and multi-scale features of the present invention; Figure 2 It is the prediction fitting diagram of the temperature variation curve of the electric transformer; Figure 3 It is a structural schematic diagram of the time series prediction method based on period embedding and multi-scale features of the present invention. DETAILED DESCRIPTION
[0021] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. The specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention.
[0022] In one embodiment of the present invention, referring to Figure 1-Figure 3 , provides a time series prediction method based on period embedding and multi-scale features, the method comprising: S1: preprocessing the input historical observation time series of temperature changes of electric transformers in industrial substations, wherein the preprocessing includes overlapping and blocking the historical observation time series to obtain a plurality of subsequences of fixed length; S2: extract the periodic pattern in the subsequence and calculate the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features; S3: decomposing the non-periodic residual feature into a low-frequency component and a high-frequency component by discrete wavelet transform; S4: Calculate weights according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features; fuse the frequency domain features obtained by weighted optimization to obtain multi-scale features; S5: construct two embedding parameter matrices and generate an adaptive adjacency matrix; S6: Input the multi-scale features and the adaptive adjacency matrix into the graph convolutional network to obtain the output features of the graph convolutional network; S7: Perform residual connection between the output features of the graph convolutional network and the multi-scale features to calculate the fused features; S8: Generate the prediction result of the time series using the fused features, that is, the predicted value of the time series; S9: Use the periodic characteristic value to correct the predicted value of the time series; S10: Output the time series prediction results after periodic correction.
[0023] The following is a detailed explanation of each of the above steps: S1: Preprocessing the input historical observation time series X of the temperature change of the electric transformer in the industrial substation, wherein the preprocessing includes overlapping block processing of the historical observation time series to obtain a number of subsequences of fixed length; the purpose is to retain the continuity of the time series and generate fixed-length subsequences with temporal context information.
[0024] Specifically, the preprocessing includes: extracting subsequences of length w from the historical observation time series in a sliding window manner, each window partially overlaps with the previous window, for example, the overlapping step length is s, so as to capture more local patterns and reduce boundary effects. The preprocessing enables the historical observation time series to be divided into multiple overlapping subsequences, laying the foundation for subsequent feature extraction and effectively avoiding information loss.
[0025] In this embodiment, a specific implementation of S1 may be: S101: Use a sliding window method to divide the historical observation time series X into blocks according to a fixed window length w and step length s, and extract subsequences centered on time step t. The range of each subsequence is ,in, , T is the total length of the time series data.
[0026] Multiple adjacent and overlapping subsequences are generated by means of sliding windows to ensure the continuity of the sequence and the retention of contextual information, thus laying the foundation for subsequent feature extraction.
[0027] S102: Divide the subsequence into a number of small segments of fixed length.
[0028] Each subsequence is centered at each time step t+i and is segmented with a fixed segment length l into several overlapping small segments. The range of each small segment is , where l represents the length of the small segment, i=−k,...,k, and k is determined by the length of the window after subdivision. This segmentation operation can capture the local feature patterns in the subsequence while reducing the errors that may be introduced by the change of window scale.
[0029] Specifically, the split operation is: ; In the above formula, represents a subsequence, , This operation captures the local patterns in the subsequence while reducing the error caused by scale changes.
[0030] S2: Extract the periodic patterns in the subsequences and calculate the non-periodic residual features of the subsequences to separate the periodic features and the non-periodic residual features.
[0031] The subsequences are input into the period embedding module, and the period length is defined according to different dataset characteristics, such as daily period, weekly period, etc., to extract the periodic patterns in the subsequences.
[0032] The periodic embedding module models the implicit periodic changes in the sequence by constructing a periodic embedding matrix. The periodic embedding matrix maps the time points of the input subsequence through learning parameters to capture the change pattern within the periodic time span. Next, the non-periodic residual part is calculated, that is, the periodic pattern is separated from the sequence to retain the residual information of the non-periodic part of the data. Through this operation, the periodic features are clearly separated from the non-periodic features, allowing the model to process these two types of features separately.
[0033] In this embodiment, a specific implementation of S2 may be: S201: construct a periodic embedding matrix based on the subsequence.
[0034] Input the subsequence into the period embedding module and set the period length according to the characteristics of the data set τ, periodically mapping the time step t of the input subsequence.
[0035] The periodic embedding module constructs the periodic embedding matrix P(t) through the following formula: ; Among them, t is the current time step and τ is the set cycle length.
[0036] The periodic embedding matrix captures the periodic variation pattern implicit in the sequence and describes the temporal characteristics under different periods through parameterized sine and cosine functions, laying the foundation for subsequent feature decomposition.
[0037] S202: Based on the periodic embedding matrix, a non-periodic residual part is calculated to separate the periodic features from the subsequence.
[0038] The calculation formula for the non-periodic residual is as follows: ; Among them, X(t) represents the original value of the input subsequence, and P(t) is the periodic eigenvalue generated by the periodic embedding matrix. Through the above calculation, the periodic pattern P(t) is removed from the original sequence, and only the non-periodic residual feature R(t) is retained. This operation ensures that the periodic features and non-periodic features are clearly separated, providing more independent feature input for subsequent modeling.
[0039] S3: Decomposing the non-periodic residual features into low-frequency components and high-frequency components through discrete wavelet transform.
[0040] Wavelet transform is a mathematical tool for multi-scale analysis that can decompose sequence signals into different frequency components. By using discrete wavelet transform (DWT), non-periodic residuals are decomposed into two main components: low-frequency components and high-frequency components. During the decomposition process, a suitable wavelet basis, such as Daubechies or Haar, is selected to ensure that the important patterns of the data are captured in the frequency domain while reducing the decomposition error. The purpose of this stage is to analyze the multi-scale characteristics of the data at the frequency domain level to provide support for subsequent feature enhancement and analysis.
[0041] In this embodiment, a specific implementation of S3 may be: The non-periodic residual R(t) is decomposed into multi-scales using discrete wavelet transform on the time series data, and the appropriate wavelet basis function is selected to convert the non-periodic residual R(t) into low-frequency components and high-frequency components. The low-frequency components represent the long-term trend and global change pattern of the time series, and the high-frequency components capture short-term fluctuations and detail features. The specific calculation formula is: ; in, represents the low-frequency wavelet basis function, Wavelet basis functions representing high frequencies; Represents the wavelet decomposition coefficients corresponding to the low-frequency wavelet basis function, The wavelet decomposition coefficients corresponding to the wavelet basis functions representing the high frequencies.
[0042] S4: Calculate weights according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features; fuse the frequency domain features obtained by weighted optimization to obtain multi-scale features.
[0043] After completing the wavelet decomposition, the low-frequency and high-frequency components are weighted according to their significance to strengthen the expression of important frequency domain features. Specifically, firstly, the channel values of the low-frequency and high-frequency components are statistically analyzed, and the energy value of each channel is calculated to measure its importance, such as the absolute mean or the sum of squares; based on the energy value, an attention weight is assigned to each channel, and the channel features that contribute more to the target task in the low-frequency and high-frequency are enhanced through weighted operations. The enhanced features not only retain the frequency domain information, but also explicitly emphasize the key patterns, allowing the model to focus on important feature areas.
[0044] In this embodiment, a specific implementation of S4 may be: S401: Perform statistical analysis on the channel values of the low-frequency component and the high-frequency component to obtain the energy value of each channel.
[0045] The energy calculation method includes the absolute value mean or square sum of the channels, which are expressed as: ; in, and They represent the significance of low-frequency channel j and high-frequency channel k respectively, and N is the length of each channel.
[0046] S402: Based on the energy value of each channel, an attention weight is assigned to each channel and normalized.
[0047] The attention weight allocation adopts the normalization method to ensure that the weight value range is between [0, 1], which is convenient for subsequent weighting operations. The attention weight calculation formula is: ; in, and are the normalized weights of low-frequency and high-frequency channels, respectively. These weights reflect the relative importance of each channel in feature expression, and channels with higher significance are given greater weights.
[0048] S403: Apply the normalized attention weights to the low-frequency features and high-frequency features, and perform weighted optimization on the discrete wavelet transform results.
[0049] The weighted operation formula is: ; in, represents the low-frequency features after weighted optimization, Represents the high-frequency features after weighted optimization.
[0050] Through weighted operations, channel features that contribute more to the target task can be strengthened while suppressing noise or unimportant features. The weighted optimized low-frequency and high-frequency features not only retain the information of the original frequency domain features, but also explicitly emphasize the key patterns, providing more effective input for subsequent model training.
[0051] S404: The weighted optimized low-frequency features are combined with the weighted optimized high-frequency features to obtain multi-scale features : .
[0052] S5: Construct two embedding parameter matrices and generate an adaptive adjacency matrix.
[0053] First, two parameter matrices are constructed by learning, and then the initial adjacency matrix is generated by the matrix product of the parameter matrices. In order to limit the values of the adjacency matrix to a reasonable range, the generated matrix is further normalized using the Sigmoid function to ensure that all values are in the interval [0, 1]. This adaptive adjacency matrix can dynamically capture the topological relationships between time series nodes, especially those nonlinear or implicit dependencies. The initial adjacency matrix is continuously optimized by learning, and finally an adaptive adjacency matrix that can reflect the feature dependency structure of the time series is generated.
[0054] In this embodiment, a specific implementation of S5 may be: S501: Construct two embedding parameter matrices and , represents the input embedding of the time series node, Represents the output embedding of the time series node; the initial adjacency matrix is generated by the product of the two embedding parameter matrices : ; To ensure that the matrix values are within a reasonable range, the Sigmoid function is used for normalization to obtain the final adaptive adjacency matrix : ; Adaptive adjacency matrix Able to dynamically capture implicit relationships between time series nodes and optimize the embedding matrix through training and , gradually and accurately reflecting the dependency structure of the time series and providing input support for subsequent graph convolutional network modeling.
[0055] S6: Input the multi-scale features and the adaptive adjacency matrix into the graph convolutional network to obtain the graph convolutional network output features.
[0056] Multi-scale features and adaptive adjacency matrices are input into a graph convolutional network (GCN) to capture the complex dependencies between time series nodes. First, the adaptive adjacency matrix is symmetric-normalized to generate a propagation matrix to ensure the stability of the information propagation process; then, the update of node features is calculated through graph convolution operations. Graph convolutional networks can propagate information through the adjacency matrix and model implicit long-term and short-term dependencies in time series.
[0057] In this embodiment, a specific implementation of S6 may be: S601: Symmetrically normalize the adaptive adjacency matrix to generate a propagation matrix , and its calculation formula is: ; Where D is the adjacency matrix The degree matrix is used to standardize the connection relationship of nodes and ensure the numerical stability of the information propagation process; S602: Using the propagation matrix and multi-scale features , update the node features through graph convolution operation, the specific formula is: ; Among them, W is the learnable weight matrix of graph convolution, and ReLU is the activation function. This operation propagates information between nodes through adjacency relationships, models the long-term and short-term dependencies of time series, and provides deeper feature representation for subsequent tasks.
[0058] S7: Output features of graph convolutional network With multi-scale features Perform residual connection and calculate the fused features.
[0059] In order to ensure the integrity of the model and prevent information loss during feature processing, a residual connection mechanism is used to convert multi-scale features into And the output features of the graph convolutional network Addition: ′, The residual connection of the fused features is crucial in the deep structure of the model. It can alleviate the degradation problem of information in multi-layer propagation, while retaining the key information of the original features and improving the learning stability of the model.
[0060] S8: Generate the prediction result of the time series based on the fused features, that is, the predicted value of the time series.
[0061] The fused feature R''' is input into the backbone network for final prediction. If a multi-layer perceptron (MLP) is used, the feature pattern is further extracted through multi-layer nonlinear mapping; if a linear layer is used, the mapping from feature to predicted value is directly completed. The final output is the time series prediction result Y, and the goal is to generate accurate prediction values based on the high-quality features extracted previously.
[0062] S9: Use the periodic characteristic value to correct the predicted value of the time series.
[0063] After the backbone network outputs the prediction result Y, the prediction result is corrected using the periodic feature P. The calculation formula is: Y ' = Y + P; This correction operation can reintroduce periodic patterns into the forecast results, ensuring that the model can capture the periodic changes in the data while retaining the key trends and detailed characteristics in the time series.
[0064] The final time series forecast result Y' after periodic correction is output. This result combines multi-scale frequency domain information, periodic features, and dependencies modeled by graph convolutional networks, and can achieve excellent performance in prediction accuracy and pattern expression ability.
[0065] S10: Output the time series prediction result Y′ after periodic correction.
[0066] This result combines multi-scale frequency domain information, the periodic characteristics of time series, and dependencies modeled by graph convolutional networks, and can achieve excellent results in prediction accuracy and data pattern preservation.
[0067] Reference Figure 2 ,When predicting the temperature of a long sequence of electric transformer, the present invention can also ensure the accuracy and effective fitting effect.
[0068] Based on the same inventive concept, an embodiment of the present invention also provides a time series prediction device based on period embedding and multi-scale features for implementing the above-mentioned time series prediction method based on period embedding and multi-scale features. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more system embodiments provided below can refer to the above limitations on a time series prediction method based on period embedding and multi-scale features, which will not be repeated here.
[0069] In this embodiment, a time series prediction device based on period embedding and multi-scale features is provided, and the device includes: a blocking module, a period embedding module, a wavelet decomposition module, a wavelet channel attention module, an adaptive adjacency matrix generation module, a graph convolution module, a residual connection module, a backbone network prediction module, a period feature correction module and an output module.
[0070] The block module is used to preprocess the input historical observation time series of the temperature change of the electric transformer in the industrial substation, and the preprocessing includes overlapping block processing of the historical observation time series to obtain a number of subsequences of fixed length. Specifically, the historical observation time series X is block processed according to the fixed window length w and step length s, and the time series is divided into subsequences with overlapping parts, and multiple overlapping subsequences of fixed length are generated to ensure the continuity of the sequence and provide context information support for subsequent feature extraction.
[0071] The periodic embedding module is used to extract the periodic patterns in the subsequences and calculate the non-periodic residual features of the subsequences to separate the periodic features from the non-periodic residual features. Specifically, the period length τ is defined according to the characteristics of the time series, and the periodic features of the time series are modeled using the periodic embedding matrix P(t); the periodic embedding matrix maps the time step t through parameterized sine and cosine functions, captures the periodic patterns, and generates the non-periodic residual features R=X−P to separate the periodic features from the non-periodic features.
[0072] The wavelet decomposition module is used to perform multi-scale wavelet decomposition on the non-periodic residual feature R, decomposing it into low-frequency components and high-frequency components. Specifically, through discrete wavelet transform (DWT), the non-periodic residual feature R is decomposed into low-frequency components cA and high-frequency components cD. The low-frequency component cA reflects the long-term trend and global change pattern of the time series, and the high-frequency component cD represents local fluctuations and detail features; the frequency domain features obtained by weighted optimization are fused to obtain multi-scale features.
[0073] The wavelet channel attention module is used to calculate the weights according to the importance of low-frequency components and high-frequency components, and generate weighted optimized frequency domain features. Specifically, by performing statistical analysis on the low-frequency component cA and the high-frequency component cD, the energy value of each channel (such as the absolute value mean or square sum) is calculated, and the channel attention weight is generated according to the energy value. and ; Apply attention weights to the low-frequency component cA and the high-frequency component cD to generate weighted optimized frequency domain features.
[0074] Adaptive adjacency matrix generation module, used to generate adaptive adjacency matrix through learning The module constructs two embedding parameter matrices and , calculate the initial adjacency matrix ; Through the Sigmoid function Normalize and generate an adaptive adjacency matrix with a value range of [0, 1] , to dynamically capture the topological relationships between time series nodes.
[0075] Graph convolution module, used to transform multi-scale features and the adaptive adjacency matrix Input the graph convolutional network (GCN) to obtain the output features of the graph convolutional network and capture the complex dependencies between time series nodes. Specifically, first Perform symmetric normalization to generate the propagation matrix , and then calculate the feature update through the graph convolution operation: .
[0076] Residual connection module, used to output features of graph convolutional network With multi-scale features Perform residual connection and calculate the fused features This module is able to alleviate the information degradation problem in deep networks while retaining key original features.
[0077] The backbone network prediction module is used to generate the prediction results of the time series using the fused features, that is, the predicted value of the time series. Specifically, the fused features R''' are input into the backbone network for final prediction. The backbone network can be a multi-layer perceptron (MLP) or a linear layer: if it is an MLP, the deep features are further extracted through nonlinear transformation; if it is a linear layer, the mapping from features to predicted values is directly completed. The prediction result Y of the time series is output.
[0078] The period feature correction module is used to correct the prediction result Y by combining the period embedding feature. The final output value is calculated by adding the period feature P back to the prediction result: Y′=Y+P.
[0079] This module ensures that the model output reflects the periodicity of the data while preserving key trends in the time series.
[0080] The output module is used to output the final prediction result Y' after periodic correction. This result combines multi-scale frequency domain information, periodic features, and dependencies modeled by graph convolutional networks, and has significant advantages in prediction accuracy and data pattern retention.
[0081] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A time series prediction method based on period embedding and multi-scale features, characterized in that: The following steps are involved: S1: preprocessing the input historical observation time series of temperature changes of electric transformers in industrial substations, wherein the preprocessing includes overlapping and blocking the historical observation time series to obtain a plurality of subsequences of fixed length; S2: extract the periodic pattern in the subsequence and calculate the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features; S3: decomposing the non-periodic residual feature into a low-frequency component and a high-frequency component by discrete wavelet transform; S4: Calculate the weights according to the importance of low-frequency components and high-frequency components, generate weighted optimized frequency domain features, and fuse the weighted optimized frequency domain features to obtain multi-scale features; S5: construct two embedding parameter matrices and generate an adaptive adjacency matrix; S6: Input the multi-scale features and the adaptive adjacency matrix into the graph convolutional network to obtain the output features of the graph convolutional network; S7: Perform residual connection between the output features of the graph convolutional network and the multi-scale features to calculate the fused features; S8: Generate the prediction result of the time series based on the fused features, that is, the predicted value of the time series; S9: Correct the predicted value of the time series; S10: Output the time series prediction results after periodic correction.
2. According to claim 1, a time series prediction method based on period embedding and multi-scale features is characterized in that: The overlapping block processing of the historical observation time series to obtain a plurality of subsequences of fixed lengths includes: extracting subsequences of length w from the historical observation time series in a sliding window manner, each window partially overlapping with the previous window, and obtaining a plurality of subsequences of fixed lengths.
3. The time series prediction method based on period embedding and multi-scale features according to claim 1 is characterized in that: S2 extracts the periodic pattern in the subsequence and calculates the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features, specifically including: S201: Construct a periodic embedding matrix P(t) based on the subsequence: ; Among them, t is the current time step, and τ is the set cycle length; S202: Based on the periodic embedding matrix, a non-periodic residual part is calculated to separate the periodic feature from the subsequence. The calculation formula of the non-periodic residual part is as follows: ; Among them, R(t) represents the non-periodic residual, and X(t) represents the original value of the input subsequence.
4. The time series prediction method based on period embedding and multi-scale features according to claim 3 is characterized in that: In S3, the non-periodic residual feature is decomposed into a low-frequency component and a high-frequency component by discrete wavelet transform, which specifically includes: The non-periodic residual R(t) is decomposed into multi-scales using discrete wavelet transform on the time series data, and the wavelet basis function is selected to convert the non-periodic residual R(t) into low-frequency components and high-frequency components. The low-frequency components represent the long-term trend and global change pattern of the time series, and the high-frequency components capture short-term fluctuations and detail features. The specific calculation formula is: ; in, represents the low-frequency wavelet basis function, Wavelet basis functions representing high frequencies; Represents the wavelet decomposition coefficients corresponding to the low-frequency wavelet basis function, The wavelet decomposition coefficients corresponding to the wavelet basis functions representing high frequencies.
5. The time series prediction method based on period embedding and multi-scale features according to claim 4 is characterized in that: In S4, weights are calculated according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features, and the frequency domain features obtained by weighted optimization are fused to obtain multi-scale features, which specifically includes: S401: Performing statistical analysis on the channel values of the low-frequency component and the high-frequency component to obtain the energy value of each channel; ; in, and Respectively represent the significance of low-frequency channel j and high-frequency channel k, N is the length of each channel; S402: Based on the energy value of each channel, an attention weight is assigned to each channel and normalized; the channel-assigned attention weight calculation formula is: ; in, and are the normalized weights of low-frequency and high-frequency channels, respectively; S403: Apply the normalized attention weights to the low-frequency features and high-frequency features, and perform weighted optimization on the discrete wavelet transform results. The weighted optimization formula is: ; in, represents the low-frequency features after weighted optimization, Represents the high-frequency features after weighted optimization; S404: The weighted optimized low-frequency features are combined with the weighted optimized high-frequency features to obtain multi-scale features : 。 6. The time series prediction method based on period embedding and multi-scale features according to claim 5 is characterized in that: In S5, two embedding parameter matrices are constructed to generate an adaptive adjacency matrix, which specifically includes: Construct two embedding parameter matrices and , represents the input embedding of the time series node, represents the output embedding of a time series node; The initial adjacency matrix is generated by the product of the two embedding parameter matrices : ; Use the Sigmoid function to normalize and get the final adaptive adjacency matrix : 。 7. The time series prediction method based on period embedding and multi-scale features according to claim 6 is characterized in that: In S6, the multi-scale features and the adaptive adjacency matrix are input into the graph convolutional network to obtain the output features of the graph convolutional network, which specifically includes: S601: Symmetrically normalize the adaptive adjacency matrix to generate a propagation matrix , and its calculation formula is: ; Where D is the adjacency matrix The degree matrix is used to standardize the connection relationship of nodes; S602: Using the propagation matrix and multi-scale features , update the node features through graph convolution operation, the specific formula is: ; in, Represents the output features of the graph convolutional network, W is the learnable weight matrix of the graph convolution, and ReLU is the activation function.
8. The time series prediction method based on period embedding and multi-scale features according to claim 7 is characterized in that: In S7, the output features of the graph convolutional network are residually connected with the multi-scale features to calculate the fused features, which specifically includes: Using the residual connection mechanism, multi-scale features And the output features of the graph convolutional network Addition: ,in, Represents the fused features.
9. The time series prediction method based on period embedding and multi-scale features according to claim 8 is characterized in that: The predicted value of the time series is corrected in S9, specifically including: The predicted value of the time series is corrected using the periodic characteristic value, that is, the periodic characteristic value is added to the predicted value of the time series.
10. A time series prediction device based on period embedding and multi-scale features, characterized in that: The device comprises: a block module, a period embedding module, a wavelet decomposition module, a wavelet channel attention module, an adaptive adjacency matrix generation module, a graph convolution module, a residual connection module, a backbone network prediction module, a period feature correction module and an output module; The block module is used to preprocess the input historical observation time series of temperature changes of electric transformers in industrial substations, wherein the preprocessing includes overlapping block processing of the historical observation time series to obtain a plurality of subsequences of fixed length; The periodic embedding module is used to extract the periodic pattern in the subsequence and calculate the non-periodic residual features of the subsequence to separate the periodic features and the non-periodic residual features; The wavelet decomposition module is used to perform multi-scale wavelet decomposition on the non-periodic residual features to decompose them into low-frequency components and high-frequency components; The wavelet channel attention module is used to calculate weights according to the importance of low-frequency components and high-frequency components to generate weighted optimized frequency domain features; the frequency domain features obtained by weighted optimization are fused to obtain multi-scale features; The adaptive adjacency matrix generation module is used to generate an adaptive adjacency matrix through learning; The graph convolution module is used to input multi-scale features and adaptive adjacency matrix into the graph convolution network to obtain graph convolution network output features; The residual connection module is used to perform residual connection on the output features of the graph convolutional network and the multi-scale features to calculate the fused features; The backbone network prediction module is used to generate a prediction result of the time series, that is, a predicted value of the time series, by using the fused features; The period feature correction module is used to correct the prediction result in combination with the period embedding feature; The output module is used to output the final prediction result after periodic correction.
Citation Information
Patent Citations
Multivariable time series prediction method for multi-scale adaptive graph learning
CN114169394A
Convolutional sparse self-attention-based irrigation area water demand estimation method, equipment and medium
CN118395108A
Multi-period time sequence anomaly detection method based on space-time diagram neural network
CN118939699A
Time sequence data modeling method for body-equipped agent based on frequency domain learning
CN119357642A
Traffic flow forecasting method based on multi-mode dynamic residual graph convolution network
US20230334981A1
Cited By
Time sequence prediction method based on FFT and interactive depth separable convolution
CN120030284A
Hybrid model-based power transformer periodic time sequence prediction method and multivariable periodic time sequence prediction method
CN120493181A
Urban traffic flow prediction method based on multiple time-space characteristics of road network
CN120913415A
A city traffic flow prediction method based on multiple space-time characteristics of a road network
CN120913415B
Air quality prediction method, device and equipment based on multi-modal space-time fusion and medium
CN121278686A