Energy prediction control method and device based on deep learning, and storage medium

By integrating convolutional neural networks, long-term memory networks and deep learning models, and using meta-learning and online learning to update model parameters, the problem of insufficient prediction robustness of the power system under different environments and conditions is solved, and higher prediction accuracy and adaptability are achieved, ensuring the stable operation of the power grid and the effective utilization of renewable energy.

CN120073666APending Publication Date: 2025-05-30BAOWU CLEAN ENERGY CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202510036650.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When the prior art deals with power system predictions under different environments and conditions, the model is insufficient in robustness and adaptability, making it difficult to effectively deal with environmental changes and emergencies.

Method used

The prediction model integration module of the convolutional neural network CNN, the long and short-term memory network LSTM and the deep learning model Transformer are trained for training, and the model parameters and model weights are updated through meta-learning and online learning to improve the prediction ability and stability of the model.

Benefits of technology

It improves the prediction accuracy of photovoltaic and wind power generation and load demand, enhances the system's adaptability and stability under different environmental conditions, ensures the balance between supply and demand of the power grid and makes full use of renewable energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120073666A_ABST
    Figure CN120073666A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power, in particular to an energy prediction control method based on deep learning, and the method comprises the following steps: S1, collecting historical data, and preprocessing the historical data to obtain preprocessed data; s2, inputting the preprocessed data into a prediction model integration module for training, and updating model parameters and model weights through meta-learning and online learning to obtain a training model; and S3, collecting real-time data, inputting the data into the training model to obtain a prediction result, adjusting the photovoltaic output power, the wind power output power, the lithium battery output power and the hydrogen fuel battery output power according to the prediction result, and outputting a decision scheme. The prediction accuracy is improved through the prediction model integration module; the prediction capability and the stability under different environment conditions are ensured by meta learning and online learning; adjusting output power according to a prediction result to realize efficient scheduling; and the hydrogen production equipment and the energy storage system are effectively managed by outputting a decision scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power technology, and in particular, to an energy prediction control method, device, and storage medium based on deep learning. Background Art

[0002] With the global attention to renewable energy and environmental protection, the traditional power generation method mainly based on fossil fuels is gradually transforming, and clean energy technologies such as hydrogen fuel cells, energy storage systems, photovoltaic power generation, and wind power generation have been widely applied and studied. Clean energy power plants mainly rely on renewable energy (such as solar energy, wind energy, hydrogen energy, etc.) for power generation. These energies have the characteristics of intermittency and instability. Therefore, advanced prediction and control technologies are needed to optimize the operation of power generation and energy storage systems to ensure the stability and economy of power supply.

[0003] In recent years, deep learning and reinforcement learning technologies have shown great potential in the prediction and control of power systems. Deep learning can handle complex non-linear relationships and spatio-temporal dependencies, while reinforcement learning can optimize decision-making strategies through continuous environmental interactions. Currently, deep learning models (such as LSTM, CNN-LSTM) can handle complex spatio-temporal features and improve prediction accuracy, and have achieved remarkable results in load prediction and renewable energy power generation prediction. The model performs well on specific datasets, but its generalization ability may be insufficient under different environments and conditions, and more research is needed to improve the robustness and adaptability of the model. At the same time, environmental changes and emergencies (such as equipment failures, extreme weather, etc.) in actual power systems pose higher requirements for the adaptability of the model. Summary of the Invention

[0004] The purpose of the present invention is to solve the deficiencies existing in the prior art, and provide an energy prediction control method based on deep learning, including the following steps: S1: Collect historical data including historical photovoltaic power generation data, historical wind power data, and grid demand data, and preprocess the historical data to obtain preprocessed data; S2: Input the preprocessed data into a prediction model integration module including a convolutional neural network CNN, a long short-term memory network LSTM, and a deep learning model Transformer for training, and update the model parameters and model weights through meta-learning and online learning to obtain a trained model; S3: Collect real-time data including hydrogen fuel cell data and lithium battery data, input the real-time data into the trained model to obtain a prediction result, adjust the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result, and output a decision-making plan.

[0005] Preferably, in step S1, the historical photovoltaic power generation data, historical wind power data, hydrogen fuel cell data, lithium battery data, and grid demand data further include: The historical photovoltaic power generation data includes irradiance, temperature, and power generation; The historical wind power data includes wind speed, wind direction, and historical power generation; The grid demand data includes historical load data.

[0006] Preferably, in step S2, training the preprocessed data by inputting it into a prediction model integration module including a convolutional neural network CNN, a long short-term memory network LSTM, and a deep learning model Transformer is further as follows: The input layer of the convolutional neural network CNN receives the historical photovoltaic power generation data with a data dimension of (T, F), where T is the time step and F is the number of features including irradiance, temperature, and power generation. The convolutional layer performs convolution operations through filters in different time windows of the input historical photovoltaic power generation data to extract photovoltaic power generation features. The pooling layer reduces the dimension of the photovoltaic power generation features to obtain the reduced-dimensional features. The fully connected layer obtains the training convolution prediction result by non-linearly transforming the reduced-dimensional features; The long short-term memory network LSTM receives the historical wind power data and obtains the training memory prediction result through an input gate, a forget gate, and an output gate; The deep learning model Transformer receives the historical load data, weather information, and market demand data to obtain the training deep learning result and the current convolution model parameters.

[0007] Preferably, the long short-term memory network LSTM receives the historical wind power data and obtains the training memory prediction result through an input gate, a forget gate, and an output gate, which is further as follows: The long short-term memory network LSTM receives the historical wind power data. The input gate selects update information from the historical wind power data at the current time step and obtains a candidate value vector; The forget gate selects information to be discarded from the memory cell according to the hidden state at the current time step and the previous time step; Update the memory cell according to the update information, the candidate value vector, and the discarded information; The output gate outputs the hidden state at the current time step according to the updated memory cell; Obtain the training memory prediction result at the next time step and the current memory model parameters through the hidden state at the current time step.

[0008] Preferably, the deep learning model Transformer receives the historical load data, weather information, and market demand data to obtain a training deep learning result, specifically as follows: The multi-head attention mechanism of the deep learning model Transformer calculates the attention weights between different positions within the input sequence based on the historical load data, the weather information, and the market demand data, and outputs an attention result according to the attention weights; The multi-layer perceptron obtains the first non-linear feature based on the attention result; The first feed-forward neural network performs a non-linear transformation on the first non-characteristic feature to obtain a second non-linear feature. The calculation formula for the non-linear transformation is as follows: where x is the first non-characteristic feature, is the weight matrix of the first linear transformation layer, is the first bias, is the matrix of the second linear transformation layer, is the weight matrix of the second transformation layer.

[0009] The encoder combines the multi-head attention mechanism and the second feed-forward neural network, and adds a residual connection layer and normalization at each layer to process the second non-linear feature to obtain an encoding result; The encoding result is mapped through a fully connected layer to obtain the predicted load demand and the current deep model parameters; Using the mean square error MSE as the loss function to measure the difference between the predicted load demand and the historical load data, and obtaining a loss value; Mean square error MSE The calculation formula of is as follows: where, is the predicted load demand, is the historical load data, and n is the number of load data.

[0010] Preferably, the model parameters and model weights are updated through meta-learning and online learning, specifically as follows: Meta-learning MAML divides the convolutional neural network CNN task, the long short-term memory network LSTM task, and the deep learning model Transformer task into sub-tasks according to different weather conditions; Update the parameters on each sub-task through the inner loop to obtain the sub-task model parameters. The calculation formula is as follows: where, is the current model parameter, i.e., the current convolutional neural network (CN) filter parameter or long short-term memory network (LSTM) gating-related parameter or deep learning model Transformer weight, is the first learning rate, is the loss function is the gradient at the current parameter, and is the new sample data; Update the current model parameter according to the different weather conditions and all subtask losses, wherein, is the current model parameter, is the second learning rate, is all subtask losses, is the meta-learning update parameter; Update the momentum vector and the gradient cumulative squared direction vector wherein, is the momentum vector at the previous moment, is the first momentum parameter, is the gradient cumulative squared direction vector at the previous moment, is the second momentum parameter.

[0011] Calculate the momentum vector deviation correction and the gradient cumulative deviation correction : : According to the momentum vector deviation correction and the gradient cumulative deviation correction Obtain the updated model parameter : wherein, is i.e., the meta-learning model parameter, is the third learning rate, is a small constant to prevent division by zero.

[0012] Preferably, adjusting the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result includes: Set power supply constraint conditions and energy storage system capacity constraint conditions, and determine whether to adjust the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result, the power supply constraint conditions, and the energy storage system capacity constraint conditions; Among them, the power supply constraint conditions determine whether the power grid load demand is met during power supply, as follows: Among them, is the power grid demand value, is the output power of photovoltaic, wind power, hydrogen fuel cell, and lithium battery; The energy storage system capacity constraint determines whether the energy storage system capacity meets the requirements, as follows: Among them, is the hydrogen production content, is the hydrogen storage demand.

[0013] Preferably, an output decision scheme is included: If the prediction result exceeds the load demand and hydrogen storage demand, inject the excess power into the power grid; If the predicted power is in excess and the grid demand is met, use the excess power for the hydrogen production equipment to produce hydrogen; If the predicted power generation in the prediction result is insufficient and does not meet the grid demand, compensate by adjusting the lithium battery output power or the hydrogen fuel cell output power to meet the load demand and hydrogen demand.

[0014] A computer device, characterized in that it includes a memory and a processor, and computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor executes the steps of the energy prediction control method based on deep learning in an embodiment of the present invention.

[0015] A storage medium storing computer-readable instructions, characterized in that when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the energy prediction control method based on deep learning in an embodiment of the present invention.

[0016] Compared with the prior art, the beneficial effects of the present invention are: The present invention is trained through a prediction model integration module including a Convolutional Neural Network (CNN), a Long Short-Term Memory Network (LSTM), and a Deep Learning Model Transformer, leveraging the advantages of each model to improve the prediction accuracy of photovoltaic and wind power generation and load demand; and updating model parameters and model weights through meta-learning and online learning to ensure the prediction ability and stability of the system under different environmental conditions.

[0017] The present invention obtains prediction results by collecting real-time data including hydrogen fuel cell data and lithium battery data and inputting it into the training model, adjusts the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction results to achieve efficient scheduling of the power system, ensure the balance between power grid supply and demand, and enhance adaptability; and ensure stable power supply to the power grid and make full use of excess renewable energy through effective management of hydrogen production equipment and energy storage systems by outputting decision-making schemes. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered to be a limitation of the present invention.

[0019] Figure 1 is a flowchart of the energy prediction control method based on deep learning of the present invention; Figure 2 is a structural diagram of the energy prediction control method based on deep learning of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the scope of protection of the present application.

[0021] Those skilled in the art of the present technology can understand that unless specifically stated otherwise, the singular forms "a", "an", and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groups.

[0022] Embodiment 1 Please refer to Figure 1and Figure 2 As shown, the energy prediction control method based on deep learning provided in this embodiment includes the following steps: S1: Collect historical data including historical photovoltaic power generation data, historical wind power data and grid demand data, and preprocess the historical data to obtain preprocessed data.

[0023] Preferably, in step S1, the historical photovoltaic power generation data, historical wind power data, hydrogen fuel cell data, lithium battery data and grid demand data further include: The historical photovoltaic power generation data includes irradiance, temperature, and power generation. Specifically, in this embodiment, for the installed photovoltaic power generation system, the historical power generation, power generation, real-time output voltage and current of the photovoltaic panel are collected from the power monitoring device of the photovoltaic panel, the operation data recording module of the inverter, etc. At the same time, the field-related data such as the light intensity and light angle of each group of photovoltaic equipment are collected to fully grasp the actual performance of photovoltaic power generation; The historical wind power data includes wind speed, wind direction, and historical power generation. Specifically, in this embodiment, the historical operation data such as the speed, blade angle, power generation under different wind speeds, and cumulative power generation of the wind turbine are obtained from the monitoring system of the wind turbine generator set. The real-time wind speed and wind direction change records of the locations of each wind turbine should also be included to provide sufficient basis for analyzing the law of wind power generation and subsequent predictions. The grid demand data includes historical load data. Specifically, in this embodiment, the power load conditions of each power consumption node and area in different time periods in the past (such as data divided into days and hours in the past few months or years) are collected from data sources such as grid-related metering equipment and electricity consumption recording systems, including active power, reactive power, current, voltage, and other specific parameter information that can reflect the load size.

[0024] The preprocessing process of historical data is as follows: Clean the collected data, remove outliers (such as obviously wrong sensor readings), and fill in missing values ​​(using appropriate methods such as averaging and interpolation); Then, feature extraction and selection are performed. For example, different elements such as temperature and wind speed in weather data are normalized and used as input features. Daily load curve features and weekly load fluctuation features are extracted from historical load data so that the data can be better utilized by the composite model. The preprocessed and feature-engineered data is divided into a training set and a test set. The training set is used for training. By continuously adjusting the internal parameters of the model (such as the weights of the neural network, the kernel function parameters of the support vector machine, etc.), the model can achieve better prediction results on the test set (such as reducing prediction error indicators such as root mean square error, mean absolute error, etc.).

[0025] S2: Input the preprocessed data into a prediction model integration module including a Convolutional Neural Network (CNN), a Long Short-Term Memory Network (LSTM), and a Deep Learning Model Transformer for training, and update the model parameters and model weights through meta-learning and online learning to obtain a trained model. Specifically, in this embodiment, the training set is input into the prediction model integration module.

[0026] Preferably, in step S2, inputting the preprocessed data into a prediction model integration module including a Convolutional Neural Network (CNN), a Long Short-Term Memory Network (LSTM), and a Deep Learning Model Transformer for training is further as follows: The input layer of the Convolutional Neural Network (CNN) receives historical photovoltaic power generation data with a data dimension of (T, F) , where represents the photovoltaic power generation at time step T, that is, the power generation data per hour in history, F is the number of features including irradiance, temperature, and power generation. The one-dimensional convolutional layer performs convolution operations through filters in different time windows of the input historical photovoltaic power generation data to extract photovoltaic power generation features. The CNN can learn different power generation modes and periodic features presented by photovoltaic power generation from data at different time scales, such as the power generation rules under different seasons and different sunshine durations. The filter The convolution operation within the time window is , where is the activation function ReLU, b is the bias, and thus it can learn different power generation modes and periodic features from data at different time scales. The pooling layer reduces the dimension of the photovoltaic power generation features to obtain reduced-dimensional features, which can reduce the data volume while retaining key feature information, avoid overfitting, and increase the robustness of the features, making the model not overly sensitive to small changes in the input data, and improving the stability and generality of the model in practical applications. The fully connected layer obtains the trained convolution prediction result by non-linearly transforming the reduced-dimensional features; The Long Short-Term Memory Network (LSTM) receives historical wind power data and obtains the trained memory prediction result through the input gate, forget gate, and output gate. Specifically, in this embodiment, the historical wind power data and relevant weather environment features such as wind speed and wind direction are input; The Deep Learning Model Transformer receives historical load data, weather information, and market demand data to obtain the trained deep learning result and the current convolution model parameters.

[0027] Preferably, the Long Short-Term Memory Network (LSTM) receives historical wind power data and obtains the trained memory prediction result through the input gate, forget gate, and output gate, which is further as follows: The long short-term memory network (LSTM) receives historical wind power data. The input gate selects updated information from the historical wind power data at the current time step and obtains a candidate value vector; The forget gate selects information to be discarded from the memory cell according to the hidden state at the current time step and the previous time step; Update the memory cell according to the updated information, the candidate value vector, and the discarded information; The output gate outputs the hidden state at the current time step according to the updated memory cell; Obtain the training memory prediction result and the current memory model parameters for the next time step through the hidden state at the current time step. Specifically, in this embodiment, a large amount of historical wind power generation data and corresponding wind speed and wind direction data are used, and each weight matrix and bias term in the LSTM network are continuously adjusted according to the above calculation process, so that the error between the power generation value predicted by the model and the actual power generation value (for example, the mean square error and other loss functions can be used to measure) is continuously reduced, thereby improving the accuracy and reliability of the model in wind power generation prediction. In this way, the LSTM network can utilize its unique structure and calculation mechanism to effectively predict the wind power generation based on historical data and relevant weather environment characteristics, and help make more reasonable decisions in related fields such as energy management.

[0028] Preferably, the deep learning model Transformer receives historical load data, relevant weather information including meteorological elements such as temperature, humidity, wind speed, wind direction, sunshine duration, cloud cover, etc., and market demand data to obtain the training deep learning result. Further, it is as follows: The multi-head attention mechanism of the deep learning model Transformer calculates the attention weights between different positions within the input sequence according to the historical load data, weather information, and market demand data, enabling multiple influencing factors to be considered simultaneously within the model. Output the attention result according to the attention weights, overcoming the limitation that traditional models can only handle local dependence relationships, and thus can effectively capture the complex change patterns of load demand in different time periods within a long time series. Specifically, in this embodiment, load demand is often affected by multiple factors. For example, people's electricity consumption habits are different under different weather conditions (such as increased air conditioner use in hot weather leading to an increase in electricity load), and at the same time, market activities (such as changes in industrial production scale) will also have an impact on electricity demand. Integrating data from these different aspects enables the model to learn more comprehensively about various factors affecting load demand and their interrelationships. Through the multi-head attention mechanism, the model can capture the relationships between different positions within the input sequence from multiple different perspectives, and can simultaneously pay attention to how the load data at different time steps are affected by factors such as weather and market demand, thereby integrating global information and mining more comprehensive and rich feature representations for accurate prediction of load demand in the future; The multi-layer perceptron obtains the first non-linear feature based on the attention result. Through the non-linear transformation of multiple hidden layers, it can further explore and refine the deep features in the data, enhance the model's fitting ability for complex functional relationships, and enable the model to better learn the non-linear laws hidden behind the load demand changes; The first feed-forward neural network performs a non-linear transformation on the first non-characteristic feature to obtain the second non-linear feature. The calculation formula for the non-linear transformation is as follows: where x is the first non-characteristic feature, is the weight matrix of the first linear transformation layer, is the first bias, is the matrix of the second linear transformation layer, is the weight matrix of the second transformation layer.

[0029] The encoder combines the multi-head attention mechanism and the second feed-forward neural network, and adds a residual connection layer and normalization at each layer to process the second non-linear feature to obtain the encoding result. The residual connection can avoid the problem of gradient disappearance or gradient explosion during the training of the deep network, enabling information to be transmitted more smoothly between the layers of the network; the normalization operation helps to stabilize the training process, accelerate the model convergence speed, and improve the generalization ability of the model, enabling the encoder to more efficiently perform feature encoding and information integration on the input data; The encoding result is mapped through the fully connected layer to obtain the predicted load demand and the current deep model parameters; The mean squared error MSE is used as the loss function to measure the difference between the predicted load demand and the historical load data, and the loss value is obtained; Mean squared error MSE The calculation formula is as follows: where, is the predicted load demand, is the historical load data, and n is the number of load data.

[0030] Preferably, the model parameters and model weights are updated through meta-learning and online learning, specifically: Meta-learning MAML divides the convolutional neural network CNN task, long short-term memory network LSTM task, and deep learning model Transformer task into sub-tasks according to different weather conditions. The adaptive learning module enables the entire energy prediction model to flexibly handle various complex and changing environmental conditions and better serve application scenarios such as energy management and decision-making through the mechanism of close cooperation between multi-task learning based on weather type division and parameter update driven by real-time monitoring data. Specifically, in this embodiment, the tasks are divided into sunny day tasks, cloudy day tasks, and tasks with different wind force levels; Update the parameters on each subtask through the inner loop to obtain the subtask model parameters. The calculation formula is as follows: Where, is the current model parameter, that is, the parameters of the current convolutional neural network (CN) filter, or the parameters related to the gating of the long short-term memory network (LSTM), or the weights of the Transformer in the deep learning model; is the first learning rate; is the loss function; is the gradient at the current parameter; and is the new sample data; Update the current model parameters according to different weather conditions and the losses of all subtasks. Where, is the current model parameter; is the second learning rate; is the losses of all subtasks; is the meta-learning update parameter; Update the momentum vector and the gradient cumulative squared vector Where, is the momentum vector at the previous moment; is the first momentum parameter; is the gradient cumulative squared vector at the previous moment; is the second momentum parameter.

[0031] Calculate the momentum vector deviation correction and the gradient cumulative deviation correction according to the momentum vector and the gradient cumulative squared vector : Obtain the updated model parameter and the gradient cumulative deviation correction according to the momentum vector deviation correction : Where, is , that is, the meta-learning model parameter; is the third learning rate; is a small constant to prevent division by zero.

[0032] S3: Collect real-time data including hydrogen fuel cell data and lithium battery data, input it into the training model to obtain a prediction result, adjust the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result, and output a decision-making plan. Specifically, in this embodiment, the hydrogen fuel cell data includes hydrogen storage capacity and fuel cell efficiency; the lithium battery data includes battery capacity and charge-discharge rate. During the peak electricity consumption period in summer, residents use a large number of cooling devices such as air conditioners and fans, and industrial production also proceeds normally. The grid load demand will increase significantly. At this time, it is necessary to coordinate the output power of each energy source to ensure that their sum is sufficient to support such a high load and avoid power supply shortages such as power outages, maintaining the stable operation of the grid.

[0033] Preferably, adjusting the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result includes: Set power supply constraint conditions and energy storage system capacity constraint conditions, and determine whether to adjust the photovoltaic output power, wind power output power, lithium battery output power, and hydrogen fuel cell output power according to the prediction result, power supply constraint conditions, and energy storage system capacity constraint conditions; Among them, the power supply constraint condition determines whether the power supply meets the grid load demand, as follows: Among them, is the grid demand value, are the output powers of photovoltaic, wind power, hydrogen fuel cell, and lithium battery; The energy storage system capacity constraint determines whether the energy storage system capacity meets the requirements, as follows: Among them, is the hydrogen production content, is the hydrogen storage demand.

[0034] Preferably, outputting the decision-making plan includes: If the prediction result exceeds the load demand and hydrogen storage demand, inject the excess power into the grid; If the predicted power is excessive and the grid demand is met, use the excess power for the hydrogen production equipment to produce hydrogen; If the predicted power generation of the prediction result is insufficient and does not meet the grid demand, compensate by adjusting the lithium battery output power or hydrogen fuel cell output power to meet the load demand and hydrogen demand.

[0035] Embodiment 2 In some embodiments of the present application, a computer device is further provided, including a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor is caused to execute the steps of the energy prediction control method based on deep learning in an embodiment of the present invention.

[0036] The present invention further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the energy prediction control method based on deep learning in an embodiment of the present invention.

[0037] It can be understood that for the aforementioned energy prediction control method based on deep learning, if it is implemented in the form of software functional modules and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs, etc., all kinds of media that can store program codes.

[0038] The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than the computer-readable storage medium. This readable medium can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.

[0039] The above are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

Claims

1. An energy prediction control method based on deep learning, characterized in that: The following steps are involved: S1: collecting historical data including historical photovoltaic power generation data, historical wind power data and grid demand data, and preprocessing the historical data to obtain preprocessed data; S2: inputting the preprocessed data into a prediction model integration module including a convolutional neural network CNN, a long short-term memory network LSTM and a deep learning model Transformer for training, and updating model parameters and model weights through meta-learning and online learning to obtain a training model; S3: Collect real-time data including hydrogen fuel cell data and lithium battery data and input them into the training model to obtain prediction results, adjust photovoltaic output power, wind power output power, lithium battery output power and hydrogen fuel cell output power according to the prediction results, and output a decision plan.

2. The energy prediction control method based on deep learning according to claim 1, characterized in that: In step S1, the historical photovoltaic power generation data, historical wind power data, hydrogen fuel cell data, lithium battery data and grid demand data further include: The historical photovoltaic power generation data includes irradiance, temperature, and power generation; The historical wind power data includes wind speed, wind direction, and historical power generation; The power grid demand data includes historical load data.

3. The energy prediction control method based on deep learning according to claim 2 is characterized in that: In step S2, the pre-processed data is input into a prediction model integration module including a convolutional neural network CNN, a long short-term memory network LSTM and a deep learning model Transformer for training, which is further: The input layer of the convolutional neural network CNN receives the historical photovoltaic power generation data with a data dimension of (T, F), wherein T is the time step, and F is the number of features including the irradiance, the temperature, and the power generation. The convolution layer extracts photovoltaic power generation features by performing convolution operations on different time windows of the input historical photovoltaic power generation data through filters, the pooling layer reduces the dimension of the photovoltaic power generation features to obtain reduced-dimensional features, and the fully connected layer obtains training convolution prediction results by performing nonlinear transformation on the reduced-dimensional features. The long short-term memory network LSTM receives the historical wind power data and obtains the training memory prediction result through an input gate, a forget gate and an output gate; The deep learning model Transformer receives the historical load data and weather information to obtain the training deep learning results and current convolution model parameters.

4. The energy prediction control method based on deep learning according to claim 3 is characterized in that: The long short-term memory network LSTM receives the historical wind power data, obtains the training memory prediction result through the input gate, the forget gate and the output gate, and further comprises: The long short-term memory network LSTM receives the historical wind power data, and the input gate selects update information from the historical wind power data at a current time step and obtains a candidate value vector; The forget gate selects to discard information from the memory unit according to the hidden state of the current time step and the previous time step; updating a memory unit according to the update information, the candidate value vector and the discard information; The output gate outputs the hidden state of the current time step according to the updated memory unit; The training memory prediction result and the current memory model parameters of the next time step are obtained through the hidden state of the current time step.

5. The energy prediction control method based on deep learning according to claim 4 is characterized in that: The deep learning model Transformer receives the historical load data and weather information to obtain a training deep learning result, and further comprises: The multi-head attention mechanism of the deep learning model Transforme calculates the attention weights between different positions in the input sequence according to the historical load data and the weather information, and outputs the attention results according to the attention weights; A multilayer perceptron obtains a first nonlinear feature according to the attention result; The first feedforward neural network performs a nonlinear transformation according to the first non-characteristic feature to obtain a second nonlinear feature. The calculation formula of the nonlinear change is as follows: Wherein, x is the first non-characteristic feature, is the weight matrix of the first linear transformation layer, is the first bias, is the second linear transformation layer matrix, is the weight matrix of the second transformation layer; The encoder combines the multi-head attention mechanism with the second feedforward neural network, adds a residual connection layer and normalizes each layer to process the second nonlinear feature to obtain an encoding result; The encoding result is mapped through a fully connected layer to obtain predicted load demand and current deep model parameters; Using mean square error (MSE) as a loss function, measuring the difference between the predicted load demand and the historical load data, and obtaining a loss value; Mean Square Error (MSE) The calculation formula is as follows: in, For the predicted load demand, is the historical load data, and n is the number of load data.

6. The energy prediction control method based on deep learning according to claim 5 is characterized in that: Through meta-learning and online learning, the model parameters and model weights are updated to further: Meta-learning MAML divides the convolutional neural network CNN task, the long short-term memory network LSTM task and the deep learning model Transformer task into subtasks according to different weather conditions; By updating the parameters on each subtask through the inner loop, the subtask model parameters are obtained. The calculation formula is as follows: in, is the current model parameter, that is, the current convolutional neural network CN filter parameter or the long short-term memory network LSTM gating related parameter or the deep learning model Transformer weight, is the first learning rate, is the loss function The gradient at the current parameter, and is the new sample data; Update the current model parameters according to the different weather conditions and all subtask losses, in, are the current model parameters, is the second learning rate, is the loss for all subtasks, Update parameters for meta-learning; Update the momentum vector via online learning Adam and the cumulative squared gradient vector in, is the momentum vector at the previous moment, is the first momentum parameter, is the cumulative square vector of the gradient at the previous moment, is the second momentum parameter; According to the momentum vector and the gradient cumulative square vector Calculate the momentum vector bias correction and gradient accumulation bias correction : According to the momentum vector deviation correction and the gradient cumulative deviation correction Get updated model parameters : in, for , i.e., the meta-learning model parameters, is the third learning rate, is a small constant that prevents division by zero.

7. The energy prediction control method based on deep learning according to claim 6, characterized in that: The photovoltaic output power, wind power output power, lithium battery output power and hydrogen fuel cell output power are adjusted according to the prediction results, including: Setting power supply constraints and energy storage system capacity constraints, and judging whether to adjust the photovoltaic output power, the wind power output power, the lithium battery output power, and the hydrogen fuel cell output power according to the prediction results, the power supply constraints, and the energy storage system capacity constraints; The power supply constraint condition determines whether the power supply meets the grid load demand, as shown below: in, For the power grid to meet the demand value, Output power for photovoltaic, wind power, hydrogen fuel cells, and lithium batteries; The energy storage system capacity constraint determines whether the energy storage system capacity meets the requirements, as shown below: in, To generate hydrogen content, For hydrogen storage needs.

8. The energy prediction control method based on deep learning according to claim 7, characterized in that: Output decision-making solutions, including: If the forecast result exceeds the load demand and the hydrogen storage demand, injecting the excess electricity into the grid; If the predicted result shows that there is excess electricity and the grid demand is met, the excess electricity is used for hydrogen production equipment to produce hydrogen; If the predicted power generation of the prediction result is insufficient and does not meet the grid demand, compensation is performed by adjusting the output power of the lithium battery or the output power of the hydrogen fuel cell to meet the load demand and hydrogen demand.

9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the energy prediction control method based on deep learning as described in any one of claims 1 to 8.

10. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the energy prediction control method based on deep learning as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Photovoltaic power generation prediction method and device, and storage medium

    CN120414541A

  • Photovoltaic power generation prediction method, device and storage medium

    CN120414541B

  • Photovoltaic gas hybrid power supply control method and device, equipment and storage medium

    CN120810778A

  • Photovoltaic-Gas Hybrid Power Supply Control Methods, Devices, Equipment, and Storage Media

    CN120810778B

  • Wind power plant reactive power coordination method and device and storage medium

    CN121367283A