Medium and long term electric quantity prediction method and system for power grid, and medium
Through time series decomposition and multi-model fusion prediction methods, the problems of insufficient consideration of power-related influencing factors and low prediction accuracy in nonlinear data in the prior art are solved, and the accuracy of medium- and long-term power prediction is improved.
Patent Information
- Application Number
- CN202411374511.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing medium- and long-term power prediction methods have a critical degree of insufficient consideration of power-related influencing factors, and the prediction accuracy of nonlinear data is low.
The time series decomposition model is used to divide the impact data on power demand into trend components and fluctuation components, and the ARIMA multivariate regression model and multi-model fusion Stacking ensemble learning algorithm are used to predict, and trend and fluctuation change data are processed respectively.
The critical considerations of the influencing factors related to power are improved, the prediction accuracy of nonlinear data is enhanced, and the effect of medium- and long-term power prediction is improved.
Smart Images

Figure CN119154279A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of live broadcast auxiliary application technology, and in particular to a medium- and long-term electricity quantity prediction method, system and medium for power grids. Background Art
[0002] When forecasting the daily power consumption of regional power grids, considering the significant differences in power consumption characteristics of various industries, it is necessary to use the distribution network ledger information to decompose and forecast power consumption according to industry classification to improve the accuracy of the forecast. With the accumulation of diversified data such as historical power consumption data, meteorological data, and economic influencing factors in various industries, the use of big data and machine learning technology to conduct in-depth analysis of the power consumption characteristics and influencing factors of various industries will help improve the forecast accuracy of power consumption in different industries, thereby further improving the effect of medium- and long-term power consumption forecasting.
[0003] At present, the topic of medium- and long-term electricity forecasting mainly revolves around the following two aspects: First, forecasting is carried out based on the correlation between electricity demand and influencing factors, combined with corresponding models. Commonly used methods include comprehensive power consumption method, elasticity coefficient method, economic cycle analysis method, etc.; second, starting from the time series development law of power data, the load development trend is recursively deduced and the corresponding forecast value is obtained, such as exponential smoothing method, grayscale forecasting, etc. Among them, the first type of method lacks consideration of the criticality of relevant influencing factors. Generally speaking, there is a hysteresis effect between power load and relevant influencing factors, and changes in influencing factors precede load development; while the second type of method focuses on the endogenous characteristics of power data. Commonly used measurement models have strict requirements on the stability of data, and make certain concessions in reflecting the nonlinear characteristics of data, resulting in poor prediction accuracy of this type of method for nonlinear data. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present application provides a medium- and long-term electricity forecasting system, method and medium for a power grid to solve the problems that the existing solutions lack consideration of the criticality of electricity-related influencing factors and have poor prediction accuracy for nonlinear data.
[0005] In a first aspect, the present application provides a medium- and long-term electricity forecasting method for a power grid, the method comprising: Obtain preset electricity demand impact data; wherein the preset electricity demand impact data at least includes: meteorological data, time data, electricity price data and electricity data; use a time series decomposition model to decompose the preset electricity demand impact data to obtain trend components and fluctuation components corresponding to the preset electricity demand impact data; use the trend component as the input of the first prediction model to output trend change data of the electricity data in a preset future time period generated by meteorological data, time data, and electricity price data; use the trend component as the input of the second prediction model to output fluctuation change data of the electricity data in a preset future time period generated by meteorological data, time data, and electricity price data; based on the trend change data and the fluctuation change data, calculate and obtain the electricity data in the preset future time period.
[0006] Furthermore, the preset power demand impact data is obtained, including: Obtain initial preset electricity demand impact data; remove data in the preset abnormal range from the initial preset electricity demand impact data; obtain the number of missing values in the initial preset electricity demand impact data; when the number is less than a preset value, directly delete the initial preset electricity demand impact data with missing values; when the number is greater than or equal to the preset value, use the median interpolation method to complete the missing values in the initial preset electricity demand impact data; determine that the final initial preset electricity demand impact data is the preset electricity demand impact data.
[0007] Furthermore, the preset power demand impact data is decomposed using a time series decomposition model to obtain trend components and fluctuation components corresponding to the preset power demand impact data, specifically including: Use the STL class in the statsmodels library to perform STL decomposition on the preset power demand impact data to obtain the trend component and fluctuation component.
[0008] Furthermore, before taking the trend component as the input of the first prediction model to output the trend change data of the electricity data in a preset future time period along with the meteorological data, time data and electricity price data, the method further includes: Obtain actual trend change data of electricity data during a preset historical time period along with meteorological data, time data, and electricity price data; use electricity data, meteorological data, time data, electricity price data, and actual trend change data as training data; input the training data into an ARIMA multivariate regression model as input data, thereby obtaining a trained ARIMA multivariate regression model; determine the trained ARIMA multivariate regression model as the first prediction model.
[0009] Furthermore, the trend component is used as the input of the second prediction model to output the fluctuation change data of the electricity data in the preset future time period with the meteorological data, time data, and electricity price data, specifically including: The trend component is input into the trained first XGboost model, random forest model and lightGBM model respectively to obtain three output results; The three output results are input into the trained second XGboost model to obtain the output fluctuation change data.
[0010] Furthermore, based on the trend change data and the fluctuation change data, the power data in a preset future time period is calculated, specifically including: By adding the current power data, trend change data and fluctuation change data, the power data in the preset future time period is obtained.
[0011] In a second aspect, the present application provides a medium- and long-term electricity forecasting system for a power grid, the system comprising: An acquisition module is used to acquire preset electricity demand impact data; wherein the preset electricity demand impact data at least includes: meteorological data, time data, electricity price data and electricity data; a decomposition module is used to use a time series decomposition model to perform data decomposition on the preset electricity demand impact data to obtain trend components and fluctuation components corresponding to the preset electricity demand impact data; a trend acquisition module is used to use the trend component as an input of a first prediction model to output trend change data of electricity data in a preset future time period generated by meteorological data, time data and electricity price data; a fluctuation acquisition module is used to use the trend component as an input of a second prediction model to output fluctuation change data of electricity data in a preset future time period generated by meteorological data, time data and electricity price data; a calculation module is used to calculate and obtain electricity data in a preset future time period based on the trend change data and the fluctuation change data.
[0012] Furthermore, the acquisition module includes a screening unit, Used to obtain initial preset power demand impact data; Remove the data within the preset abnormal range from the data affecting the initial preset power demand; Obtain the number of missing values in the initial preset power demand impact data; When the quantity is less than the preset value, the initial preset power demand impact data with missing values is directly deleted; When the number is greater than or equal to the preset value, the median interpolation method is used to fill in the missing values in the initial preset power demand impact data; The final initial preset power demand impact data is determined as the preset power demand impact data.
[0013] Furthermore, the decomposition module includes a decomposition unit, It is used to use the STL class in the statsmodels library to perform STL decomposition on the preset power demand impact data to obtain the trend component and the fluctuation component.
[0014] In a third aspect, the present application provides a non-volatile computer storage medium having computer instructions stored thereon, which when executed implement a medium- and long-term electricity forecasting method for a power grid as described in any one of the above items.
[0015] Those skilled in the art can understand that the present application has at least the following beneficial effects: In terms of data processing, the present application adopts a time series decomposition model to divide the preset electricity demand impact data into trend components and fluctuation components, reducing the impact of multiple and complex factors of the data set on the prediction results; in addition, the corresponding preset electricity demand impact data can be obtained according to the electricity-related impact factors of the actual demand, thereby solving the problem that the existing solutions lack consideration of the criticality of electricity-related impact factors.
[0016] In addition, in terms of forecasting model construction, two forecasting models (for example, ARIMA algorithm and multi-model fusion Stacking ensemble learning algorithm) are used for training according to the characteristics of the two components to increase the accuracy of the forecast results. This solves the problem of poor forecasting accuracy for nonlinear data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Some embodiments of the present disclosure are described below with reference to the accompanying drawings, in which: Figure 1 This is a flow chart of a method for medium- and long-term electricity quantity prediction for a power grid provided in an embodiment of the present application.
[0018] Figure 2 It is a schematic diagram of the internal structure of a medium- and long-term electricity quantity prediction system for a power grid provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] It should be understood by those skilled in the art that the embodiments described below are only preferred embodiments of the present disclosure, and do not mean that the present disclosure can only be implemented through the preferred embodiments. The preferred embodiments are only used to explain the technical principles of the present disclosure, and are not used to limit the protection scope of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present disclosure.
[0020] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0021] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0022] The present application provides a method for predicting medium- and long-term power consumption of a power grid. Figure 1 As shown, the method provided in the embodiment of the present application mainly includes the following steps: Step 110: Obtain preset power demand impact data.
[0023] The preset electricity demand influencing data at least includes: meteorological data, time data, electricity price data and electricity data.
[0024] It should be noted that those skilled in the art can dynamically adjust the specific content of the preset power demand impact data according to actual needs, and can adjust it to include meteorological factors, time factors, economic factors and other data that may affect power demand.
[0025] In addition, the present application may pre-process the preset power demand impact data, and the processing process may be specifically as follows: Obtain initial preset electricity demand impact data; remove data in the preset abnormal range from the initial preset electricity demand impact data; obtain the number of missing values in the initial preset electricity demand impact data; when the number is less than a preset value, directly delete the initial preset electricity demand impact data with missing values; when the number is greater than or equal to the preset value, use the median interpolation method to complete the missing values in the initial preset electricity demand impact data; determine that the final initial preset electricity demand impact data is the preset electricity demand impact data.
[0026] It should be noted that the scheme for obtaining the initial preset power demand impact data is an existing scheme and this application will not elaborate on it. In addition, the preset abnormal range and preset value can be determined by those skilled in the art according to actual conditions, and this application does not limit the specific range.
[0027] Step 120: Decompose the preset power demand impact data using a time series decomposition model to obtain a trend component and a fluctuation component corresponding to the preset power demand impact data.
[0028] This step may be specifically as follows: using the STL class in the statsmodels library to perform STL decomposition on the preset power demand impact data, and then obtaining the trend component and the fluctuation component.
[0029] Step 130: Use the trend component as the input of the first prediction model to output trend change data of the electricity data in a preset future time period generated by the meteorological data, time data, and electricity price data.
[0030] This step can be specifically as follows: obtaining actual trend change data of electricity data during a preset historical time period generated by meteorological data, time data, and electricity price data; using the electricity data, meteorological data, time data, electricity price data, and actual trend change data as training data; inputting the training data as input data into the ARIMA multivariate regression model to obtain a trained ARIMA multivariate regression model; and determining the trained ARIMA multivariate regression model as the first prediction model.
[0031] Step 140: Use the fluctuation component as the input of the second prediction model to output the fluctuation change data of the electricity data in a preset future time period caused by the meteorological data, time data, and electricity price data.
[0032] It should be noted that the second prediction model can be a multi-model fusion Stacking ensemble learning algorithm, in which the XGboost model, the random forest model and the lightGBM model are used as base models, and the XGboost model is used as a meta-model. The specific training process of the model is implemented by the existing technology, and this application will not elaborate on this.
[0033] This step can be specifically as follows: The trend components are respectively input into the trained first XGboost model, random forest model and lightGBM model to obtain three output results; the three output results are input into the trained second XGboost model to obtain the output fluctuation change data.
[0034] It should be noted that the trained first XGboost model, random forest model and lightGBM model are all used to predict the fluctuation change data from the fluctuation component; the second XGboost model is used to merge the three predicted fluctuation change data into one predicted fluctuation change data.
[0035] Specifically, the fusion solution can be obtained by training the initial XGboost model with existing data.
[0036] Step 150: Based on the trend change data and the fluctuation change data, calculate and obtain the electricity data within a preset future time period.
[0037] This step can be specifically as follows: By adding the current power data, trend change data and fluctuation change data, the power data in the preset future time period is obtained.
[0038] besides, Figure 2 A medium- and long-term power forecasting system for a power grid is provided in an embodiment of the present application. Figure 2 As shown, the system provided in the embodiment of the present application mainly includes: The acquisition module 210 is used to acquire preset power demand impact data.
[0039] The preset electricity demand influencing data at least includes: meteorological data, time data, electricity price data and electricity data.
[0040] The acquisition module 210 includes a screening unit, which is used to obtain initial preset power demand impact data; remove data in the initial preset power demand impact data that is within a preset abnormal range; obtain the number of missing values in the initial preset power demand impact data; when the number is less than a preset value, directly delete the initial preset power demand impact data with missing values; when the number is greater than or equal to the preset value, use the median interpolation method to fill in the missing values in the initial preset power demand impact data; and determine that the final initial preset power demand impact data is the preset power demand impact data.
[0041] The decomposition module 220 is used to perform data decomposition on the preset power demand influencing data by using a time series decomposition model to obtain a trend component and a fluctuation component corresponding to the preset power demand influencing data.
[0042] The decomposition module 220 includes a decomposition unit, which is used to perform STL decomposition on the preset power demand impact data using the STL class in the statsmodels library, so as to obtain a trend component and a fluctuation component.
[0043] The trend acquisition module 230 is used to use the trend component as the input of the first prediction model to output the trend change data of the electricity data in a preset future time period generated by the meteorological data, time data, and electricity price data.
[0044] The fluctuation acquisition module 240 is used to use the fluctuation component as the input of the second prediction model to output the fluctuation change data of the electricity data in a preset future time period caused by the meteorological data, time data and electricity price data.
[0045] The calculation module 250 is used to calculate and obtain the power data within a preset future time period based on the trend change data and the fluctuation change data.
[0046] In addition, an embodiment of the present application further provides a non-volatile computer storage medium having executable instructions stored thereon, and when the executable instructions are executed, a medium- and long-term electricity forecasting method for a power grid as described above is implemented.
[0047] So far, the technical solutions of the present disclosure have been described in combination with the above multiple embodiments, but it is easy for those skilled in the art to understand that the protection scope of the present disclosure is not limited to these specific embodiments. Without departing from the technical principles of the present disclosure, those skilled in the art can split and combine the technical solutions in the above-mentioned various embodiments, and can also make equivalent changes or replacements to the relevant technical features. Any changes, equivalent replacements, improvements, etc. made within the technical concept and / or technical principle of the present disclosure will fall within the protection scope of the present disclosure.
Claims
1. A medium- and long-term electricity forecasting method for power grids, It is characterized in that The method comprises: Obtaining preset power demand impact data; wherein the preset power demand impact data at least includes: meteorological data, time data, electricity price data and power data; Decomposing the preset power demand influencing data by using a time series decomposition model to obtain trend components and fluctuation components corresponding to the preset power demand influencing data; The trend component is used as the input of the first prediction model to output the trend change data of the electricity data in a preset future time period generated by the meteorological data, time data, and electricity price data; The trend component is used as the input of the second prediction model to output the fluctuation change data of the electricity data in the preset future time period caused by the meteorological data, time data and electricity price data; Based on the trend change data and the fluctuation change data, the electricity data within a preset future time period is calculated and obtained.
2. The medium- and long-term electricity quantity prediction method for a power grid according to claim 1, It is characterized in that Obtain the preset power demand impact data, including: Obtaining initial preset power demand impact data; Remove the data within the preset abnormal range from the data affecting the initial preset power demand; Obtain the number of missing values in the initial preset power demand impact data; When the quantity is less than the preset value, the initial preset power demand impact data with missing values is directly deleted; When the number is greater than or equal to the preset value, the median interpolation method is used to fill in the missing values in the initial preset power demand impact data; The final initial preset power demand impact data is determined as the preset power demand impact data.
3. The medium- and long-term electricity quantity prediction method for a power grid according to claim 1, It is characterized in that The time series decomposition model is used to decompose the preset power demand impact data to obtain the trend component and fluctuation component corresponding to the preset power demand impact data, specifically including: Use the STL class in the statsmodels library to perform STL decomposition on the preset power demand impact data to obtain the trend component and fluctuation component.
4. The method for predicting medium- and long-term power consumption of a power grid according to claim 1, It is characterized in that Before taking the trend component as the input of the first prediction model to output the trend change data of the electricity data in a preset future time period generated by the meteorological data, the time data, and the electricity price data, the method further includes: Obtain actual trend change data of electricity data generated by meteorological data, time data, and electricity price data within a preset historical time period; Use electricity data, meteorological data, time data, electricity price data, and actual trend change data as training data; The training data is input as input data into the ARIMA multivariate regression model to obtain a trained ARIMA multivariate regression model; and the trained ARIMA multivariate regression model is determined as the first prediction model.
5. The medium- and long-term electricity quantity prediction method for a power grid according to claim 1, It is characterized in that The trend component is used as the input of the second prediction model to output the fluctuation data of the electricity data in the preset future time period caused by the meteorological data, time data, and electricity price data, including: The trend component is input into the trained first XGboost model, random forest model and lightGBM model respectively to obtain three output results; The three output results are input into the trained second XGboost model to obtain the output fluctuation change data.
6. The medium- and long-term electricity quantity prediction method for a power grid according to claim 1, It is characterized in that Based on the trend change data and fluctuation change data, the power data in the preset future time period is calculated, including: By adding the current power data, trend change data and fluctuation change data, the power data in the preset future time period is obtained.
7. A medium- and long-term electricity forecasting system for power grids, It is characterized in that The system comprises: An acquisition module is used to acquire preset power demand impact data; wherein the preset power demand impact data at least includes: meteorological data, time data, electricity price data and power data; A decomposition module, used to decompose the preset power demand impact data using a time series decomposition model to obtain a trend component and a fluctuation component corresponding to the preset power demand impact data; A trend acquisition module, used to use the trend component as the input of the first prediction model to output trend change data of the electricity data in a preset future time period generated by meteorological data, time data, and electricity price data; A fluctuation acquisition module is used to use the trend component as the input of the second prediction model to output fluctuation change data of the electricity data in a preset future time period caused by meteorological data, time data, and electricity price data; The calculation module is used to calculate and obtain the electricity data within a preset future time period based on the trend change data and the fluctuation change data.
8. The medium- and long-term electricity quantity prediction system for a power grid according to claim 7, It is characterized in that The acquisition module includes a screening unit, Used to obtain initial preset power demand impact data; Remove the data within the preset abnormal range from the data affecting the initial preset power demand; Obtain the number of missing values in the initial preset power demand impact data; When the quantity is less than the preset value, the initial preset power demand impact data with missing values is directly deleted; When the number is greater than or equal to the preset value, the median interpolation method is used to fill in the missing values in the initial preset power demand impact data; The final initial preset power demand impact data is determined as the preset power demand impact data.
9. The medium- and long-term electricity quantity prediction system for a power grid according to claim 7, It is characterized in that The decomposition module includes a decomposition unit, It is used to use the STL class in the statsmodels library to perform STL decomposition on the preset power demand impact data to obtain the trend component and the fluctuation component.
10. A non-volatile computer storage medium, It is characterized in that Computer instructions are stored thereon, and when the computer instructions are executed, a medium- and long-term electricity quantity prediction method for a power grid is implemented as described in any one of claims 1-6.
Citation Information
Patent Citations
Electricity sales prediction method and system based on load characteristics and model fusion
CN112418545A
Multi-energy load prediction method, device and equipment
CN113449904A
Power demand mid-term prediction method and system based on multi-dimensional component decomposition
CN117613905A
Power demand forecasting system and method using unsupervised learning and supervised learning in machine learning
KR102514996B1
