Residual period prediction method, system, device and medium for enhancing time series prediction
By explicitly modeling the periodic pattern of time series data, learningable cycles are generated and residual components are predicted, which solves the problems of high computing resources and insufficient accuracy of long-time series prediction in the prior art, and achieves efficient and accurate prediction effects.
Patent Information
- Application Number
- CN202411347361.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing time series prediction models have problems with high computing resource requirements and insufficient prediction accuracy in long-term time series prediction tasks, especially in capturing long-term dependencies and intrinsic periodicity in data.
By explicitly modeling the periodic patterns in time series data, learnable cycles are generated, periodic components are extracted and residual components are predicted, and predictions are combined with a simple backbone prediction model to reduce computational overhead and improve prediction accuracy.
It significantly improves the accuracy and efficiency of long-time series prediction, reduces computational costs, and provides interpretability to the prediction results.
Smart Images

Figure CN119294446B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine learning, and in particular relates to a residual period prediction method, system, device and medium for enhancing time series prediction. Background Art
[0002] Time series forecasting plays a vital role in many application areas, such as power demand forecasting, weather forecasting, financial market analysis, and intelligent transportation systems. Accurate time series forecasting not only improves system operational efficiency but also provides strong support for decision-making. In time series forecasting tasks, especially long-term time series forecasting, the key to accurate prediction lies in the model's ability to accurately capture the long-term dependencies and inherent cyclical properties of the data.
[0003] In the existing technology, in order to solve the problem of long time series prediction, many models focus on improving the ability to capture long-range dependencies. For example, Transformer-type models (such as Informer and Autoformer) have been widely used in LTSF tasks by leveraging the advantages of Transformer in modeling long-range dependencies. Convolutional neural networks (such as ModernTCN) enhance the model's ability to capture long-range dependencies through the design of large convolution kernels, while recurrent neural networks (such as SegRNN) improve the processing of long sequences through segmented iteration. However, most of these models extract periodic features in time series by building deep and complex structures.
[0004] This means that existing methods typically require higher computing resources and longer training times, and still face performance bottlenecks when faced with long time series forecasting tasks. Therefore, how to accurately model the periodicity in time series while maintaining high efficiency has become a major challenge in the current field of time series forecasting.
[0005] Based on this, this paper proposes a new time series forecasting method, namely Residual Cycle Forecasting (RCF). This method explicitly models the cyclical patterns in time series data and predicts the cyclical residuals based on this model, thereby significantly improving the accuracy and efficiency of the model in long time series forecasting tasks. Summary of the Invention
[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a residual period prediction method, system, device and medium for enhancing time series prediction. By explicitly modeling the periodic patterns in time series data and predicting the periodic residuals on this basis, the prediction accuracy is improved and the computational overhead of the model is significantly reduced.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In a first aspect, the present invention provides a residual period prediction method for enhancing time series prediction, comprising the following steps:
[0009] Determining a period length W of a data set; the data set includes time series data;
[0010] Generate learnable cycles for time series data with D variables By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained;
[0011] Take a sample x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ;
[0012] By converting the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ;
[0013] The residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ;
[0014] The predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0015] As a preferred technical solution, the period length W of the data set is determined by manually reasoning about the characteristics of the time series data set or calculating the autocorrelation within the data set.
[0016] As a preferred technical solution, the cycle period Q is trained together with the backbone prediction model through gradient back propagation during the training process, so as to learn the feature representation that reflects the intrinsic periodic pattern of the time series.
[0017] As a preferred technical solution, the backbone prediction model is a backbone model for residual prediction.
[0018] As a preferred technical solution, the backbone prediction model is a single-layer linear model or a double-layer MLP model.
[0019] As a preferred technical solution, the periodic component c t-L+1:t The generation of includes the following steps:
[0020] Shift the cycle Q to the left by tmodW positions to obtain Q (t) ;
[0021] Q (t) copy times and splice Get the periodic component c of length L t-++1:t .
[0022] As a preferred technical solution, the periodic component c t+1:t+H The generation of includes the following steps:
[0023] Shift the cycle Q to the left by (t+L) mod W positions to obtain Q (t+t) ;
[0024] Q (t+L) copy times and splice Get the periodic component c of length H t+1:t+H .
[0025] In a second aspect, the present invention provides a residual period prediction system for enhanced time series prediction, which is applied to the residual period prediction method for enhanced time series prediction, including a period determination module, a cycle generation module, a period component acquisition module, a residual component calculation module, a residual component prediction module, and a time series prediction module;
[0026] The period determination module is used to determine the period length W of a data set; the data set includes time series data;
[0027] The cycle generation module is used to generate a learnable cycle for time series data with D variables. By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained;
[0028] The periodic component acquisition module is used to intercept samples x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ;
[0029] The residual component calculation module is used to convert the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ;
[0030] The residual component prediction module is used to convert the residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ;
[0031] The time series prediction module is used to convert the predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0032] In a third aspect, the present invention provides an electronic device, comprising:
[0033] at least one processor; and,
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the residual period prediction method for enhanced time series prediction.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the residual period prediction method for enhanced time series prediction.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] (1) Effectiveness: The present invention can more accurately capture the periodic characteristics of data, thereby improving the accuracy of long time series prediction tasks.
[0039] (2) High efficiency: Compared with traditional complex deep models, the present invention can achieve high-precision prediction by only combining a simple backbone model for residual prediction, which greatly reduces the computational cost of the model and improves the prediction efficiency.
[0040] (3) Universality: The method proposed in this invention can be combined with a variety of existing time series prediction models to further improve the prediction accuracy of existing models.
[0041] (4) Interpretability: This paper explicitly models the periodic patterns in time series data by constructing learnable cycles. The fully trained cycles can accurately reflect the periodic characteristics existing in the data, providing a clear explanation basis for the prediction results.
[0042] In summary, the present invention provides an efficient and accurate solution for the long time series prediction task of time series through the residual period prediction method, which has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0044] Figure 1 Flowchart of a residual period prediction method for enhancing time series prediction in an embodiment of the present invention;
[0045] Figure 2 Schematic diagram of using Linear and MLP as backbone prediction models in an embodiment of the present invention;
[0046] Figure 3 Schematic diagram of a periodic component generation process according to an embodiment of the present invention;
[0047] Figure 4 A comparison chart of prediction accuracy and parameter efficiency in a user power consumption prediction task according to an embodiment of the present invention;
[0048] Figure 5 A comparison chart showing the improvement in prediction accuracy of a user power consumption prediction task based on an existing prediction model in an embodiment of the present invention;
[0049] Figure 6 is a cyclical pattern obtained from the modeling results in the user power consumption prediction task in an embodiment of the present invention;
[0050] Figure 7Schematic diagram of the structure of the residual period prediction system for enhancing time series prediction in an embodiment of the present invention;
[0051] Figure 8 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0054] like Figure 1 As shown, this embodiment provides a residual period prediction method for enhancing time series prediction. By explicitly modeling the periodic pattern in time series data and predicting the periodic residual based on this pattern, the prediction accuracy is improved and the computational overhead of the model is significantly reduced. The method specifically includes the following steps:
[0055] (1) Determine the period length W of the data set;
[0056] Specifically, the cycle length W can be obtained by manually inferring the characteristics of the time series dataset or calculating the autocorrelation within the dataset.
[0057] (2) For time series data with D variables, generate a learnable cycle By cyclically replicating the cycle period Q, a periodic component sequence C with the same length as the time series X can be obtained.
[0058] It is understandable that the cycle period Q will be trained together with the backbone prediction model through gradient back propagation during the training process, so as to learn the feature representation that reflects the intrinsic periodic pattern of the time series.
[0059] (3) Extract sample x from time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence Ct-L+1:t .
[0060] Specifically, the periodic component c t-L+1:t The generation of includes the following steps:
[0061] (31) By shifting the cycle q to the left by tmodW positions, we can get q (t) ;
[0062] (32) Then Q (t) copy times and splice Get the periodic component c of length L t-L+1:t ;
[0063] (4) By taking the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ;
[0064] (5) The residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample, and the backbone prediction model is the backbone model used for residual prediction, including but not limited to the basic neural network model and the existing time series prediction model. At the same time, the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C. t+1:t+H .
[0065] Specifically, the periodic component c t+1:t+H The generation of includes the following steps:
[0066] (51) By shifting the cycle Q to the left by (t+L) mod W positions, we can get Q (t+L) ;
[0067] (52) Q (t+L) copy times and splice Get the periodic component c of length H t+1:t+H .
[0068] (6) The predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0069] In another specific embodiment of the present application, the technical solution of this patent is used to further explain the electricity consumption of users in the power industry.
[0070] Accurately predicting a user's electricity consumption curve is crucial for power system planning. To this end, the industry urgently needs a more accurate user electricity consumption prediction technology to assist in the long-term scheduling and planning of the power system. There is electricity consumption data for 321 users in a certain area, with a recording interval of 1 hour. It is necessary to model based on these historical data and use the user's historical electricity consumption curve for the past 4 days (96 data points) to predict the user's electricity consumption curve for the next month (720 data points). The method of the present invention is now used to model this user electricity consumption prediction task:
[0071] First, the historical training data is standardized. Because different users have different patterns and ranges of electricity consumption data, each variable (user's electricity consumption) needs to be standardized to ensure data consistency. This is done by calculating the mean and standard deviation of each variable, then dividing each variable by its own mean and standard deviation.
[0072] Furthermore, the cycle length W of the data is determined. Electricity data typically has a daily cycle (different patterns during the day and night) and a weekly cycle (different patterns during weekdays and weekends). Combined with the data recording interval, it can be inferred that the cycle length of the power consumption curve is one week, that is, W = 168.
[0073] Furthermore, for the user power consumption data with D=321 variables, a learnable cycle is generated. By cyclically replicating the cycle period Q, a periodic component sequence C of the same length as the time series X can be obtained. The cycle period Q will be trained together with the backbone prediction model through gradient backpropagation during the training process, thereby learning the feature representation that reflects the intrinsic periodic pattern of the time series.
[0074] Furthermore, in each specific prediction process, we first intercept the sample x from the time series X. t-L+1:t , where t is the time index of the sample, L = 96 is the historical lookback window length of the sample; at the same time, the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t Specifically, Q can be obtained by shifting the cycle period Q to the left by tmodW positions. (t) , and then Q (t) copy times and splice Get the periodic component c of length L t-L+1:t .
[0075] Furthermore, by transforming the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t .
[0076] Furthermore, the residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H = 720 is the sample prediction window length. The backbone prediction model is a core model used for residual prediction, including but not limited to basic neural network models and existing time series prediction models. In this embodiment, a single-layer linear model and a two-layer MLP model are used as the backbone prediction models, and two specific prediction models, CycleNet / Linear and CycleNet / MLP, are constructed.
[0077] Furthermore, the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C. t+1:t+H Specifically, Q is obtained by shifting the cycle Q to the left by (t+L) mod W positions. (t+L) , and then Q (t+L) copy times and splice Get the periodic component c of length H t+1:t+H .
[0078] Furthermore, the predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0079] To clearly illustrate the overall process of this embodiment, Figure 1 A flowchart showing a residual period prediction method for enhancing time series forecasting is presented. Figure 2 A schematic diagram showing the use of Linear and MLP as the backbone prediction model is shown. Figure 3 A schematic diagram of the periodic component generation process using the method of the present invention is further shown.
[0080] In order to verify the effective performance of the present invention, this embodiment will use the CycleNet / Linear and CycleNet / MLP of the present invention to compare with the existing prediction models. Figure 4 The comparison results of the original direct modeling method and the method of the present invention in the prediction accuracy and parameter size of user power consumption prediction modeling are shown. It can be found that the present invention achieves higher prediction accuracy with a smaller parameter scale.
[0081] Furthermore, Figure 5The present invention, namely the residual cycle forecasting method (RCF), is combined with the existing time series forecasting model to improve the prediction accuracy. It can be found that the present invention can significantly improve the prediction accuracy of the existing model.
[0082] Furthermore, Figure 6 The figure shows the periodic features within the data learned by the present invention after training. It can be seen that the present invention fully captures the periodic features within the user's power consumption curve, including daily and weekly cycle patterns, providing further explainability for accurate time series prediction.
[0083] In summary, the residual period prediction method for enhanced time series prediction proposed in the present invention can effectively improve the prediction accuracy of user power consumption prediction tasks, provide an important basis for realizing power supply scheduling of the power system, and provide important guarantees for the safe and stable operation of the power system.
[0084] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.
[0085] Based on the same concept as the residual period prediction method for enhanced time series prediction in the above-mentioned embodiment, the present invention also provides a residual period prediction system for enhanced time series prediction, which can be used to execute the residual period prediction method for enhanced time series prediction. For ease of explanation, the structural diagram of the embodiment of the residual period prediction system for enhanced time series prediction only shows the parts related to the embodiment of the present invention. Those skilled in the art will understand that the illustrated structure does not constitute a limitation of the device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0086] See also Figure 7 In another embodiment of the present application, a residual period prediction system 100 for enhancing time series prediction is provided, the system comprising a period determination module 101, a cycle period generation module 102, a period component acquisition module 103, a residual component calculation module 104, a residual component prediction module 105, and a time series prediction module 106;
[0087] The period determination module 101 is used to determine the period length W of a data set; the data set includes time series data;
[0088] The cycle generation module 102 is used to generate a learnable cycle for time series data with D variables. By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained;
[0089] The periodic component acquisition module 103 is used to intercept samples x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ;
[0090] The residual component calculation module 104 is used to calculate the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ;
[0091] The residual component prediction module 105 is used to convert the residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ;
[0092] The time series prediction module 106 is used to convert the predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0093] It should be noted that the residual period prediction system for enhanced time series prediction of the present invention corresponds one-to-one to the residual period prediction method for enhanced time series prediction of the present invention. The technical features and beneficial effects described in the embodiment of the residual period prediction method for enhanced time series prediction mentioned above are all applicable to the embodiment of the residual period prediction for enhanced time series prediction. For specific contents, please refer to the description in the embodiment of the method of the present invention. No further details will be given here. This is hereby declared.
[0094] In addition, in the implementation of the residual period prediction system for enhanced time series prediction in the above-mentioned embodiment, the logical division of each program module is only an example. In actual application, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the residual period prediction system for enhanced time series prediction is divided into different program modules to complete all or part of the functions described above.
[0095] See also Figure 8In one embodiment, an electronic device for implementing a residual period prediction method for enhanced time series prediction is provided. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a residual period prediction program 203 for enhanced time series prediction.
[0096] The first memory 202 includes at least one type of readable storage medium, including a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the first memory 202 may be an internal storage unit of the electronic device 200, such as a mobile hard disk of the electronic device 200. In other embodiments, the first memory 202 may also be an external storage device of the electronic device 200, such as a plug-in mobile hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 200. Furthermore, the first memory 202 may also include both an internal storage unit of the electronic device 200 and an external storage device. The first memory 202 can not only be used to store application software and various types of data installed in the electronic device 200, such as the code of the residual period prediction program 203 for enhanced time series prediction, but can also be used to temporarily store data that has been output or is to be output.
[0097] In some embodiments, the first processor 201 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The first processor 201 is the control core (Control Unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and lines, and executing or executing programs or modules stored in the first memory 202, as well as calling data stored in the first memory 202, to perform various functions of the electronic device 200 and process data.
[0098] Figure 8 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 8The structure shown does not constitute a limitation on the electronic device 200 , and the electronic device 200 may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0099] The residual period prediction program 203 for enhanced time series prediction stored in the first memory 202 of the electronic device 200 is a combination of multiple instructions. When executed in the first processor 201, it can achieve the following:
[0100] Determining a period length W of a data set; the data set includes time series data;
[0101] Generate learnable cycles for time series data with D variables By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained;
[0102] Take a sample x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ;
[0103] By converting the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ;
[0104] The residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ;
[0105] The predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result
[0106] Furthermore, if the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0107] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0108] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A residual period prediction method based on enhanced time series prediction is used for user power consumption prediction, characterized in that: The steps include: Determine a cycle length W of a data set; the data set includes time series data; the data set is power consumption data of different users, and the cycle length W is the cycle length of the power consumption curve; Generate learnable cycles for time series data with D variables By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained; Take a sample x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ; By converting the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ; The residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ; The predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result The time series prediction result is the prediction result of the user's power consumption.
2. The residual period prediction method for enhanced time series prediction according to claim 1, characterized in that: The cycle length W of the data set is determined by manually reasoning about the characteristics of the time series data set or calculating the autocorrelation within the data set.
3. The residual period prediction method for enhanced time series prediction according to claim 1, characterized in that: The cycle period Q is trained together with the backbone prediction model through gradient back propagation during the training process, so as to learn the feature representation that reflects the intrinsic periodic pattern of the time series.
4. The residual period prediction method for enhanced time series prediction according to claim 1, characterized in that: The backbone prediction model is a backbone model used for residual prediction.
5. The residual period prediction method for enhanced time series prediction according to claim 4, characterized in that: The backbone prediction model is a single-layer linear model or a double-layer MLP model.
6. The residual period prediction method for enhancing time series prediction according to claim 1, characterized in that: The periodic component c t-L+1:t The generation of includes the following steps: Shift the cycle Q to the left by tmodW positions to obtain Q (t) ; Q (t) copy times and splice Get the periodic component c of length L t-L+1:t .
7. The residual period prediction method for enhanced time series prediction according to claim 1, characterized in that: The periodic component c t+1:t+H The generation of includes the following steps: Shift the cycle Q to the left by (t+L) mod W positions to obtain Q (t+L) ; Q (t+L) copy times and splice Get the periodic component c of length H t+1:t+H .
8. Enhanced time series prediction residual period prediction system for user power consumption prediction, characterized by: A residual period prediction method for enhanced time series prediction applied to any one of claims 1-7, comprising a period determination module, a cycle period generation module, a period component acquisition module, a residual component calculation module, a residual component prediction module, and a time series prediction module; The cycle determination module is used to determine the cycle length W of a data set; the data set includes time series data; the data set is power consumption data of different users, and the cycle length W is the cycle length of the power consumption curve; The cycle generation module is used to generate a learnable cycle for time series data with D variables. By cyclically replicating the cycle period Q, a periodic component sequence C having the same length as the time series X is obtained; The periodic component acquisition module is used to intercept samples x from the time series X t-L+1:t , where t is the time index of the sample, L is the length of the historical lookback window of the sample; the periodic component c corresponding to the sample is intercepted from the periodic component sequence C t-L+1:t ; The residual component calculation module is used to convert the original input sequence x t-L+1:t Subtract the periodic component c t-L+1:t Get the residual component x , t-L+1:t ; The residual component prediction module is used to convert the residual component x , t-L+1:t Input into the backbone prediction model for residual prediction to obtain the predicted value of the residual component Where H is the prediction window length of the sample; the periodic component c corresponding to the prediction window of the sample is intercepted from the periodic component sequence C t+1:t+H ; The time series prediction module is used to convert the predicted value of the residual component and the corresponding periodic component c t+1:t+H Add together to get the final time series prediction result The time series prediction result is the prediction result of the user's power consumption.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the residual period prediction method for enhanced time series prediction as described in any one of claims 1-7.
10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the residual period prediction method for enhanced time series prediction according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Timing sequence prediction method and device based on biaxial cascade network
CN117726037A
Long-time sequence prediction ensemble learning device based on multi-cycle divergence
CN118627645A