Generating capacity prediction method, device and equipment based on meteorological data

By constructing a power generation prediction method based on deep learning models, the problem that the existing technology is difficult to predict photovoltaic power generation and wind power generation at the same time is solved, and efficient prediction of a variety of new energy resources is achieved, which significantly improves the prediction accuracy and robustness.

CN119990836AInactive Publication Date: 2025-05-13GUIZHOU NORMAL UNIVERSITY

Patent Information

Application Number
CN202510473241.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing new energy forecasting technology is difficult to predict photovoltaic power generation and wind power generation at the same time, and lacks comprehensive adaptability to a variety of new energy resources, resulting in unstable power generation capacity.

Method used

The power generation prediction method based on deep learning model is adopted, including a Transformer-based encoding module, a multi-head differential attention module and a bidirectional gating cycle module. By acquiring and preprocessing historical meteorological data and power generation data, the prediction model is trained to perform real-time power generation prediction.

Benefits of technology

It significantly improves the prediction accuracy of wind and light power generation, can more comprehensively capture the complexity and diversity of new energy power generation, enhances the model's modeling ability and nonlinear expression ability of time series data, and improves the prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990836A_ABST
    Figure CN119990836A_ABST
Patent Text Reader

Abstract

The invention provides a generating capacity prediction method, device and equipment based on meteorological data, and the method comprises the steps: obtaining a historical meteorological data set in a preset region and a historical generating capacity data set corresponding to the historical meteorological data set; preprocessing the historical meteorological data set and the historical power generation data set; constructing a generating capacity prediction model based on a deep learning model, wherein the generating capacity prediction model comprises a Transform-based coding module, a multi-head differential attention module and a bidirectional gating circulation module; and inputting the preprocessed target historical meteorological data set and the target historical generating capacity data set into a generating capacity prediction model for training, obtaining a trained generating capacity prediction model by monitoring the change of a preset loss function, and performing generating capacity prediction based on meteorological data collected in real time. According to the scheme, the prediction accuracy of wind and light power generation can be improved, and more reliable power output prediction is provided for a power grid operator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer information processing, and in particular to a method, device and equipment for predicting power generation based on meteorological data. Background Art

[0002] As global energy demand continues to grow, fossil energy resources are gradually depleting, driving global attention to energy transformation. In particular, the decarbonization process has become a key issue in addressing climate change, and the widespread use of renewable energy is seen as an important way to achieve a low-carbon economy and sustainable development. Governments and research institutions around the world have increased their investment in the research and development of renewable energy technologies, striving to promote the efficient use and promotion of clean energy through innovation and policy support.

[0003] New energy refers to a form of energy that is sustainable, clean and environmentally friendly compared to traditional fossil energy (such as coal, oil, natural gas, etc.). New energy includes solar energy, wind energy, geothermal energy, biomass energy, tidal energy, hydrogen energy, etc. These energy sources cause minimal environmental pollution during use, and most of them come from nature and have long-term renewable characteristics. For example, solar energy converts sunlight into electricity through photovoltaic panels, and wind energy converts wind energy into electricity through wind turbines. With technological advances and policy support, new energy has gradually become an important part of the global energy structure transformation, driving the vigorous development of the clean energy revolution.

[0004] Although new energy has great potential in promoting energy structure transformation, reducing environmental pollution and addressing climate change, its development and application still face some limitations. First, the intermittent and unstable nature of new energy is a major challenge. The power generation of solar and wind energy depends on weather conditions and the availability of natural resources, so there may be fluctuations in energy supply, especially when climate change or extreme weather events occur, resulting in unstable power generation capacity.

[0005] Most of the existing new energy prediction technologies are optimized only for a single type of new energy (such as wind or solar energy), and lack comprehensive adaptability to multiple new energy resources. These technologies usually model and predict based on the characteristics of a single energy source, resulting in the inability to fully cope with the diversity and complexity of different types of new energy sources in practical applications. For example, the changing patterns of wind and solar energy are different, and they are affected to different degrees by factors such as climate, season, and region, which makes it difficult for a single type of prediction model to cope with the linkage effect and complementarity of different energy sources. Due to the volatility of new energy power generation, power equipment may be damaged. Therefore, developing a method that can simultaneously predict photovoltaic power generation and wind power generation is of great significance for cost control, optimizing power dispatch, and ensuring the stability of power consumption on the demand side. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a method, device and equipment for predicting power generation based on meteorological data, so as to improve the prediction accuracy of wind and solar power generation.

[0007] In order to solve the above technical problems, an embodiment of the present invention provides a method for predicting power generation based on meteorological data, comprising: Acquire a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; Preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; Constructing a power generation prediction model based on a deep learning model, wherein the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; The target historical meteorological data set and the target historical power generation data set are input into the power generation prediction model for training, and the trained power generation prediction model is obtained by monitoring the changes in the preset loss function, and used for power generation prediction based on real-time collected meteorological data.

[0008] In one embodiment, preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set includes: Cleaning the historical meteorological data set and the historical power generation data set; The cleaned historical meteorological data set and the historical power generation data set are normalized, and a corresponding time series input matrix is ​​constructed based on the normalized historical meteorological data set and the historical power generation data set to obtain the target historical meteorological data set and the target historical power generation data set.

[0009] In one embodiment, the cleaned historical meteorological data set and the historical power generation data set are normalized by the following formula: ; in, is the feature value in the data set, is the minimum value of the feature in the data set, is the maximum value of the feature in the data set, is the normalized eigenvalue.

[0010] In one embodiment, a corresponding time series input matrix is ​​constructed based on the normalized historical meteorological data set and the historical power generation data set, including: The historical meteorological data set and the historical power generation data set are segmented and processed respectively according to a preset time step and a preset time sliding window to obtain a first time series input matrix corresponding to the historical meteorological data set and a second time series input matrix corresponding to the historical power generation data set.

[0011] In one embodiment, the target historical meteorological data set and the target historical power generation data set are input into the power generation prediction model for training, and the trained power generation prediction model is obtained by monitoring the change of the preset loss function, including: Inputting the target historical meteorological data set and the target historical power generation data set into the multi-head differential attention module, and processing the target historical meteorological data set and the target historical power generation data set based on the multi-head attention mechanism to obtain a first feature data set; Inputting the first feature data set into the encoding module of the Transformer for processing to obtain a second feature data set; The second feature data set is input into the bidirectional gated loop module, and the second feature data set is processed based on the forward and reverse time dependencies to obtain a third feature data set.

[0012] In one embodiment, the power generation prediction model further includes an output module, and the training process further includes: The third feature data set is input into the output module for feature extraction and linear transformation processing to obtain the training predicted power generation.

[0013] In one embodiment, the target historical meteorological data set and the target historical power generation data set are input into the multi-head differential attention module, and the target historical meteorological data set and the target historical power generation data set are processed based on the multi-head attention mechanism to obtain a first feature data set, including: Performing a linear transformation on the target historical meteorological data set and the target historical power generation data set, dividing the transformed data into a plurality of heads, and calculating an attention matrix for each head; Determine the output attention matrix based on the preset difference factor and the attention matrix of each head; The first feature data set is obtained by performing weighted processing based on the output attention matrix and the linearly transformed value matrix.

[0014] An embodiment of the present invention further provides a device for predicting power generation based on meteorological data, comprising: An acquisition module, used to acquire a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; A processing module is used to preprocess the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; construct a power generation prediction model based on a deep learning model, and the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; input the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and obtain a trained power generation prediction model by monitoring changes in a preset loss function, and use it to predict power generation based on real-time collected meteorological data.

[0015] An embodiment of the present invention further provides a computing device, comprising: A memory for storing one or more programs; One or more processors are used to execute the one or more programs to implement the method described in the above embodiment.

[0016] An embodiment of the present invention further provides a computer-readable storage medium, in which a program is stored. When the program is executed by a processor, the method described in the above embodiment is implemented.

[0017] The above solution of the present invention includes at least the following beneficial effects: The above-mentioned scheme of the present invention provides a method, device and equipment for predicting power generation based on meteorological data, wherein the prediction method includes: obtaining a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; constructing a power generation prediction model based on a deep learning model, wherein the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module and a bidirectional gated loop module; inputting the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and obtaining a trained power generation prediction model by monitoring changes in a preset loss function, and using it to predict power generation based on real-time collected meteorological data to improve the prediction accuracy of wind and solar power generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a method for predicting power generation based on meteorological data provided by an embodiment of the present invention; Figure 2 is a process diagram of iterative model training provided by an optional embodiment of the present invention; Figure 3A comparison diagram of the effect of power generation prediction based on meteorological data provided by an optional embodiment of the present invention; Figure 4 A comparison diagram of the effect of wind energy-based power generation prediction provided in an optional embodiment of the present invention; Figure 5 A comparison diagram of the effects of predicting power generation based on solar energy provided by an optional embodiment of the present invention; Figure 6 It is a module block diagram of a device for predicting power generation based on meteorological data provided by an embodiment of the present invention; Figure 7 is a schematic block diagram of an electronic device provided by an embodiment of the present invention; and Figure 8 is a schematic block diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0020] In the following description, certain specific details are set forth for the purpose of illustrating the various disclosed embodiments to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0021] References throughout the specification to "one embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.

[0022] In the following description, in order to clearly show the structure and working mode of the present invention, many directional words will be used for description, but the words "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", "down", etc. should be understood as convenient terms and should not be understood as restrictive terms.

[0023] like Figure 1As shown, an embodiment of the present invention provides a method 10 for predicting power generation based on meteorological data, comprising the following steps: Step 11, obtaining a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; Step 12, preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; Step 13, constructing a power generation prediction model based on a deep learning model, the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; Step 14, input the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and obtain the trained power generation prediction model by monitoring the changes of the preset loss function, and use it to predict power generation based on the real-time collected meteorological data.

[0024] In this embodiment, the historical meteorological data is new energy data, including solar energy data and wind energy data, and the historical power generation data is the power generation during a period of time corresponding to the historical meteorological data during the period of time; here, the historical meteorological data is used as a sample set for model training, and the historical power generation data is used as a target data set for model training; here, the historical meteorological data and the historical power generation data are preprocessed to improve the efficiency and accuracy of model training; Deep learning model training is performed based on preprocessed historical data to capture the complexity and long-term dependencies between different types of meteorological data; that is, the correlation between wind energy data and solar energy data; such as: 1. Complementarity: Solar energy has high power generation efficiency when there is sufficient sunlight during the day, while wind energy may perform better at night or on cloudy days. Therefore, wind energy and solar energy have certain complementarity in time and can jointly provide more stable power output for the power grid; 2. Joint influence of meteorological conditions: The power generation of wind and solar energy is affected by meteorological conditions (such as temperature, air pressure, humidity, etc.). For example, changes in air pressure and wind speed will affect wind power generation, while light intensity and temperature will affect solar power generation. These meteorological factors are interrelated to a certain extent, so there is also an indirect correlation between wind and solar power generation. 3. Regional correlation: In some geographical areas, there may be a certain correlation in the distribution of wind and solar energy resources. For example, in some coastal areas, wind energy resources are abundant and solar energy resources may also be good, which means that in these areas, wind and solar power generation may be affected by similar climatic conditions at the same time.

[0025] When training the model, the differential attention mechanism is used to adjust the information transfer between data in the multi-head differential attention module, so that the model can more flexibly capture the long-term dependencies in the time series; in the Transformer-based encoding module, the information flow of data is controlled by the gating mechanism to enhance the modeling ability and nonlinear expression ability of the model for time series data; in the bidirectional gated loop module, the bidirectional dependencies between the time series of data are captured, and the target sequence length of the final output result is set to obtain the trained predicted power generation; further, based on the trained predicted power generation, historical power generation and preset loss function, the relevant parameters in the model training process are adjusted to obtain a trained power generation prediction model; The above-mentioned embodiments of the present application construct a power generation prediction model based on the meteorological factors of the renewable energy power generation point and the historical power generation data, and use the model to perform power prediction. Compared with the traditional power prediction, by fusing multi-source and different types of data, it can more comprehensively capture the complexity of energy generation; the adopted deep learning model can automatically extract the complexity in the data, capture long-term dependencies, and the differential attention mechanism, which enhances the model's ability to model time series data, and performs well in processing the randomness of renewable energy power generation, significantly improving the accuracy and robustness of renewable energy power generation prediction, and providing a more reliable solution for renewable energy grid connection and grid scheduling.

[0026] In an optional embodiment of the present invention, the above step 12 may include: Step 121, cleaning the historical meteorological data set and the historical power generation data set; Step 122, normalize the cleaned historical meteorological data set and historical power generation data set, and construct a corresponding time series input matrix based on the normalized historical meteorological data set and historical power generation data set to obtain a target historical meteorological data set and a target historical power generation data set.

[0027] In this embodiment, the historical meteorological data set can be expressed as , where each , is the characteristic dimension, i.e. the number of meteorological factors, , with the different new energy sources, Represents the specific values ​​of key weather influencing factors, such as radiation intensity, humidity, air pressure, wind speed, etc. is the number of data sets; the historical power generation data set can be expressed as , It represents the actual power generation at a point in time (KW); Here, the historical meteorological data set and the historical power generation data set are cleaned to ensure the accuracy of subsequent model training; In an implementable example of the present invention, the specific process of data cleaning is as follows: Step 1211, missing value processing: Interpolation filling: For temporarily missing meteorological data (such as missing radiation values ​​at a certain hour), linear interpolation can be used to calculate reasonable estimates based on the values ​​at previous and subsequent time points.

[0028] Long-term missing data: If the data for a certain day is missing for more than 4 hours in a row, the day will be marked as an invalid sample and can be directly removed.

[0029] Step 1212, outlier processing: Physical range verification: Filter outliers based on meteorological knowledge (such as humidity exceeding 100% or negative values, and radiation intensity not being zero at night).

[0030] Statistical filtering: For numerical features (such as wind speed), calculate the 25% and 75% quantiles of each feature, define a reasonable range (such as 1.5 times the IQR), and consider those outside the range as abnormal and use the sliding window mean replacement.

[0031] Smoothing: For features with large fluctuations (such as gust wind speed), a moving average method (with a window size of 3 hours) is used to smooth the data to preserve trends and reduce noise.

[0032] In an optional embodiment of the present invention, the cleaned historical meteorological data set and the historical power generation data set can be normalized by the following formula: ; in, is the feature value in the data set, is the minimum value of the feature in the data set, is the maximum value of the feature in the data set, is the normalized eigenvalue.

[0033] In this embodiment, It can be a historical meteorological data set or a historical power generation data set. The data set is normalized to convert the data into a three-dimensional format acceptable to the model, while avoiding interference to model training caused by different dimensions (such as air pressure values ​​around 1000 and radiation values ​​between 0-1); here, the eigenvalues ​​after normalization are in the range of [0, 1].

[0034] In an optional embodiment of the present invention, the above step 122 may include: Step 1221, segmenting the historical meteorological data set and the historical power generation data set according to a preset time step and a preset time sliding window, to obtain a first time series input matrix corresponding to the historical meteorological data set and a second time series input matrix corresponding to the historical power generation data set.

[0035] In this embodiment, before data segmentation processing is performed, the historical meteorological data set and the historical power generation data set are first divided into a training set, a validation set, and a test set in proportion; Specifically, it can be expressed as: training set , ; Validation set , ; Test set , ; Furthermore, the time series dataset , and , and the corresponding target dataset , and According to the preset time step and the preset time sliding window, it is divided into a format suitable for model training, which is described as follows: Each sample consists of the past The input features of the time step are composed, and the target data is determined by the value of t to predict the value of the next time point or multiple time points in the future; Example: If , , T is a matrix with a shape of (5, 2), where 5 is the number of data sets and the number of features is 2 (each feature represents a type of meteorological data). , ; After segmentation: [ ] T = , , ,and then = , = ; Here, it should be noted that if t = 1, only predict the next time step; if t >1, the target data for multiple time steps in the future is predicted.

[0036] In an optional embodiment of the present invention, the above step 14 may include: Step 141, inputting the target historical meteorological data set and the target historical power generation data set into a multi-head differential attention module, and processing the target historical meteorological data set and the target historical power generation data set based on the multi-head attention mechanism to obtain a first feature data set; In this embodiment, the target historical meteorological data corresponds to the first time series input matrix, and the target historical power generation data corresponds to the second time series input matrix. Here, the first time series input matrix and the second time series input matrix are first spliced ​​and fused to obtain a complete time series input matrix (it should be known that at any given moment, each type of meteorological characteristic data corresponds to power generation in a one-to-one manner); Here, after the complete time series input matrix is ​​input into the model, it first passes through the input layer and the embedding layer, and the meteorological characteristic data of each time step is mapped to a high-dimensional space in the embedding layer (here, it can be mapped through linear processing) to strengthen the model's ability to express complex relationships; further, the linearly processed data is input into the multi-head differential attention module for processing to capture the dependencies between different time steps; Specifically, the above step 141 may include: Step 1411, linearly transform the target historical meteorological data set and the target historical power generation data set, divide the transformed data into multiple heads, and calculate the attention matrix of each head; Step 1412, determining an output attention matrix according to a preset differential factor and the attention matrix of each head; Step 1413, perform weighted processing based on the output attention matrix and the linearly transformed value matrix to obtain a first feature data set.

[0037] In this embodiment, a linear transformation is performed on the input complete time series input matrix, and query (Q), key (K) and value (V) matrices are generated; specifically, they can be expressed as: Q=XWQ, K=XWK, V=XWV, where X represents the specific value in the input complete time series input matrix, WQ is the first weight matrix, corresponding to the linear transformation of the query; WK is the second weight matrix, corresponding to the linear transformation of the key; WV is the second weight matrix, corresponding to the linear transformation of the value; and the first weight matrix, the second weight matrix and the third weight matrix all represent the association weights of wind energy data and solar energy data in meteorological data, that is, at any historical moment, the influence weights of different types of historical meteorological data on the historical power generation at that moment; Furthermore, the query (Q), key (K), and value (V) matrices are divided into multiple heads (i.e., multiple subspaces), and each head calculates two attention matrices and ,in, represents the scaled dot product attention matrix, Represents the original attention matrix; further, a preset difference factor is introduced , by presetting the difference factor Adjust the weights of the two attention matrices to obtain the final attention output matrix A= ; Furthermore, the linearly transformed value (V) matrix is ​​weighted according to the final attention output matrix to obtain a first feature data set; the first feature data set includes a first data association eigenvalue between historical wind energy data and historical solar energy data at any moment, a second data association eigenvalue between historical wind energy data combined with historical solar energy data and historical power generation at any moment, and historical wind energy data, historical solar energy data and historical power generation data corresponding to any moment.

[0038] In an optional embodiment of the present invention, the above step 14 may further include: Step 142, inputting the first feature data set into the encoding module of the Transformer for processing to obtain a second feature data set; In this embodiment, in the encoding module of the Transformer, a gate operation can be performed on the input first feature data set through a SwiGLU activation function; specifically: Step 1421, in the encoding module of the Transformer, the first feature data set is first input into two parallel branches through the feed-forward network FFN, one branch performs linear transformation on the first feature data set and then processes it through the Swish activation function, and the other branch performs linear transformation on the first feature data set and then directly outputs it; Step 1422, the outputs of the two branches are gated and fused through the SwiGLU activation function, which can be specifically processed by the following formula: , where g and z are the output results of the two branches corresponding to the first feature data set, represents the gated fusion result; Step 1423, adding the original input first feature data set to the gated fusion result to enhance the gradient propagation of the model and obtain a second feature data set; here, the second feature data set is the result of optimizing the first feature data set.

[0039] In an optional embodiment of the present invention, the above step 14 may further include: Step 143: input the second feature data set into a bidirectional gated loop module, and process the second feature data set based on the forward and reverse time dependencies to obtain a third feature data set.

[0040] In this embodiment, in the bidirectional gated loop module, the second feature data set is processed in chronological order to capture information from the past to the present in the second feature data set, and a forward hidden state is obtained; at the same time, the second feature data set is processed in reverse chronological order to capture information from the future to the present in the second feature data set, and a reverse hidden state is obtained; further, the forward hidden state and the reverse hidden state are concatenated to obtain a third feature data set with a time series and a time dependency; the third feature data set includes a first time-correlated characteristic value between historical wind energy data and historical solar energy data, a second time-correlated characteristic value between the historical wind energy data combined with the historical solar energy data and the historical power generation at any moment, and the historical wind energy data, historical solar energy data, and historical power generation data corresponding to any moment.

[0041] In an optional embodiment of the present invention, the power generation prediction model further includes an output module, and the above training process further includes: Step 144, inputting the third feature data set into the output layer for feature extraction and linear transformation processing to obtain training predicted power generation; In this embodiment, after the third feature data set is input into the output layer, the output layer extracts the eigenvalue of the last time step from the third feature data set as the eigenvalue to be processed (the eigenvalue of the last time step contains the entire time series information of the entire third feature data set), and performs linear transformation on the eigenvalue to obtain the output training predicted power generation.

[0042] In a specific implementable example of the present invention, the historical meteorological data, solar power generation historical data and wind power generation historical data of the surrounding environment of a power station are taken as an example for explanation. The data time range is from January 1 to January 10, 2017, and the data is recorded at intervals of 15 minutes. The historical meteorological data include: direct radiation (0.01W / m2), total radiation (0.01W / m2), scattered radiation (0.01W / m2), component temperature (0.01℃), ambient temperature (0.01℃), air pressure (0.1hpa), relative humidity (0.1%) and wind speed at 100m (m / s). The power generation data include: actual solar power generation (0.1MW) and actual wind power generation (MW).

[0043] After cleaning and normalizing the data, the data is divided into 70% training set, 20% validation set and 10% test set; and then brought into the corresponding model for training iteration. The iteration process is as follows Figure 2 As shown, the wind power prediction and solar power prediction are obtained respectively and superimposed; preferably, the output results can be superimposed by P= Calculate; where: is the solar power generation power, is the wind power generation power, and P represents the final output data.

[0044] Furthermore, the wind energy and solar energy prediction accuracy error indicators are calculated as follows: Coefficient of determination R²: measures the ability of the model to explain the variance of the target variable. = 1 means that the power generation forecast model makes a perfect prediction; = 0 means that there is no difference between the power generation forecast model and the average forecast; <0 means that the power generation prediction model is worse than directly using the average value for prediction; the value range of R² is usually between 0 and 1. The closer it is to 1, the stronger the power generation prediction model's ability to explain the data; specifically, the determination coefficient R² can be calculated using the following formula: ; in, represents the i-th true value; represents the i-th predicted value; represents the average of the true values; Indicates the number of data points Mean absolute error (MAE): evaluates the average absolute difference between the predicted value and the true value. Specifically, the mean absolute error (MAE) can be calculated using the following formula: ; Root mean square error RMSE: It is sensitive to large errors and reflects the overall error level of the model. Specifically, the root mean square error RMSE can be calculated by the following formula: ; Mean absolute percentage error (MAPE): evaluates the relative size of the forecast error; specifically, the mean absolute percentage error (MAPE) can be calculated using the following formula: .

[0045] Preferably, during the model training process, the mean square error (MSE) can be used as the loss function: ; During the model training process, the model is iteratively trained according to the preset number of iterations and training data set until the number of iterations is completed or the loss function converges. During the model training process, the prediction value is calculated through forward propagation and the parameters are updated through back propagation.

[0046] Based on the above trained model, real-time power generation prediction is performed. The power generation predicted based on meteorological data is as follows: Figure 3 As shown, the power generation based on wind energy forecast alone is as follows Figure 4As shown, the power generation based on solar energy alone is Figure 5 The quality of each prediction index is evaluated as shown in Table 1.

[0047]

[0048] Table 1. Statistics of power generation forecast errors The power generation prediction method based on meteorological data provided by the above-mentioned embodiment of the present invention can make predictions for multiple days in the future based on meteorological factors and other factors, and its accuracy can reach the minute level. By combining the attention mechanism and the bidirectional gated recurrent unit (BiGRU), it can effectively capture the long-distance dependencies and bidirectional time series information in the time series data, thereby significantly improving the prediction accuracy. Specifically, the meteorological data is received through the input layer, and the embedding layer is mapped to the high-dimensional space. The attention mechanism can dynamically allocate weights so that the model pays more attention to the features and time steps that are more valuable to the prediction target, thereby improving the model's ability to recognize complex meteorological patterns; the bidirectional gated recurrent unit (BiGRU) further enhances the model's ability to understand time series data by simultaneously considering the forward and reverse information of the time series; each module of the power generation prediction model gradually extracts and optimizes features, so that the model can effectively cope with the volatility and complexity of renewable energy power generation, so as to improve the prediction accuracy of wind and solar power generation, provide more reliable power output predictions for power grid operators, and help them achieve the smooth operation of the power grid system. At the same time, it is of great significance for cost control, optimizing power dispatching, and ensuring the stability of power consumption on the demand side. like Figure 6 As shown, an embodiment of the present invention further provides a power generation prediction device 60 based on meteorological data, comprising: An acquisition module 61 is used to acquire a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; The processing module 62 is used to preprocess the historical meteorological data set and the historical power generation data set to obtain the preprocessed target historical meteorological data set and the target historical power generation data set; construct a power generation prediction model based on a deep learning model, and the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; input the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and obtain the trained power generation prediction model by monitoring the changes in the preset loss function, and use it to predict power generation based on real-time collected meteorological data.

[0049] It should be noted that this device is a device corresponding to the above-mentioned power generation prediction method based on meteorological data. All implementation methods in the above-mentioned method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0050] like Figure 7 As shown, an embodiment of the present invention further provides an electronic device 50, including: a memory 51 for storing one or more computer programs; one or more processors 52 for executing one or more computer programs, and when the computer program is run by the processor, the method as above is executed. All implementations in the above method embodiment are applicable to this embodiment, and the same technical effect can be achieved. The electronic device 50 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown in the present invention, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required in the present invention.

[0051] like Figure 8 As shown, the electronic device 50 is a computing device, or a computer system, which may include a CPU 501 (computing unit), which can perform various appropriate actions and processes according to a computer program stored in a ROM 502 (read-only memory) or a computer program loaded from a storage unit 508 into a random access RAM 503 (memory). In the RAM 503, various programs and data required for the operation of the device 500 may also be stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O interface 505 (input / output interface) is also connected to the bus 504.

[0052] A number of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0053] CPU 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of CPU 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. CPU 501 performs the various methods and processes described above. For example, in some embodiments, the power generation prediction method 10 based on meteorological data may be implemented as a computer software program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more steps of the power generation prediction method 10 based on meteorological data described above may be performed. Alternatively, in other embodiments, CPU 501 may be configured to perform the power generation prediction method 10 based on meteorological data in any other appropriate manner (e.g., by means of firmware).

[0054] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute the above method. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0055] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0056] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0057] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0059] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0060] If the function is implemented in the form of a software functional unit 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., which can store program codes.

[0061] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understandable that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or a network of computing devices, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0062] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code for implementing a method or device. That is to say, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0063] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for predicting power generation based on meteorological data, characterized in that: include: Acquire a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; Preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; Constructing a power generation prediction model based on a deep learning model, wherein the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; The target historical meteorological data set and the target historical power generation data set are input into the power generation prediction model for training, and the trained power generation prediction model is obtained by monitoring the changes in the preset loss function, and used for power generation prediction based on real-time collected meteorological data.

2. The method for predicting power generation based on meteorological data according to claim 1, characterized in that: Preprocessing the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set, including: Cleaning the historical meteorological data set and the historical power generation data set; The cleaned historical meteorological data set and the historical power generation data set are normalized, and a corresponding time series input matrix is ​​constructed based on the normalized historical meteorological data set and the historical power generation data set to obtain the target historical meteorological data set and the target historical power generation data set.

3. The method for predicting power generation based on meteorological data according to claim 2, characterized in that: The cleaned historical meteorological data set and the historical power generation data set are normalized by the following formula: ; in, is the feature value in the data set, is the minimum value of the feature in the data set, is the maximum value of the feature in the data set, is the normalized eigenvalue.

4. The method for predicting power generation based on meteorological data according to claim 2, characterized in that: The corresponding time series input matrix is ​​constructed based on the normalized historical meteorological data set and the historical power generation data set, including: The historical meteorological data set and the historical power generation data set are segmented and processed respectively according to a preset time step and a preset time sliding window to obtain a first time series input matrix corresponding to the historical meteorological data set and a second time series input matrix corresponding to the historical power generation data set.

5. The method for predicting power generation based on meteorological data according to claim 1, characterized in that: Inputting the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and monitoring the change of the preset loss function to obtain the trained power generation prediction model, including: Inputting the target historical meteorological data set and the target historical power generation data set into the multi-head differential attention module, and processing the target historical meteorological data set and the target historical power generation data set based on the multi-head attention mechanism to obtain a first feature data set; Inputting the first feature data set into the encoding module of the Transformer for processing to obtain a second feature data set; The second feature data set is input into the bidirectional gated loop module, and the second feature data set is processed based on the forward and reverse time dependencies to obtain a third feature data set.

6. The method for predicting power generation based on meteorological data according to claim 5, characterized in that: The power generation prediction model also includes an output module, and the training process also includes: The third feature data set is input into the output module for feature extraction and linear transformation processing to obtain the training predicted power generation.

7. The method for predicting power generation based on meteorological data according to claim 5, characterized in that: The target historical meteorological data set and the target historical power generation data set are input into the multi-head differential attention module, and the target historical meteorological data set and the target historical power generation data set are processed based on the multi-head attention mechanism to obtain a first feature data set, including: Performing a linear transformation on the target historical meteorological data set and the target historical power generation data set, dividing the transformed data into a plurality of heads, and calculating an attention matrix for each head; Determine the output attention matrix based on the preset difference factor and the attention matrix of each head; The first feature data set is obtained by performing weighted processing based on the output attention matrix and the linearly transformed value matrix.

8. A power generation prediction device based on meteorological data, characterized in that: include: An acquisition module, used to acquire a historical meteorological data set in a preset area and a historical power generation data set corresponding to the historical meteorological data set; A processing module is used to preprocess the historical meteorological data set and the historical power generation data set to obtain a preprocessed target historical meteorological data set and a target historical power generation data set; construct a power generation prediction model based on a deep learning model, and the power generation prediction model includes a Transformer-based encoding module, a multi-head differential attention module, and a bidirectional gated loop module; input the target historical meteorological data set and the target historical power generation data set into the power generation prediction model for training, and obtain a trained power generation prediction model by monitoring changes in a preset loss function, and use it to predict power generation based on real-time collected meteorological data.

9. A computing device, characterized in that include: A memory for storing one or more programs; One or more processors, configured to execute the one or more programs to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Solar energy generating capacity prediction method and system

    CN116894214A

  • Photovoltaic power generation prediction method and device

    CN118760888A

  • Short-term prediction method and device for photovoltaic generating capacity, medium and product

    CN119130187A

Cited By

  • Electricity consumption prediction method and system based on user portrait

    CN120804520A