Load prediction method and system, electronic device and storage medium
Through the LTSF-Linear model and multi-model fusion Stacking ensemble learning method, the problems of insufficient accuracy and generalization ability of existing load forecasting methods when dealing with complex nonlinear problems are solved, and higher-precision load forecasting is achieved.
Patent Information
- Application Number
- CN202411374513.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing load forecasting methods have difficulty in balancing prediction accuracy and generalization ability when dealing with complex nonlinear problems, and the self-attention mechanism is not effective in processing time-sensitive power data.
The LTSF-Linear model is adopted, including Linear, DLinear and NLinear sub-models, combined with multi-model fusion Stacking ensemble learning and linear regression model. By preprocessing historical load data and multi-step forecasting, the linear regression model is used to optimize weights and biases to improve forecast accuracy.
The accuracy and precision of load forecasting are improved, especially when processing long sequence data, the prediction error is reduced and the generalization ability of the model is enhanced.
Smart Images

Figure CN119171433B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power prediction, in particular to a load prediction method and system, an electronic device and a storage medium. BACKGROUND
[0002] In the operation and planning of power systems, load prediction is a crucial link. Accurate load prediction not only effectively guarantees the safe and stable operation of the power system, but also improves energy utilization efficiency and reduces energy waste. At present, there are various load prediction methods, mainly including traditional statistical methods, artificial intelligence methods and hybrid methods, etc.
[0003] Traditional statistical methods, such as time series analysis and linear regression, are widely used due to their simple model and high computational efficiency. However, these methods often show limitations in dealing with complex nonlinear problems and cannot accurately capture the complex rules of load changes. With the development of artificial intelligence technology, machine learning and deep learning methods have been increasingly applied in load prediction. These methods can handle large amounts of data and capture complex nonlinear relationships, improving the accuracy of load prediction. However, a single model often cannot balance prediction accuracy and generalization ability.
[0004] Most current medium and long-term prediction models cannot extract time relationships from long sequences, i.e., the prediction error does not decrease with the increase of the backtracking window size, mainly due to the self-attention mechanism. The self-attention mechanism has the characteristics of anti-sequence and permutation invariance, which means that it is not sensitive to the arrangement of input sequences, i.e., the output is robust to different arrangements of input. This seems to be more consistent with human thinking and processing in natural language processing tasks, because perhaps distant words are more helpful to the context, or changing the order of words does not affect the understanding of their semantics. However, for time-sensitive power data, each value in the sequence is a numerical value, not like a single word that has relatively fixed range of semantic information. The semantic information of numerical values is relatively scarce and variable in meaning, and the time sequence information is the most valuable information. Based on this observation, theoretically, the self-attention mechanism is suitable and effective for NLP tasks, but it is fatal for sequence processing tasks that rely on time series. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a load prediction method, system, electronic device and storage medium, which can solve at least part of the technical problems existing in the prior art.
[0006] In order to achieve the above purpose, the embodiments of the present application provide a load prediction method, comprising:
[0007] Obtaining historical load data and preprocessing the historical load data to obtain target historical load data;
[0008] inputting the target historical load data into a pre-constructed LTSF-Linear model for prediction to obtain a prediction result, wherein the pre-constructed LTSF-Linear model comprises a Linear sub-model, a DLinear sub-model, and an NLinear sub-model;
[0009] using a multi-model fusion Stacking integrated learning to calculate a target prediction result based on a linear regression model from a prediction result output by the LTSF-Linear model.
[0010] Optionally, historical load data is acquired, and the historical load data is pre-processed to obtain target historical load data, comprising:
[0011] initial historical load data is selected from the acquired historical load data, and missing values, error values, and noise values in the initial historical load data are repaired;
[0012] the repaired initial historical load data is integrated to obtain the target historical load data.
[0013] Optionally, the target historical load data is input into a pre-constructed LTSF-Linear model for prediction to obtain a prediction result, comprising:
[0014] the target historical load data is input into a Linear sub-model to obtain a first prediction result through weighted summation operation;
[0015] the target historical load data is input into a DLinear sub-model, the DLinear sub-model performs sequence decomposition on the target historical load data to obtain a trend sequence and a remaining sequence other than the trend sequence, and the trend sequence and the remaining sequence other than the trend sequence are input into a Linear sub-model respectively to obtain a prediction result corresponding to the trend sequence and a prediction result corresponding to the remaining sequence other than the trend sequence and to fuse the prediction results to obtain a second prediction result;
[0016] the target historical load data is input into an NLinear sub-model, the NLinear sub-model subtracts a last value in a sequence corresponding to the target historical load data to obtain a simple standard sequence, and performs prediction based on the simple standard sequence to obtain a prediction value, and adds the subtracted last value to the prediction value to obtain a third prediction result;
[0017] the first prediction result, the second prediction result, and the third prediction result are fused to obtain a prediction result.
[0018] Optionally, the prediction result output by the LTSF-Linear model is calculated to obtain a target prediction result based on a linear regression model using a multi-model fusion Stacking ensemble learning, including:
[0019] The Linear sub-model, the DLinear sub-model and the NLinear sub-model in the LTSF-Linear model are used as base models for load prediction, and linear regression is used as a meta-learner;
[0020] The historical load data is divided into a time series training set and a test set, and the prediction results of the base models on the training set and the test set are calculated;
[0021] Based on the daily cycle characteristics of the load, the prediction results are divided into different random variables at different time points, and a linear regression model of the prediction results of the base models is constructed for the divided time points;
[0022] The weights and biases of the linear regression model are optimized on the training set, and the target prediction result is calculated according to the linear regression model and the prediction results of the base models on the test set.
[0023] Optionally, the linear regression model is as follows:
[0024] ;
[0025] ;
[0026] In the formula, represents the prediction result of the Stacking ensemble learning model on the test set, 、 、 represents the weight of the Linear sub-model, the DLinear sub-model and the NLinear sub-model at the i-th time point, 、 、 represents the prediction result of the Linear sub-model, the DLinear sub-model and the NLinear sub-model at the i-th time point, represents the bias, and n is an integer.
[0027] On the other hand, the present application also provides a load prediction system, comprising:
[0028] An acquisition unit is configured to acquire historical load data and pre-process the historical load data to obtain target historical load data;
[0029] a prediction unit, configured to input the target historical load data into a pre-constructed LTSF-Linear model to perform prediction, and obtain a prediction result, wherein the pre-constructed LTSF-Linear model comprises a Linear sub-model, a DLinear sub-model, and an NLinear sub-model;
[0030] a fusion unit, configured to use a multi-model fusion Stacking ensemble learning to calculate a target prediction result based on a linear regression model from the prediction result output by the LTSF-Linear model.
[0031] Optionally, the prediction unit is specifically configured to:
[0032] input the target historical load data into the Linear sub-model, and obtain a first prediction result through weighted summation operation;
[0033] input the target historical load data into the DLinear sub-model, and perform sequence decomposition on the target historical load data to obtain a trend sequence and a remaining sequence other than the trend sequence, and input the trend sequence and the remaining sequence other than the trend sequence into the Linear sub-model respectively to obtain a prediction result corresponding to the trend sequence and a prediction result corresponding to the remaining sequence other than the trend sequence, and fuse the prediction result corresponding to the trend sequence and the prediction result corresponding to the remaining sequence other than the trend sequence to obtain a second prediction result;
[0034] input the target historical load data into the NLinear sub-model, subtract a last value in a sequence corresponding to the target historical load data from the sequence to obtain a simple standard sequence, perform prediction based on the simple standard sequence to obtain a prediction value, add the subtracted last value to the prediction value to obtain a third prediction result;
[0035] fuse the first prediction result, the second prediction result, and the third prediction result to obtain the prediction result.
[0036] Optionally, the fusion unit is specifically configured to:
[0037] use the Linear sub-model, the DLinear sub-model, and the NLinear sub-model in the LTSF-Linear model as base models for load prediction, and use linear regression as a meta-learner;
[0038] divide the historical load data into a time series training set and a test set, and calculate prediction results of the base models on the training set and the test set;
[0039] based on the daily cycle characteristics of the load, regard the prediction results at different time points as different random variables, and construct a linear regression model of the prediction results of the base models for the different time points;
[0040] The weights and bias of the linear regression model are optimized on the training set, and the target prediction result is calculated according to the linear regression model and the prediction result of the base model on the test set.
[0041] In another aspect, the present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the load prediction method described above when executing the program.
[0042] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the load prediction method described above when executed by a processor.
[0043] Through the above technical solution, in the aspect of prediction model construction, Linear, DLinear and NLinear in the LTSF-Linear model are used as base models for load prediction to predict historical load data, a linear regression model based on the above base models is used as a meta-model, and a final prediction result is obtained by training through the multi-model fusion Stacking ensemble learning method, thereby improving the accuracy of the load prediction result.
[0044] Other features and advantages of the embodiments of the present application will be described in detail in the following specific implementation part. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings are used to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used to explain the embodiments of the present application together with the following specific implementation, but do not constitute a limitation on the embodiments of the present application. In the drawings:
[0046] Figure 1 is an implementation flowchart of a load prediction method provided by the embodiments of the present application;
[0047] Figure 2 is a structural schematic diagram of a Linear sub-model provided by the embodiments of the present application;
[0048] Figure 3 is a structural schematic diagram of a DLinear sub-model provided by the embodiments of the present application;
[0049] Figure 4 is a multi-model fusion Stacking ensemble learning algorithm flowchart provided by the embodiments of the present application;
[0050] Figure 5 is a structural schematic diagram of a load prediction system provided by the embodiments of the present application. DETAILED DESCRIPTION
[0051] The specific embodiments of the present application are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely intended to illustrate and explain the embodiments of the present application, and are not intended to limit the embodiments of the present application.
[0052] Referring to Figure 1 shown, an implementation flowchart of a load prediction method provided by the embodiments of the present application, including the following execution steps:
[0053] Step 100: Obtain historical load data, and pre-process the historical load data to obtain target historical load data.
[0054] Specifically, when step 100 is executed, the following steps can be specifically executed:
[0055] S1000: Select initial historical load data from the obtained historical load data, and perform repair processing on missing values, error values and noise values in the initial historical load data.
[0056] S1001: Integrate the initial historical load data after repair processing to obtain target historical load data.
[0057] In some embodiments, the data pre-processing process is as follows: data screening: selecting data useful for prediction from collected data. Data cleaning: processing missing values, error values and noise in the data to ensure data quality. Data fusion: integrating data from different sources to form a complete data set. Abnormality detection: identifying and processing abnormal values in the data to ensure data accuracy and consistency.
[0058] (5) Data repair: repairing missing data or error data to improve data integrity.
[0059] Step 101: Input the target historical load data into a pre-constructed LTSF-Linear model for prediction to obtain a prediction result, wherein the pre-constructed LTSF-Linear model includes a Linear sub-model, a DLinear sub-model and an NLinear sub-model.
[0060] In some embodiments, referring to Figure 2 shown, a structure diagram of a Linear sub-model provided by the embodiments of the present application, the basic linear model Linear is a simple one-layer fully connected time series network direct multi-step prediction model (DMS), the input is a historical sequence with a length of L, and the output is a sequence of future T steps, Linear directly regresses the historical time series through weighted summation operation to make future prediction, as shown in Figure 2 . wherein is the weight of the linear layer, and is the input and prediction of the ith variable, note that Linear shares weights for different variables, which will not model spatial correlation.
[0061] In some embodiments, referring to Figure 3 , a structure diagram of a DLinear sub-model provided by an embodiment of the present application is shown, DLinear is actually a combination of a sequence decomposition mechanism and Linear, the structure of the Linear sub-model is shown in Figure 2 , the input sequence is first decomposed into a trend sequence and a residual sequence , the two sequences are respectively input into the Linear model, and the prediction output of the sub-sequences is superimposed to obtain the prediction value of the original sequence , . .
[0062] In some embodiments, in order to handle the case of distribution deviation of long sequences, NLinear is further proposed, NLinear first subtracts the last value of the input sequence from the sequence, which is called a simple standard sequence. The simple standard sequence obtains a prediction value through a linear layer, and the subtracted part is added to the prediction value to obtain the final prediction value. The subtraction and addition in NLinear are simple normalization of the input sequence.
[0063] Specifically, when step 101 is performed, the following steps can be specifically performed:
[0064] S1010: input the target historical load data into the Linear sub-model, and obtain a first prediction result through weighted summation operation.
[0065] S1010: input the target historical load data into the DLinear sub-model, the DLinear sub-model decomposes the target historical load data into a trend sequence and a residual sequence other than the trend sequence, and inputs the trend sequence and the residual sequence other than the trend sequence into the Linear sub-model respectively, obtains a prediction result corresponding to the trend sequence and a prediction result corresponding to the residual sequence other than the trend sequence, and fuses the prediction results to obtain a second prediction result.
[0066] S1010: input the target historical load data into the NLinear sub-model, the NLinear sub-model subtracts the last value in the sequence corresponding to the target historical load data to obtain a simple standard sequence, and predicts based on the simple standard sequence to obtain a prediction value, adds the subtracted last value to the prediction value to obtain a third prediction result.
[0067] S1010: fuse the first prediction result, the second prediction result and the third prediction result to obtain a prediction result.
[0068] Step 102: using multi-model fusion Stacking ensemble learning, the prediction result output by the LTSF-Linear model is calculated to obtain the target prediction result based on a linear regression model.
[0069] Specifically, when step 102 is executed, the following steps can be specifically executed:
[0070] S1020: the Linear sub-model, the DLinear sub-model and the NLinear sub-model in the LTSF-Linear model are used as base models for load prediction, and linear regression is used as a meta-learner.
[0071] S1021: the historical load data is divided into a time series training set and a test set, and the prediction results of the base models on the training set and the test set are calculated.
[0072] S1022: based on the daily cycle characteristics of the load, the prediction results are divided into different random variables at time points, and a linear regression model of the prediction results of the base models is constructed for the divided time points.
[0073] S1023: the weights and biases of the linear regression model are optimized on the training set, and the target prediction result is calculated according to the linear regression model and the prediction results of the base models on the test set.
[0074] Specifically, the linear regression model is as follows:
[0075] ;
[0076] ;
[0077] In the formula, represents the prediction result of the Stacking ensemble learning model on the test set, 、 、 represents the weight of the Linear sub-model, the DLinear sub-model and the NLinear sub-model at the i time, 、 、 represents the prediction result of the Linear sub-model, the DLinear sub-model and the NLinear sub-model at the i time, represents the bias, and n is an integer.
[0078] In some embodiments, the multi-model fusion Stacking ensemble learning algorithm used is specifically using Linear, DLinear, and NLinear in the LTSF-Linear model as base models for load prediction, and using linear regression as a meta-learner to realize model fusion. The specific flowchart is shown in FIG. 2. Figure 4 Specifically, for the divided time series training set and test set, first, the base models (Linear, DLinear, and NLinear) are learned on the training set, and the prediction results of each base model on the training set and the test set are calculated. Secondly, the construction and learning of the meta-learner, given the daily periodicity of the load, the prediction results are divided by time points as different random variables, so there are 96*3 random variables, ; ; , where the subscript represents the time point, and the superscript is used to indicate the model. The prediction results of each base model are constructed by time points , , of the linear regression model. The expression of the linear regression model is as follows:
[0079]
[0080] The weights and biases of each linear regression model are optimized on the training set, i.e., a total of 96*4 parameters are estimated. Finally, the model fusion prediction result calculation is performed, and according to each regression model and the prediction value of each base model on the test set, the prediction result of the Stacking comprehensive model on the test set is calculated.
[0081] In a specific embodiment, the load data of a certain province is used, with a resolution of 15 minutes. Linear, DLinear, and NLinear in the LTSF-Linear model are used as base models for load prediction, and based on the historical 192-point load sequence, the future 96-point load is predicted (T+1 prediction). According to the ratio of 0.7:0.1:0.2, all data is divided into training set, validation set, and test set. The prediction accuracy results of the model on the test set are shown, and the test set stage is the same time range of more than one year of data. The evaluation indicators include accuracy and maximum load accuracy, which are defined as shown in Table 1.
[0082] Table 1 Definition of evaluation indicators
[0083]
[0084] (1) Normal day and holiday accuracy
[0085] Table 2 and Table 3 show the accuracy rate and maximum load accuracy rate of each model in the working day and holiday statistics, and it can be seen that: ① The prediction accuracy rate of the model for working days is generally 0.7-1 percentage points higher than that for holidays; the maximum load prediction accuracy rate for working days is generally 0.5 percentage points higher than that for holidays. ② The prediction performance (accuracy rate and maximum load accuracy rate) of the three base models is similar on working days, while the difference is slightly obvious in holiday prediction. Overall, the performance of DLinear is slightly better, but the performance difference of the three base models is small. ③ In terms of accuracy rate for holidays and working days, the Stacking model fusion method does not show its advantage, and its accuracy rate is about 0.3% higher than the average accuracy rate of the base model.
[0086] Table 2 Accuracy rate by day type
[0087]
[0088] Table 3 Maximum load accuracy rate by day type
[0089]
[0090] (2) Monthly average accuracy rate
[0091] Table 4 and Table 5 show the accuracy rate and maximum load accuracy rate of each model in the monthly statistics, which still have similar results: the performance difference of the three base models in each month is small; the Stacking model fusion method does not show its advantage, and only in individual months it is improved by about 0.3% compared with the base model.
[0092] Table 4 Accuracy rate by month
[0093]
[0094] Table 5 Maximum load accuracy rate by month
[0095]
[0096] Through the above technical scheme, in the aspect of prediction model construction, the Linear, DLinear and NLinear in the LTSF-Linear model are used as base models for load prediction to predict the historical load data respectively, a linear regression model based on the above base models is used as a meta-model, and a final prediction result is obtained through multi-model fusion Stacking ensemble learning method, thereby improving the accuracy of the load prediction result.
[0097] Referring to Figure 5 Fig. 1 is a structural schematic diagram of a load prediction system provided by an embodiment of the present application, which comprises:
[0098] The acquisition unit 50 is configured to acquire historical load data, and pre-process the historical load data to obtain target historical load data.
[0099] The prediction unit 51 is configured to input the target historical load data into a pre-constructed LTSF-Linear model for prediction to obtain a prediction result, wherein the pre-constructed LTSF-Linear model includes a Linear sub-model, a DLinear sub-model, and an NLinear sub-model.
[0100] The fusion unit 52 is configured to use multi-model fusion Stacking ensemble learning to calculate a target prediction result based on a linear regression model from the prediction result output by the LTSF-Linear model.
[0101] In some embodiments, the prediction unit 51 is specifically configured to:
[0102] input the target historical load data into the Linear sub-model, and obtain a first prediction result through weighted summation operation;
[0103] input the target historical load data into the DLinear sub-model, the DLinear sub-model performs sequence decomposition on the target historical load data to obtain a trend sequence and a remaining sequence other than the trend sequence, and input the trend sequence and the remaining sequence other than the trend sequence into the Linear sub-model respectively to obtain a prediction result corresponding to the trend sequence and a prediction result corresponding to the remaining sequence other than the trend sequence, and fuse the prediction result corresponding to the trend sequence and the prediction result corresponding to the remaining sequence other than the trend sequence to obtain a second prediction result;
[0104] input the target historical load data into the NLinear sub-model, the NLinear sub-model subtracts the last value in the sequence corresponding to the target historical load data to obtain a simple standard sequence, and performs prediction based on the simple standard sequence to obtain a prediction value, and adds the subtracted last value to the prediction value to obtain a third prediction result;
[0105] fuse the first prediction result, the second prediction result, and the third prediction result to obtain a prediction result.
[0106] In some embodiments, the fusion unit 52 is specifically configured to:
[0107] use the Linear sub-model, the DLinear sub-model, and the NLinear sub-model in the LTSF-Linear model as base models for load prediction, and use linear regression as a meta-learner;
[0108] divide the historical load data into a time series training set and a test set, and calculate prediction results of the base models on the training set and the test set;
[0109] Based on load day cycle characteristics, the prediction results are regarded as different random variables at different time points, and a linear regression model of the prediction results of the base model is constructed for the time points;
[0110] The weight and bias of the linear regression model are optimized on the training set, and the target prediction result is calculated according to the linear regression model and the prediction result of the base model on the test set.
[0111] In another aspect, the present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the load prediction method according to any one of the above embodiments when executing the program.
[0112] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the load prediction method according to any one of the above embodiments.
[0113] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application 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-ROMs, optical storage, etc.) containing computer-usable program code.
[0114] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks
[0115] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product comprising instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks
[0116] These computer program instructions can also be loaded into computer or other programmable data processing devices to cause a series of operational steps to be performed on the computer or other programmable devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable devices provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1
[0117] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0118] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, CD-ROM, digital versatile disc (DVD), or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information for access by a computing device. In no case does the medium include a transitory signal.
[0119] Computer readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for storing information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0120] It should also be noted that the terms "comprising", "comprises", "including", "includes" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0121] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.
Claims
1. A load forecasting method, characterized in that: include: Obtain historical load data, and pre-process the historical load data to obtain target historical load data; Inputting the target historical load data into a pre-built LTSF-Linear model for prediction to obtain a prediction result, wherein the pre-built LTSF-Linear model includes a Linear sub-model, a DLinear sub-model, and an NLinear sub-model; Use multi-model fusion stacking ensemble learning to calculate the target prediction result based on the prediction result output by the LTSF-Linear model based on the linear regression model; Using multi-model fusion stacking ensemble learning, the prediction results output by the LTSF-Linear model are calculated based on the linear regression model to obtain the target prediction results, including: The Linear sub-model, DLinear sub-model, and NLinear sub-model in the LTSF-Linear model are used as the base models for load forecasting, and linear regression is used as the meta-learner. Divide the historical load data into a time series training set and a test set, and calculate the prediction results of the base model in the training set and the test set; Based on the daily cycle characteristics of the load, the forecast results at different time points are regarded as different random variables, and a linear regression model of the forecast results of the base model is constructed for each time point; The weights and biases of the linear regression model are optimized on the training set, and the target prediction results are calculated based on the linear regression model and the prediction results of the base model on the test set; The linear regression model is as follows: ; ; Where, Represents the prediction results of the Stacking ensemble learning model on the test set, 、 、 Represents the weights of the Linear sub-model, DLinear sub-model, and NLinear sub-model at the i-th moment, 、 、 Represents the prediction results of the Linear sub-model, DLinear sub-model, and NLinear sub-model at the i-th moment, Represents the bias, where n is an integer.
2. The load forecasting method according to claim 1, characterized in that: Obtain historical load data and pre-process the historical load data to obtain target historical load data, including: Selecting initial historical load data from the acquired historical load data, and repairing missing values, error values, and noise values in the initial historical load data; The repaired initial historical load data are integrated to obtain the target historical load data.
3. The load forecasting method according to claim 1, characterized in that: The target historical load data is input into the pre-built LTSF-Linear model for prediction to obtain prediction results, including: Input the target historical load data into the Linear sub-model and obtain the first prediction result through weighted sum operation; The target historical load data is input into the DLinear sub-model, which performs sequence decomposition on the target historical load data to obtain a trend sequence and a remaining sequence excluding the trend sequence. The trend sequence and the remaining sequence excluding the trend sequence are respectively input into the Linear sub-model to obtain the prediction results corresponding to the trend sequence and the prediction results corresponding to the remaining sequence excluding the trend sequence, and fuse them to obtain a second prediction result. Input the target historical load data into the NLinear sub-model, subtract the last value in the sequence corresponding to the target historical load data from the NLinear sub-model to obtain a simple standard sequence, perform a forecast based on the simple standard sequence to obtain a forecast value, and add the subtracted last value to the forecast value to obtain a third forecast result; The first prediction result, the second prediction result, and the third prediction result are integrated to obtain a prediction result.
4. A load forecasting system, characterized in that: include: An acquisition unit is used to acquire historical load data and pre-process the historical load data to obtain target historical load data; A prediction unit, configured to input the target historical load data into a pre-built LTSF-Linear model for prediction to obtain a prediction result, wherein the pre-built LTSF-Linear model includes a Linear sub-model, a DLinear sub-model, and an NLinear sub-model; The fusion unit is used to use multi-model fusion stacking ensemble learning to calculate the prediction results output by the LTSF-Linear model based on the linear regression model to obtain the target prediction results; The fusion unit is specifically used for: The Linear sub-model, DLinear sub-model, and NLinear sub-model in the LTSF-Linear model are used as the base models for load forecasting, and linear regression is used as the meta-learner. Divide the historical load data into a time series training set and a test set, and calculate the prediction results of the base model in the training set and the test set; Based on the daily cycle characteristics of the load, the forecast results at different time points are regarded as different random variables, and a linear regression model of the forecast results of the base model is constructed for each time point; The weights and biases of the linear regression model are optimized on the training set, and the target prediction results are calculated based on the linear regression model and the prediction results of the base model on the test set; The linear regression model is as follows: ; ; Where, Represents the prediction results of the Stacking ensemble learning model on the test set, 、 、 Represents the weights of the Linear sub-model, DLinear sub-model, and NLinear sub-model at the i-th moment, 、 、 Represents the prediction results of the Linear sub-model, DLinear sub-model, and NLinear sub-model at the i-th moment, Represents the bias, where n is an integer.
5. The load forecasting system according to claim 4, characterized in that: The prediction unit is specifically configured to: Input the target historical load data into the Linear sub-model and obtain the first prediction result through weighted sum operation; The target historical load data is input into the DLinear sub-model, which performs sequence decomposition on the target historical load data to obtain a trend sequence and a remaining sequence excluding the trend sequence. The trend sequence and the remaining sequence excluding the trend sequence are respectively input into the Linear sub-model to obtain the prediction results corresponding to the trend sequence and the prediction results corresponding to the remaining sequence excluding the trend sequence, and fuse them to obtain a second prediction result. Input the target historical load data into the NLinear sub-model, subtract the last value in the sequence corresponding to the target historical load data from the NLinear sub-model to obtain a simple standard sequence, perform a forecast based on the simple standard sequence to obtain a forecast value, and add the subtracted last value to the forecast value to obtain a third forecast result; The first prediction result, the second prediction result, and the third prediction result are integrated to obtain a prediction result.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the load forecasting method according to any one of claims 1 to 3 are implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the load forecasting method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Distribution transformer short-term load prediction method and device and electronic equipment
CN116128109A