A lightweight photovoltaic power prediction method and system for multi-source data fusion
Through the combination of multi-source data fusion and BiGRU-Attention network, the limitations of the existing photovoltaic power generation prediction technology and the heavy computing burden are solved, and efficient and accurate photovoltaic power prediction is achieved, which is suitable for the needs of small photovoltaic power plants.
Patent Information
- Application Number
- CN202510176916.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-18
AI Technical Summary
The existing photovoltaic power prediction technology has the limitations of a single data source, heavy computing burden, high hardware resources requirements, unsuitable for small photovoltaic power stations, and poor adaptability to complex weather conditions and nonlinear characteristics of cloud cluster movement.
The lightweight multi-source data fusion method is adopted to obtain satellite cloud maps, foundation cloud maps, meteorological data and photovoltaic power historical data, and dynamic cloud tracking method, multi-scale frequency domain optimization cloud segmentation method and mutual information method to extract the characteristics of multi-source data, and build a BiGRU-Attention network for data fusion and prediction.
It improves data utilization efficiency and prediction accuracy, reduces the computing burden and model requirements for hardware resources, is suitable for the deployment of low-resource scenarios, realizes accurate and lightweight power prediction, and supports real-time monitoring and energy management decisions of small photovoltaic power plants in rural areas.
Smart Images

Figure CN119691685B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation prediction, and more specifically, to a lightweight multi-source data fusion photovoltaic power generation prediction method and system. Background Art
[0002] With the progress of technology, policy support, and cost reduction, the popularity of photovoltaic power generation in rural areas has increased year by year, bringing profound impacts on rural economy, energy supply, and environmental protection. Some villages and regions choose to build centralized photovoltaic power stations on idle land. Especially in areas with sufficient sunlight, centralized photovoltaic power stations can generate electricity on a large scale and provide stable power. Through grid connection, the photovoltaic power station can achieve self-use of generated electricity and feed the surplus electricity into the grid. Farmers' families can not only reduce electricity bills but also obtain stable cash income by selling the surplus electricity.
[0003] Regarding the prediction of photovoltaic power generation power, the existing technologies have limitations in single data sources. Many prediction schemes only rely on satellite cloud images or historical power generation data, and do not fully utilize the complementarity between multi-source data, resulting in limited prediction accuracy. In addition, the existing technologies have a heavy computational burden. Especially for the schemes based on satellite cloud images or complex neural networks, they often have high requirements for hardware resources and are not suitable for deployment in rural small power stations; or for the method of independently using satellite cloud images or ground-based cloud images for cloud image extrapolation to predict the cloud images in the short term in the future and indirectly realize the prediction of photovoltaic power generation power. However, the amount of image data is large, which poses a great test to the computational amount of the model and the memory of the device. Moreover, the process of accurately predicting the image is complex, with high requirements for the prediction model, and it does not meet the needs of small centralized photovoltaic power stations. Secondly, the existing feature extraction technologies for cloud images do not have good adaptability to complex weather conditions and the non-linear characteristics of cloud mass movement, and perform poorly in terms of computational speed and memory occupation. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the existing technologies in the complex calculation of photovoltaic power generation power prediction and the high requirements for prediction models and devices, and to provide a lightweight multi-source data fusion photovoltaic power generation prediction method and system, which reduces the computational burden of the model, improves the prediction speed and accuracy of the model, and is suitable for deployment in low-resource scenarios.
[0005] To solve the above technical problems, the technical solution adopted by the present invention is:
[0006] Provide a lightweight multi-source data fusion photovoltaic power generation prediction method, including the following steps:
[0007] S1. Data collection: Obtain satellite cloud images, ground-based cloud images, meteorological data, and historical photovoltaic power generation data of a centralized photovoltaic power station, construct a data set, and perform data preprocessing;
[0008] S2. Extract the features of multi-source data to form a multi-source data set: Use the dynamic cloud tracking method to extract the motion features of clouds in satellite cloud images, including the speed and direction of clouds; Use the multi-scale frequency domain optimized cloud segmentation method to perform automatic threshold segmentation on cloud images and extract the cloud amount features in ground-based cloud images; Use the mutual information method to analyze the mutual dependence between photovoltaic power generation and meteorological factors, and extract strongly correlated meteorological factors as meteorological features; The collected motion features, cloud amount features, and meteorological features are constructed into a multi-source data set;
[0009] S3. Construct a photovoltaic power prediction model for multi-source data fusion: Construct a BiGRU-Attention network to fuse the features of multi-source data and predict the photovoltaic power;
[0010] S4. Train the photovoltaic power prediction model: Divide the multi-source data set into a training set and a test set, use the training set to train the photovoltaic power prediction model for multi-source data fusion, and use the test set to evaluate the photovoltaic power prediction model. When the accuracy of the photovoltaic power prediction model reaches the set threshold, the training stops;
[0011] S5. Use the trained photovoltaic power prediction model to predict the photovoltaic power of a centralized photovoltaic power station.
[0012] A lightweight photovoltaic power prediction method for multi-source data fusion provided by the present invention combines satellite cloud images, ground-based cloud images, key meteorological factors, and historical photovoltaic power data, which can improve data utilization efficiency and prediction accuracy, uses an optimized feature extraction method to speed up the calculation speed and reduce the calculation burden, and uses a lightweight architecture that combines traditional time series modeling and attention mechanism, which is suitable for deployment in low-resource scenarios; The present invention realizes the feature extraction and fusion of multi-source data for photovoltaic power generation, realizes accurate and lightweight power generation power prediction, so that the managers of small centralized photovoltaic power stations in rural areas can monitor and accurately and efficiently predict the photovoltaic power on mobile terminals, so as to make corresponding energy management decisions.
[0013] Preferably, the step S3 includes:
[0014] S31. Construct a BiGRU-Attention network to fuse the features of multi-source data and predict the photovoltaic power. The BiGRU-Attention network includes an input layer, a bidirectional GRU layer, a feature attention mechanism layer, and a fully connected layer, and uses the error backpropagation algorithm to optimize the network;
[0015] S32. The input layer is used to receive the cloud motion features from satellite cloud images, the cloud amount features from ground-based cloud images, the meteorological features from meteorological departments, and the historical photovoltaic power data, and merge each feature in the form of a time series to form an input feature matrix:
[0016]
[0017]
[0018] Wherein, is the motion speed of the cloud, is the motion direction of the cloud, is the cloud amount, is the preferred meteorological factor, is the photovoltaic power; is the number of data, is the input feature matrix
[0019] S33. The bidirectional GRU layer is used to capture the bidirectional context information of the time series to obtain the forward and backward hidden states , and map the hidden state of each time step output by the bidirectional GRU layer to the feature dimension:
[0020] ,
[0021] ,
[0022] ,
[0023] ;
[0024] Wherein, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer;
[0025] S34. The feature attention mechanism layer is used to adjust the weights of multi-source data features and weight the features of multi-source data to obtain global features :
[0026]
[0027]
[0028] Wherein, is the weight of the multi-source data features, and N is the dimension of the feature vector;
[0029] S35. Finally, map the features to the photovoltaic power generation through the fully connected layer:
[0030]
[0031] In the formula, 、 are the weight matrix and bias of the fully connected layer, is the photovoltaic power output.
[0032] Preferably, the step S1 includes:
[0033] S11. Collect and organize multi-source data, including satellite remote sensing cloud images, ground-based cloud images, meteorological conditions, and photovoltaic power generation of a centralized photovoltaic power station within a continuous period of time;
[0034] S12. Preprocess the data set, adjust the image data to a unified size, remove the noise in the image, and perform histogram equalization processing on the image;
[0035] S13. Detect and process outliers and missing values in meteorological factors and photovoltaic power generation, and normalize the data.
[0036] Preferably, the steps of extracting the motion characteristics of clouds in the satellite cloud image by using the dynamic cloud tracking method in the step S2 include the following steps:
[0037] S211. Convert the satellite cloud image into a grayscale image, construct multiple frames of cloud images, and use the continuous satellite cloud image sequence as the input:
[0038]
[0039] In the formula, , is the grayscale value of the cloud image, is the pixel point coordinate of the cloud image, represents time; represents the interval time of the continuous satellite cloud image sequence;
[0040] Divide the cloud image into small blocks, extract gradient features within each small block, and calculate the grayscale gradients of each frame of cloud image in space and time:
[0041] , , ,
[0042] The grayscale gradients respectively describe the change rates of the cloud cluster in the x and y directions, as well as the change rate in the time dimension;
[0043] Perform Taylor decomposition on the grayscale function:
[0044]
[0045] In the formula, , , are the partial derivatives of the function with respect to , , respectively, and is the remainder of the Taylor expansion;
[0046] Ignoring , and then letting the velocity of the cloud mass in the x-axis direction be , and the velocity in the y-axis direction be , the following equation is obtained:
[0047]
[0048] S212. Based on the fact that the pixels in the satellite cloud image have the same displacement within the same time, the displacement equations corresponding to each pixel in the satellite cloud image are obtained:
[0049]
[0050] S213. The conjugate gradient method is used to solve the above linear equations, that is, the motion velocity vector of the cloud mass is obtained. Writing the equation in step S212 as . In order to solve , the objective function is constructed, that is:
[0051]
[0052] Calculate the step size:
[0053]
[0054] In the formula, represents the number of iterations, and represents the residual;
[0055] Update the solution:
[0056]
[0057] Update the residual:
[0058]
[0059] Calculate the adjustment coefficient of the new direction:
[0060]
[0061] If , stop the iteration, and then obtain the moving speed of the cloud cluster , the displacement of the cloud cluster, .
[0062] Preferably, in the step S2, a multi-scale frequency domain optimized cloud segmentation method is used to perform automatic threshold segmentation on the cloud image, and the cloud amount feature in the ground-based cloud image is extracted, specifically including:
[0063] S221. Convert the ground-based cloud image from a color image to a grayscale image, and count the number of pixels at each gray level in the grayscale image to obtain the histogram of the ground-based cloud image , the formula is as follows:
[0064]
[0065] In the formula, is the pixel value of the grayscale image, is the Kronecker delta function, when at that time , otherwise it is 0, , and are the width and height of the ground-based cloud image;
[0066] S222. Normalize the grayscale histogram of the ground-based cloud image, and divide the image into regions for processing. The grayscale distribution probability of each region is as follows:
[0067] ;
[0068] In the formula, represents the region, is the histogram of the cloud image in the region , and are the width and height of the cloud image in the region respectively;
[0069] S223. For each region, calculate the between-class variance of each region in the cloud image respectively. Determine the optimal threshold by maximizing the between-class variance. First, calculate the weights and means of the cloud region and the non-cloud region:
[0070] , ,
[0071] , ,
[0072] In the formula, represents the weight of the cloud region, represents the weight of the non-cloud region, represents the mean of the cloud area, represents the mean of the non-cloud area;
[0073] The between-class variance is: ;
[0074] Find the threshold that maximizes the between-class variance , and fuse the regional thresholds into a global threshold through weighted averaging , and the formula is:
[0075] ;
[0076] S224. Use the optimal threshold to binarize the grayscale image of the cloud map, dividing the image into a cloud area and a non-cloud area. The formula is as follows:
[0077] ,
[0078] wherein, is the binarized cloud map, 1 represents the cloud area, and 0 represents the non-cloud area;
[0079] S225. Combine the binarization result of the cloud map with the frequency domain characteristics of the image, and obtain the frequency information through Fourier transform:
[0080] ,
[0081] Enhance the cloud edge features through Gaussian filtering and superimpose them on the binary map to optimize the result:
[0082] ,
[0083] where is the inverse Fourier transform;
[0084] According to the finally optimized binary map calculate the proportion of the pixels in the cloud area to the total pixels, that is, obtain the cloud amount feature :
[0085] .
[0086] Preferably, in step S2, the mutual information method is used to analyze the mutual dependence between photovoltaic power generation and meteorological factors, and extract the meteorological factors with strong correlation as meteorological features, specifically including:
[0087] S231. Obtain several meteorological factors such as temperature T, humidity H, wind speed W, and radiation intensity S of the photovoltaic power station from the meteorological observation station as the main influencing factors;
[0088] S232. Normalize each meteorological factor and photovoltaic power generation to eliminate dimensional differences;
[0089] S233. Use the histogram method to estimate the joint probability density of meteorological factors and photovoltaic power generation , and estimate the marginal probability density of meteorological factors and photovoltaic power generation 、 ;
[0090] S234. Calculate the mutual information between meteorological factors and photovoltaic power generation according to the joint distribution and marginal distribution:
[0091]
[0092] S235. Select meteorological factors with mutual information values greater than the set threshold as meteorological features.
[0093] Preferably, the step S4 includes:
[0094] S41. Divide the multi-source data set extracted in step S2 into a training set and a test set;
[0095] S42. Use the test set to evaluate the trained photovoltaic power generation prediction model based on multi-source data fusion. The evaluation index is the root mean square error RMSE to determine the prediction accuracy of the model;
[0096] S43. When the prediction accuracy of the model is lower than the set threshold, optimize the model according to the evaluation results, and continue to train the photovoltaic power generation prediction model based on multi-source data fusion until the prediction accuracy reaches the set threshold.
[0097] The present invention also provides a lightweight photovoltaic power generation prediction system based on multi-source data fusion, including:
[0098] Data acquisition module: used to obtain satellite cloud images, ground-based cloud images, meteorological data, and historical photovoltaic power generation data of a centralized photovoltaic power station, construct a data set, and perform data preprocessing;
[0099] Multi-source data feature extraction module: used to extract the motion features of clouds in satellite cloud images by using the dynamic cloud tracking method, including the speed and direction of clouds; perform automatic threshold segmentation on cloud images by using the multi-scale frequency domain optimized cloud segmentation method to extract the cloud amount features in ground-based cloud images; analyze the mutual dependence between photovoltaic power generation and meteorological factors by using the mutual information method, and extract meteorological factors with strong correlation as meteorological features; construct the collected motion features, cloud amount features, and meteorological features into a multi-source data set;
[0100] Model construction module: used to construct a photovoltaic power prediction model for multi-source data fusion. By constructing a BiGRU-Attention network, the features of multi-source data are fused to predict the photovoltaic power.
[0101] Model training module: used to train the photovoltaic power prediction model. By dividing the multi-source data set into a training set and a test set, the photovoltaic power prediction model for multi-source data fusion is trained using the training set, and the photovoltaic power prediction model is evaluated using the test set. When the accuracy of the photovoltaic power prediction model reaches the set threshold, the training terminates.
[0102] Prediction module: used to predict the photovoltaic power of a centralized photovoltaic power station using the trained photovoltaic power prediction model.
[0103] Preferably, in the model construction module, the BiGRU-Attention network includes:
[0104] Input layer unit: used to receive the cloud movement features from satellite cloud images, the cloud amount features from ground-based cloud images, the meteorological features from the meteorological department, and the historical data of photovoltaic power. The features are merged in the order of time series to form an input feature matrix:
[0105]
[0106]
[0107] In the formula, is the movement speed of the cloud, is the movement direction of the cloud, is the cloud amount, is the preferred meteorological factor, is the photovoltaic power; is the number of data, is the input feature matrix;
[0108] Bidirectional GRU layer unit: used to capture the bidirectional context information of the time series and obtain the forward and backward hidden states , and map the hidden state of each time step output by the bidirectional GRU layer to the feature dimension:
[0109] ,
[0110] ,
[0111] ,
[0112] ;
[0113] In the formula, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer;
[0114] Feature attention mechanism layer unit: used to adjust the weights of multi-source data features and weight the features of multi-source data to obtain global features :
[0115]
[0116]
[0117] In the formula, is the weight of the multi-source data features, and N is the dimension of the feature vector;
[0118] Fully connected layer: used to map features to photovoltaic power generation:
[0119]
[0120] In the formula, , are the weight matrix and bias of the fully connected layer; is the photovoltaic power output.
[0121] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.
[0122] Compared with the prior art, the beneficial effects of the present invention are:
[0123] A lightweight multi-source data fusion photovoltaic power prediction method and system of the present invention combines satellite cloud images, ground-based cloud images, key meteorological factors, and historical photovoltaic power data, which can improve data utilization efficiency and prediction accuracy, uses an optimized feature extraction method to speed up the calculation speed and reduce the calculation burden, and uses a lightweight architecture that combines traditional time series modeling and attention mechanism, which is suitable for deployment in low-resource scenarios; the present invention realizes the feature extraction and fusion of multi-source data for photovoltaic power generation, realizes accurate and lightweight power generation power prediction, so that the managers of small centralized photovoltaic power stations in rural areas can monitor and accurately and efficiently predict the photovoltaic power generation power on a mobile terminal, so as to make corresponding energy management decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0124] Figure 1Schematic flow chart of the method according to the first embodiment of the present invention;
[0125] Figure 2 Schematic diagram of the principle of the present invention;
[0126] Figure 3 Prediction effect diagram of the power generation power of the medium-voltage in the fourth embodiment of the present invention;
[0127] Figure 4 Schematic diagram of the system structure in the fifth embodiment of the present invention. Detailed implementation manners
[0128] The present invention will be further described below in conjunction with the detailed implementation manners. Among them, the drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation of this patent; in order to better illustrate the embodiments of the present invention, some components in the drawings will be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0129] In the drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", etc. indicating the orientation or positional relationship, they are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the drawings are only for illustrative purposes and should not be construed as a limitation of this patent. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0130] Embodiment 1
[0131] This embodiment is the first embodiment of a lightweight multi-source data fusion photovoltaic power prediction method. As Figure 1 shown, the method includes the following steps:
[0132] S1. Data collection: Obtain satellite cloud images, ground-based cloud images, meteorological data, and historical photovoltaic power data of a centralized photovoltaic power station, construct a data set, and perform data preprocessing;
[0133] S2. Extract the features of multi-source data to form a multi-source data set: The dynamic cloud tracking method is used to extract the motion features of clouds in satellite cloud images, including the speed and direction of clouds; the multi-scale frequency domain optimized cloud segmentation method is used to perform automatic threshold segmentation on cloud images to extract the cloud amount features in ground-based cloud images; the mutual information method is used to analyze the mutual dependence between photovoltaic power generation and meteorological factors, and strongly correlated meteorological factors are extracted as meteorological features; the collected motion features, cloud amount features, and meteorological features are constructed into a multi-source data set;
[0134] S3. Construct a photovoltaic power prediction model for multi-source data fusion: Construct a BiGRU-Attention network to fuse the features of multi-source data and predict the photovoltaic power;
[0135] S4. Train the photovoltaic power prediction model: Divide the multi-source data set into a training set and a test set, use the training set to train the photovoltaic power prediction model for multi-source data fusion, and use the test set to evaluate the photovoltaic power prediction model. When the accuracy of the photovoltaic power prediction model reaches the set threshold, the training stops;
[0136] S5. Use the trained photovoltaic power prediction model to predict the photovoltaic power of a centralized photovoltaic power station.
[0137] This embodiment provides a lightweight photovoltaic power prediction method for multi-source data fusion. First, satellite cloud images, ground-based cloud images, meteorological data, and historical photovoltaic power data of a photovoltaic base are obtained to construct a data set and perform data preprocessing; the dynamic cloud tracking method is used to extract the motion features of clouds in satellite cloud images, the multi-scale frequency domain optimized cloud segmentation method is used to perform threshold segmentation on ground-based cloud images to extract the cloud amount information in ground-based cloud images, and the mutual information method is used to analyze the mutual dependence between photovoltaic power generation and meteorological factors to extract strongly correlated meteorological factors; then, various features are sent into a BiGRU-Attention network for model training; finally, the trained model is deployed to the Solar Eye system, and the prediction model is used to predict the photovoltaic power. The present invention realizes the feature extraction and fusion of multi-source data for photovoltaic power generation, realizes accurate and lightweight power generation power prediction, so that the managers of small centralized photovoltaic power stations in rural areas can perform real-time monitoring and accurate and efficient prediction of photovoltaic power on mobile terminals, so as to make corresponding energy management decisions.
[0138] Embodiment 2
[0139] This embodiment is the second embodiment of a lightweight photovoltaic power prediction method for multi-source data fusion. This embodiment is similar to Embodiment 1, and the difference lies in that in this embodiment, the method steps of constructing a data set and performing data preprocessing and extracting the features of multi-source data are provided.
[0140] In this embodiment, the acquisition and processing of data specifically include the following steps:
[0141] S11. Collect and organize multi-source data, including satellite remote sensing cloud images, ground-based cloud images, meteorological conditions, and photovoltaic power generation of a centralized photovoltaic power station within a continuous period of time;
[0142] S12. Preprocess the data set, adjust the image data to a unified size, remove the noise in the image, and perform histogram equalization processing on the image;
[0143] S13. Detect and process outliers and missing values in meteorological factors and photovoltaic power generation, and normalize the data.
[0144] In this embodiment, the method for extracting the motion characteristics of clouds in satellite cloud images using the dynamic cloud tracking method includes the following steps:
[0145] S211. Convert the satellite cloud image into a grayscale image, construct multiple frames of cloud images, and use the continuous satellite cloud image sequence as the input:
[0146]
[0147] where , is the grayscale value of the cloud image, are the pixel coordinates of the cloud image, represents time; represents the time interval of the continuous satellite cloud image sequence;
[0148] Divide the cloud image into small blocks, extract gradient features within each small block, and calculate the grayscale gradients of each frame of cloud image in space and time:
[0149] , , ,
[0150] The grayscale gradients respectively describe the change rates of the cloud cluster in the x and y directions, as well as the change rate in the time dimension;
[0151] Perform Taylor decomposition on the grayscale function:
[0152]
[0153] where , , are the partial derivatives of the function with respect to , , , is the remainder of the Taylor expansion;
[0154] Ignore and then let the velocity of the cloud mass in the x-axis direction be and the velocity in the y-axis direction be to obtain the equation:
[0155]
[0156] S212. Based on the fact that pixels in the satellite cloud image have the same displacement in the same time, the displacement equations corresponding to each pixel in the satellite cloud image are obtained:
[0157]
[0158] S213. Use the conjugate gradient method to solve the above linear equations, that is, the motion velocity vector of the cloud mass is obtained Write the equation in step S212 as To solve construct the objective function That is:
[0159]
[0160] Calculate the step size:
[0161]
[0162] In the formula, represents the number of iterations, represents the residual
[0163] Update the solution:
[0164]
[0165] Update the residual:
[0166]
[0167] Calculate the adjustment coefficient of the new direction:
[0168]
[0169] If stop the iteration, and then obtain the motion velocity of the cloud mass and the displacement of the cloud mass, .
[0170] In this embodiment, the multi-scale frequency domain optimized cloud segmentation method is used to perform automatic threshold segmentation on the cloud image to extract the cloud amount characteristics in the ground-based cloud image, specifically including:
[0171] S221. Convert the ground-based cloud image from a color image to a grayscale image, count the number of pixels at each gray level in the grayscale image, and obtain the histogram of the ground-based cloud image , the formula is as follows:
[0172]
[0173] In the formula, is the pixel value of the grayscale image, is the Kronecker delta function, when then , otherwise it is 0, , are the width and height of the ground-based cloud image, is a number from 0 to 255;
[0174] S222. Normalize the grayscale histogram of the ground-based cloud image and divide the image into regions for processing. The probability of the grayscale distribution in each region is as follows:
[0175] ;
[0176] In the formula, represents the region, is the histogram of the cloud image in region , and are the width and height of the cloud image in region respectively;
[0177] S223. For each region, calculate the between-class variance of each region in the cloud image respectively. Determine the optimal threshold by maximizing the between-class variance. First, calculate the weights and means of the cloud region and the non-cloud region:
[0178] , ,
[0179] , ,
[0180] In the formula, represents the weight of the cloud region, represents the weight of the non-cloud region, represents the mean of the cloud region, represents the mean of the non-cloud region;
[0181] The between-class variance is: ;
[0182] Find the threshold that maximizes the between-class variance, and use the region threshold Fused as the global threshold by weighted average , the formula is:
[0183] ;
[0184] S224. Use the optimal threshold Perform binarization on the grayscale image of the cloud map to divide the image into cloud area and non-cloud area. The formula is as follows:
[0185] ,
[0186] In the formula, is the cloud map after binarization, 1 represents the cloud area, and 0 represents the non-cloud area;
[0187] S225. Combine the binarization result of the cloud map with the frequency domain feature of the image, and obtain the frequency information through Fourier transform:
[0188] ,
[0189] Enhance the cloud edge feature through Gaussian filtering and superimpose it on the binary map to optimize the result:
[0190] ,
[0191] where is the inverse Fourier transform;
[0192] According to the finally optimized binary map Calculate the proportion of the pixels in the cloud area to the total pixels, that is, obtain the cloud amount feature :
[0193] .
[0194] In this embodiment, the mutual information method is used to analyze the mutual dependence between photovoltaic power generation and meteorological factors, and meteorological factors with strong correlation are extracted as meteorological features, specifically including:
[0195] S231. Obtain several meteorological factors such as temperature T, humidity H, wind speed W, and radiation intensity S of the photovoltaic power station from the meteorological observation station as the main influencing factors;
[0196] S232. Normalize each meteorological factor and photovoltaic power generation power to eliminate the dimension difference;
[0197] S233. Use the histogram method to estimate the joint probability density of the meteorological factor and photovoltaic power generation power , estimate the marginal probability density of the meteorological factor and photovoltaic power generation power , ;
[0198] S234. Calculate the mutual information between meteorological factors and photovoltaic power generation according to the joint distribution and marginal distribution:
[0199]
[0200] S235. Select the meteorological factors with mutual information values greater than the set threshold as meteorological features.
[0201] The ground-based cloud map can provide high-resolution local cloud cover information, while the satellite cloud map provides large-scale cloud coverage and movement trends. Therefore, by separately extracting the cloud movement features of the satellite cloud map, the cloud cover features of the ground-based cloud map, and then obtaining important meteorological features, the fusion of such multi-source data can improve the accuracy and reliability of prediction. Using an optimized feature extraction method to extract the features of multi-source data and directly inputting the fused features into a lightweight prediction network greatly reduces the computational burden of the model and improves the prediction speed of the model.
[0202] Embodiment III
[0203] This embodiment is the second embodiment of a lightweight multi-source data fusion-based photovoltaic power generation prediction method. This embodiment is similar to Embodiment I, except that in this embodiment, the construction and training method steps of the photovoltaic power generation prediction model with multi-source data fusion are provided.
[0204] In this embodiment, constructing a photovoltaic power generation prediction model with multi-source data fusion specifically includes the following steps:
[0205] S31. Construct a BiGRU-Attention network to fuse the multi-source data features and predict the photovoltaic power generation. The BiGRU-Attention network includes an input layer, a bidirectional GRU layer, a feature attention mechanism layer, and a fully connected layer, and uses the error backpropagation algorithm to optimize the network;
[0206] The input layer is used to receive the cloud movement features from the satellite cloud map, the cloud cover features from the ground-based cloud map, the meteorological features from the meteorological department, and the historical photovoltaic power generation data, and merge the features in the order of time series to form an input feature matrix:
[0207]
[0208]
[0209] where is the cloud movement speed, is the cloud movement direction, is the cloud cover, is the preferred meteorological factor, is the photovoltaic power generation; is the number of data, is the input feature matrix;
[0210] S33. The bidirectional GRU layer is used to capture the bidirectional context information of the time series, obtaining the forward and backward hidden states , and mapping the hidden state of each time step output by the bidirectional GRU layer to the feature dimension:
[0211] ,
[0212] ,
[0213] ,
[0214] ;
[0215] In the formula, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer;
[0216] S34. The feature attention mechanism layer is used to adjust the weights of the multi-source data features and perform weighted processing on the multi-source data features to obtain the global features :
[0217]
[0218]
[0219] In the formula, is the weight of the multi-source data features, and N is the dimension of the feature vector;
[0220] S35. Finally, the features are mapped to the photovoltaic power generation through the fully connected layer:
[0221]
[0222] In the formula, 、 are the weight matrix and bias of the fully connected layer.
[0223] In this embodiment, the training of the model includes the following steps:
[0224] S41. Divide the multi-source data set extracted in Embodiment 2 into a training set and a test set;
[0225] S42. Use the test set to evaluate the trained photovoltaic power prediction model based on multi-source data fusion. The evaluation index is the root mean square error (RMSE) to determine the prediction accuracy of the model.
[0226] S43. When the prediction accuracy of the model is lower than the set threshold, optimize the model according to the evaluation results, and continue to train the photovoltaic power prediction model based on multi-source data fusion until the prediction accuracy reaches the set threshold.
[0227] In this embodiment, a lightweight prediction network is designed to optimize the extraction of features of multi-source data, fuse the multi-source data affecting photovoltaic power generation, and directly input the fused features into the lightweight prediction network, greatly reducing the computational burden of the model and improving the prediction speed of the model.
[0228] In this embodiment, various features are fed into the BiGRU-Attention network for model training; the trained model is used to predict the photovoltaic power generation of a centralized photovoltaic power station; finally, the prediction model is deployed to the Solar Eye system. The Solar Eye system not only has the function of dynamically updating data, can automatically obtain multi-source data through networking and automatically delete old data to optimize the storage space, but also has an intelligent optimization function, which can automatically use the obtained new data to train and update the model to maintain the best prediction effect. This embodiment realizes the feature extraction and fusion of multi-source data for photovoltaic power generation, realizes accurate and lightweight power generation power prediction, so that the managers of small centralized photovoltaic power stations in rural areas can monitor and accurately and efficiently predict the photovoltaic power generation in real time on mobile terminals, so as to make corresponding energy management decisions, which is very effective for small centralized photovoltaic power stations in rural areas.
[0229] Embodiment 4
[0230] In this embodiment, to verify the effectiveness of the proposed lightweight multi-source data fusion photovoltaic power prediction method, first in step S1, obtain the photovoltaic power generation data, satellite cloud images, ground-based cloud images, and meteorological data of a centralized photovoltaic power generation in a rural area of Guangdong Province from 0:00 on June 1, 2023 to 23:00 on December 31, 2023. After data preprocessing, feature extraction is performed, and then it is input into the BiGRU-Attention network for prediction. Using the proposed lightweight multi-source data fusion photovoltaic power prediction method of the present invention, the prediction effect diagram of the photovoltaic power generation as shown in Figure 3 is obtained. In Figure 3 , the dotted line represents the true value of the photovoltaic power generation, and the solid line represents the predicted value of the photovoltaic power generation. As shown in Figure 3It can be seen that the error between the true value and the predicted value is very small, indicating that the method proposed by the present invention can effectively improve the accuracy of centralized photovoltaic power generation prediction.
[0231] Embodiment 5
[0232] This embodiment is the first embodiment of a lightweight multi-source data fusion photovoltaic power generation prediction system. The system not only has the function of dynamically updating data, can automatically obtain multi-source data through networking and automatically delete old data to optimize the storage space, but also has an intelligent optimization function, can automatically use the obtained new data to train and update the model to maintain the best prediction effect. The system includes:
[0233] Data acquisition module: used to synchronously and automatically collect satellite cloud images above the photovoltaic base from the satellite data service system, collect ground-based cloud images from the panoramic sky imager of the photovoltaic base, and obtain meteorological information around the photovoltaic base from the meteorological department at the same time interval;
[0234] Multi-source data feature extraction module: used to extract the motion features of clouds in the satellite cloud image, including the speed and direction of clouds, by using the dynamic cloud tracking method; perform automatic threshold segmentation on the cloud image by using the multi-scale frequency domain optimized cloud segmentation method to extract the cloud amount feature in the ground-based cloud image; analyze the mutual dependence between photovoltaic power generation and meteorological factors by using the mutual information method, and extract strongly correlated meteorological factors as meteorological features; the collected motion features, cloud amount features, and meteorological features are constructed into a multi-source data set;
[0235] Model construction module: used to construct a photovoltaic power generation prediction model for multi-source data fusion, and fuse the features of multi-source data by constructing a BiGRU-Attention network to predict the photovoltaic power generation power;
[0236] Model training module: used to train the photovoltaic power generation prediction model. By dividing the multi-source data set into a training set and a test set, use the training set to train the photovoltaic power generation prediction model for multi-source data fusion, and use the test set to evaluate the photovoltaic power generation prediction model. When the accuracy of the photovoltaic power generation prediction model reaches the set threshold, the training terminates;
[0237] Prediction module: used to use the trained photovoltaic power generation prediction model to predict the photovoltaic power generation power of the centralized photovoltaic power station.
[0238] In this embodiment, the BiGRU-Attention network includes:
[0239] Input layer unit: It is used to receive the cloud motion features from satellite cloud images, the cloud amount features from ground-based cloud images, the meteorological features from meteorological departments, and the historical photovoltaic power generation data, and merge each feature in the form of a time series to form an input feature matrix:
[0240]
[0241]
[0242] In the formula, is the motion speed of the cloud, is the motion direction of the cloud, is the cloud amount, is the preferred meteorological factor, is the photovoltaic power generation; is the number of data, is the input feature matrix;
[0243] Bidirectional GRU layer unit: It is used to capture the bidirectional context information of the time series and obtain the forward and backward hidden states , and map the hidden state of each time step output by the bidirectional GRU layer to the feature dimension:
[0244] ,
[0245] ,
[0246] ,
[0247] ;
[0248] In the formula, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer;
[0249] Feature attention mechanism layer unit: It is used to adjust the weights of multi-source data features and weight the features of multi-source data to obtain global features :
[0250]
[0251]
[0252] In the formula, is the weight of multi-source data features, and N is the dimension of the feature vector;
[0253] Fully connected layer: used to map features to photovoltaic power generation
[0254]
[0255] In the formula, 、 are the weight matrix and bias of the fully connected layer, is the photovoltaic power output.
[0256] Example 6
[0257] This embodiment is a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the method described in any of the above embodiments.
[0258] In the specific content of the above specific implementation, each technical feature can be combined arbitrarily without contradiction. For the sake of concise description, not all possible combinations of the above technical features are described. However, as long as the combination of these technical features does not exist in contradiction, it should be considered as the scope described in this specification.
[0259] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A lightweight photovoltaic power generation prediction method based on multi-source data fusion, characterized in that: The following steps are involved: S1. Data collection: Obtain satellite cloud images, ground-based cloud images, meteorological data, and historical data of photovoltaic power generation of centralized photovoltaic power stations, build a data set, and perform data preprocessing; S2. Extract the features of multi-source data and form a multi-source data set: Use the dynamic cloud tracking method to extract the motion features of clouds in satellite cloud images, including the speed and direction of clouds; Use the multi-scale frequency domain optimization cloud segmentation method to perform automatic threshold segmentation on cloud images and extract the cloud amount features in ground-based cloud images; The mutual information method is used to analyze the interdependence between photovoltaic power generation and meteorological factors, and the meteorological factors with strong correlation are extracted as meteorological characteristics; the collected movement characteristics, transportation volume characteristics, and meteorological characteristics are constructed into a multi-source data set; S3. Construct a photovoltaic power generation prediction model based on multi-source data fusion: Construct a BiGRU-Attention network to fuse the features of multi-source data and predict photovoltaic power generation; specifically, it includes: S31. Construct a BiGRU-Attention network to fuse multi-source data features and predict photovoltaic power generation. The BiGRU-Attention network includes an input layer, a bidirectional GRU layer, a feature attention mechanism layer, and a fully connected layer, and uses an error back propagation algorithm to optimize the network. S32. The input layer is used to receive cloud motion features from satellite cloud images, cloud amount features from ground-based cloud images, meteorological features from the meteorological department, and photovoltaic power generation history data, and merge each feature in a time series manner to form an input feature matrix: In the formula, is the cloud movement speed, is the direction of cloud movement, For cloud cover, is the preferred meteorological factor, is the photovoltaic power generation power; is the number of data, is the input feature matrix; S33. The bidirectional GRU layer is used to capture the bidirectional context information of the time series and obtain the forward and backward hidden states. , and maps each time-step hidden state of the bidirectional GRU layer output to the feature dimension: , , , ; In the formula, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer; S34. The feature attention mechanism layer is used to adjust the weights of multi-source data features and weight the features of multi-source data to obtain global features. : In the formula, is the weight of multi-source data features, and N is the dimension of the feature vector; S35. Finally, the features are mapped to photovoltaic power through the fully connected layer: In the formula, , is the weight matrix and bias of the fully connected layer, is the photovoltaic power output; S4. Training the photovoltaic power prediction model: divide the multi-source data set into a training set and a test set, use the training set to train the photovoltaic power prediction model fused with multi-source data, and use the test set to evaluate the photovoltaic power prediction model. When the accuracy of the photovoltaic power prediction model reaches the set threshold, the training is terminated; S5. Use the trained photovoltaic power prediction model to predict the photovoltaic power generation of the centralized photovoltaic power station.
2. The lightweight multi-source data fusion photovoltaic power prediction method according to claim 1 is characterized in that: The step S1 comprises: S11. Collect and organize multi-source data, including satellite remote sensing cloud images, ground-based cloud images, meteorological conditions, and photovoltaic power generation of centralized photovoltaic power stations over a continuous period of time; S12. Preprocess the data set, adjust the image data to a uniform size, remove noise from the image, and perform histogram equalization on the image; S13. Detect and process outliers and missing values of meteorological factors and photovoltaic power generation, and normalize the data.
3. The lightweight multi-source data fusion photovoltaic power prediction method according to claim 1 is characterized in that: The step S2 in which the dynamic cloud tracking method is used to extract the motion characteristics of clouds in the satellite cloud image comprises the following steps: S211. Convert satellite cloud images to grayscale images and construct multi-frame cloud images, taking continuous satellite cloud image sequences as input: In the formula, , is the gray value of the cloud image, is the pixel coordinate of the cloud image, Represents time, Represents the interval time of continuous satellite cloud image sequence; Divide the cloud image into small blocks, extract the gradient features in each small block, and calculate the grayscale gradient of each frame of the cloud image in space and time: , , , The grayscale gradient describes the rate of change of the cloud in the x and y directions, as well as the rate of change in the time dimension; Taylor decomposition of the grayscale function: In the formula, , , Function right , , The partial derivative of is the remainder of the Taylor expansion; Will Ignore and let the velocity of the cloud in the x-axis direction , the speed in the y-axis direction , we get the equation: S212. Based on the fact that the pixels in the satellite cloud image have the same displacement in the same time, the displacement equation corresponding to each pixel in the satellite cloud image is obtained: S213. The conjugate gradient method is used to solve the above linear equations, and the cloud velocity vector is obtained. , the equation in step S212 is written as , in order to solve , construct the objective function ,Right now: Calculate the step size: In the formula, represents the number of iterations, represents the residual; Updated solution: Update residuals: Calculate the adjustment factor for the new direction: like , stop the iteration, and then get the movement speed of the cloud , the displacement of the cloud, .
4. The lightweight multi-source data fusion photovoltaic power prediction method according to claim 1 is characterized in that: In step S2, a multi-scale frequency domain optimized cloud segmentation method is used to perform automatic threshold segmentation on the cloud image to extract cloud amount features in the ground-based cloud image, specifically including: S221. Convert the ground-based cloud image from a color image to a grayscale image, count the number of pixels at each grayscale level in the grayscale image, and obtain the histogram of the ground-based cloud image. , the formula is as follows: In the formula, is the pixel value of the grayscale image, is the Kronecker delta function, when hour , otherwise 0, , is the width and height of the ground-based cloud image, is a number from 0 to 255; S222. Normalize the grayscale histogram of the ground-based cloud image and divide the image into The grayscale distribution probability of each area is as follows: ; In the formula, Representing the region, Is the cloud map in the area The histogram of and The cloud maps are in the area The width and height of S223. For each region, calculate the inter-class variance of each region in the cloud map, and determine the optimal threshold by maximizing the inter-class variance. First, calculate the weight and mean of the cloud region and the non-cloud region: , , , , In the formula, represents the weight of the cloud region, represents the weight of the non-cloud area, represents the mean value of the cloud area, represents the mean value of non-cloud area; The between-class variance is: ; Find the threshold that maximizes the between-class variance , the regional threshold The global threshold is obtained by weighted averaging. , the formula is: ; S224. Use the best threshold Binarize the grayscale image of the cloud map and divide the image into cloud area and non-cloud area. The formula is as follows: , In the formula, The cloud image is binarized, 1 represents the cloud area, and 0 represents the non-cloud area; S225. Combine the binarization result of the cloud image with the frequency domain features of the image and obtain the frequency information through Fourier transform: , Gaussian filtering is used to enhance the cloud edge features and then superimposed on the binary image to optimize the results: , in is the inverse Fourier transform; According to the final optimized binary map Calculate the ratio of cloud area pixels to total pixels, and get the cloud amount characteristics : 。 5. The lightweight multi-source data fusion photovoltaic power prediction method according to claim 1 is characterized in that: In step S2, the mutual information method is used to analyze the interdependence between photovoltaic power generation and meteorological factors, and meteorological factors with strong correlation are extracted as meteorological features, including: S231. Obtain the temperature T, humidity H, wind speed W and radiation intensity S of the photovoltaic power station from the meteorological observation station As the main influencing factor; S232. Normalize each meteorological factor and photovoltaic power generation to eliminate dimensional differences; S233. Estimation of the joint probability density of meteorological factors and photovoltaic power generation using histogram method , estimate the marginal probability density of meteorological factors and photovoltaic power generation , ; S234. Calculate the mutual information between meteorological factors and photovoltaic power generation based on joint distribution and marginal distribution: S235. Select meteorological factors whose mutual information values are greater than a set threshold as meteorological features.
6. The lightweight multi-source data fusion photovoltaic power prediction method according to claim 1 is characterized in that: The step S4 comprises: S41. Dividing the multi-source data set extracted in step S2 into a training set and a test set; S42. Use the test set to evaluate the trained photovoltaic power prediction model based on multi-source data fusion, and the evaluation indicator is the root mean square error RMSE to determine the prediction accuracy of the model; S43. When the prediction accuracy of the model is lower than the set threshold, the model is optimized according to the evaluation results, and the photovoltaic power generation prediction model based on multi-source data fusion is continued to be trained until the prediction accuracy reaches the set threshold.
7. A lightweight multi-source data fusion photovoltaic power generation prediction system, characterized in that: include: Data acquisition module: used to obtain satellite cloud images, ground-based cloud images, meteorological data and photovoltaic power generation history data of centralized photovoltaic power stations, build data sets and perform data preprocessing; Multi-source data feature extraction module: used to extract the motion characteristics of clouds in satellite cloud images using dynamic cloud tracking method, including cloud speed and direction; use multi-scale frequency domain optimization cloud segmentation method to perform automatic threshold segmentation on cloud images and extract cloud amount characteristics in ground-based cloud images; The mutual information method is used to analyze the interdependence between photovoltaic power generation and meteorological factors, and the meteorological factors with strong correlation are extracted as meteorological characteristics; the collected movement characteristics, transportation volume characteristics, and meteorological characteristics are constructed into a multi-source data set; Model building module: used to build a photovoltaic power prediction model based on multi-source data fusion. By building a BiGRU-Attention network, the features of multi-source data are integrated to predict photovoltaic power generation. The BiGRU-Attention network includes: Input layer unit: used to receive cloud motion features from satellite cloud images, cloud amount features from ground-based cloud images, meteorological features from meteorological departments, and photovoltaic power generation history data, and merge each feature in a time series manner to form an input feature matrix: In the formula, is the cloud movement speed, is the direction of cloud movement, For cloud cover, is the preferred meteorological factor, is the photovoltaic power generation power; is the number of data, is the input feature matrix; Bidirectional GRU layer unit: used to capture the bidirectional context information of the time series and obtain the forward and backward hidden states , and maps each time-step hidden state of the bidirectional GRU layer output to the feature dimension: , , , ; In the formula, is the forward hidden state, is the backward hidden state, is the weight matrix, is the bias matrix, is the output of the bidirectional GRU layer; Feature attention mechanism layer unit: used to adjust the weights of multi-source data features and weight the features of multi-source data to obtain global features : In the formula, is the weight of multi-source data features, and N is the dimension of the feature vector; Fully connected layer: used to map features into photovoltaic power generation: In the formula, , is the weight matrix and bias of the fully connected layer, is the photovoltaic power output; Model training module: used to train the photovoltaic power prediction model. The multi-source data set is divided into a training set and a test set. The photovoltaic power prediction model fused with multi-source data is trained with the training set, and the photovoltaic power prediction model is evaluated with the test set. When the accuracy of the photovoltaic power prediction model reaches the set threshold, the training is terminated. Prediction module: used to use the trained photovoltaic power prediction model to predict the photovoltaic power generation of centralized photovoltaic power stations.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method described in any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Photovoltaic ultra-short-term forecasting method and device, electronic equipment and storage medium
CN116780533A
Stacking plum rain season photovoltaic power prediction method and system based on BiGRU-Attention
CN117895484A
Optical power combination prediction method, system, equipment and medium
CN119275823A