Electricity sale quantity prediction method and device
By processing outliers and decomposing historical power sales data, predicting trend terms, season terms and random terms respectively, and reconstructing and adjusting the curve, the problem that traditional power sales forecasting methods are difficult to accurately reflect complex changes, and the accuracy and credibility of the prediction results are improved.
Patent Information
- Application Number
- CN202411652273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional power sales forecasting methods are difficult to accurately reflect the complex external environment changes and the differences in user electricity consumption characteristics, resulting in large errors in the prediction results, affecting the decision-making efficiency and operating benefits of power supply companies.
By obtaining historical power sales data, outlier processing and data set screening, the data is decomposed based on the seasonal adjustment algorithm, the trend terms, season terms and random terms are predicted, and the prediction results are added and curve reconstruction is carried out, and the final power sales prediction results are obtained through curve selection and Spring Festival adjustment.
It improves the accuracy and credibility of the power sales forecast results, can better reflect complex external environment changes and user electricity consumption characteristics, and enhances the decision-making efficiency and operating benefits of the power supply company.
Smart Images

Figure CN119515178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a method and device for predicting electricity sales volume. Background Art
[0002] With the continuous improvement of the digital level of the power industry, the data governance methods of power supply companies have undergone tremendous changes, and the power industry is also facing more and more decision-making problems. In the power industry, power sales forecasting is an important part of the operation and management of power supply companies. Its accuracy is directly related to the operating efficiency of power supply companies and the stable operation of power grids. With the continuous development of the power market and the complexity of user electricity consumption behavior, the difficulty of power sales forecasting has gradually increased. Traditional power sales forecasting methods are often based on historical data and simple statistical models, which are difficult to accurately reflect the complex changes in the external environment and the differences in user electricity consumption characteristics, resulting in large errors in the forecast results, affecting the decision-making efficiency and operating efficiency of power supply companies.
[0003] The patent with application number CN202010260212.9 provides a method and system for analyzing and predicting electricity sales by electricity consumption category based on big data, which belongs to the field of electric power technology and is used to solve the technical problems of large deviations and incomplete consideration of factors in the current electricity sales forecast. This method includes: obtaining electricity sales data and preprocessing; decomposing the electricity sales curve to obtain trend items, seasonal items and random items; introducing leading indicators, predicting trend items, seasonal items and random items, and obtaining preliminary forecast results. A two-stage modeling is used for the electricity sales forecast, and the forecast electricity of the scheduled months is adjusted respectively, and the electricity sales in the first quarter are adjusted to obtain the final forecast results. However, the volume of its data trend items is large, and the robustness of the model prediction cannot be guaranteed. In addition, the algorithm for decomposing the electricity sales curve for stripping fails to grasp the details of the data. The processing of the forecast results cannot predict the random items, and it is difficult to obtain accurate forecast results. Therefore, the accuracy of its forecast results is low. Summary of the invention
[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a method and device for predicting power sales volume, which can improve the accuracy and credibility of power sales volume prediction results.
[0005] According to one aspect of the present application, a method for predicting electricity sales volume is provided, including: obtaining historical electricity sales volume data; performing outlier processing and data set screening on the historical electricity sales volume data to obtain a screened curve; decomposing the screened curve based on a seasonal adjustment algorithm to obtain trend items, seasonal items, and random items; predicting the trend items, seasonal items, and random items respectively to obtain trend item prediction results, seasonal item prediction results, and random item prediction results; adding the trend item prediction results, the seasonal item prediction results, and the random item prediction results to obtain a curve reconstruction result; performing curve optimization and Spring Festival adjustment on the curve reconstruction result to obtain an electricity sales volume forecast result.
[0006] In one embodiment, the trend item, the seasonal item and the random item are predicted respectively to obtain trend item prediction results, seasonal item prediction results and random item prediction results, including: stripping the random item of the Spring Festival to obtain the random item curve after the Spring Festival stripping; based on the maximum temperature, the minimum temperature, the average temperature, the number of holidays, combined with a hybrid expert model, Kalman filtering, and a logistic regression algorithm, predicting the random item curve after the Spring Festival stripping to obtain a random item prediction result.
[0007] In one embodiment, after predicting the random item curve after the Spring Festival is stripped and obtaining the random item prediction result, the electricity sales forecasting method also includes: using the curve optimization algorithm of the hierarchical analysis method and the data fusion algorithm of the Kalman filter to correct the random item prediction result; wherein, the trend item prediction result, the seasonal item prediction result and the random item prediction result are added to obtain the curve reconstruction result, including: adding the corrected random item prediction result, the trend item prediction result and the seasonal item prediction result to obtain the curve reconstruction result.
[0008] In one embodiment, the electricity sales volume prediction method further includes: constructing a leading analysis model based on a dynamic time warping algorithm; obtaining a leading indicator through the leading analysis model; wherein, the trend item, the seasonal item and the random item are predicted respectively to obtain a trend item prediction result, a seasonal item prediction result and a random item prediction result, including: predicting the trend item based on the correlation between the leading indicators to obtain a trend item prediction result.
[0009] In one embodiment, a leading indicator is obtained through the leading analysis model, including: using a dynamic time warping algorithm to obtain a net capacity increase trend item and a power sales trend item; calculating the shortest regularized path between the net capacity increase trend item and the power sales trend item; and obtaining the net capacity increase based on the number of occurrences in the shortest regularized path.
[0010] In one embodiment, the trend item, the season item and the random item are predicted respectively to obtain trend item prediction results, season item prediction results and random item prediction results, including: based on sparse iterative algorithm modeling, the season item is predicted to obtain the season item prediction results.
[0011] In one embodiment, the seasonal adjustment algorithm includes an X13 seasonal adjustment algorithm, which decomposes the filtered curve based on the seasonal adjustment algorithm to obtain trend items, seasonal items and random items, including: the X13 seasonal adjustment algorithm is used for the original sequence Y t Perform linear filtering to obtain the trend term T t : Combine the original series with the trend term T t Subtract to get SI t , for SI t Perform moving average to obtain seasonal term S t :
[0012]
[0013]
[0014] Combine the original series with the trend term T t , Seasonal Item S t Subtract to get random item I t ; The relationship between the three subsequences of trend term, seasonal term and random term is expressed as: Y t =T t +S t +I t Where, Y t represents the post-screening curve, T t is the trend term, S t is the seasonal term, I t is a random item.
[0015] In one embodiment, the curve reconstruction result is subjected to curve optimization and Spring Festival adjustment to obtain a power sales forecast result, including: constructing a Spring Festival adjustment model; wherein the Spring Festival adjustment model uses the number of days from the Spring Festival to the first day of January-March and the seasonal ratio of power sales in January-March as input data; and fitting the input data using a polynomial to obtain a fitting function of the number of days from the Spring Festival to the first day of January-March and the seasonal ratio of power sales in January-March: ω k =f(x k ); Based on the fitting function and the number of days between the Spring Festival of the predicted year and the first day of January-March, calculate the seasonal ratio of the forecast for January-March of the predicted year; According to the forecast power sales value of the first quarter and the seasonal ratio of the forecast for January-March, reallocate the forecast power sales value of each month in the first quarter to obtain the output result of the Spring Festival adjustment model.
[0016] In one embodiment, the curve reconstruction result is subjected to curve selection and Spring Festival adjustment to obtain a power sales forecast result, including: curve selection for the curve reconstruction result; iterative optimization of model training error; iterative optimization of prediction trend similarity; iterative optimization of prediction trend credibility; and obtaining a power sales forecast result.
[0017] According to another aspect of the present application, a power sales forecasting device is provided, including: an acquisition module for acquiring historical power sales data; a processing module for performing outlier processing and data set screening on the historical power sales data to obtain a screened curve; a decomposition module for decomposing the screened curve based on a seasonal adjustment algorithm to obtain trend items, seasonal items and random items; a prediction module for respectively predicting the trend items, seasonal items and random items to obtain trend item prediction results, seasonal item prediction results and random item prediction results; a reconstruction module for adding the trend item prediction results, the seasonal item prediction results and the random item prediction results to obtain a curve reconstruction result; an adjustment module for performing curve optimization and Spring Festival adjustment on the curve reconstruction result to obtain a power sales forecast result.
[0018] The electricity sales forecasting method and device provided in the present application perform outlier processing and data set screening on the data to obtain the screened curve. When performing curve decomposition and stripping, modeling and forecasting are performed by considering the impact of seasons on the data, different influencing factors and user categories are effectively used for forecasting, and the curve reconstruction results are subjected to curve optimization and Spring Festival adjustment, the model is optimized, the optimal electricity sales forecasting result is obtained, and the credibility of the forecasting result is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0020] Figure 1 It is a flowchart of a method for predicting electricity sales volume provided by an exemplary embodiment of the present application.
[0021] Figure 2 It is a flowchart of a method for predicting electricity sales volume provided by another exemplary embodiment of the present application.
[0022] Figure 3 It is a structural diagram of a power sales amount prediction device provided by an exemplary embodiment of the present application.
[0023] Figure 4It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0024] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0025] Application Overview
[0026] Traditional electricity sales forecasts often rely only on historical electricity sales data, ignoring other important factors that affect electricity sales, such as meteorological conditions, holidays, user types, etc., resulting in a lack of comprehensiveness and accuracy in the forecast model. In addition, traditional forecast models often use simple methods such as linear regression and time series analysis, which are difficult to capture the nonlinear characteristics and cyclical laws of changes in electricity sales, resulting in poor stability in the forecast results. External factors such as the economy, technological progress, and climate change have a significant impact on electricity sales, but traditional methods do not take these factors into consideration enough, resulting in forecast results that are difficult to adapt to changes in the external environment.
[0027] Therefore, the present application provides a method and device for predicting electricity sales volume, which processes outliers and filters data sets to obtain filtered curves. When decomposing and stripping the curves, the impact of seasons on data is considered for modeling and prediction. Different influencing factors and user categories are effectively used for prediction. The curve reconstruction results are selected and adjusted for the Spring Festival. The model is optimized to obtain the optimal electricity sales volume prediction result and improve the credibility of the prediction result.
[0028] Exemplary Methods
[0029] Figure 1 is a flow chart of a method for predicting electricity sales provided by an exemplary embodiment of the present application. Figure 1 As shown, the electricity sales forecasting method includes:
[0030] S1: Obtain historical electricity sales data.
[0031] The historical electricity sales curve can be generated through the historical electricity sales data. The historical electricity sales curve is a graphical representation of the trend of electricity sales over a period of time. It is of great significance for understanding the seasonal fluctuations and long-term growth trends of electricity sales and predicting future electricity sales. The historical electricity sales curve can reflect seasonal fluctuations. There are usually obvious seasonal fluctuations in electricity sales, which are related to factors such as climate, holidays, and economic activities. For example, in summer, due to the increased use of refrigeration equipment such as air conditioners, electricity sales tend to increase; in winter, the use of heating equipment will also lead to an increase in electricity sales.
[0032] S2: Perform outlier processing and data set screening on the historical electricity sales data to obtain the filtered curve.
[0033] Outliers refer to those points in the data that are significantly deviated from other observations. They may be caused by measurement errors, data entry errors, or extreme variations in the data itself. When dealing with outliers, if the number of outliers is small and the impact on the overall analysis is small, they can be deleted directly. The mean, median, mode, or other reasonable values can be used to replace the outliers. The choice of replacement method should be determined according to the specific situation of the data and the purpose of the analysis. In some cases, outliers can also be retained and marked, which helps to identify and process these special points in subsequent analysis. Perform data set screening to select the optimal modeling data set and improve the quality of modeling data. Data set screening can set screening conditions based on the statistical characteristics of the curve (such as mean, standard deviation, median, etc.). For example, you can filter out the part of the curve with large fluctuations in a certain interval or data points above a certain level. Or analyze the overall trend and local changes of the curve, and filter data according to the significance and stability of the trend. For example, you can filter out data points that do not conform to the overall trend or have abnormal local fluctuations.
[0034] S3: Decompose the filtered curve based on the seasonal adjustment algorithm to obtain trend terms, seasonal terms and random terms.
[0035] The filtered curve may also be affected by seasonal factors, such as climate conditions, production cycles, holidays and sales seasons. The seasonal adjustment algorithm is a method used to eliminate the seasonal effects in time series data. The purpose is to measure, separate and adjust seasonal factors from time series data through scientific methods to more accurately reflect the basic trends and cyclical changes of the data. For example, the X13 seasonal adjustment algorithm is used to decompose the electricity sales curve, decompose the trend term, seasonal term and random term, grasp the details of the data, and improve the scientific nature of the model. The X13 seasonal adjustment algorithm is a seasonal adjustment method widely used in time series data. It is improved and expanded based on the X-11 algorithm.
[0036] S4: Predict the trend item, the seasonal item and the random item respectively to obtain the trend item prediction result, the seasonal item prediction result and the random item prediction result.
[0037] A regression model is established using economic factors, business expansion registration (business expansion registration refers to the process in which users submit electricity demands to power supply companies when they need to build, renovate, expand or replace electrical equipment, and the power supply company formulates an electricity plan based on the user's electricity demand and power supply conditions, completes electricity procedures and installs electrical equipment.) to obtain trend item prediction results. Due to the large volume of trend items, different algorithms can be used to predict them separately, ensuring the robustness of model prediction. Seasonal items have strong regularity, and the L1 / 2 sparse iterative algorithm can be used to model seasonal item prediction results. Combining the maximum temperature, minimum temperature, average temperature, and number of holidays, combined with hybrid expert models, Kalman filtering, logistic regression and other algorithms, random item prediction results are obtained.
[0038] S5: Add the trend item prediction results, the seasonal item prediction results and the random item prediction results to obtain the curve reconstruction result.
[0039] The obtained trend item, seasonal item and random item prediction results are added together. Since the trend item is predicted by different algorithms, there are multiple prediction results for the trend item. After adding up, multiple prediction results will also be generated, that is, the curve reconstruction results. The number of trend item prediction results is the same as the number of algorithms used, and the number of curve reconstruction results after adding up is also the same as the number of trend item prediction results.
[0040] S6: Perform curve optimization and Spring Festival adjustment on the curve reconstruction results to obtain the electricity sales forecast results.
[0041] Taking into account the indicators such as prediction error, trend credibility, prediction trend similarity, etc., the prediction result is obtained by combining the analytic hierarchy process (AHP). Then the Spring Festival factor is used to adjust the electricity sales volume from January to March in the first quarter, which is the optimal electricity sales volume forecast result.
[0042] In one embodiment, S4 (predicting trend items, seasonal items and random items respectively to obtain trend item prediction results, seasonal item prediction results and random item prediction results) includes: stripping the random items by the Spring Festival to obtain the random item curve after stripping by the Spring Festival; based on the maximum temperature, minimum temperature, average temperature, and number of holidays, combined with a hybrid expert model, Kalman filtering, and a logistic regression algorithm, predicting the random item curve after stripping by the Spring Festival to obtain a random item prediction result.
[0043] The random term is the remaining part of the data that cannot be explained by any of the trend term and the seasonal term. The random term usually includes measurement error, model error, and random fluctuations of the data itself. The random term is random and can more clearly reflect the random fluctuations and uncertainties in the data. And the random term may be related to the maximum temperature, minimum temperature, average temperature, and number of holidays. Combined with algorithms such as hybrid expert model, Kalman filter, and logistic regression, the prediction results of the random term are obtained. The hybrid expert model is an integrated learning method that combines multiple specialized sub-models (i.e., "experts") to form an overall model. The hybrid expert model mainly consists of two parts: the gate network (GateNet), which is responsible for dynamically determining which expert model should be activated to generate the best prediction based on the characteristics of the input data; the expert network (Experts), which is a group of independent models, each of which is responsible for handling a specific subtask. Kalman filtering is an algorithm that uses the linear system state equation to optimally estimate the system state through the system input and output observation data. It is applicable to linear, discrete, and finite-dimensional systems, and can estimate the state of a dynamic system through a series of observation data in the presence of noise. Logistic regression is a classification algorithm used to deal with classification problems. Logistic regression obtains a numerical value by performing a linear regression-like calculation on the data set, and then performs a sigmoid operation on this numerical value to map the result to a probability value on (0, 1) to determine which category the result belongs to.
[0044] In one embodiment, after predicting the random item curve after the Spring Festival is stripped and obtaining the random item prediction result, the electricity sales forecasting method may also include: using the curve optimization algorithm of the hierarchical analysis method and the data fusion algorithm of the Kalman filter to correct the random item prediction result; wherein, S5 (adding the trend item prediction result, the seasonal item prediction result and the random item prediction result to obtain the curve reconstruction result) includes: adding the corrected random item prediction result, the trend item prediction result and the seasonal item prediction result to obtain the curve reconstruction result.
[0045] The Analytic Hierarchy Process (AHP) is a decision-making method that decomposes complex decision-making problems into different components, and aggregates and combines the factors at different levels according to the mutual influence and affiliation between the factors to form a multi-level analysis structure model, thereby conducting qualitative and quantitative analysis. The basic principle of the AHP is to treat a complex multi-objective decision-making problem as a system, decompose the goal into multiple goals or criteria, and then decompose it into several levels of multiple indicators (or criteria, constraints), and calculate the single ranking (weight) and total ranking of the hierarchy through the fuzzy quantification method of qualitative indicators, as a systematic method for optimizing the decision-making of objectives (multiple indicators) and multiple schemes. In the optimization process of the model prediction results, the curve optimization algorithm of the AHP and the data fusion algorithm of the Kalman filter are used to correct the prediction results of random items, solve the problem that the calculated curve length becomes shorter with time and the indicator fails, and improve the credibility of the prediction results.
[0046] In one embodiment, the electricity sales forecasting method may further include: constructing a leading analysis model based on a dynamic time warping algorithm; obtaining a leading indicator through the leading analysis model; wherein S4 (predicting trend items, seasonal items and random items respectively to obtain trend item prediction results, seasonal item prediction results and random item prediction results) includes: predicting trend items based on the correlation between leading indicators to obtain trend item prediction results.
[0047] Leading factors mainly include manufacturing PMI, non-manufacturing PMI and net capacity increase reported by business expansion. The inclusion of leading indicators enhances the ability of the power sales analysis and forecasting model to identify "turning points". Among them, the manufacturing purchasing managers' index (PMI) is an index compiled by summarizing and compiling the monthly survey results of corporate purchasing managers. It is an internationally used leading index for monitoring macroeconomic trends and has a strong predictive and early warning function. PMI usually uses 50% as the dividing point between strong and weak economies. When PMI is higher than 50%, it reflects the expansion of the manufacturing economy; when PMI is lower than 50%, it reflects the contraction of the manufacturing economy. The non-manufacturing business activity index is a diffusion index compiled based on the monthly month-on-month changes in the total amount of business activities completed by enterprises (such as the number of customers, sales volume, engineering volume and other physical quantities). Since there is no synthetic non-manufacturing comprehensive PMI index, the business activity index is currently used internationally to reflect the overall changes in the development of the non-manufacturing economy. Usually, 50% is used as the dividing point between strong and weak economies. A value higher than 50% reflects the expansion of the non-manufacturing economy, and a value lower than 50% reflects the contraction of the non-manufacturing economy. The business expansion application service is a general term for the business process of power companies from the user's application for electricity to the actual electricity use. The business expansion application has a variety of business types, among which the business types that mainly affect the electricity forecast include: new installation (new users establish a power supply and use relationship with the power company according to the required power consumption capacity), capacity increase (adding new power consumption capacity on the basis of the original agreed power consumption capacity), capacity reduction (reducing the power consumption capacity stipulated in the contract) and account cancellation (terminating the power supply contract and stopping all power consumption capacity). The net capacity increase of business expansion refers to the new installation and capacity increase of business expansion minus the capacity reduction and account cancellation of business expansion. It can be seen from the analysis that the net capacity increase has a certain leading effect on the electricity sales volume. The change of the net capacity increase is a slow growth process, which will reach stability after several months. This embodiment uses the dynamic time warping DTW algorithm to carry out the lead-lag relationship study between relevant factors and electricity sales data, and outputs the lead-lag period of factors and electricity sales data to provide a factor basis for electricity sales forecast. Such as the lead-lag analysis between factors such as PMI, net capacity increase of business expansion application and industry-specific electricity.
[0048] In one embodiment, a leading indicator is obtained through a leading analysis model, including: using a dynamic time warping algorithm to obtain a net capacity increase trend item and a power sales trend item; calculating the shortest regularized path between the net capacity increase trend item and the power sales trend item; and obtaining the net capacity increase based on the number of occurrences in the shortest regularized path.
[0049] The leading study is carried out using the dynamic time warping DTW algorithm. This method does not require data movement. The algorithm automatically finds the shortest regularized path, and then counts the leading mode of the shortest path, and uses the leading mode as the final leading value. The detailed calculation steps are as follows:
[0050] Step 1: Take the net capacity increase trend item and power sales trend item of large industry from January 2015 to August 2019, and record them as {N i |i∈1,2,...,45} and {Q i |i∈1,2,…,45}.
[0051] Step 2: Use dynamic time warping to calculate the shortest warping path D(N,Q) between the electricity sales trend item and the net capacity increase trend item.
[0052] Step 3: Record N separately i Q i , N i Q i+1 ,…,N i Q i+m is the leading 0 month, the leading 1 month, …, the leading m months, and the number of times they appear in the shortest regular path is recorded as C0, C1, …, C m . Taking the largest leading month as 12, the leading month of the net capacity increase of the industry is L = max{C i |i=0,1,...,12}.
[0053] In one embodiment, S4 (predicting trend items, seasonal items and random items respectively to obtain trend item prediction results, seasonal item prediction results and random item prediction results) includes: predicting seasonal items based on sparse iterative algorithm modeling to obtain seasonal item prediction results.
[0054] Seasonal terms refer to the part of the data caused by seasonal changes. For example, in sales data, periodic fluctuations caused by holidays, seasonal changes, etc. can be regarded as seasonal terms. The purpose of predicting seasonal terms is to more accurately predict seasonal changes in future data, which helps to better understand and predict long-term trends and periodic fluctuations in time series data. Sparse iterative algorithms are a class of algorithms widely used in signal processing, machine learning, data mining and other fields. The core idea is to optimize model parameters in an iterative way while promoting the sparsity of parameters. Sparsity refers to the fact that many elements (or parameters) in the data or model have values that are zero or close to zero. This feature helps us reduce data redundancy and improve the efficiency and interpretability of the model. The L1 / 2 sparse iterative algorithm can be used for modeling.
[0055] In one embodiment, the seasonal adjustment algorithm includes an X13 seasonal adjustment algorithm, and S3 (decomposing the filtered curve based on the seasonal adjustment algorithm to obtain trend items, seasonal items, and random items) includes: the X13 seasonal adjustment algorithm is used for the original sequence Y t Perform linear filtering to obtain the trend term T t : Combine the original series with the trend term T t Subtract to get SI t , for SI t Perform moving average to obtain seasonal term S t :
[0056]
[0057]
[0058] Combine the original series with the trend term T t , Seasonal Item S t Subtract to get random item I t ; The relationship between the three subsequences of trend term, seasonal term and random term is expressed as: Y t =T t +S t +I t Where, Y t represents the post-screening curve, T t is the trend term, S t is the seasonal term, I t is a random item.
[0059] The X13 seasonal adjustment algorithm is used to decompose the electricity sales curve, decompose it into trend items, seasonal items and random items, grasp the details of the data, and improve the scientific nature of the model. The X13 seasonal adjustment algorithm can be used to strip off the trend items, seasonal items and random items of the original electricity sales curve. The three items are modeled and predicted by considering the influencing factors. Since the original electricity sales data causes the electricity sales curve to change in various forms due to factors such as seasons and weather, it has submerged the trend of electricity sales to a certain extent. The inclusion of the X13 seasonal adjustment algorithm effectively extracts the trend items, seasonal items and random items of electricity sales, and improves the model's ability to perceive the industry's electricity trends.
[0060] In one embodiment, S6 (performing curve optimization and Spring Festival adjustment on the curve reconstruction result to obtain the power sales forecast result) includes: constructing a Spring Festival adjustment model; wherein the Spring Festival adjustment model uses the number of days from the first day of the Spring Festival in January to March and the seasonal ratio of power sales in January to March as input data; fitting the input data using a polynomial to obtain a fitting function of the number of days from the first day of the Spring Festival in January to March and the seasonal ratio of power sales in January to March: ω k =f(x k ); Based on the fitting function and the number of days between the Spring Festival of the predicted year and the first day of January-March, calculate the seasonal ratio of the forecast for January-March of the predicted year; According to the forecast power sales value of the first quarter and the seasonal ratio of the forecast for January-March, reallocate the forecast power sales value of each month in the first quarter to obtain the output result of the Spring Festival adjustment model.
[0061] The Spring Festival adjustment model uses the number of days from the Spring Festival to the first day of January-March and the seasonal ratio of electricity sales in January-March as input data. Secondly, a polynomial is used to fit the input data to obtain the fitting function of the number of days from the Spring Festival to the first day of January-March and the seasonal ratio of electricity sales in January-March: ω k =f(x k ).
[0062] Combining the fitting function and the number of days between the Spring Festival and the first day of January-March in the predicted year, the seasonal ratio of the forecast for January-March in the predicted year is calculated. Then, based on the forecast power sales value in the first quarter and the seasonal ratio of the forecast for January-March, the forecast power sales value for each month in the first quarter is redistributed to obtain the output result of the Spring Festival adjustment model.
[0063] Figure 2 is a flow chart of a method for predicting electricity sales provided by another exemplary embodiment of the present application. Figure 2 As shown, S6 (curve optimization and Spring Festival adjustment of the curve reconstruction results to obtain the electricity sales forecast results) includes: S61: curve optimization of the curve reconstruction results; S62: iterative optimization of the model training error; S63: iterative optimization of the prediction trend similarity; S64: iterative optimization of the prediction trend credibility; S65: obtaining the electricity sales forecast results.
[0064] The evaluation index designed in the original scheme is to calculate the average prediction error between the actual electricity sales in historical years and months and the predicted electricity sales in historical years and months. The Pearson correlation coefficient (cor[cov]) between the actual electricity sales in historical years and months and the predicted electricity sales in historical years and months is implemented in the program.
[0065] The optimization of the curve selection includes the following steps:
[0066] 1) Iterative optimization of model training error
[0067] Calculation method before modification:
[0068] Modified calculation method:
[0069] in, (i=1,2,3,…,n) is the actual electricity sales in the i-th historical year and month, (i=1, 2, 3, ..., n) is the predicted electricity sales volume for the ith historical year and month. The evaluation index designed in the original scheme is to calculate the average prediction error between the actual electricity sales volume for the historical year and month and the predicted electricity sales volume for the historical year and month. The Pearson correlation coefficient (cor[cov]) between the actual electricity sales volume for the historical year and month and the predicted electricity sales volume for the historical year and month is implemented in the program.
[0070] 2) Iterative optimization of prediction trend similarity
[0071] Calculation method before modification:
[0072] in, (j=1, 2, 3, ..., 11) is the predicted electricity sales for month j, (j=1, 2, 3, ..., 11) is the actual electricity sales of the month in the previous year corresponding to month j. The length of is [2, 12]. This will cause the length of the curve involved in the calculation to become shorter as time goes by. In extreme cases, the length is 2, and the Pearson coefficient is always equal to 1. At this time, the indicator is invalid.
[0073] Modified calculation method:
[0074] in, (j=1) is the predicted electricity sales volume for month j, (j=1) is the actual electricity sales of the month in the previous year corresponding to month j. The length of is 12. This can avoid the problem of indicator failure when the curve length is shortened to 2.
[0075] 3) Iterative optimization of the credibility of prediction trends
[0076] Calculation method before modification:
[0077] Among them, r, r min 、r max All are absolute values of annual growth rates of electricity sales;
[0078] Modified calculation method:
[0079] Among them, r, r min 、r max Both are annual growth rates of electricity sales.
[0080] In one embodiment, the prediction of residential electricity sales can also be optimized. For example, for the predictions for May, June, October, and November (including both residential and urban residents), considering that these months are not affected by low or high temperatures, a two-stage modeling method is considered for prediction:
[0081] The electricity data from April to May 2015 to 2018 are obtained. It can be seen from the electricity data that the average electricity consumption in these months has been increasing year by year due to the lack of extreme high and low temperatures. Therefore, we can directly establish the function of the average electricity consumption in these months (the average electricity consumption is defined as the basic electricity consumption) and time, or the function of the per capita disposable income. Take the time function as an example:
[0082] y=313140835.70x+1757794358.00The coefficient of determination is 0.99
[0083] The function can be used to predict that the basic electricity consumption in these two months of 2019 is 3323498537 kWh. Then, combining the three variables of basic electricity consumption, monthly average temperature, and year-on-year temperature change in April and May 2019, a functional relationship with the total electricity consumption of each month is constructed, and the function is as follows:
[0084] y=-273154428.51+0.99131998×A+13303887.21×B-16653134.49×C;
[0085] Among them, A represents basic electricity, B represents average temperature, and C represents year-on-year change in temperature. Through calculation, the coefficient of determination is 0.9677, indicating that the model can track the change in electricity very well.
[0086] In this way, the forecast optimization of residential electricity consumption in 2019 can be achieved, and the forecast results for residents and urban residents in April and May 2020 can be optimized.
[0087] Exemplary Devices
[0088] Figure 3 is a schematic diagram of the structure of a power sales forecasting device provided by an exemplary embodiment of the present application. Figure 3 As shown, the power sales forecasting device 7 includes: an acquisition module 71, which is used to acquire historical power sales data; a processing module 72, which is used to perform outlier processing and data set screening on the historical power sales data to obtain a screened curve; a decomposition module 73, which is used to decompose the screened curve based on a seasonal adjustment algorithm to obtain trend items, seasonal items and random items; a prediction module 74, which is used to predict the trend items, seasonal items and random items respectively to obtain trend item prediction results, seasonal item prediction results and random item prediction results; a reconstruction module 75, which is used to add the trend item prediction results, the seasonal item prediction results and the random item prediction results to obtain a curve reconstruction result; an adjustment module 76, which is used to perform curve optimization and Spring Festival adjustment on the curve reconstruction result to obtain a power sales forecast result.
[0089] The electricity sales forecasting device provided in the present application processes outliers and screens data sets to obtain screened curves. When performing curve decomposition and stripping, it considers the impact of seasons on data for modeling and forecasting, effectively utilizes different influencing factors and user categories for forecasting, performs curve selection and Spring Festival adjustment on the curve reconstruction results, optimizes the model, obtains the optimal electricity sales forecast results, and improves the credibility of the forecast results.
[0090] In one embodiment, the prediction module 74 can be configured as follows: stripping the random items of the Spring Festival to obtain the random item curve after the Spring Festival stripping; based on the maximum temperature, minimum temperature, average temperature, and number of holidays, combined with a hybrid expert model, Kalman filtering, and a logistic regression algorithm, predicting the random item curve after the Spring Festival stripping to obtain a random item prediction result.
[0091] In one embodiment, the electricity sales forecasting device 7 can also be configured to: use the curve optimization algorithm of the hierarchical analysis method and the data fusion algorithm of the Kalman filter to correct the random item prediction results; wherein, the reconstruction module 75 can be correspondingly configured to: add the corrected random item prediction results, trend item prediction results and seasonal item prediction results to obtain the curve reconstruction results.
[0092] In one embodiment, the power sales amount prediction device 7 can also be configured to: construct a leading analysis model based on a dynamic time warping algorithm; obtain a leading indicator through the leading analysis model; wherein the prediction module 74 can be configured to: predict the trend item based on the correlation between the leading indicators to obtain the trend item prediction result.
[0093] In one embodiment, the electricity sales prediction device 7 can also be configured to: use a dynamic time warping algorithm to obtain a net capacity increase trend item and an electricity sales trend item; calculate the shortest regularized path between the net capacity increase trend item and the electricity sales trend item; and obtain the net capacity increase based on the number of occurrences in the shortest regularized path.
[0094] In one embodiment, the prediction module 74 may be configured to: predict the seasonal item based on sparse iterative algorithm modeling to obtain seasonal item prediction results.
[0095] In one embodiment, the seasonal adjustment algorithm includes an X13 seasonal adjustment algorithm, and the decomposition module 73 can be configured as follows: the X13 seasonal adjustment algorithm is used for the original sequence Y t Perform linear filtering to obtain the trend term T t : Combine the original series with the trend term T t Subtract to get SI t , for SI t Perform moving average to obtain seasonal term S t :
[0096]
[0097]
[0098] Combine the original series with the trend term T t , Seasonal Item S t Subtract to get random item I t; The relationship between the three subsequences of trend term, seasonal term and random term is expressed as: Y t =T t +S t +I t Where, Y t represents the post-screening curve, T t is the trend term, S t is the seasonal term, I t is a random item.
[0099] In one embodiment, the adjustment module 76 can also be configured to: construct a Spring Festival adjustment model; wherein the Spring Festival adjustment model uses the number of days from the first day of the Spring Festival in January to March and the seasonal ratio of electricity sales in January to March as input data; a polynomial is used to fit the input data to obtain a fitting function of the number of days from the first day of the Spring Festival in January to March and the seasonal ratio of electricity sales in January to March: ω k =f(x k ); Based on the fitting function and the number of days between the Spring Festival of the predicted year and the first day of January-March, calculate the seasonal ratio of the forecast for January-March of the predicted year; According to the forecast power sales value of the first quarter and the seasonal ratio of the forecast for January-March, reallocate the forecast power sales value of each month in the first quarter to obtain the output result of the Spring Festival adjustment model.
[0100] In one embodiment, the adjustment module 76 can also be configured to: perform curve optimization on the curve reconstruction results; perform iterative optimization of the model training error; perform iterative optimization of the prediction trend similarity; perform iterative optimization of the prediction trend credibility; and obtain the electricity sales forecast results.
[0101] Exemplary Electronic Devices
[0102] An electronic device includes: a processor; a memory for storing instructions executable by the processor; and the processor is used to execute the power sales amount prediction method described in the embodiment provided in the present application.
[0103] Below, reference Figure 4 The electronic device according to the embodiment of the present application is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signal from them.
[0104] Figure 4 A block diagram of an electronic device according to an embodiment of the present application is illustrated.
[0105] like Figure 4 As shown, the electronic device 10 includes one or more processors 11 and a memory 12 .
[0106] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0107] The memory 12 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the power sales forecasting method of each embodiment of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0108] In one example, the electronic device 10 may further include: an input device 13 and an output device 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0109] When the electronic device is a stand-alone device, the input device 13 may be a communication network connector, which is used to receive the collected input signals from the first device and the second device.
[0110] In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.
[0111] The output device 14 can output various information to the outside, including the determined distance information, direction information, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0112] Of course, to simplify, Figure 4 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0113] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0114] A computer-readable storage medium stores a computer program, and the computer program is used to execute the power sales amount prediction method described in the embodiment provided in this application.
[0115] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0116] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for predicting electricity sales, characterized in that: include: Get historical electricity sales data; Performing outlier processing and data set screening on the historical electricity sales data to obtain a screened curve; Decompose the filtered curve based on the seasonal adjustment algorithm to obtain trend items, seasonal items and random items; Predicting the trend item, the season item and the random item respectively to obtain a trend item prediction result, a season item prediction result and a random item prediction result; Add the trend item prediction result, the season item prediction result and the random item prediction result to obtain a curve reconstruction result; The curve reconstruction result is subjected to curve optimization and Spring Festival adjustment to obtain a power sales forecast result.
2. The method for predicting electricity sales according to claim 1, characterized in that: Predicting the trend item, the season item and the random item respectively to obtain a trend item prediction result, a season item prediction result and a random item prediction result includes: Stripping the random item during the Spring Festival to obtain a random item curve after the Spring Festival stripping; Based on the maximum temperature, minimum temperature, average temperature, and number of holidays, combined with the hybrid expert model, Kalman filter, and logistic regression algorithm, the random item curve after the Spring Festival is stripped is predicted to obtain the random item prediction results.
3. The method for predicting electricity sales according to claim 2, characterized in that: After predicting the random item curve after the Spring Festival is stripped and obtaining the random item prediction result, the power sales forecasting method also includes: Adopting the curve optimization algorithm of hierarchical analysis method and the data fusion algorithm of Kalman filter to correct the prediction result of the random item; The trend item prediction result, the seasonal item prediction result and the random item prediction result are added together to obtain a curve reconstruction result, including: The corrected prediction results of the random item, the trend item and the seasonal item are added together to obtain a curve reconstruction result.
4. The method for predicting electricity sales according to claim 1, characterized in that: The electricity sales volume forecasting method further includes: Based on the dynamic time warping algorithm, a leading analysis model is constructed; Obtaining a leading index through the leading analysis model; The trend item, the season item and the random item are predicted respectively to obtain the trend item prediction result, the season item prediction result and the random item prediction result, including: The trend item is predicted based on the correlation between the leading indicators to obtain a trend item prediction result.
5. The method for predicting electricity sales according to claim 4, characterized in that: Through the leading analysis model, leading indicators are obtained, including: Using dynamic time warping algorithm, the net capacity increase trend item and the power sales trend item are obtained; Calculate the shortest regularized path between the net capacity increase trend item and the power sales trend item; The net capacity increase is obtained according to the number of times it appears in the shortest regular path.
6. The method for predicting electricity sales according to claim 1, characterized in that: Predicting the trend item, the season item and the random item respectively to obtain a trend item prediction result, a season item prediction result and a random item prediction result includes: Based on sparse iterative algorithm modeling, the seasonal item is predicted to obtain a seasonal item prediction result.
7. The method for predicting electricity sales according to claim 1, characterized in that: The seasonal adjustment algorithm includes an X13 seasonal adjustment algorithm, and the filtered curve is decomposed based on the seasonal adjustment algorithm to obtain trend items, seasonal items and random items, including: X13 seasonal adjustment algorithm for the original series Y t Perform linear filtering to obtain the trend term T t : Combine the original series with the trend term T t Subtract to get SI t , for SI t Perform moving average to obtain seasonal term S t : Combine the original series with the trend term T t , Seasonal ItemS t Subtract to get random item I t ; The relationship between the three subsequences of trend term, seasonal term and random term is expressed as: Y t =T t +S t +I t ; Where Y t represents the post-screening curve, T t is the trend term, S t is the seasonal term, I t is a random item.
8. The method for predicting electricity sales according to claim 1, characterized in that: The curve reconstruction result is subjected to curve optimization and Spring Festival adjustment to obtain the power sales forecast result, including: Constructing a Spring Festival adjustment model; wherein the Spring Festival adjustment model uses the number of days from the first day of the Spring Festival in January to March and the seasonal ratio of electricity sales in January to March as input data; The input data is fitted with a polynomial to obtain the fitting function of the number of days from the first day of the historical Spring Festival to the first day of January-March and the seasonal ratio of electricity sales in January-March: oh k =f(x k ); Based on the fitting function and the number of days between the Spring Festival of the year to be predicted and the first day of January to March, calculate the seasonal ratio of the forecast for January to March of the year to be predicted; According to the electricity sales forecast value in the first quarter and the quarterly ratio of the forecast values from January to March, the electricity sales forecast values for each month in the first quarter are reallocated to obtain the output results of the Spring Festival adjustment model.
9. The method for predicting electricity sales according to claim 1, characterized in that: The curve reconstruction result is subjected to curve optimization and Spring Festival adjustment to obtain the power sales forecast result, including: Performing curve optimization on the curve reconstruction result; Perform iterative optimization of model training error; Perform iterative optimization of prediction trend similarity; Conduct iterative optimization of the credibility of forecast trends; Get the electricity sales forecast results.
10. A power sales amount prediction device, characterized in that: include: An acquisition module is used to obtain historical electricity sales data; A processing module, used for performing outlier processing and data set screening on the historical electricity sales data to obtain a screened curve; A decomposition module is used to decompose the filtered curve based on the seasonal adjustment algorithm to obtain trend items, seasonal items and random items; A prediction module, used to predict the trend item, the season item and the random item respectively, and obtain a trend item prediction result, a season item prediction result and a random item prediction result; A reconstruction module, used for adding the trend item prediction result, the seasonal item prediction result and the random item prediction result to obtain a curve reconstruction result; The adjustment module is used to perform curve optimization and Spring Festival adjustment on the curve reconstruction result to obtain the power sales forecast result.
Citation Information
Patent Citations
A method and system for analyzing and predicting electricity sales by category based on big data.
CN111476677B