Electricity consumption prediction method and system based on spatio-temporal feature fusion

By constructing a spatiotemporal feature fusion model, and combining ARIMA, seasonal decomposition, and CNN-LSTM models, the problem of insufficient accuracy in traditional electricity consumption prediction is solved, and more accurate electricity consumption prediction is achieved.

CN122021986APending Publication Date: 2026-05-12GUANGDONG POWER GRID CO LTD MANAGEMENT SCI RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG POWER GRID CO LTD MANAGEMENT SCI RES INST
Filing Date
2025-12-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional electricity consumption forecasting methods lack comprehensive consideration of multiple factors, resulting in insufficient forecast accuracy.

Method used

By constructing a spatiotemporal feature fusion model, utilizing historical electricity consumption data and target external data, and combining ARIMA, seasonal decomposition model and CNN-LSTM prediction model, future electricity consumption can be predicted.

Benefits of technology

It improves the accuracy and comprehensiveness of electricity consumption forecasting, enabling more accurate prediction of future changes in electricity consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021986A_ABST
    Figure CN122021986A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity consumption prediction method and system based on spatial-temporal feature fusion, relates to the technical field of electricity consumption prediction, and solves the problem that the prediction precision is insufficient when the electricity consumption is predicted. According to the embodiment of the invention, the spatial-temporal features are constructed by introducing the target external data having the causal relationship or statistical correlation with the electricity consumption, and the corresponding factor prediction model and CNN-LSTM prediction model are constructed and trained, so that the future external factors can be predicted firstly, and then the future electricity consumption can be predicted based on the future external factors and the historical electricity consumption data. By adopting the method provided by the embodiment of the invention, the prediction comprehensiveness and prediction precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity consumption forecasting technology, and in particular to an electricity consumption forecasting method and system based on spatiotemporal feature fusion. Background Technology

[0002] In the operation and management of power systems, electricity consumption forecasting is a core technical link in ensuring the safe and stable operation of the power grid, optimizing the allocation of energy resources, and improving the accuracy of business decisions made by power companies. Accurate electricity consumption forecasting provides a scientific basis for power grid dispatching departments, helping them to rationally arrange generator start-up and shutdown plans and coordinate cross-regional power transmission, thereby effectively avoiding grid fluctuations or energy waste caused by power supply and demand imbalances. At the same time, it also provides data support for business decisions such as electricity market transactions and power facility planning, which is of great significance for improving the overall operating efficiency and economic benefits of the power system.

[0003] However, traditional electricity consumption forecasting methods are mainly based on single-dimensional data analysis, lacking a comprehensive consideration of multi-dimensional factors affecting changes in electricity consumption. This makes it difficult to capture the potential correlation between multi-dimensional influencing factors and electricity consumption, resulting in insufficient forecast accuracy.

[0004] Therefore, there is a need for a method and system for predicting electricity consumption based on spatiotemporal feature fusion. Summary of the Invention

[0005] To address the problem of insufficient prediction accuracy in existing technologies for electricity consumption forecasting, this invention provides an electricity consumption forecasting method and system based on spatiotemporal feature fusion, which can improve the prediction accuracy of electricity consumption forecasting. The specific technical solution is as follows: In a first aspect, embodiments of this application provide a method for predicting electricity consumption based on spatiotemporal feature fusion, including: The process involves acquiring historical electricity consumption data and target external data, which are data generated outside the power system and have a causal or statistical correlation with electricity consumption. Based on this historical electricity consumption data and the target external data, spatiotemporal features are constructed. The spatiotemporal features at each time point include the target external data for that time point and historical electricity consumption data prior to that time point. For different types of external factors in the target external data, corresponding factor prediction models are constructed. These factor prediction models are used to predict the predicted value of the factor within a preset future time period based on the historical data of the corresponding external factor. Based on the historical electricity consumption data and the spatiotemporal features, an improved convolutional neural network (CNN-Long Short-Term Memory LSTM) prediction model is constructed and trained. Based on the factor prediction model and the CNN-LSTM prediction model, the electricity consumption within the preset future time period is predicted.

[0006] Preferably, the construction of spatiotemporal features based on the historical electricity consumption data and the target external data includes: using a time series decomposition algorithm to split the historical electricity consumption data into a long-term trend component and a seasonal fluctuation component; using a trend extraction algorithm to extract the long-term trend features of the long-term trend component; using a spectral analysis method to extract the seasonal fluctuation features of the seasonal fluctuation component; using principal component analysis to perform data dimensionality reduction on the electricity consumption features and the features of the target external data respectively, to obtain dimensionality-reduced electricity consumption features and dimensionality-reduced external features; wherein, the electricity consumption features include the long-term trend features and the seasonal fluctuation features; and fusing the dimensionality-reduced electricity consumption features and the dimensionality-reduced external features to obtain the spatiotemporal features.

[0007] Preferably, the target external data corresponding to the dimensionality reduction external feature includes GDP, temperature, and monthly working days.

[0008] Preferably, for different types of external factors in the target external data, corresponding factor prediction models are constructed, including: constructing an ARIMA time series prediction model for the fluctuation characteristics of GDP; constructing a seasonal decomposition prediction model for the temperature change pattern; and performing deterministic modeling based on calendar patterns for the number of working days in the month.

[0009] Preferably, after constructing the corresponding factor prediction model, the method further includes: determining the scenario boundary of the external factor based on the target external data using the quantile method; the scenario boundary is used to divide the corresponding external factor into high factor value scenarios, medium factor value scenarios, and low factor value scenarios; performing random sampling under the constraint of the scenario boundary through Monte Carlo simulation, and generating a preset number of factor prediction values ​​for each scenario based on the factor prediction model and the sampled data; statistically analyzing the mean and fluctuation range of the factor prediction values ​​under each scenario; predicting the electricity consumption in the future preset period based on the external factor prediction model and the CNN-LSTM prediction model includes: constructing scenario spatiotemporal features based on the mean and fluctuation range of the factor prediction values ​​under each scenario, and the historical electricity consumption data; inputting the scenario spatiotemporal features into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption in the future preset period output by the CNN-LSTM prediction model.

[0010] Preferably, the construction of scenario spatiotemporal features based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, and the historical electricity consumption data, includes: constructing a baseline scenario spatiotemporal feature based on the mean of the predicted values ​​of factors under each scenario and the features of the historical electricity consumption data; randomly generating fluctuation amplitude features based on the fluctuation range; and constructing the scenario spatiotemporal feature based on the baseline scenario spatiotemporal feature and the fluctuation amplitude feature.

[0011] Secondly, embodiments of this application provide a power consumption prediction system based on spatiotemporal feature fusion, applied to the method described in the first aspect, the system comprising: The acquisition module is used to acquire historical electricity consumption data and target external data, which are data generated outside the power system and have a causal relationship or statistical correlation with electricity consumption. The feature engineering module is used to construct spatiotemporal features based on the historical electricity consumption data and the target external data; wherein, the spatiotemporal features of each time point include the target external data at the corresponding time point, as well as the historical electricity consumption data before the corresponding time point; The first modeling module is used to construct corresponding factor prediction models for different types of external factors in the target external data; wherein, the factor prediction model is used to predict the factor prediction value within a preset period of the future based on the historical data of the corresponding external factors; The second modeling module is used to build and train an improved convolutional neural network (CNN-Long Short-Term Memory LSTM) prediction model based on the historical electricity consumption data and the spatiotemporal characteristics. The prediction module is used to predict the electricity consumption within the preset future time period based on the factor prediction model and the CNN-LSTM prediction model.

[0012] Preferably, the system also includes a simulation module, used to determine the high, medium, and low scenario boundaries of the external factor based on the target external data using the quantile method; through Monte Carlo simulation, random sampling is performed under the boundary constraints of each scenario, and based on the factor prediction model and the sampling data, a preset number of factor prediction values ​​are generated for each scenario; the mean and fluctuation range of the factor prediction values ​​under each scenario are statistically analyzed. The prediction module is specifically used to construct the spatiotemporal features of the scenarios based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, as well as the historical electricity consumption data; input the spatiotemporal features of the multiple scenarios into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption in the future preset time period output by the CNN-LSTM prediction model.

[0013] Thirdly, embodiments of this application provide a computing device, including: a memory for storing a program; and a processor for loading the program to execute the method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in the first aspect.

[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: by introducing target external data that has a causal relationship or statistical correlation with electricity consumption to construct spatiotemporal features, and constructing and training corresponding factor prediction models and CNN-LSTM prediction models, it is possible to first predict future external factors, and then predict future electricity consumption based on these future external factors and historical electricity consumption data. Using the method of this application's embodiments can improve the comprehensiveness and accuracy of prediction. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0017] Figure 1 A flowchart illustrating a method for predicting electricity consumption based on spatiotemporal feature fusion, provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of a power consumption prediction system based on spatiotemporal feature fusion provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0022] To address the problem of insufficient prediction accuracy in electricity consumption forecasting using traditional methods, this invention provides an electricity consumption forecasting method and system based on spatiotemporal feature fusion, which can improve the prediction accuracy of electricity consumption forecasting.

[0023] Please see Figure 1 , Figure 1 This application provides a flowchart illustrating a method for predicting electricity consumption based on spatiotemporal feature fusion, which is applied to a computing device. Figure 1 As shown, the method includes: Step 101: The computing device acquires historical power consumption data and target external data.

[0024] The computing devices can be terminals or servers, specifically terminals or servers belonging to entities related to the power system. These entities include power grid companies, power generation enterprises, energy management departments, electricity sales companies, and energy management platform operators. These entities use computing devices to predict electricity consumption for purposes such as energy dispatching, price regulation, infrastructure planning, cost control, electricity sales package development, and energy policy formulation.

[0025] The computing device can connect to the database of the power system and external systems via wired or wireless means to obtain historical electricity consumption data and target external data, and then perform subsequent steps to predict electricity consumption.

[0026] Among them, historical electricity consumption data refers to the historical electricity consumption data of the target area, which refers to the service or management scope of the entity corresponding to the computing device; the target external data refers to data generated outside the power system that has a causal relationship or statistical correlation with electricity consumption. Specifically, historical electricity consumption data and target external data have spatiotemporal consistency, that is, they point to the same or approximately the same time and space.

[0027] Specifically, the computing device can acquire historical electricity consumption data of the power grid in the target area. The data dimensions include daily electricity consumption data for the entire industry, used for daily, weekly, and monthly cycle predictions; monthly electricity consumption data, used for monthly and yearly cycle predictions; and the data time span is no less than 5 years to ensure the richness and representativeness of the data sample.

[0028] The computing device can also acquire time characteristics, including year, month, day, week of the week, and whether it is a holiday; meteorological characteristics, including maximum / minimum temperature, rainfall, and humidity; and economic characteristics, including general socioeconomic indicators and regional economic indicators for the target area.

[0029] Then, the computing device can use an outlier detection algorithm to identify and remove outliers in the electricity data; for missing values, if the missing ratio is less than 5%, linear interpolation or moving average can be used to fill them in; if the missing ratio is greater than 5%, data on similar electricity consumption patterns in adjacent time periods can be combined to reconstruct the data to ensure its integrity.

[0030] For example, the outlier detection algorithm can be an outlier detection method based on the 3σ principle or an isolated forest algorithm.

[0031] Then, the acquired internal and external data are aligned on the same spatiotemporal scale and constructed into a supervised learning sequence. For each prediction time point, data from the past N time points are used as input features to predict the battery level at the next M time points.

[0032] For example, N is 365 and M is 7.

[0033] Then, the computing device can standardize or normalize the numerical features to accelerate model convergence and improve stability in subsequent steps.

[0034] Step 102: The computing device constructs spatiotemporal features based on the historical electricity consumption data and the target external data.

[0035] The computing device can extract internal features from the historical electricity consumption data and external features from the target external data, and construct spatiotemporal features based on the internal and external features.

[0036] Specifically, the computing device can acquire the external features of time point t and the internal features of time period t-N+1 to t, and construct the spatiotemporal features of time point t. These spatiotemporal features of time point t can be used to predict the electricity consumption within time period t+M, where N and M are positive integers.

[0037] In another possible implementation, the computing device can also acquire the external features of the time period from t to t+M, and the internal features of the time period from t-N+1 to t, to construct the spatiotemporal features of the time period from t to t+M. These spatiotemporal features of the time period from t to t+M can be used to predict the electricity consumption within the time period from t to t+M.

[0038] The spatiotemporal characteristics of each time point include the target external data for that time point, as well as historical electricity consumption data prior to that time point.

[0039] Historical electricity consumption data determines the basic trends of future electricity consumption, while future external data determines the fluctuations and deviations in future electricity consumption. Only by combining the two can we fully depict the characteristics of electricity consumption in future periods. By constructing spatiotemporal features using future external features and historical internal features, we can capture the temporal dependence of electricity consumption while quantifying the causal effects of external factors on the future.

[0040] Preferably, the computing device can use a time series decomposition algorithm to split the historical electricity consumption data into a long-term trend component and a seasonal fluctuation component; use a trend extraction algorithm to extract the long-term trend characteristics of the long-term trend component; use a spectral analysis method to extract the seasonal fluctuation characteristics of the seasonal fluctuation component; use principal component analysis to perform data dimensionality reduction on the electricity consumption characteristics and the characteristics of the target external data respectively, to obtain dimensionality-reduced electricity consumption characteristics and dimensionality-reduced external characteristics; wherein, the electricity consumption characteristics include the long-term trend characteristics and the seasonal fluctuation characteristics; and fuse the dimensionality-reduced electricity consumption characteristics and the dimensionality-reduced external characteristics to obtain the spatiotemporal characteristics.

[0041] Historical electricity consumption data is a time series of electricity consumption that changes over time. Its fluctuations are driven by both long-term trends and seasonal fluctuations. The computing device can use a time series decomposition algorithm to separate the electricity consumption time series into independent long-term trend components and seasonal fluctuation components.

[0042] Specifically, the computing device can use the seasonal and trend decomposition using Loess (STL) method based on local weighted regression to decompose the electricity time series and obtain the long-term trend component, seasonal fluctuation component and noise component.

[0043] Specifically, the trend extraction algorithm can be the moving average method or the Local Weighted Scatterplot Smoothing (LOESS) method.

[0044] Specifically, spectral analysis is a method that uses mathematical methods such as Fourier transform to identify periodic recurring fluctuations from seasonal fluctuation components.

[0045] Then, the computing device can apply principal component analysis to the characteristics of the electricity consumption and the characteristics of the target external data to perform data dimensionality reduction.

[0046] Principal component analysis can compress multiple related features into a few unrelated principal components while preserving as much information as possible about the original features.

[0047] The computing device can use algorithms such as splicing, weighted summation, and attention mechanisms to fuse and merge the dimensionality-reduced power consumption features and dimensionality-reduced external features into a unified feature vector, which serves as the input to the model in subsequent steps.

[0048] Preferably, the target external data corresponding to the dimensionality reduction external feature includes Gross Domestic Product (GDP), temperature, and monthly working days.

[0049] Step 103: The computing device constructs corresponding factor prediction models for different types of external factors in the target's external data.

[0050] The factor prediction model is used to predict the value of the corresponding external factor within a preset future time period based on historical data of the factor. Then, the predicted value of the factor and historical electricity consumption data are combined to construct spatiotemporal features to predict the electricity consumption within the corresponding preset future time period.

[0051] Preferably, corresponding to the three external factors of GDP, temperature and monthly working days, the computing device can construct an Autoregressive Integrated Moving Average (ARIMA) time series forecasting model for the fluctuation characteristics of GDP; construct a seasonal decomposition forecasting model for the temperature variation pattern; and perform deterministic modeling based on calendar patterns for the monthly working days.

[0052] GDP is a macroeconomic indicator, traded quarterly or annually. Its fluctuations are characterized by weak trends, lack of significant seasonal fluctuations, and susceptibility to economic cycles and policies, generally exhibiting a stable or near-stable time-series pattern. Using the ARIMA model, historical GDP data can be leveraged to uncover its inherent time-series dependencies. Specifically, the autoregressive part of the ARIMA model can predict future GDP values ​​using historical values, assuming that past fluctuations will continue into the future. The integral part transforms non-stationary GDP data into stationary data through differencing. The moving average part uses historical prediction errors to correct future predictions, reducing the impact of random fluctuations. In this way, the ARIMA model's predictions are input as economic factors into the final electricity consumption prediction model, explaining the logic behind changes in industrial electricity consumption as GDP changes.

[0053] Temperature is a meteorological environmental indicator, and the data is presented at hourly, daily, and monthly frequencies. Its fluctuation characteristics include strong seasonality, short-term random fluctuations, and weak long-term trends.

[0054] Specifically, the computing device can use a seasonal decomposition prediction model to decompose temperature change data into seasonal fluctuation components, trend components, and noise components. Then, it can use methods such as spectral analysis and Fourier transform to capture the period of the seasonal fluctuation components and directly reuse historical seasonal patterns to predict the future. Based on the trend components, it can use moving averages and linear regression to predict long-term changes. Through models such as ARIMA, it can predict short-term random fluctuations based on the noise components. Finally, the prediction results of the three parts are added together to obtain the final temperature prediction value.

[0055] Among them, the number of working days per month is a social rule-based indicator, determined by the calendar and holiday arrangements. Its fluctuation characteristics are strong certainty, no trend, and fixed fluctuations.

[0056] Specifically, the number of working days per month does not need to be calculated using machine or statistical models; future values ​​can be calculated directly based on known rules. The calculation involves determining the criteria for identifying working days, then importing calendar data and holiday schedules for future years to calculate the number of working days for each month.

[0057] When constructing the corresponding factor prediction models, one or more predictions can be made in actual use.

[0058] Preferably, after constructing the corresponding factor prediction model, the computing device can determine the scenario boundary of the external factor based on the target external data using the quantile method; the scenario boundary is used to divide the corresponding external factor into high factor value scenarios, medium factor value scenarios, and low factor value scenarios; through Monte Carlo simulation, random sampling is performed under the constraint of the scenario boundary, and based on the factor prediction model and the sampling data, a preset number of factor prediction values ​​are generated for each scenario; the mean and fluctuation range of the factor prediction values ​​under each scenario are statistically analyzed.

[0059] The computing device first collects historical data on various external factors, and then takes the 25th and 75th percentiles of the corresponding data sequence sorted by numerical value as the scenario boundary.

[0060] Then, based on historical data of the target external data, the probability distribution of each external factor is fitted.

[0061] Then, based on the fitted probability distribution, a preset number of Monte Carlo simulations are performed. Specifically, random samples are drawn from the probability distribution, and these sampled data are combined with the time characteristics of a preset future time period, input into the corresponding factor prediction model, and the predicted values ​​of the preset number of factors are obtained.

[0062] Then, using scenario boundaries, the predicted factor values ​​of the preset quantity group are divided into sets of predicted factor values ​​under each scenario; then the mean and fluctuation range of the predicted factor values ​​under each scenario are calculated.

[0063] In this preferred approach, the factor prediction model no longer generates a deterministic value, but rather a set of random values ​​that conform to probabilistic laws, capable of covering possible future fluctuations. This design ensures that the uncertainty of external factors is fully covered, while also ensuring the rationality of the predicted values ​​through the factor prediction model, providing high-quality multi-scenario input for subsequent electricity consumption forecasting.

[0064] Step 104: Based on the historical electricity consumption data and the spatiotemporal characteristics, the computing device constructs and trains an improved Convolutional Neural Network (CNN)-Long Short-Term Memory Network (LSTM) prediction model.

[0065] In this CNN-LSTM prediction model, the CNN module focuses on extracting high-dimensional, deep spatial features from the feature vectors at each time point, and then the LSTM module captures the dynamic evolution of these deep features over time.

[0066] Specifically, the CNN module uses a one-dimensional convolutional kernel to perform sliding convolutions along the time axis, which simultaneously applies to all features. As the kernel slides along the time axis, it calculates a weighted combination of all feature values ​​at K time points each time, generating a new feature value. By using multiple such convolutional kernels, the model can extract various local temporal patterns from the original spatiotemporal features. The output of each convolutional layer is passed through a non-linear activation function to introduce non-linear transformation capabilities. Subsequently, a one-dimensional max-pooling layer may be used to reduce the temporal resolution, preserve salient features, and improve computational efficiency and model robustness.

[0067] Specifically, the LSTM module takes over the output of the CNN module and expands the output of the CNN module in the time dimension, treating it as a time series composed of vectors of "new time steps", where each vector serves as a deep feature representation.

[0068] The internal structure of the LSTM module includes an input gate, a forget gate, an output gate, and cell states. Through the gating mechanism, it can effectively learn and memorize long-term dependencies extracted from CNN feature sequences.

[0069] The hidden state computed by the LSTM module at the last time step contains condensed information about the entire input sequence. This vector is then fed into one or more fully connected layers. The final output layer is a linear layer with the number of neurons equal to the number of time points to be predicted within a preset future time period; for example, 24 neurons are needed to predict the next 24 hours. The output of this layer is the model's predicted future electricity consumption sequence.

[0070] Preferably, adding an attention mechanism between CNN and LSTM can enhance the weights of important features.

[0071] The computing device can construct a spatiotemporal feature set based on historical electricity consumption data and target external data, using the electricity consumption of the corresponding time period as the validation result to obtain the training set; then, the CNN-LSTM prediction model is trained using this training set. The evaluation metrics of the validation set, such as Mean Absolute Percentage Error (MAPE) and Root Mean Squared Error (RMSE), are used to guide parameter adjustment.

[0072] Specifically, the computing device can measure the difference between the predicted and true values ​​using a loss function suitable for regression tasks, such as mean squared error loss. Then, an optimization algorithm based on gradient descent, along with the Adam optimizer, is used for iterative optimization until the model converges.

[0073] Step 105: The computing device predicts the electricity consumption within the future preset time period based on the factor prediction model and the CNN-LSTM prediction model.

[0074] The computing device can first predict the predicted value of the factor for a future preset period based on the factor prediction model; then construct spatiotemporal features based on the predicted value of the factor and historical electricity consumption data; and then input the spatiotemporal features into the CNN-LSTM prediction model to obtain the electricity consumption within the future preset period.

[0075] Preferably, the computing device can construct the spatiotemporal features of the scenario based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, as well as the historical electricity consumption data; input the spatiotemporal features of the scenario into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption in the future preset time period output by the CNN-LSTM prediction model.

[0076] The computing device can generate simulated values ​​for the corresponding scenarios based on the mean and fluctuation range of the predicted values ​​of factors under each scenario; then combine the simulated values ​​of different external factors to obtain scenario simulation features; and then splice the scenario simulation features with the electricity consumption features to obtain the scenario spatiotemporal features.

[0077] Preferably, the computing device can construct the spatiotemporal characteristics of the baseline scenario based on the mean of the predicted values ​​of factors under each scenario and the characteristics of the historical electricity consumption data; randomly generate the fluctuation amplitude characteristics based on the fluctuation range; and construct the spatiotemporal characteristics of the scenario based on the spatiotemporal characteristics of the baseline scenario and the fluctuation amplitude characteristics.

[0078] Then, the spatiotemporal features corresponding to different scenario combinations are input into the CNN-LSTM prediction model to obtain the electricity consumption prediction under different scenario combinations; then, the electricity consumption prediction under these different scenario combinations is statistically analyzed to obtain the electricity consumption prediction distribution within the future preset time period.

[0079] Preferably, based on the probability of occurrence of scenario combinations, weights are assigned to each scenario combination to adjust the contribution of each group of predicted values; then, the weighted predicted values ​​of all combinations are merged into a unified dataset, the merged dataset is sorted, and the electricity consumption value corresponding to each quantile is calculated to form an empirical probability distribution; finally, the electricity consumption for the future preset period is described in the form of "mean + 95% confidence interval + quantile table", which not only adapts to business decisions but also retains the core information of the probability distribution.

[0080] Then, the computing device can perform a rationality test and sensitivity analysis on the prediction results to verify their effectiveness.

[0081] In this embodiment, spatiotemporal features are constructed by introducing target external data that has a causal relationship or statistical correlation with electricity consumption. Corresponding factor prediction models and CNN-LSTM prediction models are then built and trained. This allows for the prediction of future external factors, followed by prediction of future electricity consumption based on these future external factors and historical electricity consumption data. The method described in this embodiment improves the comprehensiveness and accuracy of predictions.

[0082] The method provided in the embodiments of this application has been described above. The system provided in the embodiments of this application will be described below.

[0083] Please see Figure 2 , Figure 2 A schematic diagram of a power consumption prediction system based on spatiotemporal feature fusion provided in this application embodiment is shown below. Figure 2 As shown, the system 20 includes: The acquisition module 201 is used to acquire historical electricity consumption data and target external data, which are data generated outside the power system and have a causal relationship or statistical correlation with electricity consumption. The feature engineering module 202 is used to construct spatiotemporal features based on the historical electricity consumption data and the target external data; wherein, the spatiotemporal features of each time point include the target external data at the corresponding time point, and the historical electricity consumption data before the corresponding time point; The first modeling module 203 is used to construct corresponding factor prediction models for different types of external factors in the target external data; wherein, the factor prediction model is used to predict the factor prediction value within a preset period of the future based on the historical data of the corresponding external factors. The second modeling module 204 is used to construct and train an improved convolutional neural network (CNN-Long Short-Term Memory LSTM) prediction model based on the historical electricity consumption data and the spatiotemporal characteristics. The prediction module 205 is used to predict the electricity consumption within the future preset time period based on the factor prediction model and the CNN-LSTM prediction model.

[0084] Preferably, the system 20 further includes a simulation module 206, used to determine the scenario boundary of the external factor based on the target external data using the quantile method; the scenario boundary is used to divide the corresponding external factor into high factor value scenarios, medium factor value scenarios, and low factor value scenarios; through Monte Carlo simulation, random sampling is performed under the constraint of the scenario boundary, and based on the factor prediction model and the sampled data, a preset number of factor prediction values ​​are generated for each scenario; the mean and fluctuation range of the factor prediction values ​​under each scenario are statistically analyzed; the prediction module 205 is specifically used to construct the scenario spatiotemporal features based on the mean and fluctuation range of the factor prediction values ​​under each scenario, as well as the historical electricity consumption data; the scenario spatiotemporal features are input into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption in the future preset time period output by the CNN-LSTM prediction model.

[0085] The electricity consumption prediction system based on spatiotemporal feature fusion provided in this application can be understood by referring to the relevant content in the foregoing method embodiment section, and will not be repeated here.

[0086] like Figure 3 As shown, Figure 3 This is a schematic diagram of a possible logical structure of a computing device provided in an embodiment of this application. The computing device 30 includes a processor 301, a communication interface 302, a memory 303, and a bus 304. The processor 301, the communication interface 302, and the memory 303 are interconnected via the bus 304. In an embodiment of this application, the processor 301 is used to control and manage the operation of the computing device 30. For example, the processor 301 is used to execute... Figure 1 The steps in the embodiments and / or other processes used in the techniques described herein. Communication interface 302 is used to support communication by computing device 30. Memory 303 is used to store program code and data of computing device 30.

[0087] The processor 301 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The bus 304 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0088] In another embodiment of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the above-described... Figure 1 The method described in the embodiments.

[0089] Those skilled in the art will recognize that the units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.

[0090] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0091] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0093] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0094] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A method for predicting electricity consumption based on spatiotemporal feature fusion, characterized in that, The method includes: Acquire historical electricity consumption data and target external data, wherein the target external data is data generated outside the power system that has a causal relationship or statistical correlation with electricity consumption; Based on the historical electricity consumption data and the target external data, spatiotemporal features are constructed; wherein, the spatiotemporal features at each time point include the target external data at the corresponding time point, and the historical electricity consumption data before the corresponding time point; For different types of external factors in the target external data, a corresponding factor prediction model is constructed; wherein, the factor prediction model is used to predict the factor prediction value within a preset time period based on the historical data of the corresponding external factor; Based on the historical electricity consumption data and the spatiotemporal characteristics, an improved convolutional neural network (CNN)-long short-term memory (LSTM) prediction model is constructed and trained. Based on the factor prediction model and the CNN-LSTM prediction model, the electricity consumption within the future preset time period is predicted.

2. The method according to claim 1, characterized in that, The construction of spatiotemporal features based on the historical electricity consumption data and the target external data includes: The historical electricity consumption data is divided into long-term trend components and seasonal fluctuation components using a time series decomposition algorithm. The long-term trend features of the long-term trend components are extracted using a trend extraction algorithm. The seasonal fluctuation characteristics of the seasonal fluctuation components are extracted using spectral analysis. Principal component analysis is used to perform dimensionality reduction on the electricity consumption characteristics and the characteristics of the target external data, respectively, to obtain dimensionality-reduced electricity consumption characteristics and dimensionality-reduced external characteristics; wherein, the electricity consumption characteristics include the long-term trend characteristics and the seasonal fluctuation characteristics; The spatiotemporal features are obtained by fusing the reduced power consumption features and the reduced external features.

3. The method according to claim 2, characterized in that, The target external data corresponding to the dimensionality reduction external features include GDP, temperature, and monthly working days.

4. The method according to claim 3, characterized in that, The step of constructing corresponding factor prediction models for different types of external factors in the target external data includes: To address the volatility characteristics of GDP, an ARIMA time series forecasting model is constructed. Based on the aforementioned temperature variation patterns, a seasonal decomposition prediction model is constructed. For the number of working days in a month, a deterministic model is performed based on calendar patterns.

5. The method according to claim 1, characterized in that, After constructing the corresponding factor prediction model, the method further includes: Based on the target external data, the scenario boundary of the external factor is determined using the quantile method; the scenario boundary is used to divide the corresponding external factor into high factor value scenarios, medium factor value scenarios, and low factor value scenarios. Through Monte Carlo simulation, random sampling is performed under the constraints of the scenario boundaries, and based on the factor prediction model and the sampling data, a preset number of factor prediction values ​​are generated for each scenario. The mean and fluctuation range of the predicted values ​​of factors under various scenarios were statistically analyzed. The prediction of electricity consumption within the future preset time period based on the external factor prediction model and the CNN-LSTM prediction model includes: Based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, and the historical electricity consumption data, the spatiotemporal characteristics of the scenarios are constructed. The spatiotemporal features of the scenario are input into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption within the future preset time period output by the CNN-LSTM prediction model.

6. The method according to claim 5, characterized in that, The construction of scenario spatiotemporal characteristics based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, and the historical electricity consumption data, includes: Based on the mean of the predicted values ​​of factors under each scenario and the characteristics of the historical electricity consumption data, a spatiotemporal feature of the baseline scenario is constructed. Based on the fluctuation range, a fluctuation amplitude feature is randomly generated; Based on the spatiotemporal characteristics of the baseline scenario and the fluctuation amplitude characteristics, the spatiotemporal characteristics of the scenario are constructed.

7. A power consumption prediction system based on spatiotemporal feature fusion, characterized in that, The system, applied to the method of any one of claims 1-6, comprises: The acquisition module is used to acquire historical electricity consumption data and target external data, wherein the target external data is data generated outside the power system that has a causal relationship or statistical correlation with electricity consumption; The feature engineering module is used to construct spatiotemporal features based on the historical electricity consumption data and the target external data; wherein, the spatiotemporal features of each time point include the target external data of the corresponding time point, and the historical electricity consumption data before the corresponding time point; The first modeling module is used to construct corresponding factor prediction models for different types of external factors in the target external data; wherein, the factor prediction model is used to predict the factor prediction value within a preset time period based on the historical data of the corresponding external factor; The second modeling module is used to construct and train an improved convolutional neural network (CNN-Long Short-Term Memory LSTM) prediction model based on the historical electricity consumption data and the spatiotemporal characteristics. The prediction module is used to predict the electricity consumption within the preset future time period based on the factor prediction model and the CNN-LSTM prediction model.

8. The system according to claim 7, characterized in that, The system also includes a simulation module, used to determine the scenario boundaries of the external factors based on the target external data using the quantile method; the scenario boundaries are used to divide the corresponding external factors into high factor value scenarios, medium factor value scenarios, and low factor value scenarios; through Monte Carlo simulation, random sampling is performed under the constraints of the scenario boundaries, and based on the factor prediction model and the sampling data, a preset number of factor prediction values ​​are generated for each scenario; the mean and fluctuation range of the factor prediction values ​​under each scenario are statistically analyzed; The prediction module is specifically used to construct scenario spatiotemporal features based on the mean and fluctuation range of the predicted values ​​of factors under each scenario, as well as the historical electricity consumption data; input the scenario spatiotemporal features into the CNN-LSTM prediction model to obtain the probability distribution of electricity consumption in the future preset time period output by the CNN-LSTM prediction model.

9. A computing device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method of any one of claims 1-6.