Electricity consumption prediction method capable of actively correcting influence factors and related device

By analyzing and correcting the influencing factors of electricity consumption in first-tier cities, and combining multiple prediction models to predict annual electricity consumption and monthly electricity consumption, the problem of poor accuracy of traditional prediction methods is solved and more accurate electricity consumption prediction is achieved.

CN120087998APending Publication Date: 2025-06-03STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411326580.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, electricity consumption fluctuates greatly, and traditional prediction methods have poor accuracy. Especially in the monthly electricity consumption prediction of first-tier cities, fluctuations caused by special factors such as the Spring Festival are difficult to accurately predict.

Method used

By analyzing the influencing factors of electricity consumption in the target area, determining the main influencing factors, and correcting the data of these factors and inputting them into the pre-screened annual electricity consumption and monthly electricity consumption prediction models, combining BP neural network, ACO-BP, LSTM, GWO-LSTM and other models for prediction, the model with the highest accuracy was selected for prediction.

Benefits of technology

It significantly improves the accuracy of annual electricity consumption and monthly electricity consumption prediction, reduces errors caused by inaccurate data or failure to consider key variables, and can more accurately capture short-term changes such as seasonality and periodicity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087998A_ABST
    Figure CN120087998A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity consumption prediction method capable of actively correcting influence factors and a related device, and belongs to the technical field of electricity consumption prediction. The method comprises the following steps: analyzing power consumption influence factors of a target area to obtain a plurality of main influence factors; correcting the data of the plurality of main influence factors, and inputting the data into a pre-screened annual electricity consumption prediction model to obtain an annual electricity consumption prediction result of the target area; and obtaining historical monthly electricity consumption data, performing time sequence preprocessing on the historical monthly electricity consumption data, and inputting the historical monthly electricity consumption data into a pre-screened monthly electricity consumption prediction model to obtain a monthly electricity consumption prediction result of the target area. According to the method, main influence factors of the electricity consumption of the target area are deeply analyzed, and the data of the factors are accurately corrected, so that the prediction accuracy of the annual electricity consumption can be remarkably improved; the historical monthly electricity consumption data are preprocessed through the time sequence, and the prediction accuracy of the monthly electricity consumption can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power consumption prediction, and relates to a power consumption prediction method and related device for actively correcting influencing factors. Background Art

[0002] Accurate power consumption prediction helps power companies plan and allocate power resources in advance, ensuring the stability and reliability of the power grid. By predicting the power consumption demand in different time periods and regions, power companies can reasonably arrange power generation plans and dispatch power resources to avoid power supply-demand imbalance and power shortages.

[0003] The power consumption in first-tier cities is indeed a complex and variable indicator, which is affected by many intertwined factors, making accurate prediction extremely challenging. First of all, the prosperity of economic activities is one of the key factors directly affecting power consumption. With the continuous growth of the economy in first-tier cities, the continuous improvement of various enterprises, commercial facilities and residents' living standards, the demand for electricity also increases. However, the volatility and uncertainty of economic activities, such as seasonal consumption changes, the rise and fall of industries, and the impact of the global economic environment, may all lead to significant fluctuations in power consumption, increasing the difficulty of prediction. The power consumption in first-tier cities is jointly affected by multiple factors such as economy, climate, policy, technology, population structure and residents' living habits. The interaction and dynamic changes among these factors make the accurate prediction of power consumption particularly difficult.

[0004] Currently, traditional statistical methods are well-developed. Regression analysis, trend extrapolation, grey theory, time series method, etc. are common traditional prediction methods. The significant disadvantage of traditional statistical methods is that they need to find the mathematical expression relationship between electricity consumption and factors such as economic situation, weather, and industry based on a large amount of historical data, and can predict electricity consumption when the relevant influencing factors are known according to the mathematical expression. However, since 2020, the annual power consumption in first-tier cities has fluctuated greatly, and the traditional prediction accuracy is poor. For monthly power consumption prediction, due to the different months in which the Spring Festival falls each year, the monthly power consumption fluctuates greatly, and the traditional prediction accuracy is poor. Summary of the Invention

[0005] The purpose of the present invention is to provide a power consumption prediction method and related device for actively correcting influencing factors, so as to solve the technical problem of large fluctuations in power consumption and poor accuracy of traditional prediction methods in the prior art.

[0006] To achieve the above object, the present invention adopts the following technical solutions: In the first aspect, the present invention provides a power consumption prediction method for actively correcting influencing factors, including the following steps: By obtaining the influencing factors of power consumption in the target area and analyzing them, several main influencing factors are obtained; The data of the several main influencing factors are corrected and input into the pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; Historical monthly electricity consumption data is obtained, and after performing time series preprocessing on the historical monthly electricity consumption data, it is input into the pre-screened monthly electricity consumption prediction model to obtain the monthly electricity consumption prediction result of the target area.

[0007] Further, the step of analyzing the influencing factors of electricity consumption in the target area to obtain several main influencing factors specifically includes: analyzing the influencing factors of electricity consumption in the target area by the principal component analysis method, and then verifying the long-term equilibrium relationship between the influencing factors of electricity consumption in the target area and electricity consumption through the cointegration theory to obtain several main influencing factors.

[0008] Further, the several main influencing factors include gross regional product, population, total coal consumption, resident consumption level, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry, and urban resident consumption level.

[0009] Further, the screening step of the annual electricity consumption prediction model specifically includes: Obtain the historical data of several main influencing factors; Input the historical data of the several main influencing factors into the BP neural network model, ACO-BP model, LSTM model, GWO-LSTM model, grey prediction model GM(1,1), and ARIMA model respectively for prediction to obtain several annual electricity consumption prediction values; Screen out the model with the highest prediction accuracy from the several annual electricity consumption prediction values as the annual electricity consumption prediction model and output it.

[0010] Further, the step of screening out the model with the highest prediction accuracy from the several annual electricity consumption prediction values as the annual electricity consumption prediction model and outputting it specifically includes: Calculate the relative error between the annual electricity consumption prediction value predicted by each model and the true value. The specific calculation formula is:

[0011] where, is the relative error; a is the annual electricity consumption prediction value; is the true value of the annual electricity consumption; Select the model with the smallest relative error value as the annual electricity consumption prediction model and output it.

[0012] Further, the screening step of the monthly electricity consumption prediction model specifically includes: Perform EMD decomposition on the historical monthly electricity consumption data to obtain the intrinsic mode function components and the residual mode function components; Take the intrinsic mode components and the residual mode components as the inputs of the model, and predict them through the BP neural network model, the ACO-BP model, the LSTM model, the ARIMA model, and the GWO-LSTM model respectively to obtain several monthly electricity consumption prediction values; Select the model with the highest prediction accuracy from several monthly electricity consumption prediction values as the monthly electricity consumption prediction model and output it.

[0013] Furthermore, the step of selecting the model with the highest prediction accuracy from several monthly electricity consumption prediction values as the monthly electricity consumption prediction model and outputting it specifically includes: Calculate the mean absolute percentage error between the monthly electricity consumption prediction value obtained by each model prediction and the true value. The specific calculation formula is:

[0014] where, is the mean absolute percentage error; is the number of historical data; b is the monthly electricity consumption prediction value; B is the true value of the monthly electricity consumption; Select the model with the smallest mean absolute percentage error value as the monthly electricity consumption prediction model and output it.

[0015] In a second aspect, the present invention provides an electricity consumption prediction system for actively correcting influencing factors, including: An influencing factor analysis module, configured to analyze the electricity consumption influencing factors of the target area by obtaining them to obtain several main influencing factors; An annual electricity consumption prediction module, configured to correct the data of the several main influencing factors and input them into a pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; A monthly electricity consumption prediction module, configured to obtain historical monthly electricity consumption data, perform time series preprocessing on the historical monthly electricity consumption data, and input them into a pre-screened monthly electricity consumption prediction model to obtain the monthly electricity consumption prediction result of the target area.

[0016] In a third aspect, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0017] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0018] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses a method and related device for predicting electricity consumption that actively corrects influencing factors. First, by analyzing the influencing factors of electricity consumption in the target area, the main influencing factors are determined, and after correcting the main influencing factors, they are input into the annual electricity consumption prediction model to predict the annual electricity consumption data. Then, the historical monthly electricity consumption data is preprocessed by time series to reduce the prediction error of monthly electricity consumption caused by the Spring Festival effect; finally, the monthly electricity consumption data is predicted through the monthly electricity consumption prediction model. By deeply analyzing the main influencing factors of electricity consumption in the target area and precisely correcting the data of these factors, the present invention can significantly reduce the errors caused by inaccurate data or unconsidered key variables in the prediction process, thereby greatly improving the prediction accuracy of annual electricity consumption. The present invention adopts a combination of an annual electricity consumption prediction model and a monthly electricity consumption prediction model, taking into account both long-term trends and short-term fluctuations, making the prediction results more comprehensive and flexible. By preprocessing the historical monthly electricity consumption data through time series, the short-term change rules such as seasonality and periodicity can be captured more accurately. It is of great significance for power enterprises and energy management departments to formulate scientific power supply and demand plans and optimize resource allocation.

[0019] Furthermore, through the historical electricity consumption data, the present invention compares the predicted values and the true values of the models, and screens out the annual electricity consumption prediction model and the monthly electricity consumption prediction model with the highest prediction accuracy; through strict screening, it is ensured that the selected models are more suitable for the electricity consumption situation of the target area. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0021] Figure 1 is the flow chart of the method of the present invention; Figure 2 is the schematic diagram of the system of the present invention; Figure 3 is the prediction route map of the method of the embodiment of the present invention; Figure 4 is the scatter plot distribution diagram of the annual electricity sales volume and the main influencing factors in the embodiment of the present invention, wherein, Figure 4-1 is the scatter plot distribution diagram between the annual electricity sales volume and the gross regional product, Figure 4-2 is the scatter plot distribution diagram between the annual electricity sales volume and the population, Figure 4-3 is the scatter plot distribution diagram between the annual electricity sales volume and the consumption level of urban residents, Figure 4-4 is the scatter plot distribution diagram between the annual electricity sales volume and the total coal consumption, Figure 4-5It is a scatter plot distribution diagram between annual electricity sales volume and residents' consumption level. Figure 4-6 It is a scatter plot distribution diagram between annual electricity sales volume and the output value of the primary industry. Figure 4 -7 It is a scatter plot distribution diagram between annual electricity sales volume and the output value of the secondary industry. Figure 4 -8 It is a scatter plot distribution diagram between annual electricity sales volume and the output value of the tertiary industry. Figure 5 It is a comparison chart of monthly electricity consumption in different years of the embodiments of the present invention. Among them, Figure 5-1 It is a comparison chart of monthly electricity consumption data in 2016, 2018, and 2019. Figure 5-2 It is a comparison chart of monthly electricity consumption data in 2014, 2016, and 2018. Figure 6 It is a schematic structural diagram of the computer device of the present invention. Detailed implementation manners

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations.

[0023] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts fall within the scope of protection of the present invention.

[0024] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0025] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper", "lower", "horizontal", "inner", etc. are used to indicate the orientation or positional relationship, it is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of the invention is usually placed during use. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, terms such as "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0026] In addition, when the term "horizontal" appears, it does not mean that the component is required to be absolutely horizontal, but it can be slightly inclined. For example, "horizontal" only means that its direction is more horizontal relative to "vertical", and does not mean that the structure must be completely horizontal, but it can be slightly inclined.

[0027] In the description of the embodiments of the present invention, it should also be noted that unless otherwise clearly specified and limited, if the terms "set", "installed", "connected", "connected" are used, they should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0028] The present invention will be further described in detail below with reference to the accompanying drawings: See Figure 1 , the embodiments of the present invention disclose a power consumption prediction method for actively correcting influencing factors, including the following steps: S1, by obtaining and analyzing the influencing factors of the power consumption in the target area, several main influencing factors are obtained; The influencing factors of the power consumption in the target area are analyzed by the principal component analysis method, and then the long-term equilibrium relationship between the influencing factors of the power consumption in the target area and the power consumption is verified by the cointegration theory, and several main influencing factors are obtained. In this embodiment, the influencing factors suitable for analyzing the annual power consumption of the target area are selected among many influencing factors, and these influencing factors are analyzed economically. Not only the strength of the correlation between each variable and the power consumption is analyzed, but also the cointegration analysis is performed on the strongly correlated variables to verify their long-term equilibrium relationship with the power consumption. On this basis, the model can be screened and trained subsequently.

[0029] The several main influencing factors include gross regional product, population, total coal consumption, resident consumption level, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry, and consumption level of urban residents. It should be noted that the output value of the primary industry, the output value of the secondary industry, and the output value of the tertiary industry are three important concepts in national economic accounting, which respectively represent the total amount of economic activities of different industrial sectors. The output value of the primary industry usually refers to the output value created by industries that directly obtain products from nature, mainly including agriculture, forestry, animal husbandry, and fishery. The output value of this industry reflects the total value created by these production activities, including the value of agricultural products, forest products, livestock products, and aquatic products. The output value of the secondary industry refers to the output value created by departments that reprocess primary products, mainly including manufacturing, construction, and mining. The output value of this industry reflects the total economic volume of industrialization and construction activities, including the production, processing, and sales value of various industrial products, as well as the construction and maintenance value of the construction industry in aspects such as housing and infrastructure. The output value of the tertiary industry refers to the output value created by all other industrial sectors except the primary and secondary industries, and is also known as the output value of the service industry. This industry covers a wide range of fields, including transportation, warehousing and postal services, information transmission, computer services and software, wholesale and retail, accommodation and catering, finance, real estate, leasing and business services, scientific research, technical services and geological exploration, water conservancy, environment and public facilities management, resident services and other services, education, health, social security and social welfare, culture, sports and entertainment, and public management and social organizations. The output value of the tertiary industry reflects the contribution and status of the service industry in the national economy.

[0030] S2. Modify the data of the several main influencing factors and input them into the pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; By modifying the data of the main influencing factors, it can ensure that the data input into the prediction model is more accurate and reliable. This helps to reduce the prediction deviation caused by data errors. Pre-screen the annual electricity consumption prediction model that is more suitable for the target area to ensure that the selected model is more adaptable to the electricity consumption situation of the target area and has higher prediction accuracy.

[0031] S3. Obtain the historical monthly electricity consumption data, perform time series preprocessing on the historical monthly electricity consumption data, and then input it into the pre-screened monthly electricity consumption prediction model to obtain the monthly electricity consumption prediction result of the target area.

[0032] By performing time series preprocessing on the historical monthly electricity consumption data, it can significantly improve the data quality input into the prediction model to improve the prediction accuracy, so as to obtain a more accurate monthly electricity consumption prediction result.

[0033] In a feasible embodiment of the present invention, the screening of the annual electricity consumption prediction model in S2 specifically includes the following steps: S201, obtaining historical data of several main influencing factors; S202, respectively inputting the historical data of the several main influencing factors into a BP neural network model, an ACO-BP model, an LSTM model, a GWO-LSTM model, a grey prediction model GM(1,1), and an ARIMA model for prediction to obtain several annual electricity consumption prediction values; S203, screening out the model with the highest prediction accuracy from the several annual electricity consumption prediction values as the annual electricity consumption prediction model and outputting it.

[0034] Calculate the relative error between the annual electricity consumption prediction value predicted by each model and the true value. The specific calculation formula is:

[0035] where, is the relative error; a is the annual electricity consumption prediction value; is the true value of the annual electricity consumption; Select the model with the smallest relative error value as the annual electricity consumption prediction model and output it.

[0036] In a feasible embodiment of the present invention, the screening of the monthly electricity consumption prediction model in S3 specifically includes the following steps: S301, performing EMD decomposition on the historical monthly electricity consumption data to obtain intrinsic mode components and a residual mode component; S302, using the intrinsic mode components and the residual mode component as the input of the model, and respectively predicting through a BP neural network model, an ACO-BP model, an LSTM model, an ARIMA model, and a GWO-LSTM model to obtain several monthly electricity consumption prediction values; S303, screening out the model with the highest prediction accuracy from the several monthly electricity consumption prediction values as the monthly electricity consumption prediction model and outputting it.

[0037] Calculate the mean absolute percentage error between the monthly electricity consumption prediction value predicted by each model and the true value. The specific calculation formula is:

[0038] where, is the mean absolute percentage error; is the number of historical data; b is the monthly electricity consumption prediction value; B is the true value of the monthly electricity consumption; Select the model with the smallest mean absolute percentage error value as the monthly electricity consumption prediction model and output it.

[0039] It should be noted that the Mean Absolute Percentage Error (MAPE) is a statistical metric for measuring prediction accuracy, especially commonly used in time series forecasting or regression analysis. It calculates the average percentage of the absolute error between the predicted value and the actual value. MAPE can provide an intuitive and dimensionless error measure, enabling the comparison of prediction performance between datasets of different scales.

[0040] See Figure 2 , an electricity consumption prediction system for actively correcting influencing factors is disclosed in an embodiment of the present invention, including an influencing factor analysis module, an annual electricity consumption prediction module, and a monthly electricity consumption prediction module.

[0041] The influencing factor analysis module can analyze the influencing factors of electricity consumption in the target area through the principal component analysis method, and then verify the long-term equilibrium relationship between the influencing factors of electricity consumption in the target area and electricity consumption through the cointegration theory to obtain several main influencing factors. The several main influencing factors include gross regional product, population, total coal consumption, resident consumption level, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry, and urban resident consumption level.

[0042] The annual electricity consumption prediction module corrects the data of the several main influencing factors and inputs them into the pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; Among them, the screening process of the annual electricity consumption prediction model includes: obtaining the historical data of several main influencing factors; respectively inputting the historical data of the several main influencing factors into the BP neural network model, ACO-BP model, LSTM model, GWO-LSTM model, grey prediction model GM(1,1), and ARIMA model for prediction to obtain several annual electricity consumption prediction values; finally, screening out the model with the highest prediction accuracy from the several annual electricity consumption prediction values as the annual electricity consumption prediction model and outputting it.

[0043] The monthly electricity consumption prediction module can obtain the historical monthly electricity consumption data, perform time series preprocessing on the historical monthly electricity consumption data, and input it into the pre-screened monthly electricity consumption prediction model to obtain the monthly electricity consumption prediction result of the target area.

[0044] The screening process of the monthly electricity consumption prediction model includes: performing EMD decomposition on the historical monthly electricity consumption data to obtain the intrinsic mode components and the residual mode components; then using the intrinsic mode components and the residual mode components as the inputs of the model, and respectively predicting through the BP neural network model, the ACO-BP model, the LSTM model, and the GWO-LSTM model to obtain several monthly electricity consumption prediction values; finally, screening out the model with the highest prediction accuracy from the several monthly electricity consumption prediction values as the monthly electricity consumption prediction model and outputting it.

[0045] Embodiment: As the area with the largest electricity consumption proportion in the capital Beijing, the electricity consumption in Chaoyang District is affected by many factors. Therefore, studying the change characteristics of the electricity consumption market in Chaoyang District and finding a prediction model suitable for its social characteristics have far-reaching significance for important tasks such as the safe and stable development of the Beijing power grid, power grid planning, and marketing services.

[0046] This embodiment takes the electricity consumption situation in Chaoyang District as an example. Refer to Figure 3 , and discloses a method for predicting electricity consumption with actively corrected influencing factors, which specifically includes the following steps: (1) Taking the annual electricity consumption in Chaoyang District as the research object, analyze and study the impacts of different influencing factors on the electricity consumption in Chaoyang District by combining the method system of econometrics. At the same time, establish relevant econometric models. The main influencing factors are divided into principal component analysis and cointegration theory. Select 8 influencing factors for long-term equilibrium analysis. The research results show that the annual electricity consumption in Chaoyang District is greatly affected by 8 characteristic quantities, namely, the gross regional product, population, total coal consumption, resident consumption level, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry, and urban resident consumption level, and there is a long-term equilibrium relationship, as Figure 4 shown.

[0047] (2) Use the BP neural network algorithm, the ACO-BP algorithm, the LSTM algorithm, the GWO-LSTM algorithm, as well as the traditional prediction models, the grey prediction model GM(1,1) and the ARIMA model, to predict the annual electricity consumption in Chaoyang District. Simulate the prediction models on the experimental platform and compare the prediction results. For the interference of the influencing factors brought by special situations to the prediction, use a suitable prediction model to correct the influencing factors, and use the corrected data to predict the annual electricity consumption of the above prediction models again, and compare and analyze the prediction performance of each model.

[0048] Since 2020, Chaoyang District has been affected by special circumstances, and the data of relevant influencing factors in Chaoyang District have fluctuated greatly. The present invention uses their commonly used prediction models for each influencing factor to perform fluctuation analysis on the relevant data in 2020. The factors with greater impact from special circumstances are replaced with the predicted values ​​predicted by the model as the influencing factor values, and the influencing factors of 2019 and 2020 are re-inputted as the test set and the annual electricity consumption in 2021 is re-predicted.

[0049] The BP neural network and the combined algorithm ACO-BP were implemented using the MATLAB simulation program. The prediction results of BP and ACO-BP are compared as shown in Tables 1-1 and 1-2.

[0050] Table 1-1 Comparison of prediction results between BP and ACO-BP

[0051] Table 1-2 Comparison of prediction results between LSTM and GWO-LSTM

[0052] A comprehensive comparison of all the prediction models used found that the ACO-BP neural network model had a better prediction effect, with a prediction error as low as 1.323%. Therefore, the ACO-BP neural network model was used for subsequent annual electricity consumption forecasts.

[0053] (3) The monthly electricity consumption in Chaoyang District was predicted using the BP neural network learning algorithm, ACO-BP algorithm, LSTM algorithm, GWO-LSTM algorithm, and the ARIMA prediction model in the traditional algorithm. The prediction models were simulated on the experimental platform and the prediction results were compared.

[0054] The changing characteristics of monthly electricity consumption are analyzed. In view of the fluctuation of electricity consumption sequence caused by the Spring Festival holiday, EMD decomposition is used to decompose the original monthly electricity consumption data information to reduce the prediction error caused by the Spring Festival effect, and the 2020 component interfered by special circumstances is eliminated in the prediction process of the intrinsic mode component. The performance of the above-mentioned multiple prediction models in predicting annual electricity consumption is compared and analyzed.

[0055] In order to illustrate the uncertainty and randomness of monthly electricity consumption, the monthly electricity consumption data of 2016, 2018 and 2019 are selected for comparison. Figure 5-1As shown. The Spring Festival holidays in these three years were all in February. By comparison, it can be seen that as the years increase, the monthly electricity consumption values increase year by year. At the same time, it can also be seen that the electricity consumption in 2016, 2018, and 2019 has similar curve characteristics. The monthly electricity consumption reaches the lowest point in February, and the electricity consumption is relatively high in July and August in summer, which is greatly affected by temperature. Comparing the monthly electricity consumption data of 2014, 2016, and 2018, as Figure 5-2 shown, the lowest point of monthly electricity consumption in 2014 was in January, and the lowest points of monthly electricity consumption in 2016 and 2018 were both in February.

[0056] Using the obtained monthly electricity consumption data from 2012 to 2022, excluding the monthly electricity consumption data of 2014, 2016, 2017, and 2022 when the Spring Festival holiday was in January, the remaining monthly electricity consumption data was decomposed by EMD to obtain 4 intrinsic mode components. Using the intrinsic mode components obtained by decomposing the monthly electricity consumption by EMD and the continuous residual components from 2014 to 2020 to predict the monthly electricity consumption for the whole year of 2022.

[0057] Using the written MATLAB simulation program to implement the BP neural network and the combined algorithm ACO - BP. The comparison of the prediction results is shown in Tables 2 - 1 and 2 - 2 below.

[0058] Table 2 - 1 Comparison of BP and ACO - BP Prediction Results

[0059] Table 2 - 2 Comparison of LSTM and GWO - LSTM Prediction Results

[0060] R 2 is the coefficient of determination. It is a statistic used to measure the goodness of fit of a model to the observed data. It represents the proportion of the variance of the target variable that the model can explain. R 2 ranges from 0 to 1. The closer it is to 1, the better the fitting effect of the model, that is, the model can more accurately explain the changes in the data; conversely, the lower the R 2 value, the weaker the explanatory power of the model.

[0061] RMSE, that is, the Root Mean Squared Error, is the square root of the Mean Squared Error (MSE). It is used to measure the error size between the predicted value and the true value.

[0062] MAPE, namely the Mean Absolute Percentage Error, is an index to measure the relative gap between the predicted value and the true value. It is expressed in percentage form and reflects the proportion of the prediction error relative to the true value.

[0063] Among all the prediction models used, the GWO-LSTM has the smallest MAPE value and the best prediction effect on the monthly electricity consumption in Chaoyang District. Followed by ACO-BP, and the neural network models improved through parameter optimization can all enhance their prediction ability. The MAPE value is preferentially used to screen the models, and R 2 and RMSE are used as supplements.

[0064] In this embodiment, aiming at the problem of low prediction accuracy caused by large fluctuations in electricity consumption data, neural networks are used as a means to optimize the BP neural network and the LSTM neural network to establish two combined algorithms for predicting electricity consumption. It is found through verification that both can improve the problem of neural network prediction accuracy. By comparing the prediction results of the traditional prediction models GM(1,1) and ARIMA models, it can be found that ACO-BP performs well in predicting annual electricity consumption, while GWO-LSTM is more suitable for predicting monthly electricity consumption. And the trained ACO-BP algorithm and GWO-LSTM algorithm are used to predict the annual and monthly electricity consumption in Chaoyang District in 2023.

[0065] Considering that it is affected by special circumstances, different prediction models are used to correct the original data of the influencing factors in Chaoyang District, and then the corrected data is used to verify the network of the learning algorithm. By comparing the prediction results of the annual electricity consumption, it can be found that the prediction results have been improved by using the corrected data to verify the network.

[0066] Aiming at the large dependence on training samples, the amount of information contained in the data samples will directly affect the training effect of the algorithm. When predicting monthly electricity consumption, the Spring Festival effect cannot be ignored for the training effect of the neural network. Aiming at the fluctuations in the electricity consumption sequence caused by the Spring Festival holiday, EMD decomposition is used to decompose the original monthly electricity consumption data information to reduce the prediction error of monthly electricity consumption caused by the Spring Festival effect.

[0067] In one embodiment of the present invention, refer to Figure 6, a computer device is provided. The computer device includes a processor and a memory. The memory is used to store a computer program, and the computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function. The processor described in the embodiments of the present invention can be used to actively correct the operation of the power consumption prediction method of influencing factors.

[0068] The present invention also provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device, and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device, and of course can also include the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the operating system of the terminal. And, one or more instructions suitable for being loaded and executed by the processor are also stored in this storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the power consumption prediction method of actively correcting influencing factors in the above embodiments.

[0069] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0070] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.

[0071] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A method for predicting power consumption by actively correcting influencing factors, characterized in that: The following steps are involved: By obtaining and analyzing the factors affecting electricity consumption in the target area, several main influencing factors are obtained; The data of the several main influencing factors are corrected and input into the pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; The historical monthly electricity consumption data is obtained, and the historical monthly electricity consumption data is preprocessed in time series and then input into a pre-screened monthly electricity consumption prediction model to obtain a monthly electricity consumption prediction result for the target area.

2. The method for predicting power consumption by actively correcting influencing factors according to claim 1, characterized in that: The step of obtaining several main influencing factors by analyzing the influencing factors of electricity consumption in the target area specifically includes: analyzing the influencing factors of electricity consumption in the target area by the principal component analysis method, and then verifying the long-term equilibrium relationship between the influencing factors of electricity consumption in the target area and electricity consumption by the cointegration theory to obtain several main influencing factors.

3. The method for predicting power consumption by actively correcting influencing factors according to claim 2, characterized in that: The main influencing factors include regional GDP, population, total coal consumption, residents’ consumption level, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry and urban residents’ consumption level.

4. The method for predicting power consumption by actively correcting influencing factors according to claim 1, characterized in that: The screening step of the annual electricity consumption prediction model specifically includes: Obtain historical data on several major influencing factors; The historical data of the main influencing factors are respectively input into the BP neural network model, the ACO-BP model, the LSTM model, the GWO-LSTM model, the grey prediction model GM (1,1) and the ARIMA model for prediction, and the predicted values ​​of electricity consumption for several years are obtained; The model with the highest prediction accuracy is selected through several annual electricity consumption forecast values ​​and output as the annual electricity consumption forecast model.

5. The method for predicting power consumption by actively correcting influencing factors according to claim 4, characterized in that: The step of selecting a model with the highest prediction accuracy through a number of annual power consumption prediction values ​​as the annual power consumption prediction model and outputting the model specifically includes: Calculate the relative error between the predicted annual electricity consumption value and the actual value predicted by each model. The specific calculation formula is: in, is the relative error; a is the predicted annual electricity consumption; is the actual value of annual electricity consumption; The model with the smallest relative error value is selected as the annual electricity consumption prediction model and output.

6. The method for predicting power consumption by actively correcting influencing factors according to claim 1, characterized in that: The screening step of the monthly electricity consumption prediction model specifically includes: After performing EMD decomposition on the historical monthly electricity consumption data, intrinsic mode components and residual mode components are obtained; The intrinsic mode components and residual mode components are used as the input of the model, and the prediction values ​​of electricity consumption for several months are obtained through BP neural network model, ACO-BP model, LSTM model, ARIMA model and GWO-LSTM model respectively. The model with the highest prediction accuracy is selected through several monthly electricity consumption forecast values ​​and output as the monthly electricity consumption forecast model.

7. The method for predicting power consumption by actively correcting influencing factors according to claim 6, characterized in that: The step of selecting the model with the highest prediction accuracy through a plurality of monthly power consumption prediction values ​​as the monthly power consumption prediction model and outputting the model specifically includes: Calculate the average absolute percentage error between the predicted monthly electricity consumption value and the actual value predicted by each model. The specific calculation formula is: in, is the mean absolute percentage error; is the number of historical data; b is the predicted value of monthly electricity consumption; B is the actual value of monthly electricity consumption; The model with the smallest mean absolute percentage error is selected as the monthly electricity consumption prediction model and output.

8. A power consumption prediction system for actively correcting influencing factors, characterized in that: include: The influencing factor analysis module is used to obtain and analyze the influencing factors of power consumption in the target area to obtain several main influencing factors; An annual electricity consumption prediction module is used to correct the data of the several main influencing factors and input them into the pre-screened annual electricity consumption prediction model to obtain the annual electricity consumption prediction result of the target area; The monthly electricity consumption prediction module is used to obtain historical monthly electricity consumption data, and perform time series preprocessing on the historical monthly electricity consumption data and input the data into a pre-screened monthly electricity consumption prediction model to obtain a monthly electricity consumption prediction result for a target area.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.