Time sequence prediction method and system based on period-trend-residual decomposition
By explicitly extracting the periodic, trend, and residual components of power load through a period-trend-residual decomposition architecture, the problem of high computational complexity in existing models is solved, achieving lightweight and high-precision time series forecasting, which is suitable for edge devices and ultra-long sequence scenarios.
Patent Information
- Application Number
- CN202511684278.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-10
AI Technical Summary
Existing time series forecasting models have high computational complexity and a large number of parameters in power load forecasting, making them difficult to deploy on edge devices. Furthermore, their practicality is limited in ultra-long series forecasting scenarios. They also lack explicit modeling of the internal structure of power load, making it difficult to balance forecasting accuracy and computational efficiency.
The system adopts a period-trend-residual decomposition architecture. Through a cyclic period generation module, an adaptive weighted multi-scale moving average module, and a residual perception module, it explicitly extracts the period, trend, and residual components of the time series and performs collaborative modeling and summation reconstruction.
It achieves lightweight time series forecasting, reduces the number of model parameters and computational complexity, improves forecast accuracy and robustness, is suitable for deployment on edge devices, and maintains high efficiency and scalability in ultra-long sequence scenarios.
Smart Images

Figure CN121502220A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time series data processing technology, and in particular to a time series forecasting method and system based on period-trend-residual decomposition. Background Technology
[0002] Time series forecasting is a key task in data analysis, widely used in fields such as power load forecasting, traffic flow analysis, and financial market analysis. Among these, power system load forecasting is a crucial link in grid dispatching and energy management, its core task being to predict power demand for specific future periods based on historical electricity consumption data. Accurate load forecasting is essential for ensuring the safe and stable operation of the power grid, optimizing generation plans, and reducing operating costs.
[0003] Traditional power load forecasting methods primarily rely on statistical models such as ARIMA, which have limited ability to characterize complex nonlinear patterns. In recent years, deep learning-based models, such as Transformer, RNN, and TCN, have made significant progress in load forecasting tasks due to their powerful representation learning capabilities. However, these models, designed to capture long-range dependencies and complex patterns, are typically structured as deep networks, resulting in a huge number of parameters and high computational complexity. This not only makes them difficult to deploy on grid edge computing devices but also affects their practicality in ultra-long-term forecasting scenarios. More importantly, existing technologies often focus on end-to-end fitting of the overall load sequence, lacking explicit and lightweight modeling of the inherent structure of power load (such as daily / weekly / yearly cycles, long-term growth trends, and random fluctuations). This makes it difficult to balance forecasting accuracy and computational efficiency, failing to meet the urgent needs of smart grids for real-time, accurate, and lightweight forecasting. Summary of the Invention
[0004] To address the technical problems of high model complexity, high computational cost, and limited scalability for ultra-long series in time series forecasting (such as power load forecasting) mentioned above, this invention introduces an explicit period-trend-residual decomposition architecture and designs a learnable cyclic period generation module, an adaptive weighted multi-scale moving average module, and a residual sensing module, thereby providing a time series forecasting method and system that combines high forecasting accuracy with lightweight characteristics.
[0005] To achieve the above objectives, a first aspect of the present invention provides a time series forecasting method based on period-trend-residual decomposition, comprising: Obtain time series data; The time series data is input into the cycle generation module for processing, so as to explicitly extract and output the cycle components corresponding to the global periodic pattern. The time series data is input in parallel to the adaptive weighted multi-scale moving average module for processing, so as to extract and output the trend components corresponding to the sequence evolution trend at different time granularities; Based on the time series data, the periodic component, and the trend component, the residual sensing module calculates and outputs residual components that characterize high-frequency fluctuations and random disturbances. The periodic component, trend component, and residual component are summed and reconstructed to obtain the prediction result for a specific future time range.
[0006] Furthermore, the time series data is input into the cycle generation module for processing to explicitly extract and output the periodic components corresponding to the global periodic pattern, including: Initialize a learnable periodic template matrix to capture the potential periodic structure in the time series data; During training, the parameters of the periodic template matrix are adaptively updated using the backpropagation algorithm; Based on the relative position of the current time step in the potential period, the updated period template matrix is shifted to achieve phase alignment in the time dimension. By repeating and truncating the aligned periodic template, a periodic subsequence with the same length as the input window is generated, and periodic components for the past L steps and the future H steps are constructed based on the periodic subsequence.
[0007] Furthermore, the time series data is input in parallel to an adaptive weighted multi-scale moving average module for processing, in order to extract and output the trend components corresponding to the sequence evolution trend at different time granularities, including: Multiple moving average scales with different window lengths are preset, and the scales include at least short-term, medium-term and long-term scales; For each scale of the sliding window, a one-dimensional moving average operation is performed independently on the time series data to smooth local fluctuations and obtain the trend candidate components at that scale. Multiple trend candidate components obtained at different scales are concatenated along the feature dimension to form a multi-scale trend feature representation. The normalized attention weights of trend candidate components at each scale are calculated using a lightweight fusion weight allocation network. Using the normalized attention weights, the multiple trend candidate components are weighted and summed to generate a comprehensive trend representation; The synthesized trend representation is mapped to the target dimension through a linear projection layer, outputting the final trend component.
[0008] Furthermore, the sliding window lengths corresponding to the short-term scale include 3 and 5, the sliding window lengths corresponding to the medium-term scale include 9 and 11, and the sliding window lengths corresponding to the long-term scale include 15 and 21.
[0009] Furthermore, based on the time series data, the periodic component, and the trend component, the residual sensing module calculates and outputs residual components characterizing high-frequency fluctuations and random disturbances, including: From the time series data, the periodic component and the trend component are subtracted element by element to obtain a preliminary residual sequence; The initial residual sequence is input into a fully connected layer for nonlinear feature mapping and dimensionality reduction to obtain the residual components.
[0010] Furthermore, the method employs a mean squared error loss function during the training phase and utilizes a gradient descent algorithm to optimize all learnable parameters involved in the cyclic period generation module, the adaptive weighted multi-scale moving average module, and the residual sensing module end-to-end.
[0011] A second aspect of the present invention provides a time series forecasting system based on period-trend-residual decomposition, comprising: The data acquisition module is used to acquire time series data; The cycle generation module is used to explicitly extract and output the cycle components corresponding to the global periodic pattern based on time series data. An adaptive weighted multi-scale moving average module is used to extract and output the trend components corresponding to the sequence evolution trend at different time granularities based on parallel input of time series data. The residual sensing module is used to calculate and output residual components that characterize high-frequency fluctuations and random disturbances based on the time series data, the periodic components, and the trend components. The prediction fusion module is used to sum and reconstruct the periodic component, trend component and residual component to obtain the prediction result for a specific future time range.
[0012] A third aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps in the time series forecasting method based on period-trend-residual decomposition as described in the first aspect of the present invention.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the time series forecasting method based on period-trend-residual decomposition as described in the first aspect of the present invention.
[0014] A fifth aspect of the present invention provides a computer program product comprising software code, wherein the program in the software code performs the steps of the time series forecasting method based on period-trend-residual decomposition as described in the first aspect of the present invention.
[0015] Compared with existing technologies, the time series forecasting method and system based on period-trend-residual decomposition provided by this invention has the following advantages: (1) This invention, based on a cyclic period generation module, an adaptive weighted multi-scale moving average module, and a residual perception module, decomposes the complex sequence modeling task into three relatively simple sub-tasks by explicitly decomposing the deep stacked neural network instead of the original one. This avoids redundant parameter stacking, significantly reduces the number of parameters and computational complexity of the model, thereby achieving a lightweight model that is more suitable for deployment on edge devices or in resource-constrained environments, and solves the technical problems of high complexity and high computational and storage costs of existing models.
[0016] (2) This invention achieves a complete characterization of the multi-level structure of time series based on the collaborative modeling and summation reconstruction of periodic components, trend components and residual components. By separately modeling and finally fusing the periodicity, trend and residual (high-frequency fluctuations) respectively, the model can more accurately capture the global periodicity, long-term evolution direction and local dynamic details of the series, thereby effectively improving the overall prediction accuracy and robustness, and solving the technical problems of incomplete decomposition methods and limited prediction accuracy in existing methods.
[0017] (3) This invention uses computationally efficient explicit modules to capture key temporal structures based on learnable periodic template matrices, cyclic shift operations, and multi-scale moving average operations. The computational complexity of these modules is linear or approximately linear with the sequence length, overcoming the problem of quadratic complexity in Transformer-type models. This ensures that the model can maintain high efficiency and scalability in ultra-long sequences or real-time inference scenarios, and solves the technical problem of limited scalability of attention-based methods in long sequence tasks. Attached Figure Description
[0018] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.
[0019] Figure 1 This is a flowchart of the time series prediction method based on period-trend-residual decomposition provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the overall architecture of the CTR provided in Embodiment 1 of the present invention; Figure 3 The cycle period provided in Embodiment 1 of the present invention QAlignment and repetition diagram, Figure 3 (a) in the text indicates the past. L The corresponding periodic component of the step C t , Figure 3 (b) in the text represents the periodic component corresponding to the next H steps. t ; Figure 4 This is a schematic diagram of the trend decomposition framework of the Adaptive Weighted Multi-Scale Moving Average (AMMAT) module provided in Embodiment 1 of the present invention. Figure 5 This is an architecture diagram of a time series prediction system based on period-trend-residual decomposition provided in Embodiment 2 of the present invention. Detailed Implementation
[0020] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0021] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. Furthermore, it should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0023] All data acquisition in this embodiment is carried out in accordance with laws and regulations and with user consent, and the data is used legally.
[0024] Before describing the embodiments of the present invention in detail, the technical terms involved in the present invention are explained and defined as follows: 1. Time series forecasting: refers to the process of estimating the value or state of future moments based on the time-dependent characteristics and change patterns contained in historical time series data, using statistical modeling or machine learning methods.
[0025] 2. Periodic-Trend-Residual Decomposition: This is the process of explicitly dividing the original time series signal into three independent components. The periodic component represents the repetitive patterns of change in the time series with fixed or quasi-fixed time intervals, used to characterize the periodicity of the system; the trend component represents the smooth evolution trend of the time series over a longer time scale, used to reflect the overall direction of change in the system; and the residual component represents the high-frequency fluctuations or short-term disturbances that still exist after removing the periodicity and trend components, used to capture local dynamic characteristics and random fluctuations. Through this decomposition process, multi-scale modeling of the time series structure can be achieved, thereby improving the accuracy of predictions.
[0026] 3. Lightweight: While ensuring model performance and prediction accuracy, lightweight models achieve efficient computation and rapid deployment by simplifying the structure, reducing the number of parameters, lowering computational complexity, and minimizing storage footprint. In time series forecasting tasks, lightweight models typically have lower inference latency and energy consumption, making them suitable for edge computing, real-time monitoring, and resource-constrained applications.
[0027] Example 1 This embodiment uses power system load forecasting as a specific application scenario for illustration. It should be understood that the technical solution of the present invention is also applicable to other time series forecasting tasks with similar periodic-trend-residual characteristics, such as traffic flow forecasting and financial market analysis.
[0028] In this embodiment, the time series data specifically refers to power load data, including but not limited to: power consumption data collected every 15 minutes, hourly power consumption data, etc. This data typically exhibits obvious daily, weekly, and annual cycle characteristics, while also showing long-term trends due to the influence of weather and climate changes, and includes various random disturbances and abnormal fluctuations.
[0029] like Figure 1 This embodiment provides a method for predicting electricity load time series based on period-trend-residual decomposition, including: Obtain time series data of power load; The power load time series data is input into the cycle generation module for processing, so as to explicitly extract and output the cycle components corresponding to the daily / weekly / yearly cycle patterns of the power load. The power load time series data is input in parallel into an adaptive weighted multi-scale moving average module for processing, so as to extract and output the trend components corresponding to the power load evolution trend at different time granularities. Based on the power load sequence data, the periodic component, and the trend component, the residual sensing module calculates and outputs the residual component that characterizes the high-frequency fluctuations and random disturbances in the power load. The periodic component, trend component, and residual component are summed and reconstructed to obtain the prediction result for a specific future time range.
[0030] This invention constructs a collaborative prediction framework for the periodic-trend-residual decomposition of electricity load. The complex task of electricity load prediction is decoupled into three parallel, more specialized sub-tasks. A cyclical generation module captures recurring fixed patterns in the electricity load (such as daily, weekly, and yearly cycles); an adaptive weighted multi-scale moving average module extracts the long-term evolution direction and changing trends at different time scales; and a residual perception module picks up local fluctuations and noise that the former two modules fail to explain, such as the impact of sudden weather events or random electricity consumption behavior. Finally, these three complementary components are integrated through summation and reconstruction to obtain a comprehensive electricity load prediction result.
[0031] Specifically, the power load time series data is input into the cycle generation module for processing to explicitly extract and output the cycle components corresponding to the global periodic pattern, including: Initialize a learnable periodic template matrix to capture the potential periodic structure in the power load time series data; During training, the parameters of the periodic template matrix are adaptively updated using the backpropagation algorithm; Based on the relative position of the current time step in the potential period, the updated period template matrix is shifted to achieve phase alignment in the time dimension. By repeating and truncating the aligned periodic template, a periodic subsequence with the same length as the input window is generated, and periodic components for the past L steps and the future H steps are constructed based on the periodic subsequence.
[0032] The model provided by this invention no longer presets or manually analyzes the cycle length of the power load, but adaptively learns the optimal cycle pattern primitives through training data. Cyclic shift operations ensure that the learned cycle pattern is precisely aligned with the input load sequence in time phase. This approach overcomes the reliance on prior knowledge in traditional methods and can adaptively capture the complex and variable periodic characteristics of power loads, greatly improving the accuracy and flexibility of cycle modeling.
[0033] Specifically, the power load time series data is input in parallel to an adaptive weighted multi-scale moving average module for processing, in order to extract and output trend components corresponding to the sequence evolution trend at different time granularities, including: Multiple moving average scales with different window lengths are preset, and the scales include at least short-term, medium-term and long-term scales; For each scale of the sliding window, a one-dimensional moving average operation is independently performed on the power load time series data to smooth local fluctuations and obtain the trend candidate components at that scale. Multiple trend candidate components obtained at different scales are concatenated along the feature dimension to form a multi-scale trend feature representation. The normalized attention weights of trend candidate components at each scale are calculated using a lightweight fusion weight allocation network. Using the normalized attention weights, the multiple trend candidate components are weighted and summed to generate a comprehensive trend representation; The synthesized trend representation is mapped to the target dimension through a linear projection layer, outputting the final trend component.
[0034] This invention captures short-term, medium-term, and long-term trends in electricity load by setting sliding windows of different sizes. The short-term scale captures intraday fluctuations, the medium-term scale reflects weekly changes, and the long-term scale corresponds to seasonal trends. Subsequently, a lightweight fusion network (such as an attention mechanism using the Softmax function) dynamically calculates the importance weights of trends at each scale, achieving adaptive multi-feature fusion. This design allows the model to flexibly address the differences in electricity load trend patterns across different regions and seasons, avoiding the limitations of single-scale modeling and enhancing the robustness of trend extraction.
[0035] Specifically, the sliding window lengths corresponding to the short-term scale include 3 and 5, the sliding window lengths corresponding to the medium-term scale include 9 and 11, and the sliding window lengths corresponding to the long-term scale include 15 and 21.
[0036] The optimized scale combination (such as 3, 5, 9, 11, 15, 21) provides the model with an effective receptive field covering short, medium and long term, which is the physical basis for its ability to capture multi-granularity trend information of power load and an important guarantee for the model to achieve excellent performance.
[0037] Specifically, based on the power load time series data, the periodic component, and the trend component, the residual sensing module calculates and outputs residual components characterizing high-frequency fluctuations and random disturbances, including: From the power load time series data, the periodic component and the trend component are subtracted element by element to obtain a preliminary residual sequence; The initial residual sequence is input into a fully connected layer for nonlinear feature mapping and dimensionality reduction to obtain the residual components.
[0038] Subtracting the periodic and trend components element-wise is an efficient and intuitive method for residual extraction, ensuring thorough decomposition. The subsequent fully connected layer performs a nonlinear transformation on the initial residuals, which filters noise and enhances feature representation capabilities. This allows the residual components to better characterize meaningful short-term disturbances in the power load (such as load changes caused by localized weather changes or specific events), rather than purely random noise.
[0039] Specifically, the method employs a mean squared error loss function during the training phase and utilizes a gradient descent algorithm to optimize all learnable parameters involved in the cyclic period generation module, the adaptive weighted multi-scale moving average module, and the residual sensing module end-to-end.
[0040] This invention optimizes all learnable parameters end-to-end, meaning the entire decomposition and prediction process is trained collaboratively. This allows the periodic module, trend module, and residual module to cooperate and optimize each other, working together to achieve the final power load prediction target, rather than being decomposed in isolation, thus ensuring the overall performance of the model.
[0041] This invention reduces the computational and storage costs of power load forecasting models. Based on a lightweight forecasting framework, it explicitly models the periodic structure of power load through a learnable cyclic generation module and extracts trend components using a smoothing operator, achieving decomposition and modeling of key time-series features at low cost. This design avoids redundant stacking of deep networks, significantly reducing parameter size and computational complexity, thereby improving model efficiency and deployability while maintaining forecasting performance.
[0042] This invention improves the overall accuracy of power load forecasting by proposing a power load forecasting method based on cycle-trend-residual (CTR) decomposition. By explicitly decomposing complex load sequences into three components—cycle, trend, and residual—the model can more accurately characterize the multi-level features of the load and effectively improve its ability to model long-term dependencies and short-term fluctuations.
[0043] This invention maintains scalability in ultra-long power load sequences and real-time scenarios. It replaces or assists highly complex global mechanisms with lightweight explicit decomposition modules, ensuring that key temporal structures can still be effectively captured and computationally controlled in ultra-long sequences or real-time inference scenarios.
[0044] In this embodiment, in order to fully capture the potential structure of the load sequence and improve long-term forecasting performance, the present invention models three types of components: periodic, trend, and residual. The periodic component is explicitly extracted by the Cyclic Periodic Generation Module (RCG) to capture the globally stable periodic patterns of the load. In terms of trend modeling, an Adaptive Weighted Multi-Scale Moving Average Module (AMMAT) is designed to characterize the long-term changes of the load sequence. The residual component explicitly extracted by the Residual Sensing Module (RAM) represents the high-frequency fluctuations and random disturbances in the load, supplementing the model's characterization of anomalies and uncertainties caused by abnormal weather, sudden events, etc.
[0045] To explicitly model the periodicity of electricity load time series, a learnable Recurrent Cycle Generation Module (RCG) is introduced. First, a learnable periodic template matrix is defined to capture the potential periodic structure of the sequence; this matrix is adaptively updated via backpropagation during training. Then, based on the relative position of the current time step within the cycle, the periodic template is cyclically shifted (Roll) to achieve time phase alignment, and periodic subsequences with the same length as the input window are generated through alignment and repeat operations. Finally, periodic components for the past L steps and the future H steps are constructed by truncating segments of appropriate length, thereby achieving explicit modeling and prediction of the periodicity of electricity load.
[0046] This invention designs an Adaptive-weighted Multi-scale Moving Average (AMMAT) module for trend modeling. Its core idea is to smoothly model the input load sequence at multiple time scales, thereby capturing trend information of different lengths. Specifically, the module first sets several sliding window scales, such as short-term scales (e.g., 3 or 5 steps), medium-term scales (e.g., 9 or 11 steps), and long-term scales (e.g., 15 or 21 steps). For each scale, a moving average operation is performed independently to smooth local fluctuations and extract trend components within that time range. Subsequently, the trend candidate components obtained at different scales are concatenated along the scale dimension to form a comprehensive representation containing multi-level temporal features. To adaptively select the most representative scale information from these candidate trends, the module introduces a fusion weight allocation mechanism: feature correlations of trends at each scale are extracted through linear transformation, and the normalized weights of each scale are calculated using the Softmax function, thus reflecting the importance of different scales in the current time segment. These weights are used to weight and fuse the trend components at each scale to generate a comprehensive trend representation. This representation further employs feature mapping through a linear transformation layer to enhance the model's expressive power and output the final trend result. The entire process achieves end-to-end modeling from multi-scale trend extraction to adaptive fusion, enabling the model to flexibly capture changes in power load trends at different time granularities, ensuring the stability and generalization ability of trend modeling.
[0047] This invention, building upon periodic and trend modeling, introduces a Residual-aware Module (RAM) to explicitly model the residual component within the decomposition framework. This RAM treats the residual as a high-frequency component with learnable patterns, rather than pure random noise. By introducing an independent residual modeling branch, the model can more effectively capture short-term disturbances and local fluctuations, thereby improving overall prediction accuracy. These residuals may originate from measurement errors, sudden events, or complex electricity consumption behaviors not yet captured by the model. Subsequently, the residual components are input into a linear transformation layer for feature mapping to obtain the final residuals.
[0048] The model sums the generated periodic components, trend components, and residual components to obtain the final prediction result.
[0049] Table 1 shows the performance comparison of the proposed method (CTRNet) with other mainstream time series prediction models on multiple public datasets. The backtracking length L is fixed at 96, and the prediction lengths H of the datasets are {96, 192, 336, 720}. All results are averages for four different prediction lengths. The best value is indicated in bold, and the second best value is indicated by an underline.
[0050] In particular, the superior performance on the Electricity dataset verifies the effectiveness of the method described in this invention for electricity load forecasting tasks. As can be seen from the results in the table, the method provided by this invention achieves excellent performance on multiple datasets, outperforming existing mainstream models overall. On the ETTh2, ETTm2, Electricity, and Weather datasets, the method provided by this invention achieves optimal results in both MSE and MAE metrics; on the ETTm1 and Exchange datasets, it also demonstrates performance close to the optimal method. In summary, the method provided by this invention exhibits stronger prediction accuracy in long-term time-series forecasting tasks, fully validating its effectiveness and application advantages in practical scenarios such as electricity load forecasting.
[0051] Table 1. Comparison of the method provided by this invention with other models on the multivariate LTSF task.
[0052] Table 2 further compares the model efficiency of CTRNet with other models on the power dataset. Training time represents the average time required for each epoch of the model. As can be seen from Table 2, although CycleNet has fewer parameters and lower computational cost than the CTRNet model proposed in this invention, its prediction accuracy on the power dataset (see Table 1) is not comprehensively superior to that of this invention. In contrast, the CTRNet model proposed in this invention maintains a high level of lightweight design while ensuring higher prediction accuracy, and its training efficiency (10.1 seconds / epoch) is significantly better than most of the comparative models. This means lower hardware costs and faster model iteration speed in actual power system deployments. This invention decomposes the time series into three learnable components—period, trend, and residual—through explicit decomposition, and designs efficient extraction and prediction modules for each component, achieving optimization of the model structure and control of computational load while ensuring prediction accuracy. Simultaneously, the decomposed input signal is cleaner, leading to faster training convergence and improved training efficiency. In summary, the method proposed in this invention achieves a better balance between lightweight design, training efficiency, and prediction accuracy when facing practical tasks such as power load forecasting. Although it has a slightly larger parameter scale than CycleNet, it is still significantly optimized compared to most other methods, demonstrating stronger comprehensive performance and engineering application value.
[0053] Table 2. Efficiency comparison of CTRNet and other models on a power dataset with a backtracking length L=96 and a prediction range H=720.
[0054] Example 2 like Figure 5As shown, this embodiment provides a power load time series forecasting system based on period-trend-residual decomposition, including: The data acquisition module is used to acquire time series data of power load; The cycle generation module is used to input the power load time series data into the cycle generation module for processing, so as to explicitly extract and output the cycle components corresponding to the daily / weekly / yearly cycle patterns of the power load. An adaptive weighted multi-scale moving average module is used to extract and output trend components corresponding to the evolution trend of power load at different time granularities based on parallel input of power load time series data. The residual sensing module is used to calculate and output residual components that characterize high-frequency fluctuations and random disturbances based on the time series data, the periodic components, and the trend components. The prediction fusion module is used to sum and reconstruct the periodic component, trend component and residual component to obtain the prediction result for a specific future time range.
[0055] Example 3 Embodiment 3 of the present invention provides an electronic device.
[0056] An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements the steps in the time series forecasting method based on period-trend-residual decomposition as described in Embodiment 1 of the present invention.
[0057] The detailed steps are the same as those of the time series forecasting method based on period-trend-residual decomposition provided in Example 1, and will not be repeated here.
[0058] Example 4 Embodiment 4 of the present invention provides a computer-readable storage medium.
[0059] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the time series forecasting method based on period-trend-residual decomposition as described in Embodiment 1 of the present invention.
[0060] The detailed steps are the same as those of the time series forecasting method based on period-trend-residual decomposition provided in Example 1, and will not be repeated here.
[0061] Example 5 Embodiment 5 of the present invention provides a computer program product.
[0062] A computer program product includes software code, wherein the program in the software code performs the steps of the time series forecasting method based on period-trend-residual decomposition as described in Embodiment 1 of the present invention.
[0063] The detailed steps are the same as those of the time series forecasting method based on period-trend-residual decomposition provided in Example 1, and will not be repeated here.
[0064] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0065] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0068] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0069] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
[0070] The above description is merely a preferred embodiment of this practice and is not intended to limit the scope of this practice. Various modifications and variations can be made to this practice by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this practice should be included within the protection scope of this practice.
Claims
1. A time series forecasting method based on period-trend-residual decomposition, characterized in that, include: Obtain time series data; The time series data is input into the cycle generation module for processing, so as to explicitly extract and output the cycle components corresponding to the global periodic pattern. The time series data is input in parallel to the adaptive weighted multi-scale moving average module for processing, so as to extract and output the trend components corresponding to the sequence evolution trend at different time granularities; Based on the time series data, the periodic component, and the trend component, the residual sensing module calculates and outputs residual components that characterize high-frequency fluctuations and random disturbances. The periodic component, trend component, and residual component are summed and reconstructed to obtain the prediction result for a specific future time range.
2. The method as described in claim 1, characterized in that, The time series data is input into the cycle generation module for processing to explicitly extract and output the cycle components corresponding to the global periodic pattern, including: Initialize a learnable periodic template matrix to capture the potential periodic structure in the time series data; During training, the parameters of the periodic template matrix are adaptively updated using the backpropagation algorithm; Based on the relative position of the current time step in the potential period, the updated period template matrix is shifted to achieve phase alignment in the time dimension. By repeating and truncating the aligned periodic template, a periodic subsequence with the same length as the input window is generated, and periodic components for the past L steps and the future H steps are constructed based on the periodic subsequence.
3. The method as described in claim 1, characterized in that, The time series data is input in parallel to an adaptive weighted multi-scale moving average module for processing, in order to extract and output the trend components corresponding to the sequence evolution trend at different time granularities, including: Multiple moving average scales with different window lengths are preset, and the scales include at least short-term, medium-term and long-term scales; For each scale of the sliding window, a one-dimensional moving average operation is performed independently on the time series data to smooth local fluctuations and obtain the trend candidate components at that scale. Multiple trend candidate components obtained at different scales are concatenated along the feature dimension to form a multi-scale trend feature representation. The normalized attention weights of trend candidate components at each scale are calculated using a lightweight fusion weight allocation network. Using the normalized attention weights, the multiple trend candidate components are weighted and summed to generate a comprehensive trend representation; The synthesized trend representation is mapped to the target dimension through a linear projection layer, outputting the final trend component.
4. The method as described in claim 3, characterized in that, The sliding window lengths corresponding to the short-term scale include 3 and 5, the sliding window lengths corresponding to the medium-term scale include 9 and 11, and the sliding window lengths corresponding to the long-term scale include 15 and 21.
5. The method as described in claim 1, characterized in that, Based on the time series data, the periodic component, and the trend component, the residual sensing module calculates and outputs residual components characterizing high-frequency fluctuations and random disturbances, including: From the time series data, the periodic component and the trend component are subtracted element by element to obtain a preliminary residual sequence; The initial residual sequence is input into a fully connected layer for nonlinear feature mapping and dimensionality reduction to obtain the residual components.
6. The method as described in claim 1, characterized in that, The method employs a mean squared error loss function during the training phase and utilizes a gradient descent algorithm to optimize all learnable parameters involved in the cyclic period generation module, the adaptive weighted multi-scale moving average module, and the residual sensing module end-to-end.
7. A time series forecasting system based on period-trend-residual decomposition, characterized in that, include: The data acquisition module is used to acquire time series data; The cycle generation module is used to explicitly extract and output the cycle components corresponding to the global periodic pattern based on time series data. An adaptive weighted multi-scale moving average module is used to extract and output the trend components corresponding to the sequence evolution trend at different time granularities based on the parallel input of the time series data. The residual sensing module is used to calculate and output residual components that characterize high-frequency fluctuations and random disturbances based on the time series data, the periodic components, and the trend components. The prediction fusion module is used to sum and reconstruct the periodic component, trend component and residual component to obtain the prediction result for a specific future time range.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of the time series forecasting method based on period-trend-residual decomposition as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the time series forecasting method based on period-trend-residual decomposition as described in any one of claims 1 to 6.
10. A computer program product, comprising software code, characterized in that, The program in the software code performs the steps of the time series forecasting method based on period-trend-residual decomposition as described in any one of claims 1 to 6.
Citation Information
Cited By
Period-trend decoupling prediction control method and system of an industrial large model
CN122239599A
