Short-term load prediction method, device and system for integrated energy system, and storage medium

By using the Transformer model in an integrated energy system, using attention mechanism and characteristic contribution calculation, the problem of complex data preprocessing and low degree of model parallelization in traditional methods is solved, and the accuracy and efficiency of short-term load prediction are improved.

CN119312210APending Publication Date: 2025-01-14BEIJING POWER EXCHANGE CENT CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411335958.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Traditional timing modeling methods have problems such as complex data preprocessing and low parallelization of models in the short-term load prediction of integrated energy systems, resulting in slow training speed.

Method used

The Transformer model is adopted to capture the correlation and long-term dependence between sequences using attention mechanism, and the training set is constructed through data preprocessing and feature contribution calculation, and input it into the Transformer model for prediction.

Benefits of technology

It improves the accuracy and efficiency of load prediction, solves the problem of slow training speed of traditional methods, and provides a new method for short-term load prediction of integrated energy systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312210A_ABST
    Figure CN119312210A_ABST
Patent Text Reader

Abstract

The invention discloses an integrated energy system short-term load prediction method, device and system, and a storage medium. The method comprises the following steps: S1, obtaining electric load historical data, thermal load historical data and historical meteorological data of a historical integrated energy system; s2, preprocessing the electric load historical data, the thermal load historical data and the historical meteorological data of the integrated energy system; s3, obtaining a load prediction model according to the preprocessed electrical load historical data, thermal load historical data and historical meteorological data of the integrated energy system; and S4, inputting to-be-processed data of which the type is the same as that of the historical data into the load prediction model to perform short-term load prediction of the integrated energy system. By adopting the technical scheme of the invention, the problem of low training speed caused by complex data preprocessing and low model parallelization degree of a traditional method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of integrated energy systems, and in particular relates to a method and device, a system, and a storage medium for short-term load forecasting of an integrated energy system. Background Art

[0002] The integrated energy system is a key technology to help achieve the dual carbon goals by coordinating the planning and flexible scheduling of multiple energy sources, fully absorbing renewable energy and improving energy utilization, while achieving complementary and coordinated operation of multiple energy sources. Load forecasting is the basis for energy management and optimal scheduling of integrated energy systems, and its forecasting accuracy is directly related to the overall operating performance and efficiency of the system. In addition, the load of the integrated energy system has temporal and spatial correlation and periodicity, so the load forecasting method based on time series modeling is widely used in short-term load forecasting.

[0003] Traditional time series modeling is mainly divided into prediction models based on autoregression, prediction models based on deep recurrent networks, prediction models based on time convolution, and prediction models based on fuzzy logic. Among them, the most famous autoregressive model is ARIMA (autoregressive model with integrated moving average). Due to the limitations of the linear model's expressive power, it is not friendly to time series modeling of complex nonlinear relationships, so prediction methods such as deep recurrent networks and time convolution have emerged. These two types of methods lack attention to the long-span characteristics of time series, and the accuracy of long series prediction is not high. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for short-term load forecasting of an integrated energy system, which solves the problem of slow training speed caused by complex data preprocessing and low degree of model parallelism in traditional methods.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A method for short-term load forecasting of an integrated energy system comprises the following steps:

[0007] Step S1, obtaining historical electric load data, thermal load data and historical meteorological data of the historical integrated energy system;

[0008] Step S2, preprocessing the historical data of electric load, historical data of heat load and historical meteorological data of the integrated energy system;

[0009] Step S3, obtaining a load forecasting model according to the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0010] Step S4: input the data to be processed that is the same as the historical data type into the load forecasting model to perform short-term load forecasting for the integrated energy system.

[0011] Preferably, in step S2, preprocessing the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system includes: correcting data outliers and missing values.

[0012] Preferably, step S3 comprises:

[0013] A training set is obtained according to the contribution of the electric load characteristics and the thermal load characteristics in the preprocessed electric load historical data, the thermal load historical data and the historical meteorological data of the integrated energy system;

[0014] The training set is input into the Transformer model to obtain the load forecasting model.

[0015] The present invention also provides a short-term load forecasting device for an integrated energy system, comprising:

[0016] An acquisition module, used to acquire historical electric load data, thermal load data and historical meteorological data of a historical integrated energy system;

[0017] A preprocessing module, used for preprocessing the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system;

[0018] A training module, used for obtaining a load forecasting model based on the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0019] The prediction module is used to input the data to be processed that is the same as the historical data type into the load prediction model to perform short-term load prediction of the integrated energy system.

[0020] Preferably, the preprocessing module is used to correct data outliers and missing values ​​in the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system.

[0021] Preferably, the training module includes:

[0022] A first processing unit is used to obtain a training set according to the contribution of electric load characteristics and thermal load characteristics in the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0023] The second processing unit is used to input the training set into the Transformer model to obtain the load forecasting model.

[0024] The present invention also provides a short-term load forecasting system for an integrated energy system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a short-term load forecasting method for an integrated energy system when executed by the processor.

[0025] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the short-term load forecasting method for the integrated energy system when running.

[0026] The present invention proposes a Transformer model with attention mechanism as the main architecture, which uses the attention structure to capture the correlation between sequences. It has the advantages of parallel computing and long-term sequence dependency learning, and solves the problems of complex data preprocessing and slow training speed caused by low model parallelization in traditional methods, bringing new development space for load forecasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0028] Figure 1 This is a flow chart of a method for short-term load forecasting of an integrated energy system according to an embodiment of the present invention;

[0029] Figure 2 Schematic diagram of short-term load forecast curve; (a) is the electric load forecast curve, and (b) is the thermal load forecast curve. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] Embodiment 1:

[0033] like Figure 1As shown, an embodiment of the present invention provides a method for short-term load forecasting of an integrated energy system, comprising the following steps:

[0034] Step S1, obtaining historical electric load data, thermal load data and historical meteorological data of the historical integrated energy system;

[0035] Step S2, preprocessing the historical data of electric load, historical data of heat load and historical meteorological data of the integrated energy system;

[0036] Step S3, obtaining a load forecasting model according to the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0037] Step S4: input the data to be processed that is the same as the historical data type into the load forecasting model to perform short-term load forecasting for the integrated energy system.

[0038] As an implementation of an embodiment of the present invention, in step S2, preprocessing the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system includes: correcting data outliers and missing values.

[0039] Furthermore, an outlier refers to a measured value in a group of measured values ​​whose deviation from the mean value exceeds two standard deviations; the detected outlier and missing value data are corrected by using the regression interpolation method combined with the following formula, and the average value of the n data before and after the corresponding position is replaced;

[0040]

[0041] Among them, X k represents the corrected kth missing value / outlier, X k-n It represents the nth observed value before the kth missing value / outlier in the observed sample, where n is a constant term, and n=4 is taken here.

[0042] As an implementation of the embodiment of the present invention, step S3 includes:

[0043] Step S31, obtaining a training set according to the contribution of the electric load characteristics and the thermal load characteristics in the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the comprehensive energy system;

[0044] Step S32: input the training set into the Transformer model to obtain a load forecasting model.

[0045] Further, in step S31, the data input features are preliminarily constructed based on the preprocessed historical data of electric load, thermal load and historical meteorological data of the integrated energy system, and the feature contribution is calculated according to the random forest method. Since each tree selects the features to be split downward based on the Gini coefficient, it is assumed that all the data have a input features Y1, Y2, ..., Y n , feature Y j At the node m of a certain tree i, split down h times, calculate the contribution of each feature to the load forecast according to the following formula, and select p1 electric load features and p2 thermal load features accordingly, merge the electric and thermal load inputs to form a complete sample library, and divide the sample library into s mutually exclusive sub-sample sets D of the same size;

[0046]

[0047] Among them, V ij gini Represents Y j The importance of the current tree i, G m represents the Gini coefficient before splitting, G1, G r Respectively represent the Gini coefficients of the left and right branches after splitting.

[0048] Assume that there are b trees with this feature, then:

[0049]

[0050] Among them, V j gini Represents Y j The importance score of this feature, V ij gini Represents Y j The importance of i in the current tree.

[0051]

[0052] Where V represents Y j The contribution of this feature, V i gini , V j gini Respectively represent Y i , Y j Importance score of the feature.

[0053] Further, in step S32, the training set of each division method is input into the Transformer model, and s different Transformer models are trained according to the following formula; in each training process, a non-repetitive sampling method is used, and different s-1 mutually exclusive sub-sample sets are used to train the Transformer model, and the remaining mutually exclusive sub-sample set is used as a validation set, and the accuracy of the Transformer model is calculated using the test sets corresponding to different training sets; finally, the average accuracy of s iterative training is calculated as the final model accuracy, and the model with the accuracy closest to the average accuracy among the s Transformer models is selected as the offline training model, that is, the best Transformer model, and relevant parameters are saved, including the number of iterative training (epochs), batch size (batch_size), cross-validation fold (s) and multi-task weights (α1, α2);

[0054]

[0055] in, is the predicted value of the i-th sample, X i is the true value of the i-th sample, t is the input sequence length, λ is the smoothing hyperparameter, and i represents the i-th sample;

[0056] According to the stochastic gradient descent algorithm, the model parameters that minimize the loss in the above formula are found, which is the load forecasting model.

[0057] As an implementation method of an embodiment of the present invention, the data to be processed that is the same as the historical data type is input into the load forecasting model, and the electric load forecasting results and the thermal load forecasting results are separated by a fully connected layer, and the output obtained is the predicted values ​​of the electric load and thermal load at the current moment.

[0058] Combined with the data of electricity and heat load of a comprehensive energy in 2022, the steps for example analysis are as follows:

[0059] Step 1: Collect data. According to the requirements of the load forecast for the next hour, collect the system electricity and heat load values, and collect meteorological data of the area where the integrated energy system is located, including temperature, humidity, dew point, etc. The data collection frequency is 1 hour, 24 time nodes a day, and a total of 8760 samples. The processed data is divided into training set and test set in a ratio of 6:3:1.

[0060] Step 2: Data processing, take n = 4, according to the formula Correct the outliers and missing values ​​in the data. Preliminary data input features are constructed based on the collected historical load, weather factors, date type and other data. The historical load 24 hours before the forecast time, the weather characteristics at the forecast time, and the date type are selected as the preliminary input features. Then, the formula

[0061] The contribution of each feature is calculated to select the load historical data, temperature, humidity, wind speed and other features, and extract typical characteristic indicators that reflect the load characteristics and their changing laws. The electric load includes: temperature, weather type, holidays, dew point, wind speed, etc.; the thermal load includes: temperature, weather type, holidays, atmospheric pressure, etc.

[0062] Step 3: Establish a Transformer multi-task model according to the formula The load forecasting model is obtained and the parameter values ​​are recorded. Finally, the data to be predicted is brought into the model to obtain the predicted value. The parameter results are: epochs = 100, batch_size = 64, s = 10, α1: α2 = 0.6: 0.4.

[0063] Since the load forecasting model has a longer-term memory capability, the load forecasting result obtained according to the embodiment of the present invention has better accuracy, thereby improving the accuracy of short-term load forecasting of the integrated energy system. Figure 2 as shown in (a) and (b).

[0064] The embodiment of the present invention has the characteristics of simple algorithm and parallel operation, which improves the prediction efficiency. The embodiment of the present invention introduces an attention mechanism, focuses on the long-span characteristics of the time series, analyzes the contribution of data characteristics to the load, effectively improves the prediction accuracy and prediction effect, and has wide practical application and promotion value.

[0065] Embodiment 2:

[0066] The embodiment of the present invention further provides a short-term load forecasting device for an integrated energy system, comprising:

[0067] An acquisition module, used to acquire historical electric load data, thermal load data and historical meteorological data of a historical integrated energy system;

[0068] A preprocessing module, used for preprocessing the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system;

[0069] A training module, used for obtaining a load forecasting model based on the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0070] The prediction module is used to input the data to be processed that is the same as the historical data type into the load prediction model to perform short-term load prediction of the integrated energy system.

[0071] As an implementation method of an embodiment of the present invention, a preprocessing module is used to correct data outliers and missing values ​​for historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system.

[0072] As an implementation of an embodiment of the present invention, the training module includes:

[0073] A first processing unit is used to obtain a training set according to the contribution of electric load characteristics and thermal load characteristics in the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system;

[0074] The second processing unit is used to input the training set into the Transformer model to obtain the load forecasting model.

[0075] Embodiment 3:

[0076] An embodiment of the present invention also provides a short-term load forecasting system for an integrated energy system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a short-term load forecasting method for an integrated energy system when executed by the processor.

[0077] Embodiment 4:

[0078] An embodiment of the present invention further provides a storage medium having a computer program stored thereon, and the computer program executes a method for short-term load forecasting of an integrated energy system when the computer program is run.

[0079] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for short-term load forecasting of an integrated energy system, characterized in that: The following steps are involved: Step S1, obtaining historical electric load data, thermal load data and historical meteorological data of the historical integrated energy system; Step S2, preprocessing the historical data of electric load, historical data of heat load and historical meteorological data of the integrated energy system; Step S3, obtaining a load forecasting model according to the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system; Step S4: input the data to be processed that is the same as the historical data type into the load forecasting model to perform short-term load forecasting for the integrated energy system.

2. The short-term load forecasting method for an integrated energy system according to claim 1, characterized in that: In step S2, preprocessing of the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system includes: correction of data outliers and missing values.

3. The method for short-term load forecasting of an integrated energy system according to claim 2, characterized in that: Step S3 includes: A training set is obtained according to the contribution of the electric load characteristics and the thermal load characteristics in the preprocessed electric load historical data, the thermal load historical data and the historical meteorological data of the integrated energy system; The training set is input into the Transformer model to obtain the load forecasting model.

4. A short-term load forecasting device for an integrated energy system, characterized in that: include: An acquisition module, used to acquire historical electric load data, thermal load data and historical meteorological data of a historical integrated energy system; A preprocessing module, used for preprocessing the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system; A training module, used for obtaining a load forecasting model based on the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system; The prediction module is used to input the data to be processed that is the same as the historical data type into the load prediction model to perform short-term load prediction of the integrated energy system.

5. The short-term load forecasting device for an integrated energy system according to claim 4, characterized in that: The preprocessing module is used to correct data outliers and missing values ​​for the historical data of electric load, historical data of thermal load and historical meteorological data of the integrated energy system.

6. The short-term load forecasting device for an integrated energy system according to claim 5, characterized in that: The training modules include: A first processing unit is used to obtain a training set according to the contribution of electric load characteristics and thermal load characteristics in the pre-processed electric load historical data, thermal load historical data and historical meteorological data of the integrated energy system; The second processing unit is used to input the training set into the Transformer model to obtain the load forecasting model.

7. A short-term load forecasting system for an integrated energy system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the method for short-term load forecasting of an integrated energy system as described in any one of claims 1 to 3 is executed.

8. A storage medium, characterized in that: The storage medium stores a computer program, which, when running, executes the short-term load forecasting method for an integrated energy system as described in any one of claims 1 to 3.