Power load prediction method and system
By combining the decomposition and fusion model of the power load data, the problem of insufficient accuracy of power load prediction in extreme weather is solved, and more efficient power load prediction is achieved to adapt to the needs of complex and changeable power systems.
Patent Information
- Application Number
- CN202510175547.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art has insufficient accuracy in power load prediction under extreme weather conditions, making it difficult to adapt to complex and variable power system needs, and traditional methods ignore data deviations between extreme events and normal situations.
By performing the first preprocessing, second decomposition and third decomposition of historical data, the data is decomposed into long-term trend, short-term trend and periodic pattern components, and a fusion model of quantum hybrid network, generalized additive model and gradient enhancement algorithm are used to predict, and the prediction model is dynamically adjusted based on real-time data and external factors.
It improves the accuracy and reliability of power load prediction, can adapt to load changes in extreme weather conditions, and provides support for the stable operation of the power system.
Smart Images

Figure CN120262355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric load forecasting, and particularly to an electric load forecasting method and system. Background Art
[0002] Electric load forecasting is a key component in the planning and operation management of power systems, and solves key problems such as power supply-demand balance, power grid planning, economic dispatching, energy cost management, system reliability and stability.
[0003] Accurate load forecasting under extreme weather has increasingly become a research focus and an urgent problem to be solved in the industrial community. Under these extreme conditions, the load usually changes greatly, which requires an interpretable model to make better decisions.
[0004] Typical deep learning time series forecasting usually focuses on minimizing the global loss, while ignoring the data deviation between normal conditions and extreme events, and cannot achieve ideal performance under extreme events. Forecasting under extreme events is closely related to the regression problem on imbalanced data. Summary of the Invention
[0005] The purpose of this part is to outline some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this part, as well as in the abstract and title of the specification of this application, to avoid obscuring the purpose of this part, the abstract, and the title of the invention. However, such simplifications or omissions shall not be used to limit the scope of the present invention.
[0006] In view of the above existing problems, the present invention is proposed.
[0007] Therefore, the present invention provides an electric load forecasting method and system, which can solve the problems mentioned in the background art.
[0008] To solve the above technical problems, the present invention provides the following technical solutions:
[0009] In a first aspect, the present invention provides an electric load forecasting method, including:
[0010] Obtaining first historical data and performing first preprocessing on the first historical data;
[0011] Performing second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data;
[0012] Using the first decomposition data as the input of a pre-trained first fusion model respectively, and performing electric load forecasting according to the output of the pre-trained first fusion model.
[0013] As a preferred solution of the power load forecasting method described in the present invention, wherein: the second decomposition and the third decomposition of the first historical data after the first preprocessing to obtain the first decomposition data include:
[0014] Performing first data classification on the first historical data after the first preprocessing to obtain first-class data and second-class data;
[0015] Performing second decomposition on the first-class data;
[0016] Performing third decomposition on the second-class data;
[0017] Recording the results of the second decomposition and the third decomposition as the first decomposition data.
[0018] As a preferred solution of the power load forecasting method described in the present invention, wherein: the first fusion model includes:
[0019] The first fusion model includes a number of different prediction models;
[0020] The inputs of the number of different prediction models are all a number of data in the first decomposition data;
[0021] The outputs of the number of different prediction models are all power load forecasting results or any model that can directly or indirectly obtain relevant parameters of the power load forecasting results.
[0022] As a preferred solution of the power load forecasting method described in the present invention, wherein: the first preprocessing of the first historical data includes:
[0023] Performing first decomposition on the first historical data;
[0024] The first decomposition is used to divide the first historical data into several sequences.
[0025] As a preferred solution of the power load forecasting method described in the present invention, wherein: the second decomposition and the third decomposition at least include decomposing the first historical data after the first preprocessing into a long-term trend component, a short-term trend component, and a periodic pattern component.
[0026] As a preferred solution of the power load forecasting method described in the present invention, wherein: the step of using the first decomposition data as the input for pre-training the first fusion model includes:
[0027] The first fusion model at least includes three prediction models for the long-term trend component, the short-term trend component, and the periodic pattern component.
[0028] As a preferred solution of the power load forecasting method according to the present invention, wherein: the power load forecasting according to the output of the pre-trained first fusion model includes:
[0029] Obtain the outputs of several different prediction models in the first fusion model;
[0030] Weight the outputs of the several different prediction models according to a preset weight;
[0031] And use the weighted result as the power load forecast.
[0032] In a second aspect, the present invention provides a power load forecasting system, including:
[0033] A preprocessing module for obtaining first historical data and performing first preprocessing on the first historical data;
[0034] A decomposition module for performing second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data;
[0035] A prediction module for using the first decomposition data as the input of the pre-trained first fusion model respectively and performing power load forecasting according to the output of the pre-trained first fusion model.
[0036] In a third aspect, the present invention provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the method described above are implemented.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0038] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a power load forecasting method and system, which obtains first historical data and performs first preprocessing on the first historical data; performs second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposed data; uses the first decomposed data as the input of a pre-trained first fusion model respectively, and performs power load forecasting according to the output of the pre-trained first fusion model. This power load forecasting system can effectively process historical data, and by combining decomposition and fusion models, improves the accuracy and reliability of forecasting. The data is decomposed into a long-term trend component, a short-term trend component, and a periodic pattern component, which can capture the characteristics of the data more meticulously and provide richer information for the forecasting model. Using the fusion model to forecast the decomposed data, by weighting the outputs of different forecasting models, various factors can be comprehensively considered, thus obtaining a more accurate power load forecasting result. In addition, the power load forecasting method and system of the present invention can also adapt to load changes under extreme weather conditions, providing strong support for the stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] 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 description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:
[0040] Figure 1 It is a flowchart of a method for a power load forecasting method and system provided by an embodiment of the present invention;
[0041] Figure 2 It is a schematic diagram of a power load forecasting framework of a load mutation time series decomposition quantum hybrid network for a power load forecasting method and system provided by an embodiment of the present invention;
[0042] Figure 3 It is a schematic diagram of a decomposition operation for a power load forecasting method and system provided by an embodiment of the present invention;
[0043] Figure 4 It is a schematic diagram of GBDT tree calculation for a power load forecasting method and system provided by an embodiment of the present invention;
[0044] Figure 5 It is a framework diagram of a quantum parallel long-term forecasting hybrid network for a power load forecasting method and system provided by an embodiment of the present invention;
[0045] Figure 6 It is a structural diagram of a VQC circuit for a power load forecasting method and system provided by an embodiment of the present invention;
[0046] Figure 7 Internal structure diagram of a computer device for a power load forecasting method and system provided in an embodiment of the present invention. Detailed implementation manners
[0047] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the following will describe in detail the specific implementation manners of the present invention with reference to the accompanying drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0048] Embodiment 1
[0049] Refer to Figures 1-7 , which is the first embodiment of the present invention. This embodiment provides a power load forecasting method and system, including:
[0050] In the existing related technologies, there are some problems. For example, the prediction accuracy is not high enough, and it is difficult to meet the requirements of complex and changeable power systems. In addition, traditional prediction methods often rely on a large amount of historical data, and the collection and processing of these data require a lot of time and resources.
[0051] This application provides a method that can effectively solve the above-mentioned problems. Next, multiple embodiments will be combined to elaborate in detail how to implement this power load forecasting method;
[0052] Figure 1 Shows a method flow chart of a power load forecasting method and system, including:
[0053] S101, obtain first historical data and perform first preprocessing on the first historical data;
[0054] In an optional embodiment, first historical data in different scenarios can be obtained for power load forecasting. Different scenarios can include different power systems, such as industrial power grids, commercial power grids, residential power grids, etc. By analyzing the historical data in these different scenarios, the system can identify the load patterns and change trends unique to each scenario.
[0055] In an optional embodiment, the parameters of the prediction model can also be dynamically adjusted according to the comparison between real-time data and historical data to adapt to the changes in the operating state of the power system. This flexibility makes the prediction results more accurate and can better meet the requirements of complex and changeable power systems.
[0056] In an optional embodiment, the first historical data may be the power usage data in different time periods after the scene is determined, such as the load data in the peak period and the off-peak period. These data may reflect the periodic changes in power demand and help improve the accuracy of the prediction.
[0057] In an optional embodiment, external factors such as weather information, holiday arrangements, special events, etc., which may affect the power load, can also be integrated. By comprehensively considering these factors, the system can more accurately predict the power load, thereby providing strong support for the dispatch and management of the power system.
[0058] In the embodiment of the present application, the first historical data is not limited, and relevant technical personnel can select it according to actual needs. For example, it can include but is not limited to the power usage records of the past year, the load data of a specific season, and even the power load conditions during historical abnormal weather events. In addition, the first historical data can also include historical power system failure records, which are helpful for analyzing the change pattern of power load in the event of a system failure. By integrating these different types of data, the prediction system can build a more comprehensive and accurate load prediction model.
[0059] In an optional embodiment, the first preprocessing may include cleaning and standardizing the data, as well as possible outlier detection and correction. The purpose of preprocessing is to improve data quality and ensure the accuracy of subsequent analysis and prediction. For example, data cleaning can remove duplicate records, fill missing values, or remove noise data. Standardization ensures that data is compared and analyzed on the same scale, which is particularly important for using multiple prediction models. Outlier detection and correction help identify and process data points that may have a negative impact on the prediction results.
[0060] In an optional embodiment, the first preprocessing may also include performing a time series analysis on the first historical data to identify and extract trends and periodic components in the data. This step is crucial for the subsequent decomposition operation because it helps determine which parts of the data are long-term trends, which are short-term fluctuations, and which are periodic patterns. In this way, the data can be decomposed more accurately, providing more accurate input for the subsequent prediction model.
[0061] In an embodiment of the present application, performing first preprocessing on the first historical data includes:
[0062] Performing a first decomposition on the first historical data;
[0063] The first decomposition is used to divide the first historical data into several sequences.
[0064] In an alternative embodiment, the first decomposition can be achieved through Fourier transform, which can convert time series data into the frequency domain to identify the periodic components in the data. Through Fourier transform, complex periodic patterns can be decomposed into a series of simple sine waves and cosine waves, with each waveform corresponding to a specific frequency.
[0065] In an alternative embodiment, the first decomposition can distinguish different components such as long-term trends, seasonal fluctuations, and random noise according to the frequency. In addition, wavelet transform can also be used for the first decomposition. Wavelet transform has advantages in processing non-stationary signals, can provide localized information in time and frequency, and helps to analyze the change patterns in the data more meticulously.
[0066] In the embodiment of the present application, the first decomposition is to decompose the first historical data into a residual sequence and a long-term sequence, where the residual sequence can also be subjected to a second decomposition, and the long-term sequence can be subjected to a third decomposition.
[0067] It should be noted that obtaining the first historical data and performing the first preprocessing on the first historical data can provide a more stable and consistent data basis, thereby improving the accuracy and reliability of the prediction model. Through the preprocessing steps, the noise and irregularities in the data can be removed to ensure that high-quality data is used during model training. In addition, standardization and outlier handling during the preprocessing process help to reduce the risk of model overfitting, enabling the model to better generalize to unseen data. Ultimately, these preprocessing steps lay a solid foundation for constructing an efficient and accurate power load prediction system.
[0068] S102, perform a second decomposition and a third decomposition on the first historical data after the first preprocessing to obtain first decomposition data;
[0069] In the embodiment of the present application, performing a second decomposition and a third decomposition on the first historical data after the first preprocessing to obtain first decomposition data includes:
[0070] Perform a first data classification on the first historical data after the first preprocessing to obtain first-class data and second-class data;
[0071] Perform a second decomposition on the first-class data;
[0072] Perform a third decomposition on the second-class data;
[0073] Record the results of the second decomposition and the third decomposition as first decomposition data.
[0074] In an alternative embodiment, the first data classification is to decompose the first historical data into a residual sequence and a long-term sequence, where the residual sequence can also be subjected to a second decomposition, and the long-term sequence can be subjected to a third decomposition.
[0075] In an alternative embodiment, the second decomposition can be designed using the same operating means as the first decomposition;
[0076] In an alternative embodiment, since the third decomposition is for long-term sequences, the third decomposition can either perform no operation or adopt a different decomposition method, such as seasonal decomposition method, to adapt to the characteristics of long-term trends. The purpose of the third decomposition is to further refine the long-term sequence in order to more accurately capture and predict the long-term change trend of the power load.
[0077] Exemplarily, the power load series is usually a mixture of trends and cycles. This technology decomposes the power load (y t ) into a long-term trend a short-term trend and a cyclic component
[0078]
[0079] Adopt a decomposition method based on moving average, defined as:
[0080]
[0081] In the embodiments of the present application, Figure 3 In the upper left sub-graph, it shows a line chart of the original power load time series data. In the lower left sub-graph, it shows that under extreme events, directly using the traditional gradient boosting algorithm for load forecasting, the predicted value is shown to be low; Figure 3 In the middle left sub-graph, it shows that the original load is decomposed into three parts: long-term trend, short-term trend, and cycle; Figure 3 In the right sub-graph, it shows a local enlarged view, which is a comparison of the three component sequences and the original load sequence after decomposing the load data;
[0082] It should be noted that the long-term trend, also known as the annual trend, is a smooth and continuously increasing curve, as shown in the above figure (middle). The trend of the load sequence has a strong correlation with the regional GDP growth or climate change (such as global warming). Using quantum hybrid network regression, it can handle the simple patterns of long-term trends while maintaining the extrapolation ability for upward trends.
[0083] It should be noted that for the short-term trend, after removing the long-term trend, the residuals combine the cyclic trend and the short-term trend. In the short-term trend, due to the low perception of extremely hot weather in the training data, the sudden increase in load will be difficult to be captured by the model. To solve this problem, an externally variable-triggered loss (ETL) is introduced.
[0084] It should be noted that for the periodic trend, after removing the long-term trend and short-term trend, a gradient boosting algorithm is used to model the periodic mode after removing the long-term trend and short-term trend.
[0085] In the embodiment of the present application, first, for the input time series data, time features with timestamps are constructed, such as year, month, and day. Some additional features, such as whether it is a working day, can also be obtained from calendar information. Load differential weather features, such as the numerical weather prediction (NWP) attributes of "2meter temperature" and "Surfacepressure". The increment of these attributes is related to the change in load. Therefore, a differential operation is performed on the NWP attributes two days ago (always 192 points in advance) to obtain rolling historical load data, using different windows, such as 1 or 7. The rolling historical load represents the impact of past load on the future. The algorithm must learn the historical patterns of the load. Combine the time, weather, and load features together, and then all features can be used as inputs to drive the model to predict the future load.
[0086] It should be noted that performing a second decomposition and a third decomposition on the first preprocessed first historical data can obtain first decomposition data that can more accurately capture the characteristics of the data, providing richer information for the subsequent prediction model. Through the decomposition operation, complex power load data can be decomposed into long-term trend, short-term trend, and periodic mode components, each of which reflects different aspects of the power load. The long-term trend component reveals the overall growth or decline trend of the power load over time, the short-term trend component captures the fluctuations and abnormal changes in the short term, and the periodic mode component reveals the periodic fluctuation law of the power load. Through this decomposition, the prediction model can more carefully analyze and learn the internal laws of the power load, thereby improving the accuracy and reliability of the prediction.
[0087] S103, use the first decomposition data as the input of the pre-trained first fusion model respectively, and perform power load prediction according to the output of the pre-trained first fusion model.
[0088] In the embodiment of the present application, the first fusion model includes:
[0089] The first fusion model includes several different prediction models;
[0090] The inputs of several different prediction models are all several data in the first decomposition data;
[0091] The outputs of several different prediction models are all power load prediction results or any model that can directly or indirectly obtain relevant parameters of the power load prediction results.
[0092] In an alternative embodiment, the first fusion model may adopt a neural network model based on deep learning, which realizes non-linear mapping through a multi-layer perceptron (MLP) structure to capture complex patterns and relationships in power load data. In addition, the model may also integrate a convolutional neural network (CNN) to extract spatial features of time series data, and a recurrent neural network (RNN) or its variants such as long short-term memory network (LSTM) to handle the temporal dependencies of time series data. By fusing different network structures in this way, the first fusion model can learn the multi-dimensional features of power load data more comprehensively, and thus provide more accurate prediction results.
[0093] In an alternative embodiment, the first fusion model may also adopt an integrated attention mechanism, which enables the model to pay more attention to key information in power load data, thereby improving the accuracy of prediction. The attention mechanism assigns different weights to different parts of the input data, enabling the model to highlight important features while suppressing unimportant noise when processing data. In addition, the fusion model may also combine a reinforcement learning algorithm to optimize the decision-making strategy in the prediction process and further improve the prediction performance. The reinforcement learning algorithm continuously adjusts the prediction strategy through interaction with the environment to maximize the long-term cumulative reward. Through the combination of these technologies, the power load prediction system can better adapt to complex and changing power demand patterns and provide strong support for the stable operation of the power grid.
[0094] In an alternative embodiment, the first fusion model may also adopt a prediction model based on the gradient boosting algorithm, which is particularly suitable for processing power load data with complex trends and periodic fluctuations. The gradient boosting algorithm constructs a strong predictor by iteratively adding weak predictors, and each weak predictor attempts to correct the errors of the previous predictor. This method performs well in dealing with non-linear relationships and interaction effects, and is therefore very suitable for the scenario of power load prediction.
[0095] In the embodiment of the present application, a quantum hybrid network, a generalized additive model (GAM), and a gradient boosting (lightGBM) model are adopted as the first fusion model;
[0096] In an optional embodiment, the relevant parameters for obtaining the power load forecasting results directly or indirectly may include weather conditions, historical load data, special event information, and real-time electricity market prices. These parameters are cleaned and formatted by a data preprocessing module to ensure that they can be accurately processed by the first fusion model. The data preprocessing module includes steps such as handling missing data values, detecting and correcting outliers, and data standardization. The processed data is fed into the first fusion model, which combines a quantum hybrid network, a generalized additive model, and a lightGBM model based on gradient boosting to achieve accurate prediction of power load. The prediction results are then used for power grid scheduling and optimal allocation of power resources, thereby improving the operating efficiency and reliability of the power grid.
[0097] In the embodiments of the present application, using the first decomposed data as the input for pre-training the first fusion model includes:
[0098] The first fusion model includes at least three prediction models for the long-term trend component, short-term trend component, and periodic pattern component.
[0099] Exemplarily, in the prediction stage, in the present technology, the decomposed short-term trend is affected by external variables such as weather indicators. To quantitatively characterize the influence of external variables, the external variable trigger loss (ETL) function is used:
[0100]
[0101] where x e represents the external variable, N represents the number of samples, λ q represents the weight of the qth user-defined external feature (for example, in load forecasting, a larger temperature weight is given), and represents the output of the generalized additive model. S(·) is a non-linear scoring function that gives different weights according to the extreme value level of each sample.
[0102] When extreme values occur, different weights are set for the selected external variables through correlation analysis. Specifically, when a severe heat wave occurs, since the correlation coefficient between temperature and the target load is high, temperature is selected as the external variable. It can also be physically explained that when the temperature rises, the usage of residential air conditioning loads will increase significantly. In this simple example, temperature is the only external variable. Let represent the feature of temperature, let λ1 = 1, λ j = 0, To emphasize the weight of samples under extremely high temperatures, let S(·) be
[0103]
[0104] where S(·) is a piecewise function used to assign greater weights to samples with temperatures higher than K, where K is a predefined threshold for different tasks. Multiple external variables can be easily expanded using the ETL formula.
[0105] Next, use the GAM model (Generalized Additive Model) to fit the short-term trend and external variable-triggered loss as the loss function, where the short-term trend is formalized as the sum of univariate functions of external factors. Specifically:
[0106]
[0107] In the formula, φ q is a function of q th for external variables, and ξ t is the fitting error. GAM has strong interpretability. Given a sample (x t , y t ), the contribution of each factor can be easily obtained as Obviously, the set of {φ q} that satisfies the above formula is not unique. This technology uses GBDT (Gradient Boosting Decision Tree) to implement GAM by setting the depth of the trees in GBDT to 1, as follows Figure 4 shown, which means that each tree uses only one feature and thus does not involve feature interaction.
[0108] It should be noted that this GBDT tree, whose full name is Gradient Boosting Decision Tree, is an iterative decision tree algorithm that constructs a set of weak learners (trees) and accumulates the results of multiple decision trees as the final prediction output. This algorithm effectively combines decision trees with the ensemble idea. As Figure 4 shown in the above figure, there are 4 trees with a depth of 1; taking the first tree as an example, if the feature f1 is less than 0.8, the output is 4.2, otherwise the output is 2.8, and so on; by accumulating multiple trees, the GAM (Generalized Additive Model) graph can be drawn;
[0109] Exemplarily, in the cycle prediction stage, use LightGBM (Light GradientBoosting Machine) based on the gradient boosting algorithm for model training and prediction of time series prediction for cycle data. For the cycle data after feature engineering processing, perform data partitioning (training set and test set):
[0110] train_set = lgb.Dataset(X_train, Y_train) # Create a training dataset object;
[0111] valid_sets = [train_set, lgb.Dataset(X_valid, Y_valid)] # A list used to store objects related to the validation dataset;
[0112] The second stage is for training:
[0113] model = lgb.train(train_set = train_set, valid_sets = valid_sets, **train_params) # Use the training set and validation set to train the model;
[0114] Subsequently, use the trained model to predict the test data and return the predicted values.
[0115] In the embodiment of this application, the cycle prediction stage mainly includes the following three stages:
[0116] Data preparation: Wrap the training set and validation set data into the Dataset format of LightGBM.
[0117] Model training: Use the lgb.train method to train the model and evaluate the performance of the model using the validation set at each iteration.
[0118] Prediction and result processing: According to whether differential processing is used, combine the model prediction results with the difference values or directly output the prediction results.
[0119] Exemplarily, in the long-term prediction stage, this technology uses a quantum network framework for modeling in the long-term prediction stage. The flowchart is as Figure 5 shown; in this process, the long-term trend load sequence after feature engineering processing is respectively processed by a quantum variational circuit (VQC) and a multi-layer perceptron (MLP) network, and then the results obtained respectively are weighted linearly added, and finally the final long-term prediction result is obtained through a linear layer.
[0120] It should be noted that the weighted linear addition combination is a weighted linear addition with trainable weights, and these weights determine the contribution of each network to the final output.
[0121] In the embodiment of this application, before the long-term trend sequence is processed by vqc, due to the influence of the number of qubits and noise of the current quantum device, PCA dimensionality reduction is performed to obtain N features. The quantum variational network layer (vqc) first processes the N features {x N ,..., x N} Initialize using N qubits, use angle encoding, and then alternately use a series of parameter layers and entanglement layers. Finally, measurement is where the quantum information collapses into M classical outputs, which can be obtained by taking the expectation value of the circuit with respect to the measurement observables. Note the difference between M (the number of classical outputs of the VQC) and N (the number of qubits), and they are not necessarily the same because usually only some qubits need to be measured.
[0122] Meanwhile, the fully connected MLP also takes in N features and passes them through a single hidden neuron layer of size F by multiplying the feature vector by a weight matrix of size N×F. Then, biases are applied to these values and scaled using an activation function. The activation function is necessary for adding non-linearity to the linear system. Then, the neurons propagate through their respective biases and activation functions (denoted as {c1,…,c M}) to M MLP output neurons. Then the MLP and VQC outputs are combined using a one-to-two linear weight layer to form the PHN outputs {o1,…,o M}. The last layer combines the first output of the VQC with the first output of the MLP: Similarly for all M outputs, where ({s q},{s c}) are trainable parameters. The scope of this work includes architectures that use multiple VQCs (MLPs) in parallel because they can always be combined into a single VQC (MLP).
[0123] In the embodiment of this application, the power load prediction based on the output of the pre-trained first fusion model includes:
[0124] Obtain the outputs of several different prediction models in the first fusion model;
[0125] Weight the outputs of several different prediction models according to preset weights;
[0126] And use the weighted result as the power load prediction.
[0127] In an alternative embodiment, weighting the outputs of several different prediction models according to preset weights can use a machine learning-based weighting algorithm, which can dynamically adjust the weights according to the historical performance of each prediction model. For example, if a certain model performs poorly in recent predictions, the algorithm will automatically reduce the weight of this model and increase the weights of those models with better performance. This dynamic adjustment mechanism helps to improve the accuracy of overall predictions. In addition, the system can also integrate a real-time data feedback mechanism to further optimize the prediction results. By monitoring the operating state of the power system in real time and feeding this data back into the prediction model, the system can timely adjust the prediction strategy to adapt to the real-time changes in power demand.
[0128] In an alternative embodiment, weighting the outputs of several different prediction models according to preset weights can also use a rule-based weighting algorithm. This algorithm assigns weights according to a series of predefined rules, which may be based on the type of model, the nature of the prediction task, or the statistical characteristics of historical data. For example, if a model has stable performance within a specific time period, it may be given a higher weight. On the contrary, if another model performs better under certain specific conditions, then under these conditions, its weight may be increased. In this way, the system can adjust the weights according to different situations and the relative performance of the models to achieve more accurate prediction results.
[0129] In the embodiments of the present application, the preset weights are not limited, and relevant technical personnel can dynamically adjust the weights according to actual needs and the performance of the prediction models. For example, the adjustment of weights can be based on factors such as the prediction accuracy rate, prediction speed, and computing resource consumption of the models. In some cases, if a model is outstanding in terms of prediction accuracy rate but consumes a large amount of computing resources, the system may increase the weight of this model when resources are sufficient and reduce its weight when resources are scarce. In this way, the system can flexibly adapt to different operating environments and prediction requirements, thereby optimizing the overall resource utilization efficiency while ensuring the prediction accuracy.
[0130] In summary, the present invention proposes a power load forecasting method, which obtains first historical data and performs a first preprocessing on the first historical data; performs a second decomposition and a third decomposition on the first historical data after the first preprocessing to obtain first decomposition data; uses the first decomposition data as the input of a pre-trained first fusion model respectively, and performs power load forecasting according to the output of the pre-trained first fusion model. This power load forecasting system can effectively process historical data, and by combining decomposition and fusion models, improves the accuracy and reliability of forecasting. The data is decomposed into a long-term trend component, a short-term trend component, and a periodic pattern component, which can capture the characteristics of the data more meticulously and provide richer information for the forecasting model. Using the fusion model to forecast the decomposed data, by weighting the outputs of different forecasting models, various factors can be comprehensively considered, so as to obtain a more accurate power load forecasting result. In addition, the power load forecasting method and system of the present invention can also adapt to the load changes under extreme weather conditions and provide strong support for the stable operation of the power system.
[0131] Embodiment 2
[0132] In a preferred embodiment, power load forecasting is a key component in power system planning and operation management, which solves key problems such as power supply-demand balance, power grid planning, economic dispatch, energy cost management, system reliability and stability. Accurate load forecasting under extreme weather has increasingly become a research focus and an urgent problem to be solved in the industrial community. Under these extreme conditions, the load usually changes greatly, which requires an interpretable model to make better decisions.
[0133] Typical deep learning time series forecasting usually focuses on minimizing the global loss, while ignoring the data deviation between normal situations and extreme events, and cannot achieve ideal performance under extreme events. Forecasting under extreme events is closely related to the regression problem on imbalanced data. For load forecasting under extreme events, a quantum adaptive decomposition interpretable framework is designed, which decomposes the original load sequence into three components (long-term trend, short-term trend, periodic pattern), and then introduces a quantum network framework for modeling. The overall model has robustness to extreme events due to its decomposition structure, and different processing strategies are adopted for the decomposed sequences.
[0134] The generalized additive model and quantum parallel computing network used model the relationship between target features and input features, thereby increasing the interpretability of the model.
[0135] This technology decomposes the original load sequence into three components (long-term trend, short-term trend, periodic pattern), and then performs different modeling. Quantum hybrid networks, generalized additive models (GAMs), and gradient boosting (lightGBM) models are respectively adopted for the three components, and feature engineering is fused for power load forecasting. Design asFigure 2 Power load forecasting framework of quantum hybrid network with time series decomposition for load mutation
[0136] In the embodiments of the present application, the quantum VQC circuit used in the present technology is specifically as follows:
[0137] Variational Quantum Algorithms (VQA) have been widely used in hybrid quantum-classical computing systems. These algorithms are implemented through parameterized quantum circuits and the circuit parameters can be adjusted through classical optimization techniques. The core of VQA is the Variational Quantum Circuits (VQC), which consists of parameterized quantum logic gates, is used to process quantum data sets, and embeds the results into classical machine learning models.
[0138] The VQC structure includes a part that encodes classical input data into the circuit quantum state and a variational circuit block with learnable parameters, as Figure 6 shown;
[0139] As Figure 6 shown, the VQC structure diagram mainly includes three parts: a feature encoding layer, trainable parameters and an entanglement layer, and a measurement layer; among them, the parameter of RY is the parameter for the evolution of the quantum state. VQC measures the output of the quantum circuit and converts the result into classical data, and then uses the classical model to calculate the loss value, parameter gradient, and update the model parameters. Compared with classical neural networks, VQC shows better performance with limited number of parameters and can be iteratively optimized by classical computers.
[0140] (1) Feature encoding layer
[0141] Any classical data to be processed by a quantum circuit needs to be encoded into its quantum state. The n-qubit quantum state can be expressed as:
[0142]
[0143] where is the amplitude for each basis state and each q i ∈ {0, 1}. The square of the amplitude is the probability of measuring the state after measurement in , and the total probability is equal to 1. The first step of the encoding scheme is to convert the initial state into an unbiased state:
[0144]
[0145] where the index i is the decimal number of the corresponding bit string that labels the computational basis.
[0146] Next, from the N - dimensional input vector , respectively take θ i,1 = arctan(x i ) and generate 2N rotation angles. The encoded classical data, now a quantum state, will then undergo a series of unitary operations. These quantum operations include several CNOT gates and single - qubit rotation gates.
[0147] (2) Trainable Parameter Entanglement Layer (Variational Layer)
[0148] The encoded classical data, now a quantum state, will then undergo a series of unitary operations. CNOT gates are applied to each pair of qubits with fixed adjacencies 1 and 2 (in a cyclic manner) to generate multi - qubit entanglement. In the single - qubit rotation gate {R i = R(α i , β i , γ i )}, the three rotation angles {α i , β i , γ i} along the x, y, and z axes respectively are not pre - fixed; instead, they need to be updated during an iterative optimization process based on the gradient - descent method. The dashed box can be repeated several times to increase the depth of this layer and thus increase the number of variational parameters.
[0149] (3) Quantum Measurement Layer
[0150] At the end of each VQC block is a quantum measurement layer. Here, the expected value of each qubit is considered through measurement on the computational basis. The returned result is a fixed - length vector that needs to be further processed on a classical computer.
[0151] Example 3
[0152] In this example, a power load forecasting system is also provided, including:
[0153] A pre - processing module, used to obtain first - historical data and perform first - pre - processing on the first - historical data;
[0154] A decomposition module, used to perform second - decomposition and third - decomposition on the first - pre - processed first - historical data to obtain first - decomposed data;
[0155] A forecasting module, used to take the first - decomposed data as the input of the pre - trained first - fusion model respectively, and perform power load forecasting according to the output of the pre - trained first - fusion model.
[0156] The above-mentioned unit modules can be embedded in the processor of a computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0157] This embodiment also provides a computer device, which can be a terminal, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for predicting electric load. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0158] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the following steps are implemented:
[0159] Obtain first historical data and perform first preprocessing on the first historical data;
[0160] Perform second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data;
[0161] Use the first decomposition data as the input of a pre-trained first fusion model respectively, and perform electric load prediction according to the output of the pre-trained first fusion model.
[0162] 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 preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
[0163] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript.
[0164] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as 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 generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0165] 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 generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0166] 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 Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0167] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.
[0168] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. A power load forecasting method, characterized in that, including: obtaining first historical data and performing first preprocessing on the first historical data; performing second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data; using the first decomposition data as the input of a pre-trained first fusion model respectively, and performing electric load forecasting according to the output of the pre-trained first fusion model.
2. The power load forecasting method according to claim 1, wherein The performing second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data includes: performing first data classification on the first historical data after the first preprocessing to obtain first-class data and second-class data; performing second decomposition on the first-class data; performing third decomposition on the second-class data; recording the results of the second decomposition and the third decomposition as first decomposition data.
3. The power load forecasting method according to claim 2, wherein, The first fusion model includes: the first fusion model includes a plurality of different prediction models; the inputs of the plurality of different prediction models are all a plurality of data in the first decomposition data; the outputs of the plurality of different prediction models are all electric load forecasting results or any model that can directly or indirectly obtain relevant parameters of electric load forecasting results.
4. The power load forecasting method according to claim 3, characterized in that, The performing first preprocessing on the first historical data includes: performing first decomposition on the first historical data; the first decomposition is used to divide the first historical data into several sequences.
5. The power load forecasting method according to claim 4, wherein The second decomposition and the third decomposition at least include decomposing the first historical data after the first preprocessing into a long-term trend component, a short-term trend component, and a periodic pattern component.
6. The power load forecasting method according to claim 5, characterized in that, The using the first decomposition data as the input of a pre-trained first fusion model respectively includes: the first fusion model at least includes three prediction models for the long-term trend component, the short-term trend component, and the periodic pattern component.
7. The power load forecasting method according to claim 6, wherein, The performing electric load forecasting according to the output of the pre-trained first fusion model includes: obtaining the outputs of a plurality of different prediction models in the first fusion model; weighting the outputs of the plurality of different prediction models according to a preset weight; and using the weighted result as the electric load forecasting.
8. A power load forecasting system, characterized in that, including: a preprocessing module, configured to obtain first historical data and perform first preprocessing on the first historical data; a decomposition module, configured to perform second decomposition and third decomposition on the first historical data after the first preprocessing to obtain first decomposition data; a prediction module, configured to use the first decomposition data as the input of a pre-trained first fusion model respectively, and perform electric load forecasting according to the output of the pre-trained first fusion model.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, 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 having a computer program stored thereon, 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.