Long sequence prediction method based on time-varying period encoding and hierarchical channel fusion
By employing time-varying periodic encoding and hierarchical channel fusion methods, the problem of modeling time-varying periodicity and channel correlation in long-term time series forecasting was solved, enabling adaptive capture and dynamic modeling of seasonal components and improving forecast accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG NORMAL UNIV
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-23
AI Technical Summary
Existing models struggle to adaptively model time-varying periodic features and dynamically capture the strong or weak correlations between channels in long-term time series forecasting, resulting in limited model flexibility and adaptability.
By employing the time-varying periodicity coding (TVPE) and hierarchical channel fusion (HCFM) methods, time-varying periodic parameters and amplitudes are dynamically generated through a periodic evolution network. By combining global channel dependency and local channel interaction modeling, adaptive periodic feature capture and dynamic correlation modeling of seasonal components are achieved.
It significantly improves the accuracy of long-term predictions, dynamically adapts to cyclical changes, captures complex dependencies between channels, and enhances the model's predictive performance.
Smart Images

Figure CN121744245B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion. Background Technology
[0002] Multivariate long-term time series forecasting aims to accurately predict future time steps using historical information from multiple related variables, and is crucial for decision-making in various fields such as energy management, weather forecasting, and traffic flow prediction. Deep learning models based on RNNs, CNNs, MLPs, and Transformers have been widely applied to multivariate long-term time series forecasting tasks.
[0003] As one of the most common decomposition methods in time series analysis, seasonal trend decomposition divides the original sequence into trend, seasonal, periodic, and residual components, making it easier to predict. It can be achieved using filters or exponential smoothing. Autoformer was the first to introduce the decomposition idea into a deep learning model, proposing a sequence decomposition module as a basic module to extract the seasonal and trend components of the input sequence. MICN is a CNN-based method that employs multi-scale hybrid seasonal-trend decomposition. After decomposing the input sequence, the model integrates global and local context to improve prediction accuracy. TimeMixer is an MLP-based model that uses a decomposable multi-scale hybrid approach. It uses sequence decomposition blocks to decompose multi-scale time series into multiple seasonal and trend components, utilizing the multi-scale past information after mixing seasonal and trend components to predict future values, solving the core problem of the difficulty in modeling periodicity in time series. However, most current research directly uses the decomposed components for prediction, lacking in-depth exploration of the inherent and fundamentally different characteristics of trend and seasonal components.
[0004] However, these methods still have limitations in key modeling stages:
[0005] In periodic modeling, explicit periodic modeling is a key approach to improving long-term prediction performance. Existing models employ the following periodic modeling schemes: TimesNet detects the dominant period in the input sequence using Fast Fourier Transform (FFT) and solidifies it into the structural parameters of a two-dimensional convolution; FEDformer performs frequency domain transformations based on predefined Fourier basis functions, whose frequencies remain fixed throughout training; SCINet constructs a multi-resolution framework using a fixed downsampling rate and filter bank to capture periodic patterns at a preset time scale; CycleNet uses a preset period length to control the rhythm of cyclic shift operations, thus explicitly modeling periodic dependencies. Although these methods have achieved significant results by introducing periodic priors, they all suffer from a fundamental limitation: the periodic parameters they rely on are either manually preset or globally learnable static parameters, which cannot be dynamically adjusted over time after model training. This rigid assumption makes it difficult for the model to adapt to the dynamic changes in periodicity in real-world scenarios, severely limiting the model's flexibility and adaptability.
[0006] In channel modeling, the correlations between channels are neither completely independent nor completely dependent, but vary in strength. However, current common methods for constructing channel correlations, such as Channel Independence (CI) and Channel Dependency (CD), fail to model these varying degrees of correlation. CI processes each channel independently, completely ignoring potential inter-channel relationships and resulting in the loss of necessary cross-channel interaction information. CD, on the other hand, treats all channels as a unified whole for joint modeling, theoretically fully exploring inter-channel dependencies. However, assigning the same weight to all channel interactions and applying uniform weight parameters to all channels leads to a complete disregard for the strength of channel correlations. Both existing strategies have certain drawbacks, preventing the model from focusing on key dependencies and severely impacting predictive performance.
[0007] Therefore, how to provide a long-term series prediction method that can adaptively model time-varying periodic features and dynamically capture the strong and weak correlations between channels is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0008] In view of the above problems, the present invention is proposed to provide a long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion to overcome or at least partially solve the above problems.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] This invention provides a long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion, comprising the following steps:
[0011] S1: Decompose the input multivariate time series into trend components and seasonal components;
[0012] S2: Map the trend components to obtain the trend output;
[0013] S3: Perform time-varying periodic encoding and hierarchical channel fusion processing on the seasonal components to obtain seasonal output. The time-varying periodic encoding is used to adaptively capture the time-varying periodic features in the seasonal components, and the hierarchical channel fusion processing is used to dynamically capture the correlation differences between different channels in the seasonal components.
[0014] S4: Based on the trend output and the seasonal output, generate the prediction results for the future time step.
[0015] Preferably, step S1 includes:
[0016] The input multivariate time series is smoothed using an exponential moving average algorithm to obtain the trend component;
[0017] The seasonal component is obtained by subtracting the input multivariate time series from the trend component.
[0018] Preferably, the step of performing time-varying periodic encoding processing on the seasonal components in step S3 includes:
[0019] S311: Based on time indexing, L sets of time-varying periodic parameters and corresponding time-varying amplitudes are dynamically generated through a periodic evolution network, where L > 1;
[0020] S312: Based on the time-varying periodic parameters and the time-varying amplitude, construct periodic basis functions to generate time-varying periodic codes;
[0021] S313: Add the time-varying periodic code to the seasonal component to obtain the periodically enhanced seasonal component.
[0022] Preferably, step S311 includes:
[0023] S3111: The periodic evolution network adopts a multilayer perceptron structure, including L parallel first periodic encoding units; the first periodic encoding unit receives the time index vector as input, and obtains the time-varying periodic parameter after processing by multiple sets of linear layers and activation functions, wherein the value of the time-varying periodic parameter is greater than the preset minimum period constraint;
[0024] S3112: The periodic evolution network further includes a second periodic coding unit; the second periodic coding unit receives the time-varying periodic parameters as input, and obtains the corresponding time-varying amplitude after processing by a linear layer and an activation function.
[0025] Preferably, step S312 includes:
[0026] S3121: The periodic basis functions include sine basis functions and cosine basis functions. The sine basis functions and cosine basis functions are concatenated to obtain a local periodic feature vector.
[0027] S3122: Using linear mapping to Each periodic feature vector is projected onto the hidden feature space and then aggregated. The time-varying periodic code is obtained by outputting the aggregated feature vector through the output projection.
[0028] Preferably, the step of performing hierarchical channel fusion processing on the seasonal components in step S3 includes:
[0029] S321: Perform global channel dependency modeling on the seasonal components after time-varying periodic encoding to obtain a global dependency representation;
[0030] S322: Local channel interaction modeling is performed on the seasonal components after time-varying periodic encoding to obtain the probability that each channel belongs to different clusters, which is used to indicate the correlation strength between channels;
[0031] S323: Using the probability as a fusion weight, the global dependency representation is weighted on each cluster, and the weighted results of all clusters are fused to obtain the seasonal output.
[0032] Preferably, step S321 includes:
[0033] S3211: Divide the seasonal components after time-varying periodic encoding into sequence blocks;
[0034] S3212: Map the sequence block to the latent space, and introduce global sequence block embedding and positional encoding to obtain the sequence block embedding matrix;
[0035] S3213: Perform dual attention calculations of standard attention and hidden attention in the channel dimension on the embedded representation, and input the two attention outputs into a parallel feedforward neural network for feature fusion to generate the global dependency representation.
[0036] Preferably, step S322 includes:
[0037] S3221: Initialize multiple learnable clustering embeddings;
[0038] S3222: Map the sequence of each channel in the seasonal component after time-varying periodic encoding processing to channel embedding;
[0039] S3223: Calculate the similarity between each channel embedding and multiple learnable cluster embeddings to obtain the probability that each channel belongs to each cluster.
[0040] Preferably, step S322 further includes:
[0041] S3224: Based on the probability, update the clustering embedding through a cross-attention mechanism, and recalculate the probability of each channel belonging to each cluster based on the updated clustering embedding, and obtain the latest probability as the fusion weight.
[0042] Preferably, the step of weighted fusion of the global dependency representation based on the probability includes: step S323 includes:
[0043] For each cluster, the global dependency representation is weighted using the probability corresponding to that cluster and then processed by the corresponding feedforward neural network;
[0044] All clustering results are fused along the channel dimension to obtain the fused seasonal component as the seasonal output.
[0045] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0046] This invention employs a clear decomposition-fusion paradigm as its foundation, decomposing the input multivariate time series into two main components: trend and seasonality. The trend component represents slow and smooth movements with weak channel correlation; the seasonal component, on the other hand, contains rapidly changing, periodic micro-fluctuations, with stronger and more dynamic channel correlation within it.
[0047] For the trend component, this invention uses a lightweight MLP for smooth modeling, ensuring the stability and efficiency of the overall framework.
[0048] For seasonal components, simply decomposing them is insufficient; a targeted solution is needed. Based on this, this invention proposes a precise modeling of the periodic characteristics and channel correlations of seasonal components in PCFM, significantly improving the accuracy of long-term predictions on multiple benchmark datasets. Specifically:
[0049] In terms of periodic modeling, this invention proposes Time-Varying Periodicity Encoding (TVPE), which introduces a periodic evolution network to transform periodic parameters from manually preset or globally learnable static scalars into time-varying periodic parameters, and simultaneously learns the corresponding time-varying amplitude weights. TVPE constructs multiple parallel periodic encoding units through multiple sets of time-varying periodic parameters and amplitudes, and fuses multi-scale periodic information through a learnable weighting mechanism, thereby achieving adaptive modeling of complex time-varying periods in time series.
[0050] In terms of channel modeling, this invention proposes Hierarchical Channel Fusion (HCFM), which abandons the rigid "either / or" choice and instead adopts a hierarchical collaborative mechanism, arguing that any local judgment detached from the global context may be one-sided. Therefore, HCFM constructs a global dependency representation through a channel-dimensional attention mechanism, providing a comprehensive channel relationship context for subsequent hierarchical fusion; on the other hand, it utilizes learnable dynamic clustering to locally refine and group channels, calculating dynamic fusion weights. Finally, the global dependency representation is weighted and fused according to the fusion weights, achieving differentiated weighting based on the strength of channel correlation, thereby dynamically capturing the strength of correlations between channels and realizing fine-grained modeling of channel correlations. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0052] Figure 1 A PCFM model architecture diagram provided for embodiments of the present invention;
[0053] Figure 2 A TVPE flowchart provided for embodiments of the present invention;
[0054] Figure 3 HCFM flowchart provided for embodiments of the present invention;
[0055] Figure 4 A diagram illustrating the channel-dimensional attention principle for global channel dependency modeling provided in this embodiment of the invention;
[0056] Figure 5 A schematic diagram of channel clustering principle for local channel interaction modeling provided in this embodiment of the invention;
[0057] Figure 6 A schematic diagram illustrating the visualization results of TVPE on the ETTh1 and Weather datasets provided in an embodiment of the present invention;
[0058] Figure 7 This is a visualization diagram of the inter-channel Pearson coefficient provided in an embodiment of the present invention;
[0059] Figure 8 The visualization results of the channel clustering probability distribution provided in the embodiments of the present invention. Detailed Implementation
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] This invention discloses a long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion, comprising the following steps:
[0062] S1: Decompose the input multivariate time series into trend components and seasonal components;
[0063] S2: Map the trend components to obtain the trend output;
[0064] S3: Perform time-varying periodic encoding and hierarchical channel fusion processing on the seasonal components to obtain the seasonal output. The time-varying periodic encoding is used to adaptively capture the time-varying periodic features in the seasonal components, and the hierarchical channel fusion is used to dynamically capture the correlation differences between different channels in the seasonal components.
[0065] S4: Generate prediction results for future time steps based on trend output and seasonal output.
[0066] This invention is used to perform time series forecasting tasks. Given a multivariate time series input... The time series forecasting task is to predict the future F time steps. Where N is the number of variables and T represents the length of the review window, the goal of this embodiment of the invention is to make the predicted value Closely approximating ,in Represents the actual value.
[0067] To better understand the hidden patterns in time-series data, a periodic-aware channel fusion model (PCFM) is proposed, such as... Figure 1 As shown. Multivariate time series. First, the seasonal components are obtained through EMA decomposition. and trend components In this context, "Seasonal" and "Trend" represent season and trend, respectively; The results after time-varying periodic encoding and hierarchical channel fusion module and The results of the linear mapping are merged and then fed into the linear layer for output prediction, thus obtaining the prediction result. .
[0068] In one embodiment, step S1 includes:
[0069] The exponential moving average algorithm is used to smooth the input multivariate time series to obtain the trend component;
[0070] The seasonal component is obtained by subtracting the input multivariate time series from the trend component.
[0071] The specific execution process of this embodiment is as follows:
[0072] For the input sequence Seasonal trend decomposition is performed using the Exponential Moving Average (EMA), an exponential smoothing method that assigns greater weight to the most recent data points while smoothing out older data. This exponential weighting scheme allows the EMA to respond more quickly to changes in the underlying trend of the time series than other seasonal trend decomposition methods, without needing to fill in duplicate values.
[0073] Data starting from time t=0 Corresponding EMA points It is expressed as follows:
[0074]
[0075] in, Represents the smoothing factor. After EMA decomposition, the trend components were obtained. and seasonal portion , means as follows:
[0076]
[0077] .
[0078] In one embodiment, considering the smoother and more predictable nature of the trend portion, step S2 uses a simple MLP (Multilayer Perceptron) for projection to obtain the output of the trend portion. The formula is as follows:
[0079]
[0080] in, , , , and All of them are learnable parameters.
[0081] In one embodiment, for the seasonal components obtained after EMA decomposition In seasonal quantities The branch introduces the TVPE and HCFM modules. TVPE dynamically adjusts the period parameters and amplitude through a periodic evolution network, then adaptively captures the dominant time-varying periodic patterns in the data using multiple parallel periodic encoding units. HCFM, on the other hand, extracts complex dependencies between channels at both global and local levels through a strategy combining global dependency awareness and local dynamic clustering. Working together, these two modules endow the model with powerful modeling capabilities for complex time-varying periods and channel correlations in seasonal components.
[0082] The specific execution steps of the TVPE module and HCFM module are explained below:
[0083] To adaptively capture time-varying periodic features in the seasonal component, the TVPE module utilizes a periodic evolution network. Multiple sets of time-varying periodic parameters and time-varying amplitudes are generated to drive waveform generation and intensity adjustment of multiple parallel periodic coding units. Then, a weighted fusion strategy is used to integrate the multi-period codes, ultimately achieving dynamic capture of complex time-varying periodic patterns, such as... Figure 2 As shown. In one embodiment, the step of performing time-varying periodic encoding processing on the seasonal components in step S3 includes:
[0084] S311: Based on time indexing, L sets of time-varying periodic parameters and corresponding time-varying amplitudes are dynamically generated through a periodic evolution network, where L > 1;
[0085] S312: Based on time-varying periodic parameters and time-varying amplitude, construct periodic basis functions to generate time-varying periodic codes;
[0086] S313: Add the time-varying periodic code to the seasonal component to obtain the periodically enhanced seasonal component.
[0087] In this embodiment, step S311 includes:
[0088] S3111: Periodic Evolution Network The periodic evolution network adopts a multilayer perceptron structure, including L parallel first periodic coding units; the first periodic coding unit receives the time index vector as input, and obtains the time-varying periodic parameter after processing by multiple sets of linear layers and activation functions, wherein the value of the time-varying periodic parameter is greater than the preset minimum period constraint;
[0089] S3112: The periodic evolution network also includes a second periodic coding unit; the second periodic coding unit receives time-varying periodic parameters as input, and obtains the corresponding time-varying amplitude after processing by a linear layer and an activation function.
[0090] The specific execution process of this embodiment is as follows:
[0091] Let the input be seasonal components. First, construct a set of time index vectors. ,in TVPE's core component, the cyclic evolution network. The multilayer perceptron architecture is employed, and its function is to process the time index vector. As input, time-varying period parameters are dynamically generated. , means as follows:
[0092]
[0093]
[0094]
[0095] in, and For the learnable parameters of each layer, For the output results of each layer, and ( ) is the activation function. This is a minimum period constraint used to avoid numerical instability caused by excessively small periods. For the ... Each time-varying period parameter is represented in this paper as: Furthermore, to enhance the model's adaptive modeling of different periodic intensities, a periodic evolution network is used. An amplitude adjustment mechanism was also introduced, as shown below:
[0096]
[0097] in, Indicates the first The time-varying amplitude of each time-varying periodic component This represents the sigmoid activation function. and These are learnable parameters.
[0098] In this embodiment, step S312 includes:
[0099] S3121: Periodic basis functions include sine basis functions and cosine basis functions. The sine basis functions and cosine basis functions are concatenated to obtain local periodic eigenvectors.
[0100] S3122: Using linear mapping to Each periodic feature vector is projected onto the hidden feature space and then aggregated. The time-varying periodic code is obtained by output projection after aggregation.
[0101] The specific execution process of this embodiment is as follows:
[0102] Based on the learned time-varying period parameters With time-varying amplitude TVPE generates sinusoidal basis functions for it. Sum and cosine basis functions And concatenate them into a local periodic feature vector. :
[0103]
[0104]
[0105] .
[0106] Subsequently, the obtained linear mapping is used to... The periodic feature vectors are projected onto the hidden feature space, and after aggregation, the final time-varying periodic code is obtained through the output projection, as shown below:
[0107]
[0108] in, and Both are learnable parameter matrices.
[0109] Finally, the time-varying periodic encoding is performed. Compared with the original seasonal portion Adding them together yields the seasonally enhanced component. , means as follows:
[0110] .
[0111] To effectively model the complex dependencies between channels in the seasonal components, this paper designs a hierarchical channel fusion module (HCFM). This module constructs a hierarchical and collaborative channel modeling mechanism by fusing global channel dependencies and local channel interactions, ultimately achieving accurate modeling of channel correlations in the seasonal components. The HCFM architecture diagram is shown below. Figure 3 As shown. In one embodiment, the step S3 of performing hierarchical channel fusion processing on the seasonal components includes:
[0112] S321: Perform global channel dependency modeling on the seasonal components after time-varying periodic encoding to obtain a global dependency representation;
[0113] S322: Local channel interaction modeling is performed on the seasonal components after time-varying periodic encoding to obtain the probability that each channel belongs to different clusters, which is used to indicate the correlation strength between channels;
[0114] S323: Using probability as the fusion weight, the global dependency representation is weighted on each cluster, and the weighted results of all clusters are fused to obtain the seasonal output.
[0115] In this embodiment, global channel dependency modeling is first performed. The purpose is to construct a unified global representation capable of comprehensively perceiving the interaction relationships between channels, thereby providing high-quality, structured, and semantically unified input for subsequent hierarchical fusion. Step S321 includes:
[0116] S3211: Divide the seasonal components after time-varying periodic encoding into sequence blocks;
[0117] S3212: Map the sequence blocks to the latent space and introduce global sequence block embedding and positional encoding to obtain the sequence block embedding matrix;
[0118] S3213: Perform dual attention calculations of standard attention and hidden attention in the channel dimension on the embedded representation, and input the outputs of the two attentions into a parallel feedforward neural network for feature fusion to generate a global dependency representation.
[0119] The specific execution process of this embodiment is as follows:
[0120] First, the concept of sequence patches is used to enhance the seasonal components with periodicity. Divided into overlapping sequence blocks ,in Number of sequence blocks and These are the step size and the sequence block length, respectively.
[0121] Then, a trainable linear projection is used. The letter 'p' stands for the first letter of projection to indicate the meaning of projection. It maps the patch to a D-dimensional latent space. To introduce global semantic information, this paper borrows the idea of a static covariate encoder and adds a global sequence block embedding. and position encoding This is used to monitor the temporal order of sequence blocks, where pat is an abbreviation for patch to indicate the meaning of sequence block, and pos is an abbreviation for position to indicate the meaning of position encoding; global sequence block embedding. and position encoding All were obtained through random initialization.
[0122] Finally, the sequence block embedding matrix was obtained. Here, "emb" is an abbreviation for "embedded" to represent the meaning of an embedding matrix, as shown in the formula below:
[0123] .
[0124] When calculating channel-dimensional attention, we consider using a multi-head attention mechanism. Generate linear mappings , Represents the number of attention heads, :
[0125]
[0126] in, , Represents a query. Represents key and Representative value, weight matrix Represents the head dimension. Then... , , Divided into the sequence patch dimension This represents the query, key, and value at each sequence block dimension. , This represents the number of sequence blocks.
[0127] In addition to the standard attention in the channels, an extra attention structure is introduced in the hidden dimension to help capture local information in each sequence block. (Standard attention output in the channel dimension) With hidden attention output The calculation is as follows:
[0128]
[0129]
[0130] in, and In this text, 1 and 2 represent standard attention and hidden attention, respectively. The meanings and values of h and m are explained above. This represents an exponential probability normalization function; standard attention is used to capture dependencies between different patches, while additional attention is used to model the relationships between hidden feature dimensions within the same patch.
[0131] Next, merge along the sequence block dimension. and Received and ,like Figure 4 As shown. Subsequently, a linear mapping is used to... and Attention head mixing is performed to achieve lightweight aggregation and structured integration of cross-head information, yielding the mixed output results. and .
[0132] Finally, the two attention outputs are fed into a parallel feedforward neural network for feature fusion to obtain a unified feature representation that integrates global dependencies and latent feature interactions at the channel level. :
[0133]
[0134] in, , and This represents two parallel feedforward mapping paths used for feature reconstruction and fusion. as well as Residual join and normalization operations were performed to obtain This represents the feature representation of seasonal components at the global channel level. Centered on the channel dimension, this representation encodes global dependencies across variables, enabling each channel to perceive and integrate the contextual features of other channels. Therefore, As a converged representation of global channel information, it provides semantically unified input for subsequent hierarchical channel fusion.
[0135] In this embodiment, step S322 includes:
[0136] S3221: Initialize multiple learnable clustering embeddings;
[0137] S3222: Map the sequence of each channel in the seasonal component after time-varying periodic encoding to channel embedding;
[0138] S3223: Calculate the similarity between each channel embedding and multiple learnable cluster embeddings to obtain the probability that each channel belongs to each cluster.
[0139] It should be noted that although global channel dependency modeling can effectively capture the overall correlation among multiple variables, in real-world multivariate time series, the correlation between different channels is often dynamic and unbalanced. Specifically, a few channels exhibit strong, tightly coupled correlations, while many others show only loose, weak correlations that vary over time. Therefore, channel clustering is used to further refine the dynamic strength and weakness of dependencies between channels based on global modeling, such as... Figure 5 As shown.
[0140] The specific execution process of this embodiment is as follows:
[0141] First, initialize A learnable clustering embedding ,in (express A certain clustering embedding in (k=1,……,K), It is the hidden dimension of the clustering. Given a periodically enhanced seasonal component. For the first Sequence of channels ,in Let be the number of channels. Then we calculate it using cosine similarity. Each channel learns its belonging to the first The probability of a cluster is given by the following formula:
[0142]
[0143] in, Represents the normalization function. Represents a learnable linear channel embedding function, which will Each channel is converted to Hidden embeddings of dimensions; Indicates channel Belongs to clustering The probability of. It is a dynamic indicator that quantifies the correlation strength between channels and a fusion weight that guides the differentiated fusion of global information.
[0144] The core logic is as follows: if two channels exhibit high probabilities in the same cluster, they are considered strongly correlated, and the model will assign high weights during global information fusion to enhance their synergistic effect; conversely, if the probability distributions of two channels show significant differences or are generally low, they are considered weakly correlated, and low weights will be assigned during fusion to suppress potential cross-interference. This differentiated strategy of high weights for strong correlations and low weights for weak correlations ensures that the model can dynamically and selectively focus on the most critical channel dependencies.
[0145] In this embodiment, to further enhance the expressive power of clustering embedding and achieve dynamically adaptive local feature updates, a clustering update mechanism based on cross-attention is further adopted. Therefore, step S322 also includes:
[0146] S3224: Based on probability, the cluster embedding is updated through a cross-attention mechanism, and the probability of each channel belonging to each cluster is recalculated based on the updated cluster embedding to obtain the latest probability as the fusion weight.
[0147] The specific execution process of this embodiment is as follows:
[0148] Clustering embedding Viewed as a query, hidden embedding of channels Using keys and values, a new clustering representation after weighted aggregation is obtained through cross-channel attention operations, as follows:
[0149]
[0150] in, , , These are learnable parameters. Updated clustering embeddings. This will be used to recalculate the clustering probabilities and obtain the latest channel clustering distribution. .
[0151] In one embodiment, the step of weighted fusion of global dependency representations based on probability includes: Step S323 includes:
[0152] For each cluster, the global dependency representation is weighted using the probability corresponding to that cluster and then processed through the corresponding feedforward neural network;
[0153] All clustering results are fused along the channel dimension to obtain the fused seasonal component as the seasonal output.
[0154] The specific execution process of this embodiment is as follows:
[0155] The latest Obtained from global channel dependency modeling The interaction is achieved through a channel-aware feedforward fusion network, which fuses global and local information. The overall fusion formula for all channels is as follows:
[0156]
[0157] in, The output of the seasonal component after channel-aware fusion; For the first Channel probability vectors for each cluster; This represents broadcast multiplication along the channel dimension; Indicates the first A feedforward neural network for clustering.
[0158] This fusion process is essentially based on the probability distribution of channels in each cluster. Dynamically adjust global dependency representation The weights in the fusion process are used to refine the local dynamic strength and weakness of the correlation between channels within the global correlation framework.
[0159] Finally, regarding the output results for the seasonal part... Output results of the trend section The data was then fed into a linear layer, yielding prediction results for the multivariate time series. .
[0160] To evaluate the effectiveness of the PCFM model proposed in this invention, experiments were conducted on nine real-world multivariate time series datasets:
[0161] Nine multivariate time series datasets were used: Electricity TransformerTemperature (ETTh1, ETTh2, ETTm1, ETTm2), weather, traffic, electricity, exchange rate, and Influenza-Like Illness (ILI). To ensure fair comparisons, this experiment followed the same standard protocol as other methods, splitting all datasets into training, validation, and test sets. The ETT dataset had a 6:2:2 ratio, while the other datasets had a 7:1:2 ratio.
[0162] The following models were selected as benchmarks: MSTVI, CARD, TimeMixer, iTransformer, PatchTST, MICN, Dlinear, and TimesNet. All models followed the same experimental settings, with a specific review window length for the ILI dataset. The predicted length is For other datasets, review window length. The predicted length is Smoothing factor of EMA decomposition The optimal value was set to 0.3. The total training epochs were 100, and an early stopping strategy was employed to prevent overfitting. Furthermore, building upon previous work, mean squared error (MSE) and mean absolute error (MAE) were used to evaluate performance.
[0163] The experimental results are shown in Table 1 below. All results are the average values of four different prediction lengths.
[0164] Table 1. Average long-term forecast results based on 9 real-world datasets using MSE and MAE indicators.
[0165]
[0166] Table 1 details the overall performance of all comparative models across multiple datasets and prediction lengths. Overall, the model of this invention achieves optimal performance on nearly 80% of the datasets, fully demonstrating its effectiveness. Specifically, compared to TimesNet, which is related to periodicity modeling, PCFM achieves lower MSE and MAE on most metrics. Compared to classic CI models such as PatchTST and classic CD models such as CARD, the model of this invention shows significant performance improvements. This indicates that PCFM, through its TVPE module and HCFM, comprehensively surpasses existing typical methods in both periodicity modeling and channel correlation handling. Furthermore, PCFM consistently outperforms earlier baseline models such as DLinear and MICN, highlighting its advanced nature and competitiveness in long-term prediction tasks.
[0167] The two key modules of PCFM are TVPE and HCFM. To evaluate the impact of these two components on the model, this experiment conducted ablation studies on four datasets: ETTh1, ETTm1, exchange rate, and ILI. The corresponding results are shown in Table 2. The complete model is the PCFM architecture; the model without TVPE only includes channel modeling in its seasonal components; the model without HCFM only includes period modeling in its seasonal components.
[0168] Table 2: Average MSE and MAE results of the ablation module at four prediction lengths
[0169]
[0170] The experimental results show that removing any module from PCFM leads to a significant performance degradation, demonstrating the effectiveness of each module. Removing TVPE resulted in a consistent performance degradation across all four datasets, highlighting the importance of modeling time-varying periodic features. Similarly, removing HCFM also caused a significant performance degradation, emphasizing the crucial role of dynamically capturing the strong or weak correlations between channels.
[0171] To delve into the core mechanism of the TVPE module, this experiment selected two typical datasets with significant periodic differences—ETTh1 and weather—for visualization analysis. The results are as follows: Figure 6 As shown. Figure 6 This visually demonstrates the time-varying periodic encoded sequences generated by the TVPE module for ETTh1 and weather datasets with an input sequence length of 96.
[0172] Specifically, the time-varying periodic encoded sequences corresponding to the ETTh1 dataset exhibit a relatively small numerical distribution range, displaying a relatively smooth and stable periodic fluctuation pattern. In contrast, the time-varying periodic encoded sequences corresponding to the weather dataset exhibit a larger numerical distribution range, displaying a periodic pattern with larger amplitude and more intense fluctuations. The significant differences in numerical range and fluctuation morphology between the two encoded sequences, from a visualization perspective, confirm that the TVPE module can perceive and adapt to the inherent periodic characteristics of different datasets. More importantly, the encoded waveforms of the weather dataset clearly demonstrate non-stationary time-varying periodicity. This dynamically changing periodic pattern proves the core capability of the TVPE module; its built-in periodic evolution network can dynamically adjust the time-varying period parameters and amplitude according to the temporal context of the input data, thereby capturing complex, time-varying periodic patterns in the real world.
[0173] To further validate the effectiveness of the HCFM design, this experiment performed visualization analysis on the ETTh1 dataset for both global channel dependency modeling and local channel interaction modeling within this module. To explore the global dependency characteristics captured by global channel dependency modeling, which represent the correlation between channels, the model was converted into a Pearson correlation coefficient matrix and visualized. The results are as follows: Figure 7 As shown. Figure 7 The study clearly demonstrates significant strong positive and negative correlations among channels, while also including abundant moderate correlations. This structure indicates that global channel dependency modeling successfully learns and integrates global contextual information from time-series data, constructing a fusion basis that reflects the broad and differentiated dependencies among channels. This validates that HCFM provides a comprehensive and structured channel relationship context at the macroscopic level for subsequent fusion.
[0174] Furthermore, the probability distribution for modeling local channel interactions Perform visualization processing, such as Figure 8 As shown in the image, this visualization intuitively illustrates the probability distribution of the seven channels across four clusters, revealing distinct affiliations among the seven channels within these limited four clusters. This uneven probability distribution strongly demonstrates that local channel interaction modeling can adaptively and discriminatively group channels locally. It identifies which channels exhibit strong correlations and which have weak correlations.
[0175] In summary, global channel dependency modeling provides a rich context for hierarchical fusion, while local channel interaction modeling further enables fine-grained dynamic weight allocation. Through a hierarchical and complementary mechanism, both support HCFM in achieving fine-grained modeling of channel correlations. Experimental results clearly demonstrate that PCFM outperforms state-of-the-art models, including MSTVI, CARD, and TimeMixer, on multiple public datasets, validating its superior long-term predictive performance and generalization ability.
[0176] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0177] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion, characterized in that, Applied to weather forecasting, the input data includes a weather dataset, and the process involves the following steps: S1: Decompose the input multivariate time series into trend components and seasonal components; S2: Map the trend components to obtain the trend output; S3: Perform time-varying periodic encoding and hierarchical channel fusion processing on the seasonal components to obtain a seasonal output. The time-varying periodic encoding is used to adaptively capture the time-varying periodic features in the seasonal components, and the hierarchical channel fusion processing is used to dynamically capture the correlation differences between different channels in the seasonal components. The steps for performing time-varying periodic encoding on the seasonal components include: S311: Based on time indexing, L sets of time-varying periodic parameters and corresponding time-varying amplitudes are dynamically generated through a periodic evolution network, where L > 1; S312: Based on the time-varying periodic parameters and the time-varying amplitude, construct periodic basis functions to generate time-varying periodic codes; S313: Add the time-varying periodic code to the seasonal component to obtain the periodically enhanced seasonal component; The steps for performing hierarchical channel fusion processing on the seasonal components include: S321: Perform global channel dependency modeling on the seasonal components after time-varying periodic encoding to obtain a global dependency representation; S322: Local channel interaction modeling is performed on the seasonal components after time-varying periodic encoding to obtain the probability that each channel belongs to different clusters, which is used to indicate the correlation strength between channels; S323: Using the probability as a fusion weight, the global dependency representation is weighted on each cluster, and the weighted results of all clusters are fused to obtain the seasonal output; S4: Based on the trend output and the seasonal output, generate the prediction results for the future time step.
2. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, Step S1 includes: The input multivariate time series is smoothed using an exponential moving average algorithm to obtain the trend component; The seasonal component is obtained by subtracting the input multivariate time series from the trend component.
3. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, Step S311 includes: S3111: The periodic evolution network adopts a multilayer perceptron structure, including L parallel first periodic encoding units; the first periodic encoding unit receives the time index vector as input, and obtains the time-varying periodic parameter after processing by multiple sets of linear layers and activation functions, wherein the value of the time-varying periodic parameter is greater than the preset minimum period constraint; S3112: The periodic evolution network further includes a second periodic coding unit; the second periodic coding unit receives the time-varying periodic parameters as input, and obtains the corresponding time-varying amplitude after processing by a linear layer and an activation function.
4. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, Step S312 includes: S3121: The periodic basis functions include sine basis functions and cosine basis functions. The sine basis functions and cosine basis functions are concatenated to obtain a local periodic feature vector. S3122: Using linear mapping to Each periodic feature vector is projected onto the hidden feature space and then aggregated. The time-varying periodic code is obtained by outputting the aggregated feature vector through the output projection.
5. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, Step S321 includes: S3211: Divide the seasonal components after time-varying periodic encoding into sequence blocks; S3212: Map the sequence block to the latent space, and introduce global sequence block embedding and positional encoding to obtain the sequence block embedding matrix; S3213: Perform dual attention calculations of standard attention and hidden attention at the channel dimension on the embedded representation, and input the two attention outputs into a parallel feedforward neural network for feature fusion to generate the global dependency representation.
6. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, Step S322 includes: S3221: Initialize multiple learnable clustering embeddings; S3222: Map the sequence of each channel in the seasonal component after time-varying periodic encoding processing to channel embedding; S3223: Calculate the similarity between each channel embedding and multiple learnable cluster embeddings to obtain the probability that each channel belongs to each cluster.
7. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 6, characterized in that, Step S322 also includes: S3224: Based on the probability, update the clustering embedding through a cross-attention mechanism, and recalculate the probability of each channel belonging to each cluster based on the updated clustering embedding, and obtain the latest probability as the fusion weight.
8. The long-term series prediction method based on time-varying periodic coding and hierarchical channel fusion according to claim 1, characterized in that, The step of weighted fusion of the global dependency representation based on the probability includes: Step S323 includes: For each cluster, the global dependency representation is weighted using the probability corresponding to that cluster and then processed by the corresponding feedforward neural network; All clustering results are fused along the channel dimension to obtain the fused seasonal component as the seasonal output.