Power grid load prediction method and device and electronic equipment
By combining the load prediction model of the time convolution network and the bidirectional gated cycle network, the problem of poor generalization ability of a single network model is solved, and the accuracy and generalization ability of grid load prediction are improved.
Patent Information
- Application Number
- CN202510212704.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-27
AI Technical Summary
The load prediction model constructed based on a single network model has poor generalization capabilities, resulting in low accuracy in grid load prediction.
The load prediction model combining time convolutional network (TCN) and bidirectional gated recurrent network (BiGRU) is used to train based on data from multiple historical periods through machine learning to reduce the interference of redundant information on model performance.
It improves the accuracy of grid load prediction, enhances the generalization ability of the model, and reduces prediction errors.
Smart Images

Figure CN120049430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grids, and more particularly to the field of power system load forecasting technology. Specifically, it relates to a power grid load forecasting method, device, and electronic device. Background Art
[0002] Short-term load forecasting is a key link in the planning and operation of power systems. With the rapid development of smart grids, power load data exhibits high complexity and volatility, making it difficult for traditional forecasting methods to accurately capture these dynamic changes, resulting in large forecasting errors. Improving the accuracy of short-term load forecasting is crucial for the safe, stable, and efficient operation of power systems.
[0003] In recent years, machine learning technologies have made significant progress in the field of short-term load forecasting. In particular, deep learning technologies, such as Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM), and their variants, have become the mainstream methods for short-term load forecasting due to their powerful data processing and feature extraction capabilities. These models can more accurately predict future load changes by automatically learning the temporal dependencies and feature patterns in historical load data. However, a single deep learning model still has certain limitations in processing complex load data. On this basis, the load forecasting model constructed based on a single network model has poor generalization ability, which in turn leads to low accuracy of power grid load forecasting.
[0004] To address the above problems, no effective solutions have been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a power grid load forecasting method, device, and electronic device to at least solve the technical problem of poor generalization ability of the load forecasting model constructed based on a single network model in related technologies, resulting in low accuracy of power grid load forecasting.
[0006] According to one aspect of an embodiment of the present invention, there is provided a power grid load forecasting method, including: obtaining current acquisition data of the power grid collected in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located; based on the current acquisition data, using a load forecasting model to obtain a load forecasting result of the power grid in the forecasting period, where the forecasting period is a period after the current period, and the load forecasting model includes a temporal convolutional network and a bidirectional gated recurrent unit; wherein, the load forecasting model is obtained through machine learning based on historical acquisition data and actual load results collected in multiple historical periods, and the historical acquisition data includes historical load data collected in corresponding historical periods and historical weather data of the area where the power grid is located.
[0007] According to another aspect of an embodiment of the present invention, there is also provided a power grid load forecasting device, including: an obtaining module, configured to obtain current acquisition data of the power grid collected in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located; a forecasting module, configured to, based on the current acquisition data, use a load forecasting model to obtain a load forecasting result of the power grid in the forecasting period, where the forecasting period is a period after the current period, and the load forecasting model includes a temporal convolutional network and a bidirectional gated recurrent unit; wherein, the load forecasting model is obtained through machine learning based on historical acquisition data and actual load results collected in multiple historical periods, and the historical acquisition data includes historical load data collected in corresponding historical periods and historical weather data of the area where the power grid is located.
[0008] According to another aspect of an embodiment of the present invention, there is also provided a non-volatile storage medium storing multiple instructions, and the instructions are suitable for being loaded and executed by a processor to perform any one of the power grid load forecasting methods.
[0009] According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors and a memory, where the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the power grid load forecasting methods.
[0010] According to another aspect of an embodiment of the present invention, there is also provided a computer program product including a computer program, and when the computer program is executed by a processor, the steps of any one of the power grid load forecasting methods are implemented.
[0011] In an embodiment of the present invention, by obtaining current acquisition data of the power grid collected in the current period, where the current acquisition data includes current load data of the power grid in the current period and current weather data of the area where the power grid is located; based on the current acquisition data, using a load prediction model to obtain a load prediction result of the power grid in the prediction period, where the prediction period is a period after the current period, and the load prediction model includes a temporal convolutional network and a bidirectional gated recurrent network; wherein, the load prediction model is obtained through machine learning based on historical acquisition data and actual load results collected in multiple historical periods, and the historical acquisition data includes historical load data collected in corresponding historical periods and historical weather data of the area where the power grid is located, achieving the purpose of jointly constructing a load prediction model based on a temporal convolutional network and a bidirectional gated recurrent network for power grid load prediction to reduce the interference of redundant information on the performance of the model, thereby realizing the technical effect of improving the accuracy of power grid load prediction, and further solving the technical problem of poor generalization ability of the load prediction model constructed based on a single network model in the related art, resulting in low accuracy of power grid load prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0013] Figure 1 is a flowchart of a power grid load prediction method according to an embodiment of the present invention;
[0014] Figure 2 is a schematic structural diagram of an optional TCN model according to an embodiment of the present invention;
[0015] Figure 3 is a schematic structural diagram of an optional power grid load prediction model according to an embodiment of the present invention;
[0016] Figure 4 is a schematic diagram of a power grid load prediction device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the 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.
[0018] It should be noted that the terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0019] First, for the convenience of understanding the embodiments of the present invention, some terms or nouns involved in the present invention will be explained below:
[0020] The Maximum Information Coefficient method (MIC) is a statistical metric method used to measure the strength and direction of the relationship between two variables. It can be used to evaluate the linear or non-linear relationship between variables and can handle various types of data, including continuous, discrete, ordered and unordered data.
[0021] The Red Tail Hawk Algorithm (RTH) is an optimization algorithm, usually used to solve optimization problems, especially in the fields of engineering, finance and artificial intelligence. The Red Tail Hawk Algorithm is inspired by the predation behavior of the red tail hawk and finds the optimal solution to the problem by simulating the hunting strategy of the red tail hawk. This algorithm belongs to the nature-inspired algorithm, also known as the bio-simulation algorithm or bionic algorithm.
[0022] The Temporal Convolutional Network (TCN) is a deep learning model used to process time series data. It captures the local time dependencies in time series data through convolutional operations and can learn more complex time-dependent patterns by stacking multiple convolutional layers.
[0023] The Bidirectional Gated Recurrent Unit (BiGRU) is a deep learning model, which is an extension of the Gated Recurrent Unit (GRU) or the Long Short-Term Memory (LSTM). This network structure can process the data input in both the forward direction (from left to right) and the reverse direction (from right to left) simultaneously to capture the context information in the sequence data.
[0024] According to an embodiment of the present invention, an embodiment of a method for predicting power grid load is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0025] Figure 1 is a flowchart of the power grid load prediction method according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:
[0026] Step S102, obtain the current acquisition data of the power grid collected in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located;
[0027] Optionally, the load data in the power system can refer to the measure of the electrical energy or power consumed or demanded by the power system or a certain part thereof (such as a region, a line, or a user) within a certain specific time period. It can reflect the change of power consumption in the power system over time and is an important basis for power system planning, operation, and management.
[0028] In step S102 of the present application, by collecting the load data of the power grid and the weather data of the area where it is located in real time in the current period, it can be ensured that the load prediction model can process and analyze the latest power grid load data and weather information, which is a necessary condition for short-term and even ultra-short-term load prediction. Obtaining real-time data enables the load prediction model to make immediate predictions based on the current power demand and environmental conditions, improving the timeliness and accuracy of the prediction. The current acquisition data including the power grid load data and the weather data helps to provide multi-dimensional information affecting the power load prediction. The load data can reflect the real-time power demand of the power grid, while the weather data takes into account the potential impact of environmental factors such as temperature, humidity, and wind speed on the power demand. The comprehensive use of these data helps the model to more comprehensively understand the change law of the load and thus make more accurate predictions.
[0029] Optionally, the current acquisition data is the direct input for the load prediction model to make predictions. The load prediction model can learn the internal relationship between the load change and the weather conditions based on these data, providing a data basis for the prediction.
[0030] In an alternative embodiment, before obtaining the load prediction result of the power grid during the prediction period by using a load prediction model based on the current load data and the current weather data, the method further includes: extracting features from the historical acquisition data collected in multiple historical periods to obtain a plurality of electrical features and a plurality of feature data sets respectively corresponding to the multiple historical periods, where the feature data set includes the feature values respectively corresponding to the plurality of electrical features collected in the corresponding historical period; training an initial model based on the feature data sets respectively corresponding to the multiple historical periods and the actual load results respectively corresponding to the multiple historical periods until a predetermined termination condition is reached; and determining the load prediction model based on the trained model output when the predetermined termination condition is reached.
[0031] Optionally, training the initial model means training the Temporal Convolutional Network (TCN) and the Bidirectional Gated Recurrent Unit (BiGRU). Among them: The TCN can effectively capture the long-term time dependence and periodic characteristics in the power load data through its unique causal convolution structure and Dilated Convolutions technology. It can process all time-step data in parallel, greatly reducing the training time and improving the efficiency of processing large-scale sequence data. By combining convolutional layers with different dilation rates, the TCN can extract features from multiple time scales, further enhancing the model's ability to understand various time patterns in the load data, whether it is short-term fluctuations at the hourly level or long-term trends at the daily and weekly levels. Figure 2 It is a schematic diagram of an alternative TCN model structure according to an embodiment of the present invention.
[0032] Causal convolution means that the output at the current moment only depends on past information and does not include future information, which can ensure that the model prediction result is not affected by future data. Each convolutional layer has a convolutional kernel of a fixed size, which slides on the input sequence and performs a convolutional operation to generate a local receptive field. By stacking multiple layers of causal convolutional layers, the receptive field of each layer will gradually expand, enabling the model to capture dependencies within a longer time span.
[0033] Dilated convolution allows the convolutional kernel to sample across multiple time steps without increasing the number of parameters. As the network depth increases, the dilation coefficient gradually increases, which can significantly expand the receptive field of each layer without sacrificing computational efficiency. For example, a standard convolution with a dilation rate of 1 is used in the first layer, and a convolution with a dilation rate of 2 is used in the second layer, and so on, ultimately achieving effective capture of important features within the entire time series range.
[0034] BiGRU adopts a bidirectional processing mechanism. It can consider historical and future (simulated during training) information simultaneously, enhancing the model's ability to model complex time series data. It shows good performance in dealing with short-term fluctuations and periodic changes. BiGRU prediction significantly enhances the model's ability to model complex time series data through steps such as bidirectional processing mechanism, information integration, capturing time-dependent relationships, and gating mechanism.
[0035] The bidirectional processing mechanism means that BiGRU combines two parallel processing layers: a forward GRU and a backward GRU. Among them, the forward GRU processes data in the natural order of the time series, capturing dependencies from front to back; while the backward GRU processes data in reverse order, capturing dependencies from back to front. Bidirectional processing enables the model to consider historical and future information simultaneously (although future information is simulated through backpropagation during training).
[0036] Information integration means that the outputs generated by the two GRU layers at each time step are then integrated, usually through concatenation or other appropriate aggregation methods. This integration produces a comprehensive representation that can encapsulate context information from the past and future at each time step.
[0037] Capturing time-dependent relationships can enhance the model's ability to capture time-dependent relationships in the sequence. Whether it is long-term or short-term dependencies, BiGRU can effectively manage and transmit relevant information through its gating mechanism (update gate, reset gate).
[0038] The gating mechanism allows the model to decide at each step which information to retain and which to forget. This flexibility enables BiGRU to handle complex time series data, including data with significant volatility and periodicity.
[0039] Optionally, in this embodiment, historical data is preprocessed and relevant features are extracted, aiming to identify and select electrical features that have a significant impact on power load prediction. Through this process, the load prediction model can be trained based on the most relevant information, improving training efficiency and the accuracy of the prediction model. The historically collected data may contain noise and redundant information. Preprocessing these data helps to remove noise, reduce data dimensions, improve the model training speed and effect, and avoid overfitting. Training the initial model based on the feature data set and actual load results is a key step in building a machine learning prediction model. This step enables the load prediction model to learn the laws and patterns of load changes from historical data, thereby improving the prediction ability. The predetermined termination condition can be set in the following form, but is not limited to: the training error is lower than a certain threshold, or the number of training iterations reaches a set value, ensuring that the model training process is fully optimized.
[0040] In an alternative embodiment, historical acquisition data collected for multiple historical time periods are subjected to feature extraction to obtain a plurality of electrical features, including: determining the correlation coefficients between a plurality of initial features and the actual load result respectively based on the historical acquisition data collected for multiple historical time periods and the actual load result by using the Maximal Information Coefficient (MIC) method, wherein the historical acquisition data collected for each historical time period includes the feature values corresponding to the plurality of initial features collected for the corresponding historical time period; determining a plurality of electrical features from the plurality of initial features based on the correlation coefficients between the plurality of initial features and the actual load result respectively, wherein the number of the plurality of electrical features is less than the number of the plurality of initial features.
[0041] Optionally, the feature extraction process can be integrated into the model as a MIC feature analysis module, or can be used as a processing process independent of the model.
[0042] Optionally, MIC can evaluate the correlation between all possible input features and the target variable (i.e., load power). The MIC algorithm calculates the dependence between all features and the load power and gives a value between 0 and 1, indicating the strength of the correlation. An MIC value close to 1 indicates a high correlation between two variables. A threshold is set according to the MIC value, and this threshold can be selected according to the specific application and the characteristics of the data set. Features above this threshold are considered to be features strongly correlated with the load power and will be retained for model training. For the selected strongly correlated features, further feature engineering processing can be performed, such as the decomposition of time features (for example, extracting hours, day of the week, etc. from timestamps), or the transformation of meteorological data, etc., to ensure that the features are presented in a form that can be processed by the model. Finally, these features after MIC screening and possible feature engineering processing will be used as input data to supply load prediction models (such as TCN and BiGRU) for training and prediction.
[0043] Optionally, the mutual dependence relationship between the initial features and the power load result can be quantified by MIC, so as to identify which features have a significant impact on load prediction. The MIC method can handle the non-linear relationship between features and can more comprehensively evaluate the importance and complexity of features compared with the correlation metrics in related technologies.
[0044] Optionally, based on the correlation coefficient calculated by MIC, in this embodiment, electrical features highly correlated with the actual load result are screened out from multiple initial features. Feature screening can reduce redundant information in the model input, avoid noise interference, and at the same time reduce the training complexity of the model, improve the training speed and prediction efficiency. The feature extraction and screening process can be regarded as an optimization of the model training process. By reducing the number of input features, the trained load prediction model can focus more on those variables that truly contribute to load prediction, avoid learning irrelevant or weakly correlated variables, and thus improve the generalization ability and prediction accuracy of the model.
[0045] In an alternative embodiment, the method further includes: using the initial hyperparameters of the initial model as the particles included in the population to construct an initial population; during the training of the initial model, using the Red Tail Hawk Algorithm (RTH) to optimize the initial population to obtain an optimized population; based on the hyperparameters included in the optimized population output when reaching a predetermined termination condition, determining the hyperparameters of the load prediction model.
[0046] Optionally, hyperparameters refer to the parameters that need to be manually set before training the model. They control the structure and learning process of the model, but are not directly learned from the training data. Different from model parameters (such as weights and biases in a neural network, which are automatically adjusted according to the data during training), hyperparameters are manually selected by the user based on experience or through hyperparameter optimization methods before the start of model training.
[0047] Optionally, the RTH optimization algorithm can finely adjust the key hyperparameters in the model, where the hyperparameters include but are not limited to the learning rate, batch size, number of convolutional layers, etc. The RTH algorithm has an efficient search strategy and convergence speed, which can ensure the optimal configuration of model parameters. The specific implementation steps are as follows:
[0048] Step S11, initialization. First, set the initial positions of the red tail hawks, which correspond to the initial values of the initial hyperparameters of the model. At the same time, determine the parameters of the algorithm, such as the maximum number of iterations, the dimension of the search space, etc.
[0049] Step S12, enter the high-altitude soaring stage. Simulate the behavior of red tail hawks soaring in high-altitude areas, and search for potential optimal solution regions in the entire hyperparameter space through random search or heuristic methods. This process is similar to global search and aims to quickly locate the regions with better performance in the hyperparameter space.
[0050] Step S13, enter the low-altitude flight phase. When the red-tailed hawk discovers a potential prey area (i.e., a hyperparameter combination with better performance), it enters the low-altitude flight phase. At this time, a more refined search strategy is adopted, such as spiral descent or local search algorithms, to conduct in-depth searches within a smaller hyperparameter space range to find a more precise optimal solution.
[0051] Step S14, enter the dive attack phase. Based on the optimal or near-optimal hyperparameter combination found in the low-altitude flight phase, the red-tailed hawk performs a "dive attack", that is, fine-tuning around these hyperparameter values to further confirm and optimize the hyperparameter settings. This phase is similar to local refinement, aiming to improve the performance of the model under specific hyperparameter configurations.
[0052] Step S15, iteration and update. The entire search process is an iterative process. In each iteration, the quality of the current hyperparameter combination is evaluated according to the prediction performance of the model (such as the error rate), and the positions of the red-tailed hawks in the population (i.e., hyperparameter values) are updated accordingly. Through continuous iteration, the red-tailed hawk gradually approaches and reaches the optimal hyperparameter configuration. When the preset maximum number of iterations is reached or other convergence conditions are met, the algorithm stops. At this time, the optimal hyperparameter combination is output and applied to the load prediction model to improve the prediction accuracy and stability of the model.
[0053] Optionally, in this embodiment, by taking the initial hyperparameters of the model as particles in the population, the RTH algorithm can search and explore in the hyperparameter space to find those hyperparameter combinations that can make the model perform optimally. This search is global and can avoid falling into local optimal solutions. Compared with manually adjusting hyperparameters, the RTH algorithm can automatically adjust hyperparameters, reduce human intervention and trial-and-error costs, and improve the efficiency and effectiveness of hyperparameter optimization. Automated optimization enables the model to achieve better performance in a shorter time. By optimizing hyperparameters with the RTH algorithm, the training and prediction performance of the model can be significantly improved. The optimized hyperparameter configuration can enable the model to better adapt to the characteristics of power load data and improve the accuracy and stability of prediction.
[0054] In an alternative embodiment, the method further includes: during the training of the initial model, determining a first prediction error between the prediction result output by the temporal convolutional network in the initial model and the actual load result, and a second prediction error between the prediction result output by the bidirectional gated recurrent network in the initial model and the actual load result; determining a third weight value corresponding to the temporal convolutional network in the initial model and a fourth weight value corresponding to the bidirectional gated recurrent network in the initial model based on the reciprocal of the first prediction error and the reciprocal of the second prediction error; determining a first weight value corresponding to the temporal convolutional network in the load prediction model based on the third weight value output when a predetermined termination condition is reached; and determining a second weight value corresponding to the bidirectional gated recurrent network in the load prediction model based on the fourth weight value output when the predetermined termination condition is reached.
[0055] Optionally, as a prediction result fusion strategy, the Error Inversion Method has a core idea of dynamically adjusting the weight of each prediction model in the final prediction result based on its prediction error. This method can automatically identify which models perform better on specific samples, thus giving a more accurate and stable prediction result.
[0056] Optionally, the implementation process of fusing the first prediction result and the second prediction result can be as follows: First, use the first model (e.g., TCN) and the second model (e.g., BiGRU) to predict the data respectively to obtain the output results of the two models, namely the first prediction result and the second prediction result. For each model, calculate the error between its prediction result and the actual result, which can but is not limited to using the Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), etc. as the error metric. Calculate the reciprocal of the prediction error of each model, which is the core step of the Error Inversion Method. The reciprocal of the error can reflect the reliability of the model prediction. The smaller the error, the larger the reciprocal, indicating that the model prediction is more reliable. For each time point, calculate the weights of the prediction results of the two models based on the obtained reciprocal values. The weights are determined by normalizing the reciprocal of the error. Use the calculated weights to fuse the two prediction results to obtain the final prediction result.
[0057] Optionally, in this embodiment, the Error Inversion Method is used as the prediction result fusion strategy. By intelligently weighting and combining the outputs of the two prediction networks (TCN and BiGRU), the bias that may be caused by a single model is reduced, and the optimization and stability of the prediction result are achieved.
[0058] Optionally, in this embodiment, first, an error evaluation is performed based on the difference between the prediction results of the TCN and BiGRU and the actual load results. Then, weights are assigned based on the reciprocal of the error. The smaller the error, the larger its reciprocal, and the higher the weight. The weight dynamic adjustment mechanism can continuously optimize the prediction ability of the prediction model during the training process. Even when facing complex and variable power load data, it can maintain a high prediction accuracy. The finally determined first weight value and second weight value represent the best proportion of the contributions of the TCN and BiGRU models to the prediction results after the training is completed. This optimal model utilization strategy ensures that the prediction model can maximize the potential of the two sub-models. This process ensures that the model with better prediction effect occupies a larger proportion in the final result, thereby improving the comprehensive accuracy of the prediction.
[0059] Step S104, based on the currently collected data, use a load prediction model to obtain the load prediction result of the power grid in the prediction period, where the prediction period is the period after the current period, and the load prediction model includes a temporal convolutional network and a bidirectional gated recurrent unit; among them, the load prediction model is obtained through machine learning based on the historical collected data and the actual load results collected in multiple historical periods. The historical collected data includes the historical load data collected in the corresponding historical period and the historical weather data of the region where the power grid is located.
[0060] Optionally, the historical collected data includes, but is not limited to, historical load data, meteorological data, holiday and weekday information, timestamps, electricity price data, etc.
[0061] Optionally, the power grid load data and weather data of the current period can be used as inputs. The load prediction model can predict the power load demand in the future period in real time or near real time. Being able to predict the load in advance helps to reasonably arrange power generation resources and avoid shortages or surpluses in power supply. By integrating these two models, TCN and BiGRU, the load prediction model can more comprehensively understand the characteristics of power load data and improve the prediction accuracy. The load prediction model is trained based on historical collected data, which means that the model can learn the laws of load changes from past data, including seasonal changes, differences between weekdays and rest days, and the influence of weather factors, etc., so as to better predict future loads.
[0062] In an alternative embodiment, based on the currently collected data, a load forecasting model is used to obtain the load forecasting result of the power grid during the forecasting period, including: extracting features from the currently collected data to obtain the current feature values corresponding to multiple power features; based on the current feature values corresponding to the multiple power features, using the temporal convolutional network in the load forecasting model to obtain a first forecasting result; based on the current feature values corresponding to the multiple power features, using the bidirectional gated recurrent unit in the load forecasting model to obtain a second forecasting result; and obtaining the load forecasting result based on the first forecasting result and the second forecasting result.
[0063] Optionally, the currently collected data includes the current feature values corresponding to multiple initial features.
[0064] Optionally, the currently collected data, including the current load data and weather data, can be subjected to feature extraction to convert the complex raw data into feature values understandable by the model, providing information-rich inputs for the forecasting process. The Temporal Convolutional Network (TCN) and Bidirectional Gated Recurrent Unit (BiGRU) are respectively used to predict the extracted feature values. The TCN is good at capturing long-term dependencies, while the BiGRU can consider both forward and backward time series. The two complement each other, covering different time ranges and context information in the forecasting. The forecasting results of the TCN and BiGRU are combined, and through the inverse error method or other appropriate fusion strategies, the final load forecasting result is obtained. The above method can make full use of the advantages of the two models to reduce bias and improve the accuracy and stability of the forecasting result.
[0065] In an alternative embodiment, obtaining the load forecasting result based on the first forecasting result and the second forecasting result includes: obtaining the first weight value corresponding to the temporal convolutional network in the load forecasting model and the second weight value corresponding to the bidirectional gated recurrent unit in the load forecasting model; and performing weighted calculation based on the first forecasting result, the second forecasting result, the first weight value, and the second weight value to obtain the load forecasting result.
[0066] Optionally, the first weight value and the second weight value can be obtained by using the inverse error method during the model training process.
[0067] Optionally, by obtaining the weight values corresponding to the TCN and BiGRU respectively, the forecasting results of the two models can be dynamically adjusted during the forecasting process. Through this embodiment, the problem of over-reliance on a single model can be avoided, the stability of the forecasting result can be improved, and the dynamic adjustment mechanism enhances the interpretability of the forecasting model. The change of the weight value reflects the relative contributions of different models during the forecasting process, which can help relevant staff (such as power system analysts) understand the logic and basis behind the forecasting result.
[0068] Optionally, the weighted calculation combines the prediction results of the TCN and BiGRU according to their respective importance levels (reflected by the weight values). This method allows the model to leverage the advantages of the two sub-models, namely the TCN's ability to capture long-term dependencies and the BiGRU's ability to process bidirectional sequence information, thereby obtaining a more refined and comprehensive load prediction.
[0069] Through the above steps S102 to S104, the purpose of reducing the interference of redundant information on the model performance can be achieved, thereby realizing the technical effect of improving the accuracy of power grid load prediction, and further solving the technical problem of low accuracy of power grid load prediction caused by the poor generalization ability of the load prediction model constructed based on a single network model in the related art.
[0070] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation manner of the power grid load prediction method. Figure 3 It is a schematic structural diagram of an optional power grid load prediction model according to an embodiment of the present invention. This method can be applied to a load prediction model as shown in Figure 3 The load prediction model includes a MIC feature analysis module, a TCN prediction module, a BiGRU prediction module, an RTH hyperparameter optimization module, and an error reciprocal method combination module, where:
[0071] The MIC feature analysis module serves as the front end of the model. This module uses advanced MIC (Maximal Information Coefficient) technology to deeply analyze the key features in the power load data. It can effectively extract the factors that have the greatest impact on the prediction results, providing refined and information-rich input data for subsequent predictions.
[0072] The TCN prediction module is a deep learning model specifically designed to process sequence data. The TCN consists of dilated, causal one-dimensional convolutional layers with the same input and output lengths. The specific structure of the TCN network is still as shown in Figure 2 The TCN can efficiently capture the time-dependent and periodic features in the power load data. In addition, the TCN has strong long-term dependence modeling capabilities and fewer parameters, and can calculate the data in all time steps in parallel, thereby processing time series data more efficiently. Especially in tasks such as power load prediction, it can significantly reduce the training time. At the same time, the TCN directly outputs the prediction results from the input multi-time scale data, and the model automatically learns the most important features and dependencies at different time scales during the training process.
[0073] The BiGRU prediction module runs in parallel with the TCN module. The BiGRU module adopts a bidirectional processing mechanism. It takes into account both historical and future (simulated during training) information, which can further enhance the model's ability to model complex time series data. It shows good performance in dealing with short-term fluctuations and periodic changes. The BiGRU prediction module can significantly enhance the model's ability to model complex time series data through steps such as bidirectional processing mechanism, information integration, time dependence capture, and gating mechanism. The specific implementation methods of each step are the same as those described above and will not be elaborated here.
[0074] The RTH hyperparameter optimization module finely tunes the key hyperparameters in the model by introducing the RTH optimization algorithm. The RTH algorithm has an efficient search strategy and convergence speed, which can ensure the optimal configuration of model parameters, thus significantly improving the prediction accuracy. The specific implementation process of this RTH optimization algorithm is the same as those described above and will not be elaborated here.
[0075] The reciprocal error method combination module uses the reciprocal error method as the fusion strategy for prediction results. By intelligently weighting and combining the outputs of the two prediction modules (TCN and BiGRU), it can effectively reduce the bias that may be caused by a single model and achieve further optimization and stability of the prediction results.
[0076] This method includes:
[0077] Step S1, obtain the current acquisition data of the power grid collected in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located;
[0078] Step S2, based on the current acquisition data, use the Figure 3 load prediction model as shown to obtain the load prediction result of the power grid in the prediction period. The specific implementation process is as follows:
[0079] Step S21, extract features from the current acquisition data to obtain the current feature values corresponding to multiple power features;
[0080] Step S22, based on the current feature values corresponding to multiple power features, use the time convolutional network in the load prediction model to obtain the first prediction result;
[0081] Step S23, based on the current feature values corresponding to multiple power features, use the bidirectional gated recurrent network in the load prediction model to obtain the second prediction result;
[0082] Step S24, obtain the first weight value corresponding to the time convolutional network in the load prediction model and the second weight value corresponding to the bidirectional gated recurrent network in the load prediction model;
[0083] Step S25: Perform weighted calculation based on the first prediction result, the second prediction result, the first weight value, and the second weight value to obtain the load prediction result.
[0084] Further verify the effects that can be achieved in this embodiment through experimental verification. The specific processing procedure is as follows:
[0085] S31: Experimental design
[0086] A detailed load power data set covering the whole year of the past year can be selected, including 35,040 records, covering multi-dimensional information such as historical load sequences, ambient temperature, air humidity, wind speed, rainfall, and timestamp. Build an advanced model prediction platform based on the programming environment Python 3.6, and use the deep learning framework PyTorch for model training and prediction.
[0087] S32: Feature selection and analysis
[0088] Use the MIC algorithm to perform correlation analysis on the features, and screen out the key features that have the greatest impact on load prediction, such as temperature, rainfall, holidays, etc. Through the MIC feature analysis module, redundant information can be effectively reduced, and the prediction efficiency and accuracy of the model can be improved.
[0089] S33: Model construction and optimization
[0090] Build a prediction model including TCN and BiGRU to capture the long-term dependencies and time features in the load data, as well as short-term fluctuations and periodic changes respectively. Introduce the RTH optimization algorithm to finely tune the hyperparameters of the TCN and BiGRU models to achieve the optimal prediction performance.
[0091] S34: Prediction result fusion
[0092] Use the reciprocal of error method to perform weighted sum and combination on the prediction results of the TCN and BiGRU models to further improve the prediction accuracy and stability.
[0093] S35: Experimental results
[0094] The experimental results show that, compared with single models (such as Backpropagation (BP), Bidirectional Long Short-Term Memory (BiLSTM), BiGRU, TCN) and other benchmark models, the load prediction model constructed based on the TCN+BiGRU+RTH model in this embodiment performs excellently in the short-term load prediction task. In terms of multiple evaluation metrics (such as MAE, RMSE, Mean Absolute Percentage Error (MAPE)), the load prediction model in this embodiment reaches the lowest prediction error rate, significantly improving the prediction accuracy. Specifically, compared with the BiLSTM model, the load prediction model in this embodiment reduces by 24.66%, 32.06% and 3.11% respectively in terms of MAE, RMSE and MAPE, which can prove its special ability in minimizing prediction deviation and improving prediction accuracy.
[0095] This embodiment can achieve at least one of the following effects: 1) This embodiment innovatively introduces the maximum information coefficient (MIC) feature correlation analysis, deeply screens the features of power load data, and inputs the strongly correlated features into the time convolutional network (TCN) and bidirectional gated recurrent unit (BiGRU) models for training and prediction, significantly improving the model prediction accuracy. 2) The hyperparameters of the TCN and BiGRU models are finely adjusted through the Red-tailed Hawk (RTH) optimization algorithm to achieve the optimal prediction performance, solving the problems of blindness and low efficiency in model parameter adjustment in the related technology. 3) An innovative reciprocal error method is proposed to seamlessly fuse the prediction results of the TCN and BiGRU models, further reducing the error and enhancing the stability and accuracy of the prediction results. 4) Combining MIC feature analysis, TCN time series modeling, BiGRU context capture ability, RTH optimization and the reciprocal error method, a high-fidelity short-term load prediction model is constructed, which has significant advantages in dealing with complex and variable load data.
[0096] In this embodiment, a power grid load prediction device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the terms "module" and "device" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0097] According to an embodiment of the present invention, an apparatus embodiment for implementing the above-mentioned power grid load prediction method is also provided. Figure 4 It is a schematic structural diagram of a power grid load prediction device according to an embodiment of the present invention, asFigure 4 As shown in Figure 4 , the above-mentioned power grid load forecasting device includes: an acquisition module 200 and a forecasting module 202, where:
[0098] The acquisition module 200 is used to acquire the current acquisition data of the power grid collected in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located;
[0099] The forecasting module 202 is connected to the acquisition module 200 and is used to obtain the load forecasting result of the power grid in the forecasting period based on the current acquisition data by using a load forecasting model. The forecasting period is the period after the current period, and the load forecasting model includes a temporal convolutional network and a bidirectional gated recurrent unit network. The load forecasting model is obtained through machine learning based on the historical acquisition data and the actual load results collected in multiple historical periods. The historical acquisition data includes the historical load data collected in the corresponding historical periods and the historical weather data of the area where the power grid is located. It should be noted that the above-mentioned modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above-mentioned modules can be located in the same processor; or, the above-mentioned modules are located in different processors in any combination.
[0100] Here, it should be noted that the above-mentioned acquisition module 200 and forecasting module 202 correspond to steps S102 to S104 in the embodiment. The examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned embodiment. It should be noted that the above-mentioned modules, as part of the device, can run in a computer terminal.
[0101] It should be noted that the optional or preferred implementation manners of this embodiment can refer to the relevant descriptions in the embodiment, and will not be repeated here.
[0102] The above-mentioned power grid load forecasting device may further include a processor and a memory. The above-mentioned acquisition module 200, forecasting module 202, etc. are all stored in the memory as program modules, and the corresponding functions are implemented by the processor executing the above-mentioned program modules stored in the memory.
[0103] The processor contains a kernel, and the kernel is used to retrieve the corresponding program modules from the memory. One or more kernels can be set. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM). The memory includes at least one storage chip.
[0104] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is further provided. Optionally, in this embodiment, the above non-volatile storage medium includes a stored program, wherein when the above program runs, it controls the device where the non-volatile storage medium is located to execute any one of the above grid load forecasting methods.
[0105] Optionally, in this embodiment, the above non-volatile storage medium can be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group. The above non-volatile storage medium includes a stored program.
[0106] Optionally, when the program runs, it controls the device where the non-volatile storage medium is located to execute the following functions: obtaining the current acquisition data of the power grid collected in the current period, wherein the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located; based on the current acquisition data, using a load forecasting model, obtaining the load forecasting result of the power grid in the forecasting period, wherein the forecasting period is the period after the current period, and the load forecasting model includes a time convolutional network and a bidirectional gated recurrent network; wherein, the load forecasting model is obtained through machine learning based on the historical acquisition data and the actual load results collected in multiple historical periods. The historical acquisition data includes the historical load data collected in the corresponding historical period and the historical weather data of the area where the power grid is located.
[0107] According to an embodiment of the present application, an embodiment of a processor is further provided. Optionally, in this embodiment, the above processor is used to run a program, wherein when the above program runs, it executes any one of the above grid load forecasting methods.
[0108] According to an embodiment of the present application, an embodiment of a computer program product is further provided. Optionally, in this embodiment, the above computer program product includes a computer program, and when the above computer program is executed by a processor, it realizes the program of any one of the above grid load forecasting method steps.
[0109] Optionally, when the above computer program product is executed on a data processing device, it is adapted to execute a program initialized with the following method steps: obtaining current acquisition data of the power grid acquired in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located; based on the current acquisition data, using a load prediction model to obtain a load prediction result of the power grid in the prediction period, where the prediction period is a period after the current period, and the load prediction model includes a temporal convolutional network and a bidirectional gated recurrent network; where the load prediction model is obtained through machine learning based on historical acquisition data and actual load results respectively acquired in multiple historical periods, and the historical acquisition data includes historical load data acquired in the corresponding historical period and historical weather data of the area where the power grid is located.
[0110] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining current acquisition data of the power grid acquired in the current period, where the current acquisition data includes the current load data of the power grid in the current period and the current weather data of the area where the power grid is located; based on the current acquisition data, using a load prediction model to obtain a load prediction result of the power grid in the prediction period, where the prediction period is a period after the current period, and the load prediction model includes a temporal convolutional network and a bidirectional gated recurrent network; where the load prediction model is obtained through machine learning based on historical acquisition data and actual load results respectively acquired in multiple historical periods, and the historical acquisition data includes historical load data acquired in the corresponding historical period and historical weather data of the area where the power grid is located.
[0111] The order of the above embodiments of the present invention is only for description and does not represent the advantages or disadvantages of the embodiments.
[0112] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0113] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the above module division can be a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of modules or modules can be in an electrical or other form.
[0114] The modules described above as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] In addition, in each embodiment of the present invention, the functional modules can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0116] If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable non-volatile 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 this technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The aforementioned non-volatile storage media include: USB flash drives, read-only memories (ROMs), random access memories (RAMs), external hard drives, magnetic disks, or optical discs and other various media that can store program codes.
[0117] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for predicting power grid load, characterized in that: include: Acquire current collected data of the power grid collected in the current period, wherein the current collected data includes current load data of the power grid in the current period and current weather data of the area where the power grid is located; Based on the currently collected data, a load forecasting model is used to obtain a load forecasting result of the power grid in a forecasting period, wherein the forecasting period is a period after the current period, and the load forecasting model includes a time convolutional network and a bidirectional gated recurrent network; Among them, the load forecasting model is obtained through machine learning based on historical collection data and actual load results collected in multiple historical time periods. The historical collection data includes historical load data collected in corresponding historical time periods and historical weather data of the area where the power grid is located.
2. The method according to claim 1, characterized in that Before obtaining the load forecast result of the power grid in the forecast period by using the load forecast model based on the current load data and the current weather data, the method further includes: Performing feature extraction on the historical data collected in the multiple historical time periods to obtain multiple electrical features and feature data sets corresponding to the multiple historical time periods, wherein the feature data sets include feature values corresponding to the multiple electrical features collected in the corresponding historical time periods; Based on the characteristic data sets corresponding to the multiple historical time periods, and the actual load results corresponding to the multiple historical time periods, the initial model is trained until a predetermined termination condition is reached; The load forecasting model is determined based on the trained model outputted when the predetermined termination condition is reached.
3. The method according to claim 2, characterized in that The feature extraction is performed on the historical data collected in the multiple historical time periods to obtain multiple electrical features, including: Based on the historical collection data and actual load results collected in multiple historical periods, the maximum information coefficient method is used to determine the correlation coefficients between the multiple initial features and the actual load results, wherein the historical collection data collected in each historical period includes the characteristic values corresponding to the multiple initial features collected in the corresponding historical period; The plurality of electrical features are determined from the plurality of initial features based on correlation coefficients between the plurality of initial features and actual load results, wherein the number of the plurality of electrical features is smaller than the number of the plurality of initial features.
4. The method according to claim 3, characterized in that The method further comprises: Using the initial hyperparameters of the initial model as particles included in the population, constructing an initial population; In the process of training the initial model, the initial population is optimized using a red-tailed hawk algorithm to obtain an optimized population; The hyperparameters of the load forecasting model are determined based on the hyperparameters included in the optimized population when the predetermined termination condition is reached.
5. The method according to claim 3, characterized in that: The method further comprises: In the process of training the initial model, determining a first prediction error between a prediction result output by a temporal convolutional network in the initial model and an actual load result, and a second prediction error between a prediction result output by a bidirectional gated recurrent network in the initial model and an actual load result; Based on the inverse of the first prediction error and the inverse of the second prediction error, determining a third weight value corresponding to the temporal convolutional network in the initial model and a fourth weight value corresponding to the bidirectional gated recurrent network in the initial model; Determining a first weight value corresponding to the temporal convolutional network in the load forecasting model based on a third weight value output when the predetermined termination condition is reached; Based on the fourth weight value output when the predetermined termination condition is reached, a second weight value corresponding to the bidirectional gated cyclic network in the load forecasting model is determined.
6. The method according to claim 1, characterized in that The method of obtaining a load forecast result of the power grid in a forecast period based on the currently collected data and using a load forecast model includes: Extracting features from the currently collected data to obtain current feature values corresponding to a plurality of power features; Based on the current feature values respectively corresponding to the multiple power features, a temporal convolutional network in the load prediction model is used to obtain a first prediction result; Based on the current characteristic values respectively corresponding to the multiple power characteristics, a bidirectional gated cyclic network in the load prediction model is used to obtain a second prediction result; The load forecast result is obtained based on the first forecast result and the second forecast result.
7. The method according to claim 6, characterized in that The step of obtaining the load forecast result based on the first forecast result and the second forecast result includes: Obtaining a first weight value corresponding to a temporal convolutional network in the load forecasting model and a second weight value corresponding to a bidirectional gated recurrent network in the load forecasting model; The load forecast result is obtained by performing weighted calculation based on the first forecast result, the second forecast result, the first weight value and the second weight value.
8. A power grid load prediction device, characterized in that: include: An acquisition module is used to acquire the current collected data of the power grid collected in the current period, wherein the current collected data includes the current load data of the power grid in the current period, and the current weather data of the area where the power grid is located; The prediction module is used to obtain the load prediction result of the power grid in the prediction period based on the current collected data and the load prediction model, wherein the prediction period is the period after the current period, and the load prediction model includes a time convolution network and a bidirectional gated recurrent network; wherein the load prediction model is based on the historical collection data and actual load results collected in multiple historical periods, and is obtained through machine learning, and the historical collection data includes the historical load data collected in the corresponding historical period, and the historical weather data of the area where the power grid is located.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the power grid load forecasting method described in any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the power grid load forecasting method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Power load prediction method and system based on combined mining model
CN110245801A
Method for short-term load actual prediction based on CNN-LSTM and light GBM dynamic weighted fusion model
CN117474151A
Short-term power load prediction method
CN118174294A
Power system load prediction method, equipment, medium and product
CN118735293A