Short-term power load prediction method and device
By adopting a neural network model in short-term power load prediction, combining the bidirectional gating cycle unit layer, attention mechanism layer and chaotic game optimization algorithm, the problem of insufficient accuracy in the existing methods is solved, and higher prediction accuracy and stronger generalization capabilities are achieved.
Patent Information
- Application Number
- CN202510201393.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-20
AI Technical Summary
The existing short-term power load prediction methods have insufficient accuracy, especially the classical traditional methods and a single intelligent prediction method cannot meet the complex needs of modern power systems.
A short-term power load prediction method based on neural network is proposed, using the bidirectional gating cyclic unit layer and attention mechanism layer, combining the chaotic game optimization algorithm to optimize neural network parameters, and construct a CGO-BiGRU-Attention model to improve prediction accuracy.
Through this method, the accuracy of short-term power load prediction can be significantly improved, the problems of poor stability and insufficient prediction accuracy of a single time series are overcome, and a more accurate and stable load prediction model is provided, which improves the efficiency and economics of the generator set.
Smart Images

Figure CN120184908A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric load, and particularly to a short-term electric load forecasting method and device. Background Art
[0002] The accuracy of electric load forecasting is an important prerequisite for ensuring the dispatching security, planning rationality, and operation economy of the power system. The forecasting work not only affects the overall quality of the power plan but also has a direct impact on the normal operation of the power grid. The accuracy of electric load forecasting directly affects the investment and construction scale of the power grid planning for the construction of the power system and the power grid. Short-term electric load forecasting can provide a basis for power plants to arrange the next day's power generation plan.
[0003] Currently, the methods for short-term load forecasting are basically divided into two categories: classical traditional methods and intelligent forecasting methods. The classical methods mainly include regression analysis method, time series method, similar day method, etc.; the intelligent forecasting methods include: expert system method, support vector machine method, neural network method, etc. With the development of the industry, the classical traditional methods and single intelligent forecasting methods can no longer meet the forecasting needs, and there are problems such as low forecasting accuracy. Summary of the Invention
[0004] In view of at least one problem in the prior art, the present application proposes a short-term electric load forecasting method and device, which can improve the accuracy of short-term electric load forecasting.
[0005] To solve the above technical problems, the present application provides the following technical solutions:
[0006] In a first aspect, the present application provides a short-term electric load forecasting method, including:
[0007] Obtaining the electricity load and environmental information of the target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type;
[0008] Determining the short-term electric load forecasting value of the target area according to the electricity load, environmental information, and a preset short-term electric load forecasting model;
[0009] Wherein, the short-term electric load forecasting model is pre-trained for a neural network model based on a batch of training samples and their respective corresponding actual short-term electric loads. Each training sample includes: historical electricity load and historical environmental information, and the neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0010] In an embodiment, the short-term electric load forecasting method further includes:
[0011] Collecting a batch of training samples and their respective corresponding actual short-term electric loads;
[0012] The neural network model is trained using a batch of training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model.
[0013] In one embodiment, the training of the neural network model using a batch of training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model includes:
[0014] Optimizing the hyperparameters in the bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch of training samples to obtain a bidirectional gated recurrent unit layer with optimized hyperparameters, where the hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times;
[0015] The bidirectional gated recurrent unit layer with optimized hyperparameters and the attention mechanism layer are trained using a batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the short-term power load prediction model is obtained.
[0016] In one embodiment, the training of the neural network model using a batch of training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model includes:
[0017] Optimizing the first hyperparameters in the first bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch of training samples to obtain a first bidirectional gated recurrent unit layer with optimized hyperparameters, where the first hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times;
[0018] Optimizing the second hyperparameters of the convolutional neural network layer according to the chaotic game optimization algorithm and the batch of training samples to obtain a convolutional neural network layer with optimized hyperparameters, where the second hyperparameters include: the learning rate, the convolutional kernel size, and the number of convolutional layers;
[0019] The first sub-neural network model is trained using a batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the trained first sub-neural network model is obtained. The second sub-neural network model is trained using a batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the trained second sub-neural network model is obtained;
[0020] The short-term power load forecasting model includes: a trained first sub-neural network model and a second sub-neural network model. The first sub-neural network model includes: an attention mechanism layer and a first bidirectional gated recurrent unit layer with optimized hyperparameters. The second sub-neural network model includes: an attention mechanism layer, a second bidirectional gated recurrent unit layer, and a convolutional neural network layer with optimized hyperparameters. The hyperparameters of the second bidirectional gated recurrent unit layer are the same as those of the first bidirectional gated recurrent unit layer with optimized hyperparameters.
[0021] In one embodiment, determining the short-term power load forecasting value of the target area according to the power consumption load, environmental information, and a preset short-term power load forecasting model includes:
[0022] Inputting the power consumption load and environmental information into the trained first sub-neural network model, and determining the output result of the trained first sub-neural network model as the first short-term power load forecasting value;
[0023] Inputting the power consumption load and environmental information into the trained second sub-neural network model, and determining the output result of the trained second sub-neural network model as the second short-term power load forecasting value;
[0024] Determining the average value of the first short-term power load forecasting value and the second short-term power load forecasting value as the short-term power load forecasting value of the target area.
[0025] In a second aspect, the present application provides a short-term power load forecasting device, including:
[0026] An acquisition module, configured to acquire the power consumption load and environmental information of the target area. The environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type;
[0027] A determination module, configured to determine the short-term power load forecasting value of the target area according to the power consumption load, environmental information, and a preset short-term power load forecasting model;
[0028] Wherein, the short-term power load forecasting model is pre-trained on a neural network model based on a batch of training samples and their respective corresponding actual short-term power loads. Each training sample includes: historical power consumption load and historical environmental information. The neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0029] In one embodiment, the short-term power load forecasting device further includes:
[0030] A collection module, configured to collect a batch of training samples and their respective corresponding actual short-term power loads;
[0031] A training module for training the neural network model using batch training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model.
[0032] In one embodiment, the training module includes:
[0033] A first optimization unit for optimizing the hyperparameters in the bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and batch training samples to obtain a bidirectional gated recurrent unit layer with optimized hyperparameters, where the hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times;
[0034] A first training unit for training the bidirectional gated recurrent unit layer with optimized hyperparameters and the attention mechanism layer using batch training samples and their respective corresponding actual short-term power loads, and when the number of training times reaches the target number of training times, obtaining the short-term power load prediction model.
[0035] In one embodiment, the training module includes:
[0036] A second optimization unit for optimizing the first hyperparameters in the first bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and batch training samples to obtain a first bidirectional gated recurrent unit layer with optimized hyperparameters, where the first hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times;
[0037] A third optimization unit for optimizing the second hyperparameters in the convolutional neural network layer according to the chaotic game optimization algorithm and batch training samples to obtain a convolutional neural network layer with optimized hyperparameters, where the second hyperparameters include: the learning rate, the convolutional kernel size, and the number of convolutional layers;
[0038] A second training unit for training the first sub-neural network model using batch training samples and their respective corresponding actual short-term power loads, and when the number of training times reaches the target number of training times, obtaining the trained first sub-neural network model, and training the second sub-neural network model using batch training samples and their respective corresponding actual short-term power loads, and when the number of training times reaches the target number of training times, obtaining the trained second sub-neural network model;
[0039] The short-term power load prediction model includes: the trained first sub-neural network model and the second sub-neural network model. The first sub-neural network model includes: an attention mechanism layer and a first bidirectional gated recurrent unit layer with optimized hyperparameters. The second sub-neural network model includes: an attention mechanism layer, a second bidirectional gated recurrent unit layer, and a convolutional neural network layer with optimized hyperparameters. The hyperparameters of the second bidirectional gated recurrent unit layer are the same as those of the first bidirectional gated recurrent unit layer with optimized hyperparameters.
[0040] In one embodiment, the determining module includes:
[0041] A first determining unit, configured to input the electricity load and environmental information into a trained first sub-neural network model, and determine the output result of the trained first sub-neural network model as the first short-term electricity load prediction value;
[0042] A second determining unit, configured to input the electricity load and environmental information into a trained second sub-neural network model, and determine the output result of the trained second sub-neural network model as the second short-term electricity load prediction value;
[0043] A third determining unit, configured to determine the average value of the first short-term electricity load prediction value and the second short-term electricity load prediction value as the short-term electricity load prediction value of the target area.
[0044] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the short-term electricity load prediction method described above is implemented.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the short-term electricity load prediction method described above is implemented.
[0046] As can be seen from the above technical solutions, the present application provides a short-term electricity load prediction method and device. Among them, the method includes: obtaining the electricity load and environmental information of a target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type; determining the short-term electricity load prediction value of the target area according to the electricity load, environmental information, and a preset short-term electricity load prediction model; where the short-term electricity load prediction model is pre-trained on a neural network model based on a batch of training samples and their respective corresponding actual short-term electricity loads. Each training sample includes: historical electricity load and historical environmental information. The neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer, which can improve the accuracy of short-term electricity load prediction; specifically, a chaotic game optimization algorithm can be used to optimize the neural network parameters to avoid falling into local optimal values, and at the same time, an attention mechanism is added to strengthen the connection between data, and a short-term electricity load prediction model based on CGO-BiGRU-Attention is constructed, which can overcome problems such as large computational complexity and coding limitations of one-hot encoding, can effectively improve the modeling accuracy, can provide a more accurate and stable model for load prediction, and improve the efficiency and economy of the generator set. Description of the Drawings
[0047] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0048] Figure 1 is the first process schematic diagram of the short-term power load forecasting method in the embodiments of the present application;
[0049] Figure 2 is the second process schematic diagram of the short-term power load forecasting method in the embodiments of the present application;
[0050] Figure 3 is the third process schematic diagram of the short-term power load forecasting method in the embodiments of the present application;
[0051] Figure 4 is the logical schematic diagram of the neural network model in an example of the present application;
[0052] Figure 5 is the logical schematic diagram of the neural network model in another example of the present application;
[0053] Figure 6 is the first structural schematic diagram of the short-term power load forecasting device in the embodiments of the present application;
[0054] Figure 7 is the second structural schematic diagram of the short-term power load forecasting device in the embodiments of the present application;
[0055] Figure 8 is the system composition schematic block diagram of the electronic device in the embodiments of the present application. Detailed implementation manners
[0056] To enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of the present application based on the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0057] Existing power load forecasting methods include: obtaining power system data; preprocessing and multi-source data fusion processing of the power system data; using a variational mode decomposition model to decompose the original time series according to the preprocessed and multi-source data fusion processed power system data, wherein an improved sparrow search algorithm is used to optimize the parameters of the variational mode decomposition model; constructing a power load forecasting model according to a gated recurrent unit and an attention mechanism, and forecasting the power load according to the decomposed subsequences by using the power load forecasting model.
[0058] However, the above existing power load forecasting methods perform one-hot encoding on the factors affecting the change of power load. However, not all of these influencing factors can be simply classified and processed. For example, temperature, humidity, calendar, economic situation, etc. If these factors are forced to be classified according to one-hot encoding, it is not only difficult to accurately reflect the data characteristics, but also will occupy a large amount of computing space, slow down the computing speed, affect the forecasting of short-term load, and the practicability is poor.
[0059] To solve the problems existing in the above existing problems, the present application provides a short-term power load forecasting method and device, which can perform neural network modeling based on a chaotic game optimization algorithm and an attention mechanism, and integrate the outputs of each time series by using the attention mechanism, which overcomes the problems of poor stability and insufficient forecasting accuracy of a single time series to a certain extent; the short-term power load forecasting model established by using a neural network model based on a chaotic game optimization algorithm and an attention mechanism has higher fitting accuracy and stronger generalization ability.
[0060] The short-term power load forecasting method and device provided in the embodiments of the present application can avoid the problem that the parameter setting of the neural network often relies on the empirical method and is not rigorous. After the chaotic game optimization algorithm optimizes the network parameters, it can not only give better network parameters, but also give a theoretical basis for parameter selection; the attention mechanism can be combined with the algorithm to re-integrate the output of the neural network, which can effectively avoid the situation where a single data deviation is too large, improve the forecasting accuracy; and can also effectively reduce the risk of falling into local optimum.
[0061] Specifically, it is described through the following various embodiments.
[0062] To improve the accuracy of short-term power load forecasting, this embodiment provides a short-term power load forecasting method whose execution subject is a short-term power load forecasting device. The short-term power load forecasting device includes but is not limited to a server, such as Figure 1 shown, and the method specifically includes the following content:
[0063] Step 100: Obtain the power consumption load and environmental information of the target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type.
[0064] Specifically, the environmental information may further include: daily temperature difference, humidity change rate, seasonal indicators, etc. The date types may include: working days and holidays; the seasonal indicators may include: spring, summer, autumn, and winter. The unit of the electricity load may be MW.
[0065] Step 200: Determine the short-term electricity load prediction value of the target area according to the electricity load, environmental information, and a preset short-term electricity load prediction model; wherein, the short-term electricity load prediction model is pre-trained for a neural network model based on a batch of training samples and their respective corresponding actual short-term electricity loads. Each training sample includes: historical electricity load and historical environmental information, and the neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0066] Specifically, the electricity load and environmental information may be input into a preset short-term electricity load prediction model, and the output result of the preset short-term electricity load prediction model may be determined as the short-term electricity load prediction value of the target area; it can be understood that: the historical electricity load may represent the electricity load obtained before obtaining the electricity load and environmental information of the target area, and the historical environmental information may represent the environmental information obtained before obtaining the electricity load and environmental information of the target area.
[0067] To improve the reliability of the training of the short-term electricity load prediction model, and further improve the accuracy of predicting the short-term electricity load using the short-term electricity load prediction model, as Figure 2 shown, in an embodiment of the present application, the short-term electricity load prediction method further includes:
[0068] Step 001: Collect a batch of training samples and their respective corresponding actual short-term electricity loads.
[0069] Step 002: Train the neural network model using the batch of training samples and their respective corresponding actual short-term electricity loads to obtain the short-term electricity load prediction model.
[0070] To avoid the problems of poor stability and insufficient prediction accuracy of a single time series, and improve the fitting accuracy and generalization ability, as Figure 3 shown, in an embodiment, Step 002 includes:
[0071] Step 021: Optimize the hyperparameters in the bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch of training samples to obtain a bidirectional gated recurrent unit layer with optimized hyperparameters. The hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times.
[0072] Step 022: Use the batch training samples and their respective corresponding actual short-term power loads to train the bidirectional gated recurrent unit layer and the attention mechanism layer after the hyperparameters are optimized. When the number of training times reaches the target number of training times, the short-term power load prediction model is obtained.
[0073] Specifically, in this embodiment, the attention mechanism can be used to integrate the outputs of each time series. The short-term power load prediction model established based on the Chaos Game Optimization (CGO) algorithm and the attention mechanism has higher fitting accuracy and stronger generalization ability. For example, Figure 4 As shown, in an example, the neural network model may include: an input layer, a BiGRU layer, an Attention layer, and an output layer. The CGO algorithm can be used to optimize the hyperparameters of the BiGRU layer.
[0074] Further, after the training is completed, it can be determined whether the accuracy of the short-term power load prediction model is greater than the accuracy threshold. If not, the hyperparameters in the bidirectional gated recurrent unit layer can be optimized again, and the batch training samples and their respective corresponding actual short-term power loads are used to train the bidirectional gated recurrent unit layer and the attention mechanism layer after the hyperparameters are optimized again until the accuracy of the short-term power load prediction model is greater than the accuracy threshold.
[0075] To further improve the reliability of the short-term power load prediction model, in one embodiment, step 002 includes:
[0076] Step 121: Optimize the first hyperparameters in the first bidirectional gated recurrent unit layer according to the chaos game optimization algorithm and the batch training samples to obtain the first bidirectional gated recurrent unit layer with optimized hyperparameters. The first hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times.
[0077] Specifically, the first hyperparameters in the first bidirectional gated recurrent unit layer can represent the hyperparameters in the bidirectional gated recurrent unit layer of the first sub-neural network model. The target number of training times can represent the number of training times in the first hyperparameters.
[0078] Step 122: Optimize the second hyperparameters of the convolutional neural network layer according to the chaos game optimization algorithm and the batch training samples to obtain the convolutional neural network layer with optimized hyperparameters. The second hyperparameters include: the learning rate, the convolutional kernel size, and the number of convolutional layers.
[0079] Specifically, the second hyperparameters of the convolutional neural network layer can represent the hyperparameters in the convolutional neural network layer of the second sub-neural network model.
[0080] Step 123: Train the first sub-neural network model using the batch training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, obtain the trained first sub-neural network model. Train the second sub-neural network model using the batch training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, obtain the trained second sub-neural network model; the short-term power load prediction model includes: the trained first sub-neural network model and the second sub-neural network model. The first sub-neural network model includes: an attention mechanism layer and a first bidirectional gated recurrent unit layer with optimized hyperparameters. The second sub-neural network model includes: an attention mechanism layer, a second bidirectional gated recurrent unit layer, and a convolutional neural network layer with optimized hyperparameters. The hyperparameters of the second bidirectional gated recurrent unit layer are the same as those of the first bidirectional gated recurrent unit layer with optimized hyperparameters. Figure 5 It is a logical schematic diagram of a short-term power load prediction model in an example of this application.
[0081] Specifically, the second bidirectional gated recurrent unit layer is the bidirectional gated recurrent unit layer in the second sub-neural network model. The hyperparameters of the second GRU layer are the same as those of the first GRU layer, that is, the optimization effects are the same.
[0082] To further improve the reliability of short-term power load prediction, in one embodiment, step 002 includes:
[0083] Step 221: Input the power consumption load and environmental information into the trained first sub-neural network model, and determine the output result of the trained first sub-neural network model as the first short-term power load prediction value.
[0084] Step 222: Input the power consumption load and environmental information into the trained second sub-neural network model, and determine the output result of the trained second sub-neural network model as the second short-term power load prediction value.
[0085] Step 223: Determine the average value of the first short-term power load prediction value and the second short-term power load prediction value as the short-term power load prediction value of the target area.
[0086] To further illustrate this solution, this application provides an application example of a short-term power load prediction method, which is specifically described as follows:
[0087] For an observation data sample set D = {(Xi, Yi)|i = 1, 2, 3,..., N} with a data scale of N, where X i = [x i1 , x i2 , …, x im ∈ R mis an input variable with dimension m; i ∈R is a single-dimensional output variable. Before building the model, the observation data is first divided into two parts: training data set D tr ={(X tr ,Y tr )|tr=1,2,…,N tr}, and the test data set D te ={(X te ,Y te )|te=1,2,…,N te},N=N te +N tr The training data is used to train the model parameters, specifically, to select the number of hidden neurons, the number of hidden layers, and the number of training times of the model that optimizes the model accuracy and generalization ability. The test data is used to verify the prediction accuracy of the model.
[0088] Step 1: Select modeling data, including meteorological factors (such as daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, etc.) and calendar information, that is, 6 parameters can be selected as auxiliary variables of the load forecasting model: power load (MW), daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity and date type (working day / holiday). With the 6 auxiliary variable parameters as input variables and future load data as output variables, a data-driven short-term power load forecasting model is established. Perform data anomaly detection processing, remove abnormal data, process the missing parts by interpolation, and standardize the data samples according to the following formula:
[0089]
[0090] in These are the maximum and minimum values of the mth dimension of the input data, respectively.
[0091] Specifically, CGO optimizes the three hyperparameters of the BiGRU layer: the number of hidden neurons, the number of hidden layers, and the number of training times. The optimized parameters are used as parameters of the neural network layer to participate in the final calculation. After the input data passes through the neural network layer, the attention mechanism is used to redistribute the weights of all outputs in order to achieve better prediction results.
[0092] Step 2: Determine the optimal hyperparameters of the BiGRU layer. Step 2 includes:
[0093] Step 2.1: Use CGO to randomly initialize the neural network hyperparameters within the search space, and use the random selection method to define the initial position of the candidate solution X or the initial qualified point in the search space. The algorithm initialization formula is as follows:
[0094] xim (0) = x im,min + rand.(x im,max - x im,min )
[0095] Step 2.2: Using the training dataset as input, calculate the fitness value of the initial candidate solution according to the self - similarity of the initial qualified points, and determine the global best qualified point and the global optimal value GB. Use the mean square error (MSE) as the fitness function of CGO.
[0096]
[0097] For each qualified point X in the search space i , the average value of the initial qualified points MG determined by the random selection process i , use three vertices X i , MG i , GB to determine a temporary triangle. For each temporary triangle, the four seed positions are updated according to the following formula:
[0098] First seed position update:
[0099]
[0100] where α i is a randomly generated matrix used to simulate the movement position limit of the seeds, while β i and γ i represent random integers of 0 or 1.
[0101] Second seed position update:
[0102]
[0103] Third seed position update:
[0104]
[0105] Fourth seed position update:
[0106]
[0107] where k is a random integer vector in [1, d]. R is a uniformly distributed random number in [0, 1]. To control and adjust the exploration and exploitation speed of the proposed new CGO algorithm, α i can be determined according to the following formula:
[0108]
[0109] Step 2.3: Re-evaluate the seed position after the update and update the fitness value. Determine whether the maximum number of iterations is satisfied. If it is satisfied, output the optimal position and the global optimal solution. Otherwise, return to Step 2.2 for iterative calculation again.
[0110] Step 3: Use the global optimal solution selected in the previous step as the parameters of the final model, input the input data in the test dataset into the model, and calculate the model output: Perform inverse normalization processing according to the following formula, and denote the processed output value as:
[0111]
[0112] Y max and Y min are the maximum and minimum values of the output data in sequence.
[0113] Step 4: To accurately evaluate the performance of the proposed model, the mean absolute percentage error (MAPE) and the accuracy rate A are used as evaluation criteria:
[0114]
[0115] Regarding the power plants with a load less than 1GW, a prediction accuracy rate higher than 93% is regarded as qualified.
[0116] From the software level, in order to improve the accuracy of short-term power load forecasting, this application provides an embodiment of a short-term power load forecasting device for implementing all or part of the content in the short-term power load forecasting method. Refer to Figure 6 The short-term power load forecasting device specifically includes the following content:
[0117] An acquisition module 01, configured to acquire the power consumption load and environmental information of the target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type;
[0118] A determination module 02, configured to determine the short-term power load forecasting value of the target area according to the power consumption load, environmental information, and a preset short-term power load forecasting model; wherein, the short-term power load forecasting model is pre-trained for a neural network model based on a batch of training samples and their respective corresponding actual short-term power loads. Each training sample includes: historical power consumption load and historical environmental information, and the neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0119] As Figure 7 shown, in one embodiment, the short-term power load forecasting device further includes:
[0120] The acquisition module 03 is used to acquire a batch of training samples and their respective corresponding actual short-term power loads.
[0121] The training module 04 is used to train the neural network model with the batch of training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model.
[0122] In one embodiment, the training module includes:
[0123] The first optimization unit is used to optimize the hyperparameters in the bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch of training samples to obtain the bidirectional gated recurrent unit layer with optimized hyperparameters. The hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times.
[0124] The first training unit is used to train the bidirectional gated recurrent unit layer with optimized hyperparameters and the attention mechanism layer with the batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the short-term power load prediction model is obtained.
[0125] In one embodiment, the training module includes:
[0126] The second optimization unit is used to optimize the first hyperparameters in the first bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch of training samples to obtain the first bidirectional gated recurrent unit layer with optimized hyperparameters. The first hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times.
[0127] The third optimization unit is used to optimize the second hyperparameters in the convolutional neural network layer according to the chaotic game optimization algorithm and the batch of training samples to obtain the convolutional neural network layer with optimized hyperparameters. The second hyperparameters include: the learning rate, the convolutional kernel size, and the number of convolutional layers.
[0128] The second training unit is used to train the first sub-neural network model with the batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the trained first sub-neural network model is obtained. The second sub-neural network model is trained with the batch of training samples and their respective corresponding actual short-term power loads. When the number of training times reaches the target number of training times, the trained second sub-neural network model is obtained.
[0129] The short-term electric load forecasting model includes: a trained first sub-neural network model and a second sub-neural network model. The first sub-neural network model includes: an attention mechanism layer and a first bidirectional gated recurrent unit layer with optimized hyperparameters. The second sub-neural network model includes: an attention mechanism layer, a second bidirectional gated recurrent unit layer, and a convolutional neural network layer with optimized hyperparameters. The hyperparameters of the second bidirectional gated recurrent unit layer are the same as those of the first bidirectional gated recurrent unit layer with optimized hyperparameters.
[0130] In one embodiment, the determination module includes:
[0131] A first determination unit, configured to input the electricity load and environmental information into the trained first sub-neural network model, and determine the output result of the trained first sub-neural network model as the first short-term electric load forecasting value;
[0132] A second determination unit, configured to input the electricity load and environmental information into the trained second sub-neural network model, and determine the output result of the trained second sub-neural network model as the second short-term electric load forecasting value;
[0133] A third determination unit, configured to determine the average value of the first short-term electric load forecasting value and the second short-term electric load forecasting value as the short-term electric load forecasting value of the target area.
[0134] The embodiments of the short-term electric load forecasting device provided in this specification can specifically be used to execute the processing procedures of the embodiments of the above short-term electric load forecasting method. Their functions will not be elaborated here, and reference can be made to the detailed descriptions of the embodiments of the above short-term electric load forecasting method.
[0135] From the hardware level, in order to improve the accuracy of short-term electric load forecasting, the present application provides an embodiment of an electronic device for implementing all or part of the content in the above short-term electric load forecasting method. The electronic device specifically includes the following:
[0136] A processor, a memory, a communications interface, and a bus; wherein, the processor, the memory, and the communications interface complete communication with each other through the bus; the communications interface is used to implement information transmission between the short-term electric load forecasting device and related devices such as user terminals. The electronic device can be a desktop computer, a tablet computer, a mobile terminal, etc., and this embodiment is not limited thereto. In this embodiment, the electronic device can be implemented with reference to the embodiments for implementing the short-term electric load forecasting method and the embodiments for implementing the short-term electric load forecasting device, and their content is incorporated herein, and the repeated parts will not be elaborated.
[0137] Figure 8 This is a schematic block diagram of the system composition of the electronic device 9600 according to an embodiment of the present application. As Figure 8 shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It should be noted that this Figure 8 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0138] In one or more embodiments of the present application, the short-term power load forecasting function may be integrated into the central processing unit 9100. Among them, the central processing unit 9100 may be configured to perform the following controls:
[0139] Step 100: Obtain the power consumption load and environmental information of the target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type;
[0140] Step 200: Determine the short-term power load forecasting value of the target area according to the power consumption load, environmental information, and a preset short-term power load forecasting model; where the short-term power load forecasting model is pre-trained for a neural network model based on a batch of training samples and their respective corresponding actual short-term power loads, and each training sample includes: historical power consumption load and historical environmental information, and the neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0141] From the above description, it can be seen that the electronic device provided by the embodiment of the present application can improve the accuracy of short-term power load forecasting.
[0142] In another embodiment, the short-term power load forecasting device may be separately configured from the central processing unit 9100. For example, the short-term power load forecasting device may be configured as a chip connected to the central processing unit 9100, and the short-term power load forecasting function is implemented through the control of the central processing unit.
[0143] As Figure 8 shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It should be noted that the electronic device 9600 does not necessarily have to include Figure 8 all the components shown in; in addition, the electronic device 9600 may further include Figure 8 components not shown in, and reference may be made to the prior art.
[0144] As Figure 8As shown, the central processing unit 9100, sometimes also referred to as a controller or operation control, may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives inputs and controls the operations of the various components of the electronic device 9600.
[0145] Among them, the memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices. It can store the above information related to failures, and can also store programs for executing relevant information. And the central processing unit 9100 can execute the programs stored in the memory 9140 to achieve information storage or processing, etc.
[0146] The input unit 9120 provides inputs to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to supply power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display can be, for example, an LCD display, but is not limited thereto.
[0147] The memory 9140 can be a solid-state memory. For example, it can be a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It can also be a memory that stores information even when power is off, can be selectively erased, and has more data. Examples of such a memory are sometimes referred to as EPROMs, etc. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 can include an application / function storage section 9142, which is used to store application programs and function programs or the processes for operating the electronic device 9600 through the central processing unit 9100.
[0148] The memory 9140 can also include a data storage section 9143, which is used to store data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage section 9144 of the memory 9140 can include various drivers of the electronic device for communication functions and / or for executing other functions of the electronic device (such as a messaging application, an address book application, etc.).
[0149] The communication module 9110 is a transmitter / receiver that transmits and receives signals via the antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in the case of a conventional mobile communication terminal.
[0150] Based on different communication technologies, in the same electronic device, multiple communication modules 9110 can be provided, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, so as to implement normal telecommunication functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers, etc. In addition, the audio processor 9130 is also coupled to a central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0151] As can be seen from the above description, the electronic device provided by the embodiment of the present application can improve the accuracy of short-term power load forecasting.
[0152] The embodiment of the present application also provides a computer-readable storage medium capable of implementing all the steps in the short-term power load forecasting method in the above embodiment. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the short-term power load forecasting method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0153] Step 100: Obtain the power consumption load and environmental information of the target area, where the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity, and date type;
[0154] Step 200: Determine the short-term power load forecasting value of the target area according to the power consumption load, environmental information, and a preset short-term power load forecasting model; wherein, the short-term power load forecasting model is pre-trained for a neural network model based on a batch of training samples and their respective corresponding actual short-term power loads. Each training sample includes: historical power consumption load and historical environmental information, and the neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
[0155] As can be seen from the above description, the computer-readable storage medium provided by the embodiment of the present application can improve the accuracy of short-term power load forecasting.
[0156] In the present application, the various embodiments of the above method are all described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. For the relevant parts, refer to the partial description of the method embodiment.
[0157] 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 completely hardware embodiment, a completely 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.) that contain computer-usable program code.
[0158] 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 or more of the flows Figure 1 or blocks or the combination of blocks.
[0159] 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 or more of the flows Figure 1 or blocks or the combination of blocks.
[0160] 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 performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.
[0161] Specific embodiments are applied in the present application to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A short-term power load forecasting method, characterized in that: include: Obtaining power load and environmental information of the target area, wherein the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity and date type; Determining a short-term power load forecast value of the target area according to the power load, environmental information and a preset short-term power load forecast model; Among them, the short-term power load forecasting model is obtained by pre-training the neural network model based on batch training samples and their corresponding actual short-term power loads. Each training sample includes: historical power load and historical environmental information. The neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
2. The short-term power load forecasting method according to claim 1, characterized in that: Also includes: Collect batch training samples and their corresponding actual short-term power loads; The neural network model is trained using batch training samples and their respective corresponding actual short-term power loads to obtain the short-term power load prediction model.
3. The short-term power load forecasting method according to claim 2, characterized in that: The applying batch training samples and their respective corresponding actual short-term power loads to train the neural network model to obtain the short-term power load forecasting model includes: Optimizing the hyperparameters in the bidirectional gated recurrent unit layer according to the chaotic game optimization algorithm and the batch training samples to obtain the bidirectional gated recurrent unit layer after hyperparameter optimization, wherein the hyperparameters include: the number of hidden neurons, the number of hidden layers and the target number of training times; Batch training samples and their corresponding actual short-term power loads are used to train the bidirectional gated recurrent unit layer and the attention mechanism layer after the hyperparameter optimization. When the number of training times reaches the target number of training times, the short-term power load prediction model is obtained.
4. The short-term power load forecasting method according to claim 2, characterized in that: The applying batch training samples and their respective corresponding actual short-term power loads to train the neural network model to obtain the short-term power load forecasting model includes: Optimizing a first hyperparameter in a first bidirectional gated recurrent unit layer according to a chaotic game optimization algorithm and batch training samples to obtain a first bidirectional gated recurrent unit layer after hyperparameter optimization, wherein the first hyperparameter includes: the number of hidden neurons, the number of hidden layers, and the target number of training times; Optimizing a second hyperparameter of the convolutional neural network layer according to the chaotic game optimization algorithm and the batch training samples to obtain a convolutional neural network layer after hyperparameter optimization, wherein the second hyperparameter includes: a learning rate, a convolution kernel size, and a number of convolution layers; The first sub-neural network model is trained by using the batch training samples and their respective corresponding actual short-term power loads, and when the number of training times reaches the target number of training times, the trained first sub-neural network model is obtained; the second sub-neural network model is trained by using the batch training samples and their respective corresponding actual short-term power loads, and when the number of training times reaches the target number of training times, the trained second sub-neural network model is obtained; The short-term power load forecasting model includes: a first sub-neural network model and a second sub-neural network model after training, the first sub-neural network model includes: an attention mechanism layer and a first bidirectional gated recurrent unit layer after hyperparameter optimization, the second sub-neural network model includes: an attention mechanism layer, a second bidirectional gated recurrent unit layer and a convolutional neural network layer after hyperparameter optimization, and the hyperparameters of the second bidirectional gated recurrent unit layer are the same as those of the first bidirectional gated recurrent unit layer after hyperparameter optimization.
5. The short-term power load forecasting method according to claim 4, characterized in that: Determining the short-term power load forecast value of the target area according to the power load, environmental information and a preset short-term power load forecast model includes: Inputting the power load and environmental information into a trained first sub-neural network model, and determining an output result of the trained first sub-neural network model as a first short-term power load forecast value; Inputting the power load and environmental information into the trained second sub-neural network model, and determining the output result of the trained second sub-neural network model as a second short-term power load forecast value; An average value of the first short-term power load forecast value and the second short-term power load forecast value is determined as the short-term power load forecast value of the target area.
6. A short-term power load forecasting device, characterized in that: include: An acquisition module is used to acquire the power load and environmental information of the target area, wherein the environmental information includes: daily maximum temperature, daily minimum temperature, daily average temperature, relative humidity and date type; A determination module, configured to determine a short-term power load forecast value of the target area according to the power load, environmental information and a preset short-term power load forecast model; Among them, the short-term power load forecasting model is obtained by pre-training the neural network model based on batch training samples and their corresponding actual short-term power loads. Each training sample includes: historical power load and historical environmental information. The neural network model includes: a bidirectional gated recurrent unit layer and an attention mechanism layer.
7. The short-term power load forecasting device according to claim 6, characterized in that: Also includes: A collection module, used for collecting batch training samples and their corresponding actual short-term power loads; The training module is used to train the neural network model using batch training samples and their corresponding actual short-term power loads to obtain the short-term power load prediction model.
8. The short-term power load forecasting device according to claim 7, characterized in that: The training module includes: A first optimization unit is used to optimize the hyperparameters in the bidirectional gated recurrent unit layer according to a chaotic game optimization algorithm and batch training samples to obtain a bidirectional gated recurrent unit layer after hyperparameter optimization, wherein the hyperparameters include: the number of hidden neurons, the number of hidden layers, and the target number of training times; The first training unit is used to apply batch training samples and their respective corresponding actual short-term power loads to train the bidirectional gated recurrent unit layer and the attention mechanism layer after the hyperparameter optimization, and when the number of training times reaches the target number of training times, the short-term power load prediction model is obtained.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the short-term power load forecasting method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by the processor, the short-term power load forecasting method according to any one of claims 1 to 5 is implemented.
Citation Information
Cited By
Multi-element load short-term prediction system for power system
CN120933901A