Power consumption prediction method
By building a variety of neural networks and gray models, combining wavelet analysis and ant colony algorithm optimization, the problem of low accuracy in power consumption prediction is solved, and accurate power consumption prediction is achieved under the influence of multiple factors.
Patent Information
- Application Number
- CN202411801347.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-21
AI Technical Summary
It is difficult for the prior art to accurately predict electricity consumption, especially under the influence of temperature changes, holiday adjustments, extreme weather and other factors, resulting in too low accuracy of the prediction results.
The time convolution neural network and graph attention neural network (TCN-GAT) model are used, and the backpropagation neural network (ACO-BPNN) model is combined with wavelet analysis, gray model and ant colony algorithm-optimized backpropagation neural network (ACO-BPNN) model is used to predict electricity consumption through the construction and parameter adjustment of multiple models.
It improves the accuracy of electricity consumption prediction, and can accurately predict electricity consumption while considering various influencing factors, ensuring the reliability of the prediction results and the smooth progress of practical applications.
Smart Images

Figure CN119670974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power consumption prediction, and in particular to a method for predicting power consumption. Background Art
[0002] Electricity consumption refers to the amount of active electric energy consumed by an electricity user, measured in kW·h (kilowatt-hour). It is the product of the active power of electricity consumption and time. It is usually measured by an electric energy meter. According to the different electricity users, it can be divided into the electricity consumption of a single electric device, the production electricity consumption of products, the electricity consumption of enterprises (workshops, processes, and technologies) (including the power loss in the internal transmission and transformation process), and the electricity consumption of industries. Electricity consumption is mainly used for energy consumption statistics, trade settlement, and equipment and product energy consumption evaluation. Electricity consumption is a very important characteristic quantity in the process of electricity consumption and an important energy consumption indicator. The power sales company predicts the electricity consumption of the enterprises it represents in the future (hours, days, weeks, and months), which can provide a basic basis for its agent users in electricity procurement and energy management services, and is also the basis for the power sales company to make profits in the medium and long term and spot transactions. When predicting based on historical electricity consumption data, the actual change in electricity consumption may be affected by multiple factors such as temperature changes in the area, adjustments to statutory holidays, adjustments to folk holidays, adjustments to internal production of enterprises, and local extreme weather, making it difficult for linear models to capture the regularity of electricity consumption, which in turn causes the accuracy of the prediction results to be too low, and it is impossible to ensure the smooth progress of subsequent work. In addition, since electricity users include users from various industries, the electricity consumption patterns of users from different industries are different, so it is necessary to reasonably classify each type of user and complete the prediction separately. For electricity users who have installed solar photovoltaic panels, their estimated electricity purchase amount is equal to their estimated electricity consumption minus their photovoltaic power generation in the same period. Therefore, when predicting their electricity purchase amount, it is also necessary to predict the photovoltaic power generation on that day. Summary of the invention
[0003] The purpose of the present invention is to provide a method for predicting electricity consumption to solve the problems raised in the above background technology.
[0004] To achieve the above object, the present invention provides the following technical solution: a method for predicting power consumption, comprising the following contents:
[0005] S1: Obtain the monthly, daily and time point historical electricity consumption data of the enterprise to be predicted and the monthly predicted production increase and decrease plan; obtain the predicted monthly and daily temperatures, statutory holiday adjustments, folk holidays, extreme weather warnings, and major social events in the area where the enterprise to be predicted is located;
[0006] S2: When it is necessary to predict the daily electricity consumption of the tested area, a temporal convolutional neural network and graph attention neural network (TCN-GAT) model is established to make predictions based on temperature-season factors, holiday factors, extreme weather factors, major social events factors, and production change factors through the TCN-GAT model;
[0007] S3: When it is necessary to predict the monthly electricity consumption of the tested area, the monthly electricity consumption is predicted by using the gray and autoregressive moving average models optimized based on wavelet analysis;
[0008] S4: Use the clustering algorithm to select the historical similar monthly data of the predicted month as training data, establish the ant colony algorithm optimized back propagation neural network (ACO-BPNN) model, use the ACO-BPNN model to predict the monthly electricity consumption, and compare and analyze it with S3;
[0009] S5: Forecast the electricity consumption of the enterprise to be tested and verify it using the actual electricity consumption data. Based on the verification results, adjust the parameters of the above model to iterate the electricity consumption prediction model;
[0010] S6: Use the electricity consumption prediction model to predict electricity consumption in the area to be tested.
[0011] Preferably, the step S1 includes the following:
[0012] S11: Collect and obtain the historical electricity consumption data of the enterprise to be predicted on a monthly, daily and time point basis for the past 1 to 2 years and the monthly predicted production increase and decrease plan.
[0013] S12: Determine the region where the enterprise whose electricity consumption is to be predicted is located;
[0014] S13: Then collect and obtain the temperature forecast, statutory holidays, folk holidays, extreme weather warnings, and major social events of the area to be predicted.
[0015] Preferably, step S2 includes the following:
[0016] S21: When it is necessary to predict the daily electricity consumption of the tested area, a TCN-GAT model is built based on historical electricity consumption data, various influencing factors, time convolutional neural network and graph attention neural network;
[0017] S22: The TCN in the constructed TCN-GAT model can predict the daily load power consumption of the predicted area, and the learning ability of the GAT model can establish a correlation with the power consumption of the predicted area;
[0018] S23: Then, through the above model learning ability, the TCN-GAT model is used to predict the daily electricity consumption in the prediction area.
[0019] Preferably, step S3 includes the following:
[0020] S31: When it is necessary to predict the monthly electricity consumption in the tested area, db3 is selected as the wavelet basis through wavelet analysis, and the monthly electricity sales sequence is decomposed by wavelet to obtain the growth characteristic a and random fluctuation characteristic d of the monthly electricity sales;
[0021] S32: Build a grey model to predict the growth characteristic a, and use the autoregressive moving average prediction model to predict the random fluctuation characteristic d. S33: Perform wavelet reconstruction on the predicted results to obtain the power consumption prediction result.
[0022] Preferably, step S4 includes the following:
[0023] S41: Based on the clustering algorithm, the temperature factor, season factor, date difference factor, holiday factor and major event factor are used as the original clustering variables, and the electricity consumption data of historical months similar to the predicted month are selected as training data;
[0024] S42: Establishing a BPNN model with the obtained historical electricity consumption data of similar months, and optimizing the weight and threshold of the BP network using the ACO algorithm, so as to improve the prediction accuracy and speed of the BP network;
[0025] S43: Use similar monthly historical electricity consumption data for training and the BPNN model improved by ACO to predict the monthly electricity consumption in the predicted area;
[0026] S44: Compare and analyze the monthly electricity consumption data predicted by the ACO-BP neural network model with the other monthly electricity consumption data in the above step S3, and then obtain a comparison result;
[0027] S45: Use the model with the best electricity consumption forecast results for five consecutive months as the electricity consumption forecast result for the next forecast month.
[0028] Preferably, step S5 includes the following:
[0029] S51: Carry out prediction work on the area to be tested by establishing the above model, and then analyze and compare the results predicted by the model;
[0030] S52: Based on the analysis results, actual electricity consumption data of enterprises in the tested area is obtained as a validation set for the above model;
[0031] S53: By analyzing the growth characteristics of the electricity consumption time series, determine whether the enterprise's electricity consumption is abnormal, and update the abnormal factor, remove the dates when the electricity consumption is abnormal and fill it with the recent average value, and trace the source of enterprises with continuous abnormal electricity consumption;
[0032] S54: Adjust the parameters of the above prediction model based on deep learning, and use the adjusted power consumption prediction model to perform power consumption prediction work for the prediction area.
[0033] Preferably, step S6 includes the following:
[0034] S61: First, the power consumption prediction model is used to perform a prediction test on the power consumption of the area to be predicted, and the normal use of the power consumption prediction model is ensured by comparing the test results;
[0035] S62: Then, the electricity consumption prediction model is used to predict the electricity consumption under various factors in the prediction area.
[0036] Compared with the prior art, the beneficial effects of the present invention are: by acquiring the historical electricity consumption data of the area to be predicted, a TCN-GAT model, a gray model, an autoregressive moving average prediction model, and an electricity consumption prediction model are constructed, and then the above models can be used to analyze and predict the electricity consumption forecast work to be predicted, and the final electricity consumption forecast analysis is performed under the conditions of multiple factors such as weather factors, seasonal factors, date difference factors, holiday factors and extreme weather factors in the area to be predicted while ensuring the correctness of the prediction, and by analyzing the growth characteristics of the time series, it is determined whether the electricity consumption is abnormal, so as to prevent the deviation of the model prediction results caused by abnormal data, thereby ensuring the accuracy of the prediction results and ensuring the smooth progress of the prediction work. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] See also Figure 1 The present invention provides a technical solution: a method for predicting power consumption, comprising the following contents:
[0040] S1: Obtain the monthly, daily and time point historical electricity consumption data of the enterprise to be predicted and the monthly predicted production increase and decrease plan; obtain the predicted monthly and daily temperatures, statutory holiday adjustments, folk holidays, extreme weather warnings, and major social events in the area where the enterprise to be predicted is located;
[0041] S2: When it is necessary to predict the daily electricity consumption of the tested area, a temporal convolutional neural network and graph attention neural network (TCN-GAT) model is established to make predictions based on temperature-season factors, holiday factors, extreme weather factors, major social events factors, and production change factors through the TCN-GAT model;
[0042] S3: When it is necessary to predict the monthly electricity consumption of the tested area, the monthly electricity consumption is predicted by using the gray and autoregressive moving average models optimized based on wavelet analysis;
[0043] S4: Use the clustering algorithm to select the historical similar monthly data of the predicted month as training data, establish the ant colony algorithm optimized back propagation neural network (ACO-BPNN) model, use the ACO-BPNN model to predict the monthly electricity consumption, and compare and analyze it with S3;
[0044] S5: Forecast the electricity consumption of the enterprise to be tested and verify it using the actual electricity consumption data. Based on the verification results, adjust the parameters of the above model to iterate the electricity consumption prediction model;
[0045] S6: Use the electricity consumption prediction model to predict electricity consumption in the area to be tested.
[0046] Wherein, the step S1 includes the following:
[0047] S11: Collect and obtain the historical electricity consumption data of the enterprise to be predicted on a monthly, daily and time point basis in the past 1 to 2 years and the monthly predicted production increase and decrease plan;
[0048] S12: Determine the region where the enterprise whose electricity consumption is to be predicted is located;
[0049] S13: Then collect and obtain the temperature forecast, statutory holidays, folk holidays, extreme weather warnings, and major social events of the area to be predicted.
[0050] Wherein, the step S2 includes the following:
[0051] S21: When it is necessary to predict the daily electricity consumption of the tested area, a TCN-GAT model is built based on historical electricity consumption data, various influencing factors, time convolutional neural network and graph attention neural network;
[0052] S22: The TCN in the constructed TCN-GAT model can predict the daily load power consumption of the predicted area, and the learning ability of the GAT model can establish a correlation with the power consumption of the predicted area;
[0053] S23: Then, through the above model learning ability, the TCN-GAT model is used to predict the daily electricity consumption in the prediction area.
[0054] Wherein, the step S3 includes the following:
[0055] S31: When it is necessary to predict the monthly electricity consumption in the tested area, db3 is selected as the wavelet basis through wavelet analysis, and the monthly electricity sales sequence is decomposed by wavelet to obtain the growth characteristic a and random fluctuation characteristic d of the monthly electricity sales;
[0056] S32: Build a grey model to predict the growth characteristic a, and use the autoregressive moving average prediction model to predict the random fluctuation characteristic d. S33: Perform wavelet reconstruction on the predicted results to obtain the power consumption prediction result.
[0057] Wherein, the step S4 includes the following:
[0058] S41: Based on the clustering algorithm, the temperature factor, season factor, date difference factor, holiday factor and major event factor are used as the original clustering variables, and the electricity consumption data of historical months similar to the predicted month are selected as training data;
[0059] S42: Establishing a BPNN model with the obtained historical electricity consumption data of similar months, and optimizing the weight and threshold of the BP network using the ACO algorithm, so as to improve the prediction accuracy and speed of the BP network;
[0060] S43: Use similar monthly historical electricity consumption data for training and the BPNN model improved by ACO to predict the monthly electricity consumption in the predicted area;
[0061] S44: Compare and analyze the monthly electricity consumption data predicted by the ACO-BP neural network model with the other monthly electricity consumption data in the above step S3, and then obtain a comparison result;
[0062] S45: Use the model with the best electricity consumption forecast results for five consecutive months as the electricity consumption forecast result for the next forecast month.
[0063] Wherein, the step S5 includes the following:
[0064] S51: Carry out prediction work on the area to be tested by establishing the above model, and then analyze and compare the results predicted by the model;
[0065] S52: Based on the analysis results, actual electricity consumption data of enterprises in the tested area is obtained as a validation set for the above model;
[0066] S53: By analyzing the growth characteristics of the electricity consumption time series, determine whether the enterprise's electricity consumption is abnormal, and update the abnormal factor, remove the dates when the electricity consumption is abnormal and fill it with the recent average value, and trace the source of enterprises with continuous abnormal electricity consumption;
[0067] S54: Adjust the parameters of the above prediction model based on deep learning, and use the adjusted power consumption prediction model to perform power consumption prediction work for the prediction area.
[0068] Wherein, the step S6 includes the following:
[0069] S61: First, the power consumption prediction model is used to perform a prediction test on the power consumption of the area to be predicted, and the normal use of the power consumption prediction model is ensured by comparing the test results;
[0070] S62: Then, the electricity consumption prediction model is used to predict the electricity consumption under various factors in the prediction area.
[0071] Specifically, when using the present invention, the historical electricity consumption data of the enterprise to be predicted for the past 1 to 2 years on a monthly, daily and time point basis and the monthly predicted production increase and decrease plan are collected and obtained, the area where the enterprise whose electricity consumption is to be predicted is located is determined, and then the temperature forecast, statutory holidays, folk holidays, extreme weather warnings, and major social events of the area to be predicted are collected and obtained. When it is necessary to predict the daily electricity consumption in the area to be tested, a TCN-GAT model is built based on the historical electricity consumption data, various influencing factors, time convolutional neural network and graph attention neural network. The TCN in the built TCN-GAT model can predict the daily load electricity consumption in the area to be predicted, and the learning ability of the GAT model can predict the daily load electricity consumption in the area to be predicted. The electricity consumption of the region is established, and then the TCN-GAT model is used to predict the daily electricity consumption of the predicted region through the learning ability of the above model. When it is necessary to predict the monthly electricity consumption of the tested region, db3 is selected as the wavelet basis through wavelet analysis, and the monthly electricity sales sequence is decomposed by wavelet to obtain the growth characteristic a and random fluctuation characteristic d of the monthly electricity sales. The growth characteristic a is predicted by building a gray model, and the random fluctuation characteristic d is predicted using the autoregressive moving average prediction model. S33: The predicted results are reconstructed by wavelet to obtain the electricity consumption prediction results. Based on the clustering algorithm, temperature factors, seasonal factors, date difference factors, holiday factors and major event factors are used as original clustering variables to screen and predict The electricity consumption data of historical months similar to the measured month is used as training data, and the obtained historical electricity consumption data of similar months is used to establish a BPNN model, and the ACO algorithm is used to optimize the weights and thresholds of the BP network to improve the prediction accuracy and speed of the BP network. The historical electricity consumption data of similar months is used for training, and the BPNN model improved by ACO is used to predict the monthly electricity consumption of the predicted area. The monthly electricity consumption data predicted by the ACO-BP neural network model is compared and analyzed with the electricity consumption data of another month in the above step S3 to obtain a comparison result. The model with the dominant electricity consumption prediction results for 5 consecutive months is used as the electricity consumption prediction result for the next prediction month. The above model is established to predict the area to be tested. The test is then carried out, and the results predicted by the model are analyzed and compared. Through the analysis results, the actual electricity consumption data of enterprises in the test area are obtained as the verification set of the above model. By analyzing the growth characteristics of the electricity consumption time series, it is judged whether the electricity consumption of the enterprise is abnormal, and the abnormal factor is updated. The dates with abnormal electricity consumption are eliminated and filled with recent average values. The enterprises with continuous abnormal electricity consumption are traced, and the above prediction model based on deep learning is adjusted. The electricity consumption prediction work is carried out for the predicted area through the adjusted electricity consumption prediction model. The electricity consumption prediction model is used to test the electricity consumption in the predicted area first, and the normal use of the electricity consumption prediction model is guaranteed by comparing the test results.Then, the electricity consumption prediction model is used to predict the electricity consumption under various factors in the prediction area.
[0072] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for predicting electricity consumption, characterized in that: Includes the following: S1: Obtain the monthly, daily and time point historical electricity consumption data of the enterprise to be predicted and the monthly predicted production increase and decrease plan; obtain the predicted monthly and daily temperatures, statutory holiday adjustments, folk holidays, extreme weather warnings, and major social events in the area where the enterprise to be predicted is located; S2: When it is necessary to predict the daily electricity consumption of the tested area, a temporal convolutional neural network and graph attention neural network (TCN-GAT) model is established to make predictions based on temperature-season factors, holiday factors, extreme weather factors, major social events factors, and production change factors through the TCN-GAT model; S3: When it is necessary to predict the monthly electricity consumption of the tested area, the monthly electricity consumption is predicted by using the gray and autoregressive moving average models optimized based on wavelet analysis; S4: Use the clustering algorithm to select the historical similar monthly data of the predicted month as training data, establish the ant colony algorithm optimized back propagation neural network (ACO-BPNN) model, use the ACO-BPNN model to predict the monthly electricity consumption, and compare and analyze it with S3; S5: Forecast the electricity consumption of the enterprise to be tested and verify it using the actual electricity consumption data. Based on the verification results, adjust the parameters of the above model to iterate the electricity consumption prediction model; S6: Use the electricity consumption prediction model to predict electricity consumption in the area to be tested.
2. The method for predicting power consumption according to claim 1, characterized in that: The step S1 includes the following: S11: Collect and obtain the historical electricity consumption data of the enterprise to be predicted on a monthly, daily and time point basis in the past 1 to 2 years and the monthly predicted production increase and decrease plan; S12: Determine the region where the enterprise whose electricity consumption is to be predicted is located; S13: Then collect and obtain the temperature forecast, statutory holidays, folk holidays, extreme weather warnings, and major social events of the area to be predicted.
3. A method for predicting power consumption according to claim 2, characterized in that: The step S2 includes the following: S21: When it is necessary to predict the daily electricity consumption of the tested area, a TCN-GAT model is built based on historical electricity consumption data, various influencing factors, time convolutional neural network and graph attention neural network; S22: The TCN in the constructed TCN-GAT model can predict the daily load power consumption of the predicted area, and the learning ability of the GAT model can establish a correlation with the power consumption of the predicted area; S23: Then, through the above model learning ability, the TCN-GAT model is used to predict the daily electricity consumption in the prediction area.
4. A method for predicting power consumption according to claim 3, characterized in that: The step S3 includes the following: S31: When it is necessary to predict the monthly electricity consumption in the tested area, db3 is selected as the wavelet basis through wavelet analysis, and the monthly electricity sales sequence is decomposed by wavelet to obtain the growth characteristic a and random fluctuation characteristic d of the monthly electricity sales; S32: Build a grey model to predict the growth characteristic a, and use the autoregressive moving average prediction model to predict the random fluctuation characteristic d. S33: Perform wavelet reconstruction on the predicted results to obtain the power consumption prediction result.
5. A method for predicting power consumption according to claim 4, characterized in that: The step S4 includes the following: S41: Based on the clustering algorithm, the temperature factor, season factor, date difference factor, holiday factor and major event factor are used as the original clustering variables, and the electricity consumption data of historical months similar to the predicted month are selected as training data; S42: Establishing a BPNN model with the obtained historical electricity consumption data of similar months, and optimizing the weight and threshold of the BP network using the ACO algorithm, so as to improve the prediction accuracy and speed of the BP network; S43: Use similar monthly historical electricity consumption data for training and the BPNN model improved by ACO to predict the monthly electricity consumption in the predicted area; S44: Compare and analyze the monthly electricity consumption data predicted by the ACO-BP neural network model with the other monthly electricity consumption data in the above step S3, and then obtain a comparison result; S45: Use the model with the best electricity consumption forecast results for five consecutive months as the electricity consumption forecast result for the next forecast month.
6. A method for predicting power consumption according to claim 5, characterized in that: The step S5 includes the following: S51: Carry out prediction work on the area to be tested by establishing the above model, and then analyze and compare the results predicted by the model; S52: Based on the analysis results, actual electricity consumption data of enterprises in the tested area is obtained as a validation set for the above model; S53: By analyzing the growth characteristics of the electricity consumption time series, determine whether the enterprise's electricity consumption is abnormal, and update the abnormal factor, remove the dates when the electricity consumption is abnormal and fill it with the recent average value, and trace the source of enterprises with continuous abnormal electricity consumption; S54: Adjust the parameters of the above prediction model based on deep learning, and use the adjusted power consumption prediction model to perform power consumption prediction work for the prediction area.
7. A method for predicting power consumption according to claim 6, characterized in that: The step S6 includes the following: S61: First, the power consumption prediction model is used to perform a prediction test on the power consumption of the area to be predicted, and the normal use of the power consumption prediction model is ensured by comparing the test results; S62: Then, the electricity consumption prediction model is used to predict the electricity consumption under various factors in the prediction area.
Citation Information
Cited By
Electric energy dynamic anomaly analysis and early warning system for urban buildings in severe cold areas
CN121598262A