Short-term photovoltaic power prediction method and device, electronic equipment and storage medium

The weather feature data is processed through multi-scale pooling network and Conv1d-LSTM network, and seasonal and trend features are extracted, which solves the problem of low short-term photovoltaic power prediction accuracy and achieves more efficient photovoltaic power prediction.

CN119539286APending Publication Date: 2025-02-28BEIJING JOIN BRIGHT DIGITAL POWER TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411744057.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has low prediction accuracy in short-term photovoltaic power prediction, making it difficult to effectively process the nonlinear relationship of photovoltaic power data.

Method used

The weather characteristic data is segmented by a multi-scale pooling network, seasonal characteristic data and trend characteristic data are extracted, and these characteristic data are processed through the Conv1d-LSTM network, and the photovoltaic predicted power is finally obtained through the addition operation.

Benefits of technology

Through the combination of multi-scale pooling network and Conv1d-LSTM network, different time-scale characteristics and long-term dependencies in weather data can be more effectively captured, improving the accuracy of photovoltaic power prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539286A_ABST
    Figure CN119539286A_ABST
Patent Text Reader

Abstract

The invention provides a short-term photovoltaic power prediction method and device, electronic equipment and a storage medium, and belongs to the technical field of new energy power prediction.The method comprises the steps that weather feature data are segmented based on a multi-scale pooling network, and seasonal feature data and trend feature data are obtained; performing feature extraction on the seasonal feature data to obtain first feature data, and performing feature extraction on the trend feature data to obtain second feature data; obtaining RMS feature data based on the first feature data and the second feature data; processing the weather characteristic data on the basis of a Conv1d-LSTM (Long Short Term Memory) network to obtain Conv1d-LSTM characteristic data; and obtaining photovoltaic prediction power based on the RMS characteristic data and the Conv1d-LSTM characteristic data. According to the short-term photovoltaic power prediction method and device, the electronic equipment and the storage medium provided by the invention, the prediction precision of the short-term photovoltaic power prediction model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of new energy power prediction, and more specifically, relates to a short-term photovoltaic power prediction method and device, electronic equipment, and storage medium. Background Art

[0002] As an important clean energy, solar energy is developing rapidly and plays a key role in the transformation of energy structure. The advancement and widespread application of solar energy technology not only helps to reduce the use of fossil fuels and greenhouse gas emissions, but also promotes the popularization and application of renewable energy. However, the intermittent and unstable nature of solar power generation also brings new challenges, which makes the importance of photovoltaic power forecasting increasingly prominent. Traditional statistical methods analyze historical photovoltaic power data by constructing mathematical models to identify the laws and trends therein. These statistical methods are often based on simplified assumptions and are difficult to effectively handle the nonlinear relationship of photovoltaic power data.

[0003] In recent years, with the advancement of artificial intelligence technology, deep learning methods have been widely used in photovoltaic power forecasting. Deep learning can automatically extract useful features and build complex nonlinear prediction models by learning historical data. Although there are many prediction methods, there is a problem of low prediction accuracy of photovoltaic power prediction models in short-term photovoltaic power forecasting. Summary of the invention

[0004] The purpose of the present disclosure is to provide a short-term photovoltaic power prediction method and device, electronic equipment, and storage medium to improve the prediction accuracy of a short-term photovoltaic power prediction model.

[0005] A first aspect of the embodiments of the present disclosure provides a short-term photovoltaic power prediction method, comprising: The weather feature data is segmented based on a multi-scale pooling network to obtain seasonal feature data and trend feature data; Performing feature extraction on the seasonal feature data to obtain first feature data, and performing feature extraction on the trend feature data to obtain second feature data; Obtaining RMS feature data based on the first feature data and the second feature data; The weather feature data is processed based on the Conv1d-LSTM network to obtain Conv1d-LSTM feature data; The photovoltaic predicted power is obtained based on the RMS feature data and the Conv1d-LSTM feature data.

[0006] A second aspect of the embodiments of the present disclosure provides a short-term photovoltaic power prediction device, comprising: The data segmentation module is used to segment the weather feature data based on the multi-scale pooling network to obtain seasonal feature data and trend feature data; A feature extraction module, used for performing feature extraction on the seasonal feature data to obtain first feature data, and performing feature extraction on the trend feature data to obtain second feature data; An RMS data module, used for obtaining RMS feature data based on the first feature data and the second feature data; Conv1d-LSTM data module, used to process weather feature data based on Conv1d-LSTM network to obtain Conv1d-LSTM feature data; A power prediction module is used to obtain photovoltaic predicted power based on the RMS feature data and the Conv1d-LSTM feature data.

[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned short-term photovoltaic power prediction method when executing the computer program.

[0008] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned short-term photovoltaic power prediction method are implemented.

[0009] The beneficial effects of a short-term photovoltaic power prediction method and device, electronic device, and storage medium provided by the embodiments of the present disclosure are: first, the embodiments of the present disclosure segment weather feature data through a multi-scale pooling network, which can capture information from different time scales and separate seasonal and trend feature data, laying the foundation for subsequent analysis. Secondly, feature extraction is performed to refine key representative features to make the data more refined. Finally, RMS feature data is obtained in a specific way, and multi-source key elements are integrated to fully reflect the impact of weather on photovoltaic power. The data is then processed with the help of the Conv1d-LSTM network, which can not only extract local features, but also process long-term and short-term dependencies, and better present the impact mechanism of weather and power. Finally, the two feature data are added to obtain the photovoltaic predicted power, which is simple to operate and can avoid the risk of overfitting, achieve information complementarity, and more comprehensively characterize the influencing conditions, thereby effectively improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 A schematic diagram of a flow chart of a short-term photovoltaic power prediction method provided by an embodiment of the present disclosure; Figure 2 A schematic flow chart of another short-term photovoltaic power prediction method provided by an embodiment of the present disclosure; Figure 3 A structural diagram of the RMSNet model provided in one embodiment of the present disclosure; Figure 4 A structural block diagram of a short-term photovoltaic power prediction device provided by an embodiment of the present disclosure; Figure 5 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0012] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0013] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0014] Please refer to Figure 1 , Figure 1 A schematic flow chart of a short-term photovoltaic power prediction method provided by an embodiment of the present disclosure, the method comprising: S101: Segment the weather feature data based on a multi-scale pooling network to obtain seasonal feature data and trend feature data.

[0015] In this embodiment, weather conditions have a significant impact on photovoltaic power, and weather characteristics at different time scales contain different information. The multi-scale pooling network is a network structure that can process information at different scales. The multi-scale pooling network can examine weather characteristic data from different angles, such as long time range to short time range, thereby capturing features of different scales in the data.

[0016] The multi-scale pooling network can divide the overall weather characteristic data according to different time windows (such as using the month as the scale to capture seasonal related features, and using the day as the scale to capture short-term weather change trend features, etc.), thereby separating seasonal characteristic data and trend characteristic data with different characteristics. Seasonal characteristic data reflects the relatively stable and periodic changes in the duration, intensity, and temperature of light in different seasons of the year, such as the long duration and high intensity of light in summer and the relatively weak light in winter; while trend characteristic data more reflects the direction of weather changes in the short term, such as the impact of the thickening or dissipation trend of clouds for several consecutive days on photovoltaic power.

[0017] S102: Extracting features from the seasonal feature data to obtain first feature data, and extracting features from the trend feature data to obtain second feature data.

[0018] In this embodiment, although the original seasonal feature data and trend feature data contain useful information, they are often complicated and contain many redundant parts. Through the process of feature extraction (such as convolution kernel operation in convolutional neural network, etc.), key and more representative features can be extracted from these data.

[0019] For seasonal characteristic data, the first characteristic data extracted may include characteristic factors that have an important impact on photovoltaic power in that season, such as the light angle, average temperature, typical weather patterns, etc. These characteristics can reflect the seasonal variation of weather data; for the second characteristic data extracted from trend characteristic data, the focus can be on characteristics such as cloud movement speed, air humidity change rate, etc., which can reflect the dynamic changes of weather in the short term and are closely related to photovoltaic power. These characteristics can reflect the long-term trend and variation of weather data.

[0020] S103: Obtain RMS feature data based on the first feature data and the second feature data.

[0021] In this embodiment, the RMS feature data is a fusion method that comprehensively considers the first feature data and the second feature data. The feature information of two different sources and different properties can be integrated through specific calculation rules (such as weighting, summation, splicing, etc.), so that the newly generated RMS feature data not only contains the key elements that are relatively stable and periodic at the seasonal level, but also incorporates important content related to short-term trend changes.

[0022] For example, based on the weights corresponding to the first feature data and the second feature data (the weights can be determined by data analysis or model training, etc.), a weighted combination can be performed and corresponding mathematical transformations can be performed (such as squaring, averaging, and then taking the square root, etc., which are similar to the root mean square calculation process), to obtain comprehensive feature data that can reflect the impact of weather on photovoltaic power from multiple dimensions, providing a more comprehensive basis for subsequent accurate predictions.

[0023] S104: Process the weather feature data based on the Conv1d-LSTM network to obtain Conv1d-LSTM feature data.

[0024] In this embodiment, the Conv1D-LSTM network is a deep learning model that combines the one-dimensional convolution (Convolutional Neural Network 1D, Conv1D) operation in the convolutional neural network and the long short-term memory (Long Short-Term Memory, LSTM) network.

[0025] Conv1d can extract local features from weather feature data. For data with time series characteristics such as weather feature data, Conv1d can slide the convolution kernel along the time dimension to capture the correlation between weather features at different times, such as the relationship between wind speed, temperature, light intensity and other features within a few consecutive hours.

[0026] LSTM can handle long-term and short-term dependencies in sequence data, because photovoltaic power is not only affected by the current weather, but also closely related to weather changes in the past period of time. LSTM can remember important past weather feature information through gating mechanisms (input gate, forget gate, output gate, etc.) and pass it to subsequent calculations, avoiding the gradient vanishing or gradient exploding problems that are prone to occur in traditional neural networks when processing long sequences.

[0027] The Conv1d-LSTM network that combines the two first uses Conv1d to extract local features, and then LSTM further integrates and processes the dependencies of these features in the time series. The resulting Conv1d-LSTM feature data can better reflect the impact mechanism of weather characteristics changing over time on photovoltaic power.

[0028] S105: Obtain photovoltaic predicted power based on the RMS feature data and the Conv1d-LSTM feature data.

[0029] In this embodiment, the RMS feature data and the Conv1d-LSTM feature data are added to obtain the photovoltaic predicted power.

[0030] In this embodiment, the RMS feature data integrates the key information extracted from the seasonal feature data and the trend feature data, reflecting the comprehensive situation of the impact of weather factors on photovoltaic power at different time scales, covering features such as the duration of illumination, intensity changes, and short-term weather trend changes caused by the change of seasons. The Conv1d-LSTM feature data focuses on the local characteristics of weather characteristics in the time series and the long-term and short-term dependencies, capturing the mechanism of how weather factors change dynamically over time and affect photovoltaic power, such as the correlation between changes in factors such as wind speed and cloud thickness and photovoltaic power fluctuations in several consecutive time periods. Adding these two types of feature data can make the final feature representation integrate the advantages of both aspects and achieve information complementarity, so that the obtained comprehensive features include both relatively macroscopic periodic weather influencing factors and detailed time series change-related factors, thereby more comprehensively characterizing the various conditions affecting photovoltaic power.

[0031] Compared with some complex feature fusion strategies (such as using complex nonlinear transformations or multi-layer fusion networks), the addition operation is computationally simpler and easier, and can also avoid problems such as overfitting risks caused by overly complex fusion processes to a certain extent.

[0032] From the above, it can be concluded that, first, this embodiment divides the weather feature data through a multi-scale pooling network, which can capture information from different time scales, separate seasonal and trend feature data, and lay the foundation for subsequent analysis. Secondly, feature extraction is performed to refine key representative features to make the data more refined. Finally, RMS feature data is obtained in a specific way, and multi-source key elements are integrated to fully reflect the impact of weather on photovoltaic power. The data is then processed with the help of the Conv1d-LSTM network, which can not only extract local features, but also handle long-term and short-term dependencies, and better present the impact mechanism of weather and power. Finally, the two feature data are added to obtain the photovoltaic predicted power, which is easy to operate and can avoid the risk of overfitting, achieve information complementarity, and more comprehensively characterize the influencing conditions, thereby effectively improving the prediction accuracy.

[0033] In one embodiment of the present disclosure, before segmenting the weather feature data based on the multi-scale pooling network to obtain the seasonal feature data and the trend feature data, the method further includes: Weather characteristic data are obtained based on historical meteorological data of the photovoltaic power station and power generation data corresponding to the historical meteorological data.

[0034] In this embodiment, historical meteorological data of the photovoltaic power station and power generation data corresponding to the historical meteorological data are obtained.

[0035] Exemplarily, weather characteristic data and corresponding power generation data are obtained, and the historical meteorological data of the photovoltaic power station includes but is not limited to: temperature, weather, irradiation intensity, relative humidity, precipitation, snowfall, wind speed, direct radiation energy, scattered radiation energy, extra-atmospheric solar radiation, total horizontal radiation, cloud cover, humidity, and visibility.

[0036] The historical meteorological data of the photovoltaic power station and the power generation data corresponding to the historical meteorological data are preprocessed to obtain meteorological characteristic data and power characteristic data.

[0037] Linear interpolation can be used to fill in missing values ​​in historical meteorological data. Missing values ​​in power generation data can be processed by time period, with missing data from 7pm to 6am filled with 0, and data in other time periods filled with linear interpolation.

[0038] The quartile algorithm can be used to detect the power generation data. If it is an abnormal value, it will be deleted and filled with linear interpolation.

[0039] Exemplarily, the historical meteorological data is checked for missing values. If any, they are filled with linear interpolation. The power generation data is processed by time period, and the missing data from 7 pm to 6 am is filled with 0, and the data in other time periods are filled with linear interpolation.

[0040] The quartile method is used to detect outliers in power generation data. The quartile method divides the data set into four parts, and the quartiles include the first quartile (Q1), the second quartile (Q2, i.e. the median) and the third quartile (Q3). Using the interquartile range, the range of outliers can be defined: Interquartile range:

[0041] Nether:

[0042] Upper bound:

[0043] In the photovoltaic power data, the power generation data below the lower limit or above the upper limit is determined as an abnormal value.

[0044] The detected outlier data points of the photovoltaic power data are set to null values, and the null values ​​are filled.

[0045] After processing, meteorological characteristic data and power characteristic data are obtained.

[0046] The weather characteristic data is obtained based on the meteorological characteristic data and the power characteristic data.

[0047] The Pearson correlation coefficient can be used to calculate the correlation coefficient matrix of the meteorological characteristic data and the power characteristic data, and the meteorological characteristic data with a Pearson correlation coefficient between -0.5~-1 and 0.5~1 are selected as input features.

[0048] For example, the meteorological characteristic data and power characteristic data obtained after processing are subjected to correlation analysis using the Pearson correlation coefficient, and weather characteristic values ​​with strong correlation are selected, and the selection range is that the Pearson correlation coefficient is between -0.5~-1 and 0.5~1. The Pearson correlation coefficient calculation formula is:

[0049] Among them, r represents the Pearson correlation coefficient, which ranges from -1 to 1; x i and i Respectively represent the observed values ​​of the i-th power characteristic data and the i-th meteorological characteristic data; and are the means of power characteristic data and meteorological characteristic data respectively; n represents the total number of characteristic data.

[0050] According to the calculated correlation coefficient matrix, strongly correlated features in the meteorological characteristic data are selected as meteorological characteristic data.

[0051] It can be concluded from the above that this embodiment can improve data quality by obtaining historical meteorological data and corresponding power generation data of photovoltaic power stations and performing preprocessing. For the missing values ​​of historical meteorological data and power generation data, appropriate filling methods, such as linear interpolation and time period processing, are used respectively to reduce the impact of missing data on subsequent analysis. The quartile algorithm is used to detect and process abnormal values ​​of power generation data to make the data more reasonable. Furthermore, based on the Pearson correlation coefficient, the part with strong correlation between meteorological characteristic data and power characteristic data is selected as the input feature, ranging from -0.5 to -1 and 0.5 to 1, which can focus on key factors and remove irrelevant information, laying a more accurate and reliable data foundation for subsequent photovoltaic power prediction based on weather characteristic data, which helps to improve the accuracy and effectiveness of the prediction.

[0052] In one embodiment of the present disclosure, feature extraction is performed on the seasonal feature data to obtain first feature data, including: The seasonal characteristic data is extracted based on the Local-Global network to obtain the second characteristic data; The second feature data is input into the feedforward neural network to obtain the first feature data.

[0053] In one embodiment of the present disclosure, feature extraction is performed on the seasonal feature data based on the Local-Global network to obtain second feature data, including: Based on the Local-Global network, feature extraction is performed on seasonal feature data to obtain local feature data and global feature data; The local feature data and the global feature data are subjected to feature fusion to obtain second feature data.

[0054] In this embodiment, an RMSnet model is established, and meteorological characteristic data is used as input of the RMSnet model, and photovoltaic power prediction is performed through the RMSnet model.

[0055] In this embodiment, the weather feature data can be segmented through a multi-scale pooling network to obtain seasonal feature data and trend feature data of different periods.

[0056] Several different kernels of average pooling (Avgpool) are used to separate the seasonal feature data and trend feature data information under several different convolution kernels, and the mean operation is used to fuse different feature information. Specifically, for the input sequence X, the calculation formula is:

[0057] Among them, trend represents trend characteristic data, seasonal represents seasonal characteristic data, Represented as the length of the input sequence X, represents the average pooling of the input sequence X.

[0058] By using average pooling operations with different convolution kernel sizes, the trend feature data and seasonal feature data of different periods can be obtained.

[0059] In this embodiment, the second feature data is obtained by extracting the feature of the seasonal feature data based on the Local-Global network. The Local-Global network is a network structure that combines local and global information.

[0060] First, local features are extracted. Local features are mainly down-sampled through one-dimensional convolution with different convolution kernels and step sizes to extract local feature information at different times. The calculation process formula is as follows:

[0061] in, Represents the output of the Local-Global network, i represents the different scales corresponding to different branches, represents one-dimensional convolution, represents average pooling. express Activation function, Represents the dropout rate to prevent the model from overfitting.

[0062] The second step is to extract global features. The global features in the Local-Global network use causal convolution with a kernel size equal to the length of the entire sequence to capture global correlation. In order to achieve causal convolution, the beginning of the sequence is filled with 0s of the convolution kernel -1, and then the convolution operation is performed. This allows the model to better capture long-term dependencies in the time series and makes the output of the model depend only on the current input and past input; then the output of the Local-Global network is added to the data after the causal convolution, so that the model can better focus on the local and global features in the sequence data.

[0063] in, represents causal convolution, Representation layer normalization, Represents the output of the Local module; then a one-dimensional convolution upsampling operation is used to restore the length of the sequence, and then the data of the upsampled output layer is added to the original input data, so that the model retains the original input information and prevents important information from being lost during the propagation between layers.

[0064] The second feature data is input into the feedforward neural network to obtain the first feature data.

[0065] This embodiment uses a feed-forward neural network (Feed Forward NetWork) to adopt multi-layer linear transformation and nonlinear activation functions to learn complex features and patterns of multi-time scale features, thereby improving the generalization ability and robustness of the model.

[0066] From the above, it can be concluded that this embodiment can obtain seasonal characteristic data and trend characteristic data of different periods by segmenting the weather characteristic data through a multi-scale pooling network, and can better capture the periodicity and trend information in the data. Secondly, feature extraction is performed based on the Local-Global network, first extracting local features and then extracting global features, which can comprehensively consider local and global information, so that the model can better focus on local and global features in the sequence data. In addition, the complex features and patterns of multi-time scale features are learned by using a feedforward neural network, and through multi-layer linear transformations and nonlinear activation functions, the generalization ability and robustness of the model can be improved, which helps to more accurately predict photovoltaic power.

[0067] In one embodiment of the present disclosure, feature fusion is performed on local feature data and global feature data, including: The local feature data and the global feature data are concatenated to obtain third feature data; The third feature data is weighted based on a two-dimensional convolutional network.

[0068] In this embodiment, the cat operation can be used to fuse the global feature data and local feature data extracted at different time scales; secondly, a two-dimensional convolutional network (Conv2d) convolution is used to assign weights to the features of each time scale to obtain a multi-time scale feature representation; finally, the Feed Forward NetWork network is used to use multi-layer linear transformation and nonlinear activation functions to learn the complex features and patterns of multi-time scale features, thereby improving the generalization ability and robustness of the model.

[0069] It can be concluded from the above that this embodiment obtains the third feature data by splicing the local feature data and the global feature data, and then uses the two-dimensional convolutional network to assign weights to it, which can effectively fuse the feature information at different time scales. The cat operation is used for fusion to ensure the integrity of the data. The weight allocation mechanism of the two-dimensional convolutional network allows the characteristics of each time scale to be reasonably considered. Finally, the complex features and patterns of multi-time scale features are learned through the feedforward network. This series of operations greatly improves the generalization ability and robustness of the model, which helps to make more accurate related predictions or analyses.

[0070] In one embodiment of the present disclosure, feature extraction is performed on the trend feature data to obtain second feature data, including: The trend characteristic data are linearly combined to obtain the second characteristic data.

[0071] In this embodiment, the trend feature data is input into the reversible instance normalization network (Reversible Instance Normalization, RevIN). The RevIN network can remove the non-stationary information in the input sequence, especially the mean and standard deviation of the instance, and return the information deleted by the input normalization to the model to achieve the denormalization operation of the model. The overall process of the RevIN network is: First, the trend feature data is normalized. The mean and standard deviation are calculated for each feature of the input data. The input data is standardized using the mean and standard deviation to adjust the data to a uniform scale. Then, the input feature data is linearly combined through a linear layer to capture the linear relationship between the input features. Finally, a denormalization operation is performed to denormalize the output data using the previously calculated mean and standard deviation to restore the data to its original scale.

[0072] Use mean and standard deviation to calculate input data To normalize, enter the trend characteristic data The mean and standard deviation of are calculated as follows:

[0073]

[0074] Among them, mean represents the average value, Variance represents the standard deviation, and s represents the length of the input sequence. Represents the jth input trend feature data.

[0075] Using the mean and standard deviation calculated above, we normalize the data:

[0076] in, Represents the normalized trend characteristic data value, Represents trend characteristic data value.

[0077] In order to enhance the expressiveness of the model, RevIN can also introduce affine transformation parameters and :

[0078] The calculation formula for denormalization is:

[0079]

[0080] In one embodiment of the present disclosure, weather feature data is processed based on a Conv1d-LSTM network to obtain Conv1d-LSTM feature data, including: Processing the weather feature data based on a one-dimensional convolutional network to obtain first local feature data; The first local feature data is input into the short-term memory network to obtain Conv1d-LSTM feature data.

[0081] In this embodiment, Conv1d-LSTM can comprehensively analyze the sequence data and effectively extract and utilize the spatial and temporal features in the sequence data by combining the local features extracted by one-dimensional convolution with the temporal dependencies captured by LSTM. Construct a Conv1d-LSTM convolutional recurrent network. The convolutional recurrent network extracts down-sampling features by inputting the input sequence into a one-dimensional convolution. The one-dimensional convolutional neural network slides on the input sequence through the convolution kernel to extract local features.

[0082]

[0083] in, is the output feature, are the elements of the input sequence, is the weight of the convolution kernel, is the bias, and K is the size of the convolution kernel. Then the extracted first local feature data is sent to the LSTM network to extract long-term and short-term features and extract the long-term and short-term dependencies in the sequence data.

[0084] Furthermore, the processed input feature data is input into the RMSNet model for training, and the mean squared error function (MSE) is selected as the loss function of the RMSNet model. The formula of the MSE loss function is:

[0085] in, Indicates the real photovoltaic power data provided, is the photovoltaic predicted power value output by the RMSNet model, The loss value calculated by the value and the output value. In theory, The smaller the error, the higher the prediction accuracy of the RMSNet model; conversely, if The larger the value, the greater the error between the predicted value and the true value, and the model parameters need to be adjusted and trained again. Therefore, the optimization goal of the RMSNet model is:

[0086] in, Represents the training data of the RMSNet model, The formula represents the parameter of the model. The meaning of this formula is to continuously adjust the parameters of the model so that The value of is reduced, and the prediction accuracy of the model is improved. This is also the training process of the RMSNet model. If the loss value does not decrease after 3 epochs, stop training and get the weight file of the short-term photovoltaic power prediction model.

[0087] From the above, it can be concluded that this embodiment combines a one-dimensional convolutional network and a short-term memory network through Conv1d-LSTM, which can comprehensively analyze sequence data and effectively extract and utilize spatial and temporal features in the data. By extracting local features through a one-dimensional convolutional network and then capturing long-term and short-term dependencies through an LSTM network, weather feature data can be accurately processed. Secondly, the mean square error function (MSE) is selected as the loss function of the RMSNet model. By continuously adjusting the model parameters to reduce the MSE value, the prediction accuracy of the model can be improved, ensuring more accurate results in photovoltaic power prediction.

[0088] Please refer to Figure 2-3 , Figure 2 A schematic diagram of a process flow of another short-term photovoltaic power prediction method provided by an embodiment of the present disclosure, Figure 3 A structural diagram of the RMSNet model provided in one embodiment of the present disclosure.

[0089] like Figure 2 As shown, the photovoltaic power prediction method based on RMSNet in this embodiment includes the following steps: S201: Sort out the required data such as temperature, weather, irradiance, relative humidity, precipitation, snowfall, wind speed, direct radiation energy, scattered radiation energy, extra-atmospheric solar radiation, total horizontal radiation, cloud cover, humidity, visibility, and photovoltaic power. Use linear interpolation to fill missing values ​​for weather data and photovoltaic power data, and fill missing data from 7pm to 6am with 0 values.

[0090] S202: Preprocessing the power data and weather data of the photovoltaic power station.

[0091] The quartile algorithm is used to detect the power generation data. First, the power generation is arranged in ascending order; then the median (Q2) is calculated. If the number of data points is an odd number, the median is the middle number. If the number of data points is an even number, the median is the average of the two middle numbers; then the first quartile (Q1) is calculated. Q1 is calculated for the power generation data in the lower half, and the odd and even numbers are taken in the same way as Q2; then the third quartile (Q3) is calculated. Q3 is calculated for the power generation data in the upper half, and the odd and even numbers are taken in the same way as Q2. Finally, the upper and lower bounds of the outliers are defined according to Q1, Q2, Q3, and Q4. In the photovoltaic power generation data, photovoltaic power data below the lower bound or above the upper bound is determined as an outlier. If it is an outlier, it is deleted and filled with linear interpolation and zero-filling methods.

[0092] The Pearson correlation coefficient is used to calculate the correlation coefficient matrix between weather features and photovoltaic power data. Weather features with coefficients between -0.5~-1 and 0.5~1 are taken as input features.

[0093] S204: Establish an RMSNet model and obtain prediction results.

[0094] Construct the RMSNet short-term photovoltaic power prediction algorithm model. The model structure diagram is as follows Figure 3 As shown in the figure, the weather feature values ​​selected in step 3 are input into the model, and the feature extraction is mainly divided into two steps: RMS module and Conv1d-LSTM.

[0095] RMS Module The feature data is first subjected to multi-core average pooling, and the feature data is divided into two parts: Seasonal and trend. Seasonal and trend are respectively subjected to feature extraction by the MLG module and the RevIN module.

[0096] In the MLG module, the Seanonal feature data is first processed through a one-dimensional convolution operation, and then the feature information of different time scales is obtained through an average pooling operation. Then, the stride and kernel values ​​in the one-dimensional convolution are set to perform a downsampling operation, which is mainly used to extract local feature information. Then, the nonlinear expression ability of the model is increased through the tanh function, and dropout is used to randomly discard some neurons of the one-dimensional convolution to improve the generalization ability of the model. Then, 0 values ​​are used for padding, which is mainly to keep the sequence length unchanged when performing causal convolution, and to make the model only see the local feature information in front of the current time node when extracting global features. Then, the residual connection operation is used to fuse the global feature information and the local feature information, and LayerNorm is used to normalize the feature channels to reduce the complexity of the model and improve the model performance. Finally, an upsampling operation is used to restore the sequence length caused by downsampling, and then the data of the upsampled output layer is added to the original input data, so that the model combines features at different levels and the model can learn more complex feature representations.

[0097] In the RevIN module, the feature data is first normalized. First, the mean and standard deviation are calculated for each feature of the input data, and the input data is standardized using the mean and standard deviation to adjust the data to a uniform scale. Then, the input feature data is linearly combined through a linear layer to capture the linear relationship between the input features. Finally, a denormalization operation is performed to denormalize the output data using the previously calculated mean and standard deviation to restore the data to its original scale.

[0098] The cat operation is used to fuse the global features and local features extracted from different time scales. Secondly, Conv2d convolution is used to assign weights to the features of each time scale to obtain multi-time scale feature representation. Finally, the Feed Forward NetWork module uses multi-layer linear transformation and nonlinear activation function to learn the complex features and patterns of multi-time scale features, thereby improving the generalization ability and robustness of the model.

[0099] Then, the feature data of Seanonal and trend after the MLG module and RevIN module are added to obtain the feature data of the final RMS module of the multi-scale pooling part.

[0100] Conv1d-LSTM The original data is passed through Conv1d to capture the local dependencies in the sequence data, and then the feature map output by the convolution layer is regarded as the input sequence of the LSTM layer. Each time step has a feature vector, which constitutes the input sequence of the LSTM. The LSTM gradually processes each time step of the input sequence. At each time step, the LSTM updates its internal state based on the current input, the hidden state of the previous time step, and the cell state. The cell state is updated at each time step to retain important information and discard unnecessary information. Through this data flow mechanism, the LSTM can effectively capture the long-term and short-term dependencies in the sequence data.

[0101] Finally, the outputs of the RMS module and Conv1d-LSTM are added to obtain the final feature representation for short-term photovoltaic power prediction.

[0102] During the training process of the RMSNet model, the MSE loss function is used to calculate the error loss between the predicted value and the actual value. If the loss value does not decrease after 3 epochs, the training is stopped and the weight file of the short-term photovoltaic power prediction model is obtained.

[0103] Corresponding to a short-term photovoltaic power prediction method in the above embodiment, Figure 4 This is a structural block diagram of a short-term photovoltaic power prediction device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 The short-term photovoltaic power prediction device 20 includes: a data segmentation module 21, a feature extraction module 22, an RMS data module 23, a Conv1d-LSTM data module 24, and a power prediction module 25.

[0104] The data segmentation module 21 is used to segment the weather characteristic data based on the multi-scale pooling network to obtain seasonal characteristic data and trend characteristic data; A feature extraction module 22 is used to extract features from the seasonal feature data to obtain first feature data, and to extract features from the trend feature data to obtain second feature data; An RMS data module 23, configured to obtain RMS feature data based on the first feature data and the second feature data; Conv1d-LSTM data module 24, used for processing weather characteristic data based on Conv1d-LSTM network to obtain Conv1d-LSTM characteristic data; The power prediction module 25 is used to obtain the photovoltaic predicted power based on the RMS feature data and the Conv1d-LSTM feature data.

[0105] In one embodiment of the present disclosure, a short-term photovoltaic power prediction device 20 further includes: a data processing module; specifically used to obtain weather characteristic data based on historical meteorological data of the photovoltaic power station and power generation data corresponding to the historical meteorological data.

[0106] In one embodiment of the present disclosure, the feature extraction module 22 is further used to: The seasonal characteristic data is extracted based on the Local-Global network to obtain the second characteristic data; The second feature data is input into the feedforward neural network to obtain the first feature data.

[0107] In one embodiment of the present disclosure, the feature extraction module 22 is further used to: Based on the Local-Global network, feature extraction is performed on seasonal feature data to obtain local feature data and global feature data; The local feature data and the global feature data are subjected to feature fusion to obtain second feature data.

[0108] In one embodiment of the present disclosure, the feature extraction module 22 is further used to: The local feature data and the global feature data are concatenated to obtain third feature data; The third feature data is weighted based on a two-dimensional convolutional network.

[0109] In one embodiment of the present disclosure, the feature extraction module 22 is further used to: The trend characteristic data are linearly combined to obtain the second characteristic data.

[0110] In one embodiment of the present disclosure, the Conv1d-LSTM data module is specifically used for: Processing the weather feature data based on a one-dimensional convolutional network to obtain first local feature data; The first local feature data is input into the short-term memory network to obtain Conv1d-LSTM feature data.

[0111] See also Figure 5 , Figure 5 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 5The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned device embodiments, such as Figure 4 The functions of modules 21 to 25 are shown.

[0112] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0113] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0114] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0115] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of a short-term photovoltaic power prediction method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0116] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0117] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0118] Those of ordinary skill 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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 this disclosure.

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

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed electronic 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0121] 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 embodiments of the present disclosure.

[0122] In addition, each functional unit in each embodiment of the present disclosure 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0123] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A short-term photovoltaic power prediction method, characterized in that: include: The weather feature data is segmented based on a multi-scale pooling network to obtain seasonal feature data and trend feature data; Performing feature extraction on the seasonal feature data to obtain first feature data, and performing feature extraction on the trend feature data to obtain second feature data; Obtaining RMS feature data based on the first feature data and the second feature data; The weather feature data is processed based on the Conv1d-LSTM network to obtain Conv1d-LSTM feature data; The photovoltaic predicted power is obtained based on the RMS feature data and the Conv1d-LSTM feature data.

2. A short-term photovoltaic power prediction method as claimed in claim 1, characterized in that: Before segmenting the weather characteristic data based on the multi-scale pooling network to obtain the seasonal characteristic data and the trend characteristic data, the method further includes: The weather characteristic data is obtained based on historical meteorological data of the photovoltaic power station and power generation data corresponding to the historical meteorological data.

3. A short-term photovoltaic power prediction method as claimed in claim 1, characterized in that: The step of extracting features from the seasonal feature data to obtain first feature data includes: Extracting features from the seasonal feature data based on a Local-Global network to obtain second feature data; The second feature data is input into a feedforward neural network to obtain the first feature data.

4. A short-term photovoltaic power prediction method as claimed in claim 3, characterized in that: The extracting the seasonal characteristic data based on the Local-Global network to obtain the second characteristic data includes: Extracting features of the seasonal feature data based on a Local-Global network to obtain local feature data and global feature data; The local feature data and the global feature data are subjected to feature fusion to obtain the second feature data.

5. A short-term photovoltaic power prediction method as claimed in claim 4, characterized in that: The performing feature fusion on the local feature data and the global feature data comprises: splicing the local feature data and the global feature data to obtain third feature data; A weight is assigned to the third feature data based on a two-dimensional convolutional network.

6. A short-term photovoltaic power prediction method as claimed in claim 1, characterized in that: The step of extracting features from the trend feature data to obtain second feature data includes: The trend characteristic data are linearly combined to obtain the second characteristic data.

7. A short-term photovoltaic power prediction method as claimed in claim 1, characterized in that: The weather feature data is processed based on the Conv1d-LSTM network to obtain Conv1d-LSTM feature data, including: Processing the weather feature data based on a one-dimensional convolutional network to obtain first local feature data; The first local feature data is input into a short-term memory network to obtain the Conv1d-LSTM feature data.

8. A short-term photovoltaic power prediction device, characterized in that: include: The data segmentation module is used to segment the weather feature data based on the multi-scale pooling network to obtain seasonal feature data and trend feature data; A feature extraction module, used for performing feature extraction on the seasonal feature data to obtain first feature data, and performing feature extraction on the trend feature data to obtain second feature data; An RMS data module, used for obtaining RMS feature data based on the first feature data and the second feature data; Conv1d-LSTM data module, used to process weather feature data based on Conv1d-LSTM network to obtain Conv1d-LSTM feature data; A power prediction module is used to obtain photovoltaic predicted power based on the RMS feature data and the Conv1d-LSTM feature data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Short-term prediction method and device for photovoltaic power generation power

    CN121172757A

  • A short-term prediction method and device for photovoltaic power generation

    CN121172757B