A method and system for predicting electricity sales based on load characteristics and model fusion

Through the method based on load characteristics and model fusion, the power load characteristics are decomposed and time and weather factors are combined, the problem of large error in power sales prediction in the existing technology is solved, and more accurate power trend capture and prediction is achieved.

CN112418545BActive Publication Date: 2024-12-20STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011399227.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-04
Publication Date
2024-12-20
Estimated Expiration
2040-12-04

AI Technical Summary

Technical Problem

The existing power sales forecasting method has a large error after a special event, and cannot effectively capture the change in the power trend, resulting in inaccurate prediction results.

Method used

Using a method based on load characteristics and model fusion, through data acquisition, feature engineering, model construction and parameter optimization, the power load characteristics are decomposed into trend terms, season terms and residual terms, combined with time characteristics and weather factors, the Prophet model and gradient improvement are used. The model makes short, medium and long-term predictions, and improves prediction accuracy through model fusion.

Benefits of technology

It effectively reduces the error in power sales forecasting and improves prediction accuracy, especially after special events, it can better capture the changes in power trends and provide accurate short, medium and long-term prediction values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112418545B_ABST
    Figure CN112418545B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for predicting power sales based on load characteristics and model fusion, including: modeling data collection and preprocessing; selecting and extracting relevant features of the predicted target power sales, and optimizing the relevant features through correlation coefficients; the relevant features include power load features, time features and weather factor features; decomposing the power load features into trend items, season items and residual items, respectively predicting the three decomposed items and reconstructing the estimated power load features, inputting the short-term and medium-term prediction learner models together with the time features and weather factor features, and grid-optimizing the parameters of each model, integrating the learner models to obtain short-term and medium-term prediction values ​​of power sales; performing Prophet model optimization on the power load features, time features and weather features to obtain long-term prediction values ​​of power sales. The present invention solves the problem of large prediction errors of power sales after special events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power technology, and in particular to a method and system for predicting power sales based on load characteristics and model fusion. Background Art

[0002] In the prediction method of electricity sales, due to the small amount of monthly data, time series methods such as Holt-Winters algorithm, ARIMA algorithm or X11 decomposition method were used in the past; or simple machine learning models (strong learning models are not suitable for scenarios with too few samples) such as linear regression algorithm, SVM algorithm or perceptron algorithm. Since the prediction of electricity sales must predict the variables of the location, and the important features related to electricity (industrial added value for industrial electricity consumption, residents' disposable income for residents' electricity consumption, etc.) are all real-time features, that is, it is impossible to give the relevant feature values ​​in the future (the estimate is bound to have a large error), so the machine learning model is not applicable. As for the time series model, after a special event, the electricity is bound to have a rebound trend, and the time series cannot capture this trend. Therefore, the existing prediction method of electricity sales has a large error in the prediction results after a special event. Summary of the invention

[0003] 1. Technical issues to be resolved

[0004] Based on the above problems, the present invention provides a method and system for predicting power sales volume based on load characteristics and model fusion, which improves the problem of large power sales volume prediction error after a special event occurs.

[0005] (II) Technical solution

[0006] Based on the above technical problems, the present invention provides a method for predicting power sales based on load characteristics and model fusion, the method comprising the following steps:

[0007] S1, data collection and preprocessing for modeling, the collected data includes monthly electricity data and daily electricity data;

[0008] S2. Feature engineering: Select and extract relevant features of the predicted target electricity sales volume for the modeling data, and optimize the relevant features through correlation coefficients; the relevant features include power load features, time features, and weather factor features;

[0009] S3, decomposing the power load characteristics into three decomposition items: trend item, season item and residual item, respectively predicting the three decomposition items and reconstructing them to obtain the estimated power load characteristics;

[0010] S4. Input the time characteristics, weather factor characteristics and estimated power load characteristics into the short-term and medium-term prediction learner models, and grid optimize the parameters of each of the learner models:

[0011] S5. The learner models are integrated to obtain short-term and medium-term forecast values ​​of electricity sales.

[0012] Furthermore, the method further comprises the following steps:

[0013] S6. Perform Prophet model optimization on the power load characteristics, time characteristics and weather characteristics to obtain a long-term forecast value of power sales.

[0014] Furthermore, the time features in step S2 include: day_of_year, day_of_month, day_of_week, year, month, week_total_id, week_year_id, if_holiday, whether today is a holiday, month_year_id, month_total_id, and holiday_num, which is a weekend day.

[0015] Furthermore, the weather factor characteristics in step S2 are obtained by the following steps:

[0016] S2.2.1. Setting low temperature threshold and high temperature threshold: Draw a fitting curve based on the daily electricity sales and the daily average temperature, and set the threshold according to the trend of the fitting curve;

[0017] S2.2.2. Calculate the heating coefficient and cooling coefficient based on the low temperature threshold and the high temperature threshold:

[0018] hd i =max(T low -T i ,0),

[0019] cd i =max(T i -T high ,0),

[0020] where hd i and cd i represent the heating coefficient and cooling coefficient of the i-th day respectively; T low and T high are low temperature threshold temperature and high temperature threshold temperature respectively; T i is the average daily temperature of the day;

[0021] S2.2.3. Calculate the temperature coefficient corresponding to the day based on the heating coefficient and cooling coefficient:

[0022] HCD i =α*hd i +cd i ,

[0023]

[0024] The electricity sales in the mth month of the Xth year is recorded as S m:m+1 The peak sales volume is in month m and month n, so the ratio of peak sales volume is S m:m+1 / S n:n+1 , α is the average value of the ratio of peak electricity sales in years X and X+1.

[0025] Further, step S3 includes the following steps:

[0026] S3.1. Decomposing the power load characteristics into three decomposition items: trend item, seasonal item and residual item by X11;

[0027] S3.2. Forecast the three decomposition items separately:

[0028] S3.3. Add the predicted data of the three decomposition items according to the X11 addition model to obtain the estimated power load characteristics.

[0029] Furthermore, the prediction method of step S3.2 includes:

[0030] S3.2.1. Trend item prediction: Use the Prophet regression model to obtain the trend item prediction results;

[0031] S3.2.2、Seasonal item periodic filling: Seasonal items have strong regularity and are filled according to their periodic items;

[0032] S3.2.3. Noise filling of the remaining items: Perform LB test on the remaining items to determine whether they are white noise sequences, and use a random Gaussian model to fill them with white noise.

[0033] Furthermore, the short-term and medium-term prediction learner models described in step S4 include LightGBM, XGBoost and GBDT.

[0034] Furthermore, the grid optimization method described in step S4 is to use GridSearchCV to perform grid search on parameters to select the optimal parameter combination.

[0035] Furthermore, the fusion method described in step S5 is to use Mlxtend to perform stacking fusion on the model.

[0036] The present invention also discloses a power sales forecasting system based on load characteristics and model fusion, comprising:

[0037] at least one processor; and at least one memory in communication with the processor, wherein:

[0038] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the power sales forecasting method based on load characteristics and model fusion.

[0039] (III) Beneficial effects

[0040] The above technical solution of the present invention has the following advantages:

[0041] (1) The present invention considers that power load is a strongly relevant real-time feature of power sales forecasting, decomposes and predicts power load features, reconstructs them into estimated power load features, and uses them as future power sales features. Together with other relevant features, they are input into the forecasting model for forecasting, thus avoiding the inability of the time model to capture the trend changes of power sales caused by special events and reducing forecasting errors.

[0042] (2) The present invention combines the internal data of daily power sales, monthly power sales and power load data, and considers external data such as weather factors and holiday data, and reasonably selects relevant features that affect power sales, which helps to obtain accurate power sales forecast values ​​based on the relevant features;

[0043] (3) The prediction model of the present invention further improves the accuracy of model prediction through parameter optimization and fusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0045] Figure 1 It is a flow chart of a method for predicting power sales based on load characteristics and model fusion according to an embodiment of the present invention;

[0046] Figure 2 A flowchart of a method for predicting power sales based on load characteristics and model fusion according to an embodiment of the present invention;

[0047] Figure 3 A scatter plot of daily average temperature-daily electricity sales (total electricity sales) in an embodiment of the present invention;

[0048] Figure 4 is the spearman correlation coefficient between all the features of the embodiment of the present invention and the power sales volume;

[0049] Figure 5is a power load curve diagram of an embodiment of the present invention;

[0050] Figure 6 A graph showing the relationship between electricity sales and power load curves according to an embodiment of the present invention;

[0051] Figure 7 It is a decomposition curve diagram of the power load X11 according to an embodiment of the present invention;

[0052] Figure 8 A power load trend item prediction curve diagram according to an embodiment of the present invention;

[0053] Fig. 9 A filling curve chart of the power load seasonal item according to an embodiment of the present invention;

[0054] Fig.10 A histogram of residual items of power load according to an embodiment of the present invention;

[0055] Fig.11 A curve chart of the remaining items of the power load according to an embodiment of the present invention;

[0056] Fig.12 is an estimated power load curve diagram of an embodiment of the present invention;

[0057] Fig.13 are the optimal parameters of each prediction model in the embodiment of the present invention;

[0058] Fig.14 This is a flow chart of the Stacking model fusion according to an embodiment of the present invention;

[0059] Fig.15 It is a curve diagram of parameter components of the Prophet model according to an embodiment of the present invention;

[0060] Fig.16 Manually set a mutation point for the Prophet model of the embodiment of the present invention;

[0061] Fig.17 This is a long-term electricity forecast curve of the Prophet model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0063] The embodiment of the present invention is a method for predicting power sales based on load characteristics and model fusion, such as Figure 1 and Figure 2 As shown, the following steps are included:

[0064] S1. Modeling data collection and preprocessing:

[0065] The collected modeling data include 114 monthly electricity data from 2011 to June 2020 and 1461 daily electricity data from 2018 to July 8, 2020. The data are pre-processed through outlier identification and outlier processing; the daily electricity data are used for electricity forecasting, and the monthly electricity data are combined with relevant characteristics for factor analysis.

[0066] S2. Feature engineering: Select and extract relevant features for predicting target electricity sales based on modeling data, and optimize relevant features through correlation coefficients;

[0067] S2.1. Preliminary extraction of relevant features of the predicted target electricity sales, including power load features, time features and weather factor features: The present invention extracts 12 features, including purchase_elecqt power load, day_of_year day of this year, day_of_month day of this month, day_of_week day of this week, year year, month month, week_total_id total weeks, week_year_id weekdays, if_holiday whether today is a holiday, month_year_id month, month_total_id total months, holiday_num weekend.

[0068] In addition to date and load, the present invention also considers relevant weather factors, which are one of the main factors affecting power sales. How to properly process weather data is crucial to the results of power sales forecast. The present invention adopts a method of setting a comfortable temperature range to pre-process weather data.

[0069] Generally speaking, people will not take cooling or heating measures at a comfortable temperature. Therefore, this project sets low temperature threshold temperature and high temperature threshold temperature for each industry respectively, and heating measures or cooling measures are only taken when the actual temperature is lower than the low temperature threshold temperature or higher than the high temperature threshold temperature. The heating coefficient, cooling coefficient and overall temperature coefficient are set accordingly, and their quantified values ​​are included in the prediction model as factors affecting monthly electricity sales.

[0070] S2.2.1. Setting low temperature threshold and high temperature threshold

[0071] First, the project counted the daily electricity sales and daily average temperature in Hunan Province in 2019, and then drew a scatter plot of daily average temperature-daily electricity sales and a fitting curve. Finally, the curve trend was analyzed to set the threshold. Figure 3 This is a scatter plot of the relationship between the average daily temperature and daily electricity sales. According to the analysis, it can be concluded that the low and high temperature threshold temperatures for residential electricity consumption are 15℃ and 25℃ respectively.

[0072] S2.2.2. Calculate the heating coefficient and cooling coefficient based on the low temperature threshold and the high temperature threshold:

[0073] The heating coefficient indicates the magnitude of the average temperature below the low temperature threshold. The larger the heating coefficient, the lower the temperature and the greater the heating intensity required. The cooling coefficient indicates the magnitude of the average temperature above the high temperature threshold. The larger the cooling coefficient, the higher the temperature and the greater the cooling intensity required. When the temperature is above the low temperature threshold or below the high temperature threshold, it is in the comfort zone and no heating or cooling measures are taken. The calculation formulas for the daily heating coefficient and cooling coefficient are as follows:

[0074] hd i =max(T low -T i ,0)

[0075] cd i =max(T i -T high ,0)

[0076] where hd i and cd i represent the heating coefficient and cooling coefficient of the i-th day respectively; T low and T high are low temperature threshold temperature and high temperature threshold temperature respectively, and their values ​​can be determined based on the daily average temperature-daily electricity sales scatter plot and its fitting curve diagram for each industry; T i The average temperature for the day.

[0077] S2.2.3. Calculate the temperature coefficient corresponding to the day based on the heating coefficient and cooling coefficient:

[0078] After obtaining the daily heating coefficient and cooling coefficient, the corresponding temperature coefficient is obtained:

[0079] HCD i =α*hd i +cd i

[0080] where hd i and cd i are the heating coefficient and cooling coefficient of the i-th day, respectively, where:

[0081]

[0082] The electricity sales in the mth month of the Xth year is recorded as S m:m+1 The peak electricity sales volume is usually in July and January, so the ratio of peak electricity sales volume is S 7:8 / S 1:2 , α is the average value of the ratio of peak electricity sales in 2018 and 2019.

[0083] S2.3, optimizing the relevant features by using the correlation coefficient:

[0084] After extracting and sorting out the relevant feature information, the spearman correlation coefficient (Pearson coefficient is only applicable to linear correlation) or chi-square test is used to screen the features. The present invention adopts the spearman correlation coefficient method. The correlation coefficient is as follows: Figure 4 As shown, the features with correlation coefficient greater than 0.05 are selected as the features of the final data set.

[0085] S3, decomposing the power load characteristics into three decomposition items: trend item, season item and residual item, respectively predicting the three decomposition items and reconstructing them to obtain the estimated power load characteristics;

[0086] S3.1. Decomposing the power load characteristics into three decomposition items: trend item, seasonal item and residual item by X11;

[0087] The power load characteristics are real-time characteristics. If you want to use the power load characteristics to predict the power sales volume, you must first estimate the power load characteristics and use the estimated power load characteristics as the future power sales volume characteristics. The curve of the power load characteristics is as follows: Figure 5 As shown in Figure 2, it can be observed that the cyclical trend of the load curve is relatively stable, and the estimated error is not too large. After normalizing the power sales volume and the power load, it can be found that the two curves are very similar ( Figure 6 ), so it is concluded that power load is a strongly relevant real-time feature of power sales forecast and can be accurately estimated.

[0088] Therefore, the power load characteristics are decomposed into X11, and the formula of the X11 decomposition addition model is as follows: Y = T + S + R

[0089] The power load data series Y is divided into trend term T, seasonal term S and residual term R for subsequent prediction. The decomposition effect is as follows: Figure 7 shown.

[0090] S3.2. Forecast the three decomposition items separately:

[0091] S3.2.1. Trend item prediction: Use the Prophet regression model to obtain the trend item prediction results;

[0092] The method used to predict trend items is the Prophet model proposed by Facebook. Compared with other traditional time series models, the Prophet model has the following advantages: it is more flexible; it does not consider the problem of missing values; it fits very quickly, making interactive exploration possible; the parameters of the prediction model are very easy to interpret, so analysts can set some parameters based on experience.

[0093] The specific parameters of the Prophet model will be explained in the long-term forecast. Here, only the default parameters are used to forecast power load. Figure 8 As shown, the mape for April is predicted to be 6.379%, the mape for May is 5.929%, and the mape for June is 0.761%. From the curve and the error, it can be seen that excluding the impact of special events (abnormal reduction), the overall trend item is relatively accurate.

[0094] S3.2.2、Seasonal item periodic filling: Seasonal items have strong regularity and are filled according to their periodic items;

[0095] The seasonal term is a periodic component decomposed from the curve. Therefore, the seasonal term does not need to be predicted using complex methods. It only needs to be filled in according to the cycle. The effect of seasonal term filling is as follows: Fig. 9 shown.

[0096] S3.2.3, Noise filling of the remaining items: Perform LB test on the remaining items. If it is judged to be a white noise sequence, use a random Gaussian model to fill it with white noise;

[0097] The remaining term after decomposition, that is, the residual term, is calculated according to the probability distribution in its histogram ( Fig.10 ) and LB test, it can be found that the remaining data conforms to the standard Gaussian noise model. This means that the remaining items cannot be predicted (because they are random data). Accordingly, we only need to continue to generate Gaussian noise (white noise) to complete the filling of the remaining items. The filling effect is as follows Fig.11 shown.

[0098] S3.3. Add the predicted data of the three decomposition items to obtain the estimated power load characteristics:

[0099] After predicting and filling the trend item, seasonal item and residual item respectively, the predicted data is restored according to the X11 addition model: the total data of the estimated power load characteristics = trend item + seasonal item + residual item. The restoration effect is as follows: Fig.12 As shown in the figure, the mape in April is 5.93%, the mape in May is 3.38%, and the mape in June is 0.761%. According to the errors of each month in the second quarter, it can be proved that the load assessment is feasible.

[0100] S4. Input the time characteristics, weather factor characteristics and estimated power load characteristics into the short-term and medium-term prediction learner models, and grid optimize the parameters of each of the learner models:

[0101] The estimated power load is added as a new feature to the short-term and medium-term forecast of electricity sales. Three forecast models are tentatively selected: LightGBM, XGBoost and GBDT. The strong learner model for the short-term and medium-term forecast of electricity sales contains a large number of parameters. GridSearchCV is used to perform grid search on the parameters to select the optimal parameter combination;

[0102] GBDT stands for Gradient Boosting Decision Tree. This algorithm is an iterative decision tree algorithm that consists of multiple decision trees. The conclusions of all trees are accumulated to get the final answer. The algorithm first estimates an initial value gamma, which is a tree with only one root node; then calculates the value of the negative gradient of the loss function in the current model and uses it as an estimate of the residual; then estimates the regression tree leaf node area to fit the approximate value of the residual; then uses linear search to estimate the value of the leaf node area to minimize the loss function and update the regression tree; finally, the final model is output.

[0103] The XGBoost algorithm is an efficient implementation of GBDT. It mainly optimizes GBDT in the following three aspects: First, the optimization of the algorithm itself: In terms of the selection of weak learner models of the algorithm, compared with GBDT which only supports decision trees, it can also directly use many other weak learners. In the loss function of the algorithm, in addition to the loss itself, a regularization part is also added. In terms of the optimization method of the algorithm, the loss function of GBDT only performs a negative gradient (first-order Taylor) expansion on the error part, while the XGBoost loss function performs a second-order Taylor expansion on the error part, which is more accurate; second, the optimization of the algorithm operation efficiency: for each weak learner, such as the process of establishing a decision tree, parallel selection is performed to find the appropriate subtree splitting features and feature values. Before parallel selection, all feature values ​​are sorted and grouped to facilitate the parallel selection mentioned above. For the grouped features, select the appropriate group size and use the CPU cache for reading acceleration. Save each group to multiple hard disks to increase the IO speed; third, the optimization of the robustness of the algorithm: for the features of missing values, the processing method of the missing values ​​is determined by enumerating whether all missing values ​​enter the left subtree or the right subtree at the current node. The algorithm itself adds L1 and L2 regularization terms to prevent overfitting and improve generalization ability.

[0104] LightGBM (Light Gradient Boosting Machine) is a framework for implementing the GBDT algorithm. It supports efficient parallel training and has the advantages of faster training speed, lower memory consumption, and better accuracy. At the same time, LightGBM has distributed support and can quickly process massive data.

[0105] These three models are frequently used in data prediction. By integrating weak learners (such as decision trees) using methods such as Boosting, the accuracy of prediction is increased. Therefore, such models usually have many parameters (especially LightGBM). The present invention uses the GridSearchCV grid search method to select the optimal parameters of the model. The GridSearchCV method uses the parameters that currently have the greatest impact on the model to tune until it is optimized; then the next parameter with the greatest impact is tuned, and so on, until all parameters are adjusted. The disadvantage of this method is that it may be adjusted to a local optimum instead of a global optimum, but it saves time and effort. The parameters determined by grid optimization are as follows: Fig.13 As shown, these are the optimal parameters for each model on the training set.

[0106] S5. Fusion of the learner models: Stacking of the models using Mlxtend to obtain short-term and medium-term forecast values ​​of electricity sales;

[0107] There are many ways to integrate models, such as Voting, Averaging, Stacking, etc. This project uses the Stacking method for model integration. The flowchart of the model integration using the Stacking method is as follows: Fig.14 As shown, in simple terms, Stacking is to design several separate models, perform K-fold cross-validation on them to output prediction results, then merge the prediction results output by each model into new features, and train the base model to further improve the model accuracy.

[0108] S6. Perform Prophet model optimization on the power load characteristics, time characteristics and weather characteristics to obtain a long-term forecast value of power sales:

[0109] The Prophet model used for long-term electricity sales forecast is optimized by setting breakpoints, adding disturbances, setting thresholds, etc., so as to make the long-series electricity sales curve more realistic.

[0110] The Prophet model has been used in the trend forecast of power load. Compared with power load, the volatility and sensitivity of power sales are stronger, so the default Prophet model needs to be optimized. Weekly (7 days), monthly (30.5 days) and annual (365.5 days) variables are added to seasonal disturbances, and weekend and holiday fluctuations are added. The growth trend is set to be linear and the threshold is set to make the overall trend as realistic as possible. The Prophet parameter component curve is shown in Figure 15, which includes the trend component, holiday component, weekly component, annual component, monthly component and weekend component from top to bottom. In addition, Prophet can manually set mutation points to more accurately capture the overall trend changes of the data. The mutation point setting curve is as follows: Fig.16 shown.

[0111] Verification of electricity sales forecast results: Taking April, May and June 2020 as the test set, the total electricity sales forecast results of Hunan are obtained. Among them, the short-term and medium-term forecast results are shown in Table 1. According to Table 1, the daily error of each model is about 6.5-7%, the 7-day error is about 3.5-4%, the 15-day error is about 1.8-2.8%, and the monthly error is about 0-3%. Among them, the model fusion method with xgboost as the base model has the best effect. The error for 15 days can reach 1.97%, and the average error for April, May and June can be reduced to 1.472%.

[0112] Table 1. Short-term and medium-term electricity sales forecast errors of various models

[0113]

[0114]

[0115] According to the prediction error, the selected model is the xgboost-based model, which is a fusion of the xgboost, lightgbm and gbdt models. The prediction results of the model with a 15-day period, the monthly electricity consumption from April to June, and the overall quarterly electricity consumption in the second quarter are shown in Table 2.

[0116] Table 2. Short-term and medium-term electricity sales forecast results for April, May and June 2020

[0117] date Real power Predicted power consumption Error%(mape) 4.1-4.15 5721915407 5743509700 0.377396229 4.16-4.30 5762598366 5756301090 0.109278411 5.1-5.15 5908824579 5778365800 2.207863472 5.16-5.30 5965766882 6071295130 1.768896608 5.31-6.14 6179979786 5813112060 5.936390385 6.15-6.29 6812189773 6640018480 2.527400122

[0118] The long-term forecast is currently based on the forecast results for June 2020 and July 1-8, 2020, and the overall curve fitting trend. The average error for 7 days is 8.24%, the error for 15 days is 7.49%, the mape for the whole month of June is 3.64%, and the mape for July 1-8 is 0.29%. The long-term forecast curve for electricity sales is as follows Fig.17 shown.

[0119] Among them, short-term forecast refers to the multi-angle forecast of electricity sales for 7-15 consecutive days in the future; medium-term forecast refers to the multi-angle forecast of electricity sales for 1-3 consecutive months in the future; long-term forecast refers to the multi-angle forecast of electricity sales for 0.5-2 consecutive years in the future.

[0120] Finally, it should be noted that the above method can be converted into software program instructions, which can be implemented by using a system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0121] In summary, the above-mentioned power sales forecasting method and system based on load characteristics and model fusion has the following advantages:

[0122] (1) The present invention considers that power load is a strongly relevant real-time feature of power sales forecasting, decomposes and predicts power load features, reconstructs them into estimated power load features, and uses them as future power sales features. Together with other relevant features, they are input into the forecasting model for forecasting, thus avoiding the inability of the time model to capture the trend changes of power sales caused by special events and reducing forecasting errors.

[0123] (2) The present invention combines the internal data of daily power sales, monthly power sales and power load data, and considers external data such as weather factors and holiday data, and reasonably selects relevant features that affect power sales, which helps to obtain accurate power sales forecast values ​​based on the relevant features;

[0124] (3) The prediction model of the present invention further improves the accuracy of model prediction through parameter optimization and fusion.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims.

Claims

1. A method for predicting electricity sales based on load characteristics and model fusion, characterized in that: The method comprises the following steps: S1, data collection and preprocessing for modeling, the collected data includes monthly electricity data and daily electricity data; S2. Feature engineering: Select and extract relevant features of the predicted target electricity sales volume for the modeling data, and optimize the relevant features through correlation coefficients; the relevant features include power load features, time features, and weather factor features; S3, decomposing the power load characteristics into three decomposition items: trend item, season item and residual item, respectively predicting the three decomposition items and reconstructing them to obtain the estimated power load characteristics; S4. Input the time characteristics, weather factor characteristics and estimated power load characteristics into the short-term and medium-term prediction learner models, and grid optimize the parameters of each learner model: S5. The learner models are integrated to obtain short-term and medium-term forecast values ​​of electricity sales; The time features in step S2 include: day_of_year is the day of the year, day_of_month is the day of the month, day_of_week is the day of the week, year is the year, month is the month, week_total_id is the total number of weeks, week_year_id is the number of weeks, if_holiday is whether the day is a holiday, month_year_id is the month of the year, month_total_id is the total number of months, holiday_num is the weekend; The weather factor features in step S2 are obtained by the following steps: S2.2.

1. Setting low temperature threshold and high temperature threshold: Draw a fitting curve based on the daily electricity sales and the daily average temperature, and set the threshold according to the trend of the fitting curve; S2.2.

2. Calculate the heating coefficient and cooling coefficient based on the low temperature threshold and the high temperature threshold: hd i =max(T low -T i ,0), cd i =max(T i -T high ,0), where hd i and cd i represent the heating coefficient and cooling coefficient of the i-th day respectively; T low and T high are low temperature threshold temperature and high temperature threshold temperature respectively; T i is the average daily temperature of the day; S2.2.

3. Calculate the temperature coefficient corresponding to the day based on the heating coefficient and cooling coefficient: HCD i =α*hd i +cd i , The electricity sales in the mth month of the Xth year is recorded as S m:m+1 The peak sales volume is in month m and month n, so the ratio of peak sales volume is S m:m+1 / S n:n+1 , α is the average value of the ratio of peak electricity sales in years X and X+1; Optimizing the relevant features through the correlation coefficient includes taking the spearman correlation coefficient or the chi-square test to screen the relevant features to obtain the optimized relevant features; Step S3 includes the following steps: S3.

1. Decomposing the power load characteristics into three decomposition items: trend item, seasonal item and residual item by X11; S3.

2. Forecast the three decomposition items separately: S3.

3. Add the predicted data of the three decomposition items according to the X11 addition model to obtain the estimated power load characteristics.

2. The method for predicting power sales based on load characteristics and model fusion according to claim 1 is characterized in that: The method further comprises the following steps: S6. Perform Prophet model optimization on the power load characteristics, time characteristics and weather characteristics to obtain a long-term forecast value of power sales.

3. The method for predicting power sales based on load characteristics and model fusion according to claim 1 is characterized in that: The prediction method of step S3.2 includes: S3.2.

1. Trend item prediction: Use the Prophet regression model to obtain the trend item prediction results; S3.2.2、Seasonal item periodic filling: Seasonal items have strong regularity and are filled according to their periodic items; S3.2.

3. Noise filling of the remaining items: Perform LB test on the remaining items to determine whether they are white noise sequences, and use a random Gaussian model to fill them with white noise.

4. The method for predicting power sales based on load characteristics and model fusion according to claim 1 is characterized in that: The short-term and medium-term prediction learner models described in step S4 include LightGBM, XGBoost and GBDT.

5. The method for predicting power sales based on load characteristics and model fusion according to claim 1 is characterized in that: The grid optimization method described in step S4 is to use GridSearchCV to perform grid search on parameters to select the optimal parameter combination.

6. The method for predicting electricity sales based on load characteristics and model fusion according to claim 1 is characterized in that: The fusion method described in step S5 is to use Mlxtend to perform stacking fusion on the model.

7. A power sales forecasting system based on load characteristics and model fusion, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the power sales forecasting method based on load characteristics and model fusion as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Prosperity index prediction method for electric power consumption market

    CN105844351A

  • Wholesale electric quantity prediction method taking small hydropower output into consideration

    CN106548285A