Resident short-term electricity consumption prediction method, device and system, and storage medium
By constructing a temperature accumulation effect correction model and combining PCA, NGO-VMD, BiLSTM-AM and XGBoost technologies, the problem of low accuracy of household electricity consumption prediction is solved, and a higher accuracy and stable short-term electricity consumption prediction is achieved.
Patent Information
- Application Number
- CN202510247626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-17
AI Technical Summary
The electricity consumption of residents is affected by a variety of factors, showing non-stable, intermittent and volatility characteristics. A single model cannot guarantee prediction accuracy.
The temperature accumulation effect correction model is used, and the residential electricity consumption sequence is decomposed by PCA and NGO-VMD technology, input it into the BiLSTM-AM integrated deep learning model for prediction, and the residuals of the model are corrected through XGBoost to improve the prediction accuracy.
It improves the accuracy of residents' short-term electricity consumption prediction, overcomes the problem of insufficient parameter setting and single model prediction in traditional methods, and achieves more accurate and stable prediction results.
Smart Images

Figure CN120163469A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power prediction, and particularly relates to a method and device, a system, and a storage medium for predicting short-term electricity consumption of residents. Background Art
[0002] With the power market reform entering the deep water period, accurate electricity consumption prediction provides a reference basis and decision support for power dispatching and market transactions. The prediction of residents' electricity consumption can help users select appropriate power suppliers and power supply schemes according to market conditions, and improve the reliability and economy of electricity consumption. Since residents' electricity consumption is affected by various factors and is greatly disturbed by noise, showing the characteristics of non-steadiness, intermittency, and volatility, a single model cannot guarantee the prediction accuracy of residents' electricity consumption. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and device, a system, and a storage medium for predicting short-term electricity consumption of residents.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A method for predicting short-term electricity consumption of residents includes:
[0006] Step S1, obtaining historical electricity consumption of residents, and at the same time performing temperature cumulative effect correction according to the historical electricity consumption of residents;
[0007] Step S2, identifying key features of short-term electricity consumption of residents according to the historical electricity consumption of residents and temperature cumulative effect correction, and at the same time decomposing the electricity consumption sequence of residents;
[0008] Step S3, obtaining multiple IMF subsequences with frequencies from high to low after decomposition, inputting the decomposed sequences into a BiLSTM-AM integrated deep learning model, and respectively modeling each IMF subsequence to achieve accurate prediction of short-term electricity consumption of residents.
[0009] Preferably, in step S2, according to the historical electricity consumption of residents and temperature cumulative effect correction, the PCA method is used to identify key features of short-term electricity consumption of residents, and at the same time the NGO-VMD is used to decompose the electricity consumption sequence of residents.
[0010] Preferably, it further includes: step S4, using the training residuals of the BiLSTM-AM model as the target variable to train an XGBoost regression model to correct the prediction error of the BiLSTM-AM.
[0011] The present invention also provides a device for predicting short-term electricity consumption of residents, including:
[0012] An acquisition module, configured to acquire historical residential power consumption and correct for the cumulative temperature effect based on the historical residential power consumption;
[0013] A processing module, configured to identify key features of short-term residential power consumption based on the historical residential power consumption and the correction of the cumulative temperature effect, and decompose the residential power consumption sequence at the same time;
[0014] A prediction module, configured to obtain multiple IMF subsequences with decreasing frequencies from high to low after decomposition, input the decomposed sequences into a BiLSTM-AM integrated deep learning model, model each IMF subsequence separately, and achieve accurate prediction of short-term residential power consumption.
[0015] Preferably, the processing module uses the PCA method to identify key features of short-term residential power consumption based on the historical residential power consumption and the correction of the cumulative temperature effect, and uses NGO-VMD to decompose the residential power consumption sequence at the same time.
[0016] Preferably, it further includes: a correction module, configured to use the training residuals of the BiLSTM-AM model as the target variable, train an XGBoost regression model, and correct the prediction error of the BiLSTM-AM.
[0017] The present invention also provides a short-term residential power consumption prediction system, including: a memory and a processor, where a computer program run by the processor is stored on the memory, and the computer program executes a short-term residential power consumption prediction method when run by the processor.
[0018] The present invention also provides a storage medium, where a computer program is stored on the storage medium, and the computer program executes a short-term residential power consumption prediction method when running.
[0019] The present invention first considers the influence of the cumulative temperature effect on residential power consumption, constructs an hourly temperature correction model combined with meteorological factors, inputs the corrected hourly temperature into the prediction model, and at the same time constructs a data decomposition strategy based on VMD optimized by the NGO model to overcome the subjectivity of parameter setting in the traditional VMD method and improve the decomposition effect; secondly, constructs an integrated deep learning prediction model based on BiLSTM-AM, introduces an attention mechanism (AM) to dynamically allocate the weights of influencing factors, enhances the robustness of the prediction model, predicts multiple IMF components obtained by NGO-VMD decomposition respectively, and finally, uses the training residuals of the BiLSTM-AM model as the target variable, trains an XGBoost regression model, and corrects the prediction error of the BiLSTM-AM. Description of the Drawings
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to the provided drawings.
[0021] Figure 1 This is the flowchart of the short-term electricity consumption prediction method for residents in the embodiment of the present invention. Specific embodiments
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0023] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0024] Embodiment 1:
[0025] As Figure 1 shown, the embodiment of the present invention provides a short-term electricity consumption prediction method for residents, considering the combined short-term resident electricity consumption prediction model of the temperature cumulative effect, improved decomposition technology, and integrated deep learning, which combines the advantages of various data analysis and processing, machine learning, and deep learning algorithms. By integrating statistical methods, machine learning, and deep learning technologies, the accuracy of short-term resident electricity consumption prediction is effectively improved. The short-term resident electricity consumption prediction technology with high accuracy can effectively analyze the electricity consumption fluctuations of residents at different times, optimize the time-of-use electricity price mechanism, guide residents to spontaneously participate in power grid peak shaving from the demand side, and optimize electricity consumption behavior. In addition, accurate short-term electricity consumption prediction results can better support the development of electricity market transactions, assist electricity retailers in formulating differentiated electricity sales packages, and promote healthy competition in the electricity market. Considering that the short-term electricity consumption of residents is affected by various factors, especially meteorological factors such as temperature, humidity, and wind, the short-term electricity consumption sequence of residents will show non-steady and intermittent characteristics. Moreover, since the human body's perception of temperature is not only affected by the current time period but also by the cumulative temperature at previous times, it affects the electricity consumption of residents. Based on this, the present invention constructs a short-term resident electricity consumption prediction model considering the temperature cumulative effect, improved decomposition strategy, and integrated deep learning model, and uses the perceived temperature calculated by the temperature cumulative effect correction model to replace the original temperature in the meteorological factors.
[0026] AsFigure 1 As shown in Figure 1 , the short-term residential electricity consumption prediction method of the present invention includes:
[0027] Step S1: Obtain historical residential electricity consumption, and at the same time correct the cumulative temperature effect according to the historical residential electricity consumption;
[0028] Step S2: Identify the key features of short-term residential electricity consumption according to the historical residential electricity consumption and the correction of the cumulative temperature effect, and at the same time decompose the residential electricity consumption sequence;
[0029] Step S3: Obtain multiple IMF subsequences with frequencies from high to low after decomposition, input the decomposed sequences into the BiLSTM-AM integrated deep learning model, and model each IMF subsequence separately to achieve accurate prediction of short-term residential electricity consumption;
[0030] Step S4: Use the training residuals of the BiLSTM-AM model as the target variable to train the XGBoost regression model to correct the prediction error of the BiLSTM-AM.
[0031] As an implementation manner of an embodiment of the present invention, in step S1, it is judged whether there are missing values and outliers in the historical sequence of residential electricity consumption, and the missing values and outliers are filled or replaced based on cubic spline interpolation and Hermite interpolation methods. Then, a cumulative temperature effect model based on least squares fitting is constructed, the temperature range is divided, and cumulative temperature correction models for different temperature ranges are constructed respectively. The weight coefficients of different temperature ranges are calculated in combination with the highest temperature of the day to correct the temperature. The corrected temperature input based on least squares fitting is used as a feature and input into the next stage of the model.
[0032] Furthermore, the cumulative temperature effect means that high-temperature weather in summer not only has a greater impact on the electricity consumption at the current moment, but also has an impact on the electricity consumption in the next few days. The reason for this phenomenon is that the human body has a certain lag in response to temperature changes and needs a certain amount of time to respond to temperature changes.
[0033] When constructing the cumulative temperature effect model, the threshold temperature, the maximum cumulative days, and the cumulative effect coefficient will be considered to construct a complete temperature correction model. Among them, the selection of the cumulative effect coefficient is the key. Different cumulative effect coefficients mean different influences of historical temperatures. The following correction formula is used:
[0034]
[0035] where, T i ˊ is the corrected value of the highest temperature on the i-th day considering the cumulative effect, T i-j is the true value of the highest temperature on the j-th day before the i-th day, T i-0Denote the true value of the highest temperature on the i-th day, k j is T i-j 's weight.
[0036] Since the relationship between temperature and electricity consumption is non-linear, the common treatment method is to divide the temperature into intervals and establish linear models for each interval. Since the sensitivity of electricity consumption to temperature varies in different intervals, the same weight k j should also perform differently in different temperature intervals, and k j is mainly determined by the highest temperature of the day to be corrected. Referring to the method in the literature, k j is solved by intervals, and the specific division method is shown in Table 1 below. After statistics, select T high = 38°C, T low = 28°C, k j,n represents the k j value corresponding to the serial number n of the temperature interval.
[0037] Table 1
[0038]
[0039]
[0040] As an implementation manner of an embodiment of the present invention, in step S2, the PCA method is used to identify the key features of short-term residential electricity consumption, and the factors with a cumulative contribution degree of more than 85% are determined as key factors, and the contribution degrees of the original temperature data and the corrected temperature data to residential electricity consumption are compared. At the same time, Pearson correlation analysis is used to further compare the impacts of the corrected temperature, the original temperature, and other meteorological factors on residential electricity consumption, and the key feature factors for short-term residential electricity consumption prediction are summarized and input into the BiLSTM-AM-XGBoost prediction model. An improved data decomposition model for automatically optimizing the VMD decomposition parameters based on the NGO model is constructed. The NGO algorithm has good global optimization ability and strong robustness, and optimizes and solves the decomposition K value, alpha value, and fitness value of VMD, overcoming the defect of manually determining the decomposition parameters in VMD. The NGO-VMD is used to decompose the residential electricity consumption sequence to achieve data denoising, reduce the non-linear and non-stationary characteristics in the residential electricity consumption sequence, and ensure the quality of the input data in the prediction model.
[0041] As an implementation manner of an embodiment of the present invention, in step S3, multiple IMF subsequences with frequencies from high to low are obtained through the NGO-VMD improved data decomposition technology. The decomposed sequences are input into the BiLSTM-AM integrated deep learning model, and each IMF subsequence is modeled separately to achieve accurate prediction of short-term residential electricity consumption. The BiLSTM model can integrate historical and future information, reduce the risk of overfitting. By introducing the AM mechanism into the BiLSTM model, weights are dynamically assigned to different time steps, which can more effectively capture complex time dependencies and enhance the robustness of the short-term residential electricity consumption prediction model. The prediction results of the reconstructed subsequences are de-normalized, and the final prediction results of short-term residential electricity consumption based on the BiLSTM-AM model are integrated.
[0042] As an implementation manner of an embodiment of the present invention, in step S4, XGBoost is used to learn and fit the prediction residuals of the BiLSTM-AM model for short-term residential electricity consumption, compensate for complex patterns or noises that the BiLSTM-AM model fails to capture, and further reduce the residuals. This combination enables the short-term residential electricity consumption prediction model to have both the capture of time dependencies by BiLSTM-AM and the compensation of complex non-linear patterns by XGBoost, integrating the advantages of time series features and complex non-linear relationships, and improving the overall prediction performance of the model. Finally, the fitting results of XGBoost and the prediction results of the BiLSTM-AM model are integrated to obtain the final results of short-term residential electricity consumption. Multiple comparison models are set up, and multi-model error indicators are calculated. The effectiveness and superiority of the model constructed in this paper are verified through the comparative analysis of different model error indicators.
[0043] The embodiments of the present invention have the following technical advantages:
[0044] (1) The present invention constructs an air temperature cumulative effect model, obtains the air temperature fitting coefficient, analyzes and quantifies the temperature data that has a greater impact on residential electricity consumption behavior, calculates the corrected air temperature, and introduces the air temperature cumulative effect index for comprehensive consideration as a key input factor for short-term residential electricity consumption prediction, avoiding the deficiency of single meteorological factor analysis.
[0045] (2) The present invention constructs a data decomposition and noise reduction model for residential electricity consumption based on NGO-VMD, which overcomes the defect that the single VMD decomposition parameter setting relies on empirical selection and lacks a theoretical basis. Combining the intelligent optimization characteristics of NGO, the VMD parameters are efficiently optimized, improving the accuracy and stability of decomposition.
[0046] (3) The present invention constructs a short-term residential electricity consumption prediction model based on the combined deep learning of BiLSTM-AM, and models each subsequence obtained by NGO-VMD decomposition respectively. The BiLSTM-AM integrated prediction model can dynamically allocate weights, more accurately capture the long-term dependence relationship in the residential electricity consumption sequence, and achieve better prediction results.
[0047] (4) For the short-term residential electricity consumption prediction results of the BiLSTM-AM combined deep learning model, the present invention calculates the residual between the predicted value and the actual value of the model, and uses the XGBoost model to fit the residual predicted by the BiLSTM-AM model. The XGBoost model corrects the model error based on gradient boosting, compensates for the complex patterns or noises that the BiLSTM-AM model fails to capture, and further improves the prediction accuracy.
[0048] Example 2:
[0049] The embodiment of the present invention also provides a device for predicting short-term residential electricity consumption, including:
[0050] An acquisition module, configured to acquire historical residential electricity consumption, and at the same time correct the temperature cumulative effect according to the historical residential electricity consumption;
[0051] A processing module, configured to identify the key features of short-term residential electricity consumption according to the historical residential electricity consumption and the temperature cumulative effect correction, and at the same time decompose the residential electricity consumption sequence;
[0052] A prediction module, configured to obtain multiple IMF subsequences with frequencies from high to low after decomposition, input the decomposed sequences into the BiLSTM-AM integrated deep learning model, and model each IMF subsequence respectively to achieve accurate prediction of short-term residential electricity consumption.
[0053] As an implementation manner of the embodiment of the present invention, the processing module uses the PCA method to identify the key features of short-term residential electricity consumption according to the historical residential electricity consumption and the temperature cumulative effect correction, and at the same time uses NGO-VMD to decompose the residential electricity consumption sequence.
[0054] As an implementation manner of the embodiment of the present invention, it further includes: a correction module, configured to use the training residual of the BiLSTM-AM model as the target variable to train the XGBoost regression model and correct the prediction error of the BiLSTM-AM.
[0055] Example 3:
[0056] An embodiment of the present invention further provides a system for predicting short-term electricity consumption of residents, including: a memory and a processor. A computer program is stored on the memory and run by the processor. When the computer program is run by the processor, it executes a method for predicting short-term electricity consumption of residents.
[0057] Embodiment 4:
[0058] An embodiment of the present invention further provides a storage medium. A computer program is stored on the storage medium. When the computer program runs, it executes a method for predicting short-term electricity consumption of residents.
[0059] The above-described embodiments are only descriptions of the preferred embodiments of the present invention and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for predicting short-term electricity consumption of residents, characterized in that: include: Step S1, obtaining historical residential electricity consumption, and performing temperature cumulative effect correction based on historical residential electricity consumption; Step S2: According to the historical residential electricity consumption and temperature cumulative effect correction, identify the key characteristics of short-term residential electricity consumption, and decompose the residential electricity consumption sequence; Step S3: After decomposition, multiple IMF subsequences with frequencies from high to low are obtained. The decomposed sequences are input into the BiLSTM-AM integrated deep learning model, and each IMF subsequence is modeled separately to achieve accurate prediction of short-term residential electricity consumption.
2. The method for predicting short-term electricity consumption of residents as claimed in claim 1, characterized in that: In step S2, based on the historical residential electricity consumption and temperature cumulative effect correction, the PCA method is used to identify the key characteristics of short-term residential electricity consumption, and the NGO-VMD is used to decompose the residential electricity consumption series.
3. The method for predicting short-term electricity consumption of residents as claimed in claim 2, characterized in that: The method also includes: step S4, taking the training residual of the BiLSTM-AM model as the target variable, training the XGBoost regression model, and correcting the prediction error of the BiLSTM-AM.
4. A device for predicting short-term electricity consumption of residents, characterized in that: include: An acquisition module is used to obtain historical residential electricity consumption and to correct the cumulative effect of temperature based on historical residential electricity consumption; The processing module is used to identify the key characteristics of short-term residential electricity consumption based on historical residential electricity consumption and temperature cumulative effect correction, and decompose the residential electricity consumption series; The prediction module is used to decompose and obtain multiple IMF subsequences with frequencies from high to low, input the decomposed sequences into the BiLSTM-AM integrated deep learning model, and model each IMF subsequence separately to achieve accurate prediction of short-term residential electricity consumption.
5. The device for predicting short-term electricity consumption of residents as claimed in claim 4, characterized in that: The processing module is modified according to the historical residential electricity consumption and the cumulative effect of temperature, and the PCA method is used to identify the key characteristics of short-term residential electricity consumption. At the same time, NGO-VMD is used to decompose the residential electricity consumption series.
6. The device for predicting short-term electricity consumption of residents as claimed in claim 5, characterized in that: Also includes: The correction module is used to train the XGBoost regression model using the training residual of the BiLSTM-AM model as the target variable to correct the prediction error of the BiLSTM-AM.
7. A system for predicting short-term electricity consumption of residents, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the method for predicting short-term electricity consumption of residents as described in any one of claims 1 to 3 is executed.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when running, executes the method for predicting short-term electricity consumption of residents as described in any one of claims 1 to 3.