Photovoltaic power generation prediction method, system and equipment based on capsule network and multi-source data, and medium
By using a photovoltaic power generation prediction method based on capsule networks and multi-source data, we have solved the problems of insufficient utilization of spatiotemporal relationship of features and poor performance of traditional convolutional networks in existing technologies, and achieved more accurate and stable photovoltaic power generation prediction.
Patent Information
- Application Number
- CN202511422894.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-13
AI Technical Summary
Existing photovoltaic power generation prediction methods are insufficient in capturing spatiotemporal relationships of features and do not fully integrate multidimensional environmental parameters. Traditional convolutional neural networks are not effective in recognizing shallow feature pose relationship transformations, resulting in limited prediction accuracy and poor stability.
A prediction method based on capsule networks and multi-source data is adopted. By acquiring satellite cloud images, historical power generation information and historical weather data, a capsule network is established, multi-source fusion and time-series feature dataset are constructed, and photovoltaic power generation is predicted by combining BiLSTM-Attention network.
It improves the accuracy and stability of photovoltaic power generation forecasts, can more comprehensively capture the relationships between features, adapts to complex and ever-changing weather conditions, and enhances the robustness and adaptability of the model.
Smart Images

Figure CN121525923A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic power generation prediction method, system, device and medium based on a capsule network and multi-source data. BACKGROUND
[0002] In recent years, with the acceleration of global energy structure transformation, photovoltaic power generation, as a core form of clean energy, is continuously expanding in installed capacity and grid-connected scale. Photovoltaic power generation can alleviate environmental problems caused by traditional energy, but its power generation is significantly related to weather. Therefore, in the case of unstable weather, the randomness and intermittency of photovoltaic power generation result in great volatility of its output power, thereby posing a severe challenge to stable operation of the power grid and new energy consumption. Therefore, accurate prediction of photovoltaic power generation is particularly important for optimizing power grid operation and improving power generation economy.
[0003] At present, most photovoltaic power prediction methods use time series models and regression analysis, which have insufficient use of spatiotemporal relationships in feature capture, and most models do not fully integrate multi-dimensional environmental parameters such as solar irradiance. Some models consider spatiotemporal features, but usually use simple convolutional neural networks to extract spatial features, and convolutional neural networks are not effective in identifying shallow feature pose relationship transformations. Capsule neural networks break through the limitations of traditional convolutional neural networks by introducing capsule structures. Based on this, a photovoltaic power prediction method based on capsule neural networks and multi-source data is studied to obtain more accurate photovoltaic power prediction results. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a photovoltaic power prediction method, system, device and medium based on a capsule network and multi-source data, which can solve the problems of insufficient use of spatiotemporal relationships in feature capture, insufficient integration of multi-dimensional environmental parameters, and poor effect of traditional convolutional neural networks in identifying shallow feature pose relationship transformations in existing photovoltaic power prediction methods.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a photovoltaic power prediction method based on a capsule network and multi-source data, comprising:
[0008] Obtaining first historical data of a target photovoltaic power station, the first historical data including satellite cloud map data, historical power generation information, historical weather data and corresponding time stamps;
[0009] Establishing a capsule network, the input of the capsule network being preprocessed satellite cloud map data, and the output being irradiance feature coefficients;
[0010] The irradiance feature coefficient is fused with historical power generation information and historical weather information to construct a time sequence feature dataset, and the time sequence feature dataset is divided into a training set and a test set;
[0011] A photovoltaic prediction model is obtained according to the training set and the test set, and photovoltaic power generation prediction is performed based on the photovoltaic prediction model and photovoltaic power station prediction time information of a target photovoltaic power station.
[0012] As a preferred scheme of the photovoltaic power generation prediction method based on the capsule network and the multi-source data, the capsule network comprises:
[0013] The capsule neural network is built, and a pre-convolutional layer is first added to extract shallow features in the normalized cloud image data;
[0014] An initial capsule layer is added to perform multi-group convolution on the output of the convolutional layer to obtain multiple groups of feature maps with depth, the feature maps are straightened, and corresponding points in each group of feature maps are combined to obtain capsules that can reflect the pose relationship of the features.
[0015] This preferred scheme can more effectively capture feature information in the satellite cloud image data, especially the pose relationship of the features. The traditional convolutional neural network has poor effect in processing the shallow feature pose relationship transformation, while the scheme straightens the feature maps and combines corresponding points to obtain capsules through the initial capsule layer, so that the network can better understand the spatial structure and relative position between the features. This helps to improve the prediction accuracy of the irradiance feature coefficient, because the irradiance is closely related to the features such as the shape and position of the cloud, and accurately capturing the pose relationship of these features can more accurately reflect the influence of the cloud on the light.
[0016] At the same time, the pre-convolutional layer extracts shallow features, providing a basis for subsequent processing by the initial capsule layer, so that the entire capsule network can analyze the cloud image data in a hierarchical and step-by-step manner. This hierarchical processing method can more comprehensively mine information in the data and avoid loss of information. Moreover, the structure design of the capsule network makes it have stronger robustness and adaptability when facing complex and variable satellite cloud image data, and can better cope with different weather conditions and changes in the cloud, thereby providing more reliable irradiance feature coefficients for subsequent multi-source fusion and photovoltaic power generation prediction.
[0017] As a preferred scheme of the photovoltaic power generation prediction method based on the capsule network and the multi-source data, the capsule network further comprises:
[0018] A deep capsule layer is added to learn the contribution weight of the capsules in the initial capsule layer to the high-level capsules through a dynamic routing mechanism;
[0019] Two full connection layers are added, and the output of the last full connection layer is the photovoltaic power value, and the output of the first full connection layer is the irradiance feature coefficient of the cloud image data.
[0020] As a preferred scheme of the photovoltaic power prediction method based on the capsule network and multi-source data, the time sequence feature data set is constructed, and the time sequence feature data set includes:
[0021] The extracted irradiance feature coefficient, historical power generation information and historical weather information are combined to obtain a data set reflecting historical time features.
[0022] A sliding window is built to slide in the data set to obtain time sequence features.
[0023] The length of the sliding window represents that the photovoltaic power information at the predicted time is related to the features of the previous time, and the width of the sliding window represents the number of comprehensive feature data sets.
[0024] The sliding result is used as the model input, that is, the time sequence feature data set.
[0025] The photovoltaic power information of the next time of the current time is selected as the model output, that is, the model label.
[0026] As a preferred scheme of the photovoltaic power prediction method based on the capsule network and multi-source data, the photovoltaic prediction model is obtained according to the training set and the test set, and the photovoltaic prediction model includes:
[0027] The photovoltaic prediction model is used to establish a mapping relationship between the time sequence features and the power generation efficiency.
[0028] The training set is input into the BiLSTM-Attention network to establish a mapping relationship between the time sequence features and the power generation efficiency.
[0029] A bidirectional LSTM layer is added to obtain the forward and reverse time sequence information in the time sequence.
[0030] An Attention layer is added to give higher weights to important features.
[0031] A full connection layer is added to obtain the photovoltaic power prediction result.
[0032] As a preferred scheme of the photovoltaic power prediction method based on the capsule network and multi-source data, the photovoltaic power prediction method based on the photovoltaic prediction model and the photovoltaic power station prediction time information of the target photovoltaic power station includes:
[0033] The cloud image data of several time points before the to-be-predicted time point are acquired, are input into the trained capsule neural network respectively, and the output of the first full connection layer is selected as the irradiance feature coefficient of the corresponding cloud image data.
[0034] The historical power generation information and the historical weather information of several time points before the to-be-predicted time point are acquired.
[0035] The irradiance feature coefficient, the historical power generation information and the historical weather information are fused to acquire time sequence data, which is input into the trained BiLSTM-Attention network to acquire a photovoltaic power generation prediction result.
[0036] As a preferred scheme of the photovoltaic power generation prediction method based on the capsule network and the multi-source data, the preprocessing of the satellite cloud image data includes normalization processing on the satellite cloud image data.
[0037] In a second aspect, the application provides a photovoltaic power generation prediction system based on a capsule network and multi-source data, comprising:
[0038] A data acquisition module is configured to acquire first historical data of a target photovoltaic power station, wherein the first historical data includes satellite cloud image data, historical power generation information, historical weather data and corresponding time stamps.
[0039] A feature coefficient acquisition module is configured to establish a capsule network, wherein the input of the capsule network is the preprocessed satellite cloud image data, and the output is an irradiance feature coefficient.
[0040] A data set acquisition module is configured to perform multi-source fusion on the irradiance feature coefficient, the historical power generation information and the historical weather information, construct a time sequence feature data set, and divide the time sequence feature data set into a training set and a test set.
[0041] A prediction module is configured to obtain a photovoltaic prediction model according to the training set and the test set, and perform photovoltaic power generation prediction based on the photovoltaic prediction model and photovoltaic power station prediction time point information of the target photovoltaic power station.
[0042] In a third aspect, the application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.
[0043] In a fourth aspect, the application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method.
[0044] Compared with the prior art, the beneficial effects of the present application are: the present application proposes a photovoltaic power generation prediction method based on capsule network and multi-source data, which has significant advantages in many aspects by combining capsule network and multi-source data. In data processing, the satellite cloud image data is normalized and pretreated, which can make the data analyzed in a unified scale, reduce the influence caused by the dimension difference of data, and improve the stability and convergence speed of the model. At the same time, the fusion of multi-source data combines the irradiance characteristic coefficient with the historical power generation information and historical weather information, fully considers various factors affecting photovoltaic power generation, and enables the model to more comprehensively capture the relationship between features.
[0045] In the model construction aspect, the introduction of the capsule network is a great innovation. The capsule network can effectively identify the shallow feature pose relationship transformation through the capsule structure, making up for the shortcomings of the traditional convolutional neural network. The front convolutional layer extracts shallow features, laying a foundation for subsequent processing; the initial capsule layer straightens the feature map and combines the corresponding points to obtain capsules, which can better reflect the pose relationship of the features; the deep capsule layer learns the contribution weight of the capsule through the dynamic routing mechanism, further optimizing the feature extraction process. The setting of the two fully connected layers can obtain the irradiance characteristic coefficient and the photovoltaic power value according to different output requirements, providing key data for subsequent prediction.
[0046] In the time series processing, the sliding window is used to construct the time series feature dataset, which can fully consider the correlation between the to-be-predicted time and the previous several times, and take it as the model input. At the same time, the photovoltaic power generation information at the next time of the current time is selected as the model label, so that the model can learn the rules in the time series. The use of BiLSTM-Attention network, the bidirectional LSTM layer can obtain the forward and reverse time sequence information in the time series, and fully capture the features of the time series; the Attention layer can highlight important features and give them higher weights, so that the model pays more attention to key information, thereby establishing a more accurate mapping relationship between time series features and power generation efficiency, and achieving the purpose of accurate photovoltaic power prediction. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0048] Figure 1 A method flow chart of a photovoltaic power generation prediction method based on capsule network and multi-source data is provided for an embodiment of the present application.
[0049] Figure 2A test set prediction result schematic diagram of a photovoltaic power generation prediction method based on a capsule network and multi-source data provided by an embodiment of the present application is shown.
[0050] Figure 3 A to-be-predicted time photovoltaic power generation power prediction result schematic diagram of a photovoltaic power generation prediction method based on a capsule network and multi-source data provided by an embodiment of the present application is shown.
[0051] Figure 4 An internal structure diagram of an electronic device of a photovoltaic power generation prediction method based on a capsule network and multi-source data provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0053] Embodiment 1, refer to Figure 1 For the first embodiment of the present application, the embodiment provides a photovoltaic power generation prediction method based on a capsule network and multi-source data, comprising:
[0054] In the prior related art, there are some problems, such as the traditional photovoltaic power generation prediction method often only relies on a single data source, and it is difficult to comprehensively and accurately reflect the complex characteristics of photovoltaic power generation, resulting in limited prediction accuracy. Moreover, some methods lack in-depth mining of data features when processing data, so that the model cannot fully learn the effective information in the data, thereby affecting the prediction effect. In addition, some model structures in the prior art are relatively simple, and cannot adapt to the complex and variable environment and working conditions in the photovoltaic power generation process. Under different meteorological conditions and light intensities, the stability of the prediction result is poor.
[0055] The present application provides a method that can effectively solve the above-mentioned problems. Next, how to implement the photovoltaic power generation prediction method based on a capsule network and multi-source data will be described in detail in combination with multiple embodiments.
[0056] Figure 1 A method flowchart of a photovoltaic power generation prediction method based on a capsule network and multi-source data is shown, comprising:
[0057] S101, acquiring first historical data of a target photovoltaic power station, the first historical data comprising satellite cloud image data, historical power generation information, historical weather data and corresponding time stamps, wherein:
[0058] It should be noted that in order to realize the photovoltaic power generation prediction, historical data needs to be acquired to construct an accurate model.
[0059] In the embodiments of the present application, satellite cloud map data can intuitively reflect the distribution and change of cloud layer, which is an important factor affecting solar irradiance. Different cloud amount, cloud type and moving speed will have a significant impact on the light intensity reaching the ground. Historical power generation information records the past power generation of the target photovoltaic power station, including power generation data such as power generation and power generation. These data reflect the power generation capacity and operating condition of the power station, and are closely related to the prediction of future power generation. Historical weather data contains temperature, humidity, wind speed, air pressure and other meteorological elements, which will directly or indirectly affect the efficiency of photovoltaic power generation. The corresponding timestamp provides time dimension information for the data, so that these multi-source data can be aligned and associated in time, facilitating subsequent analysis and processing.
[0060] In an optional embodiment, other historical data such as equipment maintenance records of the target photovoltaic power station and surrounding environment data can also be acquired. Equipment maintenance records can reflect the health status and performance changes of the power generation equipment, such as the number of equipment repairs, the time of replacing parts and other information, which may affect the power generation efficiency. The surrounding environment data, such as the shading condition of surrounding buildings and the vegetation coverage, will also affect the intensity and angle of sunlight to the photovoltaic panel to some extent, thereby affecting the power generation effect. Including these data in the first historical data can further enrich the data sources, so that the model can consider more influencing factors when making photovoltaic power generation prediction, thereby improving the accuracy and reliability of the prediction.
[0061] However, in the present application, only satellite cloud map data, historical power generation information, historical weather data and corresponding timestamps are needed to construct an effective prediction model. The present application does not limit the first historical data.
[0062] It should be noted that acquiring the first historical data of the target photovoltaic power station provides a rich and comprehensive basis for subsequent data processing and model construction. Accurate satellite cloud map data can accurately capture the influence of cloud layer on light, providing a basis for predicting the irradiance characteristic coefficient. Historical power generation information helps to understand the power generation capacity and operation law of the power station, so that the model can better simulate the actual power generation of the power station. Historical weather data can consider the effect of meteorological elements on power generation efficiency, so that the prediction result is more in line with the actual situation. The corresponding timestamp enables multi-source data to be accurately aligned and associated on the time axis, facilitating time series analysis and feature extraction.
[0063] S102, a capsule network is established, the input of the capsule network is the preprocessed satellite cloud map data, and the output is the irradiance characteristic coefficient, wherein;
[0064] It should be noted that after obtaining the first historical data, it is necessary to process the satellite cloud image data by establishing a suitable model to obtain the key irradiance characteristic coefficient.
[0065] In an optional embodiment, the capsule network can be set to different layers and structures to adapt to different application scenarios and data characteristics. For example, for satellite cloud image data with high data complexity and large feature dimension, the number of layers of the capsule network can be appropriately increased to enable the network to more deeply mine the feature information in the data. When establishing the capsule network, the number and parameters of the capsules can also be optimized and adjusted. Through experiments and verification, the most suitable number and parameter combination of the capsules for the current satellite cloud image data are found, thereby improving the accuracy and efficiency of the capsule network in extracting the irradiance characteristic coefficient.
[0066] In an optional embodiment, during the training process of the capsule network, a suitable optimization algorithm and loss function are used. Common optimization algorithms such as stochastic gradient descent (SGD) and its variants Adagrad, Adadelta, Adam, etc. have different characteristics and application scenarios. The most suitable optimization algorithm can be selected according to the specific structure of the capsule network and the characteristics of the data to speed up the convergence of the network and improve the training effect. The selection of the loss function is also crucial. For the task of extracting the irradiance characteristic coefficient, the mean square error (MSE) loss function can be selected, which can measure the average error between the predicted value and the true value, and help to improve the prediction accuracy of the model.
[0067] In an optional embodiment, to prevent overfitting of the capsule network, regularization methods such as L1 and L2 regularization can be used. L1 regularization can make the parameters of the model more sparse, which helps to filter out important features; L2 regularization can limit the size of the model parameters to avoid the model being too complex. In addition, the Dropout technique can be used to randomly ignore a portion of neurons during training, reducing the interdependence between neurons and enhancing the generalization ability of the model.
[0068] In the embodiment of the present application, the capsule network is established, including:
[0069] The capsule neural network is built, and a pre-convolutional layer is first added to extract shallow features in the normalized cloud image data;
[0070] An initial capsule layer is added to perform multiple group convolutions on the output of the convolutional layer to obtain multiple groups of deep feature maps. The feature maps are straightened, and corresponding points in each group of feature maps are combined to obtain capsules that can reflect the feature pose relationship.
[0071] The capsule network is also established, including:
[0072] Add a deep capsule layer and learn the contribution weights of capsules in the initial capsule layer to higher-level capsules through a dynamic routing mechanism;
[0073] Two fully connected layers are added. The output of the last fully connected layer is the photovoltaic power generation value, and the output of the first fully connected layer is the irradiance characteristic coefficient of the cloud map data.
[0074] It should be noted that building a capsule neural network refers to constructing a complex network structure that includes a pre-convolutional layer, an initial capsule layer, a deep capsule layer, and a fully connected layer, in order to process cloud map data and predict photovoltaic power generation values.
[0075] For example, in an optional implementation, the pre-convolutional layer extracts features from the normalized cloud image data by using small-sized convolutional kernels to obtain shallow texture features, such as cloud edge information or local grayscale changes.
[0076] It should be noted that adding an initial capsule layer refers to performing multiple sets of convolutional operations on the shallow features on the basis of the convolutional layer, and forming a capsule structure by straightening and combining them to express the spatial relationship and pose information between features;
[0077] For example, in an optional implementation, the initial capsule layer combines multiple sets of feature maps output by the convolutional layer point by point to generate a capsule that can reflect the cloud distribution pattern and its directional relationship, thereby providing a basis for subsequent dynamic routing.
[0078] It should be noted that the dynamic routing mechanism is an iterative calculation method used to learn the contribution weights between low-level capsules and high-level capsules, thereby achieving more efficient information transmission and feature representation.
[0079] For example, in one alternative implementation, the dynamic routing mechanism updates the weight matrix from the initial capsule layer to the deep capsule layer through multiple iterations, so that key features in the cloud image data, such as cloud thickness and coverage, are highlighted.
[0080] It should be noted that the design of two fully connected layers refers to introducing two fully connected layers at the end of the network, which are used to extract the irradiance characteristic coefficients of the cloud map data and the final photovoltaic power generation value, respectively.
[0081] For example, in one optional implementation, the first fully connected layer receives the output of the deep capsule layer and calculates the irradiance characteristic coefficient corresponding to the cloud image data, while the second fully connected layer predicts the specific photovoltaic power generation value based on the coefficient, such as the power generation at a certain moment may be 500 watts.
[0082] In the embodiments of the present application, the preprocessing in the preprocessed satellite cloud image data includes normalization processing on the satellite cloud image data.
[0083] In an optional embodiment, the preprocessing can also include standardization processing on the historical power generation information and the historical weather data. The range and magnitude of the historical power generation information and the historical weather data can be quite different, and if not standardized, it will lead to uneven learning of different data during the training of the model, affecting the performance of the model. Standardization processing can convert these data into a standard normal distribution with a mean of 0 and a standard deviation of 1, so that different types of data are comparable and help the model to learn the features in the data more stably.
[0084] In an optional embodiment, the preprocessing can also include encoding of the timestamp data. The timestamp data itself is a continuous numerical value, but in photovoltaic power generation prediction, time has periodicity and regularity, for example, different time periods in a day, different seasons in a year, etc. will have an impact on photovoltaic power generation. One-hot encoding or cyclic encoding can be used to process the timestamp, converting the time information into a form that the model can better understand and learn, so that the model can capture the regularity of the influence of time factors on photovoltaic power generation.
[0085] In an optional embodiment, the preprocessing can also include missing value processing on the various types of data obtained. In the actual data collection process, data missing may occur due to various reasons. For satellite cloud image data, historical power generation information, historical weather data, etc., if there are missing values, it will affect the training and prediction effect of the model. Mean filling, median filling or model-based filling method can be used to process the missing values to ensure the integrity and continuity of the data and provide a high-quality data basis for subsequent model training.
[0086] It should be noted that the present application does not limit the preprocessing step, but the preprocessing step must include the normalization processing step.
[0087] It should be noted that establishing a capsule network can fully utilize the complementarity of multi-source data, and organically integrate satellite cloud image data, historical power generation information, historical weather data, etc. Through the powerful feature extraction capability of the capsule network, the key features in different types of data are extracted and effectively integrated, so that the model can comprehensively consider the influence of multiple factors on photovoltaic power generation. In subsequent data processing and analysis, the capsule network can perform deep mining and correlation analysis on multi-source data. For example, it can discover the potential relationship between cloud changes in satellite cloud image data and meteorological elements in historical weather data, and how these factors jointly act on historical power generation information, so as to more accurately predict future power generation. For subsequent model training, the dynamic routing mechanism of the capsule network can adaptively adjust the weights of different features, so that the model pays more attention to important features and information during the training process. This helps to improve the generalization ability and robustness of the model, so that it can still maintain high prediction accuracy when facing complex and variable actual situations.
[0088] S103, the irradiance feature coefficient is fused with the historical power generation information and the historical weather information, a time series feature dataset is constructed, and the time series feature dataset is divided into a training set and a test set, wherein:
[0089] It should be noted that after obtaining the irradiance feature coefficient and the historical power generation information and the historical weather information, they need to be fused to construct a more valuable dataset. The purpose of multi-source fusion is to integrate different types of data, fully utilize the advantages of each data source, and mine the potential correlation between data, so as to provide more comprehensive and accurate information for subsequent model training and prediction.
[0090] Specifically, when constructing the time series feature dataset, the time sequence of the data needs to be considered. Because photovoltaic power generation has obvious time sequence characteristics, there is a close correlation between data at different time points. The irradiance feature coefficient, historical power generation information and historical weather information can be arranged and combined according to the time sequence to form a sample containing multiple time steps. Each sample not only contains data of the current time point, but also can contain data of the past time points, which can enable the model to learn the dynamic change rule and trend of the data.
[0091] For example, for a sample with a time step of 3, it can contain the irradiance feature coefficient, historical power generation information, historical weather information at the current time point, and the corresponding data at the previous two time points. In this way, the model can capture short-term and long-term change patterns of the data, thereby better predicting photovoltaic power generation.
[0092] In the embodiment of the application, constructing the time series feature dataset comprises:
[0093] The extracted irradiance characteristic coefficients, historical power generation information, and historical weather information are combined to obtain a data set reflecting the characteristics at the historical time;
[0094] A sliding window is built to slide in the data set to obtain time sequence characteristics;
[0095] The length of the sliding window represents that the photovoltaic power generation information at the to-be-predicted time is related to the characteristics of the previous time steps, and the width of the sliding window represents the number of characteristics in the comprehensive feature data set;
[0096] The sliding result is used as the model input, i.e., the time sequence characteristic data set;
[0097] The photovoltaic power generation information at the next time of the current time is selected as the model output, i.e., the model label, when sliding.
[0098] It should be noted that constructing the time sequence characteristic data set means integrating multiple historical data and using the sliding window technology to extract a data set with time sequence characteristics;
[0099] For example, in an optional embodiment, the irradiance characteristic coefficients obtained from multiple sensors, the historical power generation records of photovoltaic power generation, and the historical weather information are combined to form a data set containing multi-dimensional information, and then a sliding window with a fixed length and width is set to scan the data set to extract the characteristics of the previous time steps related to the current time, and the characteristics are used as the model input data.
[0100] It should be noted that the length of the sliding window refers to the time range covered by the sliding window, which is used to determine how many time steps the data of the to-be-predicted time of photovoltaic power generation information is related to;
[0101] For example, in an optional embodiment, if the length of the sliding window is set to 10, it means that the photovoltaic power generation information at the to-be-predicted time is associated with the data characteristics of the previous 10 time steps.
[0102] It should be noted that the width of the sliding window refers to the number of characteristics contained in each time step in the data set, and these characteristics include irradiance characteristic coefficients, historical power generation information, and historical weather information, etc.
[0103] For example, in an optional embodiment, if each time step contains 5 characteristic variables, the width of the sliding window should be set to 5 to ensure that all relevant characteristics can be completely captured.
[0104] It should be noted that the sliding result as the model input means that the time sequence characteristic data extracted by the sliding window is arranged in a structured form as the input data of the machine learning or deep learning model;
[0105] Exemplarily, in an optional implementation, the 10 time step feature data extracted by the sliding window is converted into a two-dimensional array, where each row represents a time step and each column represents a feature variable, and finally the array is used as the input of the model.
[0106] It should be noted that the photovoltaic power generation information of the next time point of the current time point selected by the sliding window as the model output means that the label data of the model is determined by the photovoltaic power generation of the future time point, which is used to supervise the learning process of the model.
[0107] Exemplarily, in an optional implementation, when the sliding window moves on the data set, for each sliding position, the photovoltaic power generation information of the first time step after the current time step is selected as the target value, thereby constructing a complete training sample.
[0108] It should be noted that the multi-source fusion of the irradiance feature coefficient, the historical power generation information and the historical weather information, the construction of the time series feature data set, and the division of the time series feature data set into a training set and a test set can provide high-quality data support for model training and evaluation. The training set is used for parameter adjustment and optimization of the model, so that the model learns the internal rules and characteristic relationships in the data. Through repeated training on the training set, the model can gradually adapt to the distribution and pattern of the data, and continuously improve its prediction ability. The test set is used to evaluate the performance of the trained model and test the generalization ability of the model on unseen data. By comparing the prediction results of the model on the test set with the true values, the accuracy, stability and reliability of the model can be accurately measured, and possible problems and deficiencies of the model can be found in time for further improvement and optimization of the model.
[0109] S104, obtaining a photovoltaic prediction model according to the training set and the test set, and performing photovoltaic power generation prediction based on the photovoltaic prediction model and photovoltaic power station prediction time point information of the target photovoltaic power station, wherein:
[0110] It should be noted that after the division of the training set and the test set is completed, these data can be used to train and evaluate the photovoltaic prediction model.
[0111] In an optional embodiment, the photovoltaic prediction model can be constructed using different machine learning or deep learning algorithms, such as support vector machine (SVM), random forest (RF), long short-term memory network (LSTM), etc. Support vector machine can find the optimal classification hyperplane in high-dimensional space, and has good processing capability for nonlinear problems; random forest is a prediction method by integrating multiple decision trees, and has high accuracy and robustness; long short-term memory network is good at processing sequence data and can capture long-term dependencies in data. The most suitable algorithm can be selected according to the characteristics of the data and the task requirements to construct the photovoltaic prediction model.
[0112] During model training, the training set is used to adjust and optimize the parameters of the model. Through continuous iterative training, the model can learn the regularity and characteristic relationship in the data. Cross-validation method can be used to further divide the training set into multiple subsets, and different subsets are used for training and verification in turn to improve the generalization ability of the model. At the same time, early stopping strategy can also be used to stop training in time when the performance of the model on the validation set no longer improves, to avoid overfitting of the model.
[0113] After training, the test set is used to evaluate the performance of the model. By comparing the predicted results of the model on the test set with the true values, various evaluation indicators such as mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE) are calculated to measure the accuracy and stability of the model. If the performance of the model does not meet the requirements, the model can be adjusted and optimized, such as adjusting the parameters of the model, replacing the algorithm, increasing the data, etc.
[0114] In an optional embodiment, the photovoltaic prediction model can also use the attention mechanism in deep learning to enhance the ability to capture key features. The attention mechanism can make the model focus more on the feature information that has a significant impact on photovoltaic power generation prediction when processing multi-source data. For example, in satellite cloud map data, the moving speed and direction of the cloud layer may have a key impact on the irradiance in the future period. Through the attention mechanism, the model can automatically identify and give higher weights to these features.
[0115] In the embodiment of the application, the photovoltaic prediction model obtained according to the training set and the test set comprises:
[0116] The photovoltaic prediction model is used to establish the mapping relationship between the time series features and the power generation efficiency;
[0117] The training set is input into the BiLSTM-Attention network to establish the mapping relationship between the time series features and the power generation efficiency;
[0118] Add a bidirectional LSTM layer to obtain forward and reverse time sequence information in the time series;
[0119] Add an Attention layer to give higher weights to important features;
[0120] Add a fully connected layer to obtain the photovoltaic power generation prediction result.
[0121] In an embodiment of the present application, the photovoltaic power generation prediction based on the photovoltaic prediction model combined with the photovoltaic power station prediction time information of the target photovoltaic power station comprises:
[0122] Obtain the cloud image data of several time points before the to-be-predicted time point, input them into the trained capsule neural network respectively, and select the output of the first fully connected layer as the irradiance feature coefficient of the corresponding cloud image data;
[0123] Obtain the historical power generation information and historical weather information of several time points before the to-be-predicted time point;
[0124] Fuse the irradiance feature coefficient, the historical power generation information, and the historical weather information to obtain time series data, input them into the trained BiLSTM-Attention network, and obtain the photovoltaic power generation prediction result.
[0125] It should be noted that the mapping relationship between the time sequence features and the power generation efficiency refers to predicting the efficiency of photovoltaic power generation by analyzing various features in the time series;
[0126] For example, in an optional embodiment, by arranging the historical power generation data and weather information in chronological order, the influence law of irradiance change in certain specific time period on power generation efficiency can be found.
[0127] It should be noted that the forward and reverse time sequence information refers to considering both the forward sequence information from the past to the future and the reverse sequence information from the future back to the past in time series analysis;
[0128] For example, in an optional embodiment, when processing photovoltaic power generation data of a certain day, the forward information can help capture the power generation trend starting in the morning, and the reverse information can help backtrace the power generation fluctuation law of the day from the evening.
[0129] It should be noted that the higher weight of important features refers to giving greater calculation proportion to key variables that have greater influence on the result in the model training process;
[0130] For example, in an optional embodiment, for photovoltaic power generation, the irradiance feature in the cloud image data may be more important than the temperature data, so the weight of the irradiance feature can be automatically increased through the Attention mechanism.
[0131] It should be noted that the irradiance characteristic coefficient refers to a relevant parameter reflecting the solar radiation intensity obtained by processing the cloud image data;
[0132] Exemplarily, in an optional embodiment, the irradiance characteristic coefficients corresponding to the cloud thickness and distribution in a period of time are extracted by using the capsule neural network, and are used for subsequent power generation prediction.
[0133] It should be noted that the time sequence data fusion refers to integrating data from different sources but having time correlation into a unified input form;
[0134] Exemplarily, in an optional embodiment, the irradiance characteristics, historical power generation records and weather conditions of several time points before the to-be-predicted time point are combined in time sequence to form a complete input sequence for the BiLSTM-Attention network to obtain a prediction result.
[0135] In summary, the present application proposes a photovoltaic power generation prediction method based on a capsule network and multi-source data, which exhibits significant advantages in many aspects by combining the capsule network and multi-source data. In data processing, the satellite cloud image data is normalized and preprocessed, which can enable the data to be analyzed in a unified scale, reduce the influence caused by the dimensional difference of the data, and improve the stability and convergence speed of the model. At the same time, the fusion of multi-source data combines the irradiance characteristic coefficient with historical power generation information and historical weather information, fully considers various factors affecting photovoltaic power generation, and enables the model to more comprehensively capture the relationship between features.
[0136] In model construction, the introduction of the capsule network is a great innovation. The capsule network can effectively identify the shallow feature pose relationship transformation through the capsule structure, and makes up for the shortcomings of the traditional convolutional neural network. The front convolutional layer extracts shallow features, laying a foundation for subsequent processing; the initial capsule layer straightens the feature map and combines the corresponding points to obtain a capsule, which can better reflect the pose relationship of the features; the deep capsule layer learns the contribution weight of the capsule through the dynamic routing mechanism, further optimizing the feature extraction process. The setting of the two fully connected layers can obtain the irradiance characteristic coefficient and the photovoltaic power value according to different output requirements, providing key data for subsequent prediction.
[0137] In time series processing, the sliding window is used to construct the time series feature dataset, which can fully consider the correlation between the predicted time and the previous several time features as the model input, and select the photovoltaic power generation information at the next time as the model label, so that the model can learn the rules in the time series. The use of BiLSTM-Attention network, the bidirectional LSTM layer can obtain the forward and reverse time series information in the time series, fully capture the characteristics of the time series; the Attention layer can highlight important features and give them higher weights, so that the model pays more attention to key information, thereby establishing a more accurate mapping relationship between time series features and power generation efficiency, achieving the purpose of accurate prediction of photovoltaic power generation.
[0138] Embodiment 2, refer to Figures 2-3 In a preferred embodiment, the normalized satellite cloud image has a size of 30*30.
[0139] Further, the capsule network structure is built as follows: the conventional convolution layer is composed of 128 convolution kernels with a size of 13*13, and the sliding step is 1, and the output of the layer is a tensor of 128*18*18; the initial capsule layer includes 4 capsules, which are composed of 32 convolution kernels with a size of 5*5, and the sliding step is 2, and the output is a tensor of 32*7*7, and the convolution kernel is applied 4 times to obtain a tensor of 4*32*7*7; the deep capsule layer includes 30 capsules, and the dynamic routing mechanism is applied to map the initial capsule to the 30 capsules; the full connection layer 1 includes 3 neurons, and the output is a tensor of 1*3, which represents the irradiance coefficient; the full connection layer 2 includes 1 neuron, which is the photovoltaic power generation capacity corresponding to the sampling time point of the satellite cloud image.
[0140] Further, the sliding window length L is 30, that is, it is considered that the photovoltaic power generation information at the predicted time is related to the features of the previous 30 times; the width is 10, which represents that there are 10 features in the comprehensive feature dataset, and the sliding result is used as the time series feature dataset.
[0141] Further, the sliding step is set to 1, and the model label is obtained by sliding.
[0142] Further, there are 48 memory cells in the bidirectional LSTM layer, and the time series length is specified as 30; after the bidirectional LSTM layer, an Attention layer is added to assign different weights to different features; and a full connection layer with one neuron is added to output the photovoltaic power generation prediction result.
[0143] Further, the curve of the real power generation power and the model prediction value in the test set is drawn to view the prediction effect, and the result is shown in Figure 2 .
[0144] Furthermore, cloud image data from 30 moments prior to the time to be predicted are obtained and input into the trained capsule neural network. The output of fully connected layer 1 is selected as the irradiance feature coefficient of the corresponding cloud image data.
[0145] Furthermore, it obtains historical power generation information and historical weather information for the 30 moments prior to the time to be predicted.
[0146] Furthermore, the irradiance characteristic coefficient, historical power generation information, and historical weather information are fused to obtain time series data, which is then input into a trained BiLSTM-Attention network to obtain photovoltaic power generation prediction results.
[0147] Predict the photovoltaic power generation efficiency of a certain location on [Date] 2024, and plot the photovoltaic power generation as follows: Figure 3 As shown.
[0148] Example 3, referring to Figure 4 This embodiment also provides a photovoltaic power generation prediction system based on capsule networks and multi-source data, including:
[0149] The data acquisition module is used to acquire the first historical data of the target photovoltaic power station. The first historical data includes satellite cloud image data, historical power generation information, historical weather data and corresponding timestamps.
[0150] The feature coefficient acquisition module is used to establish the capsule network. The input of the capsule network is the preprocessed satellite cloud image data, and the output is the irradiance feature coefficient.
[0151] The dataset acquisition module is used to fuse irradiance characteristic coefficients with historical power generation information and historical weather information from multiple sources to construct a time-series feature dataset, and divide the time-series feature dataset into a training set and a test set.
[0152] The prediction module is used to obtain a photovoltaic prediction model based on the training set and the test set, and to predict photovoltaic power generation based on the photovoltaic prediction model combined with the photovoltaic power station prediction time information of the target photovoltaic power station.
[0153] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0154] This embodiment also provides an electronic device, which can be a terminal, and its internal structure diagram can be as follows: Figure 4As shown in the figure. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. Among them, the processor of the electronic device is used to provide computing and control capability. The memory of the electronic device includes non-volatile storage medium, internal memory. The non-volatile storage medium stores the operating system and the computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device is used for wired or wireless communication with external terminals. Wireless mode can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a photovoltaic power generation prediction method based on capsule network and multi-source data. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0155] The embodiment also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0156] Obtaining first historical data of a target photovoltaic power station, the first historical data including satellite cloud image data, historical power generation information, historical weather data and corresponding time stamps;
[0157] Establishing a capsule network, the input of the capsule network being the preprocessed satellite cloud image data, and the output being irradiance characteristic coefficients;
[0158] Multi-source fusion of the irradiance characteristic coefficients, the historical power generation information and the historical weather information is performed to construct a time series feature data set, and the time series feature data set is divided into a training set and a test set;
[0159] Obtaining a photovoltaic prediction model according to the training set and the test set, and performing photovoltaic power generation prediction based on the photovoltaic prediction model and photovoltaic power station prediction time information of the target photovoltaic power station.
[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
[0161] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that the appended claims include all such modifications and variations as fall within the scope of the present application.
[0162] It is apparent that those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. It is therefore intended that the present application cover all such changes and modifications that are within its scope.
Claims
1. A photovoltaic power generation prediction method based on capsule network and multi-source data, characterized in that, The method comprises the following steps: obtaining first historical data of a target photovoltaic power station, wherein the first historical data comprises satellite cloud image data, historical power generation information, historical weather data and corresponding time stamps; establishing a capsule network, wherein the input of the capsule network is preprocessed satellite cloud image data, and the output is irradiance feature coefficients; performing multi-source fusion on the irradiance feature coefficients, the historical power generation information and the historical weather information to construct a time series feature dataset, and dividing the time series feature dataset into a training set and a test set; obtaining a photovoltaic prediction model according to the training set and the test set, and performing photovoltaic power generation prediction based on the photovoltaic prediction model and photovoltaic power station prediction time information of the target photovoltaic power station.
2. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 1, wherein, The establishment of the capsule network comprises: building a capsule neural network, first adding a pre-convolutional layer to extract shallow features in normalized cloud image data; adding an initial capsule layer, performing multi-group convolution on the output of the convolutional layer to obtain multi-group features with depth, straightening the features, and combining corresponding points in each group of features to obtain capsules reflecting feature posture relationships.
3. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 2, characterized in that, The establishment of the capsule network further comprises: adding a deep capsule layer to learn the contribution weight of the capsules in the initial capsule layer to the high-level capsules through a dynamic routing mechanism; adding two fully connected layers, wherein the output of the last fully connected layer is a photovoltaic power generation value, and the output of the first fully connected layer is the irradiance feature coefficients of the cloud image data.
4. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 3, characterized in that, The construction of the time series feature dataset comprises: merging the extracted irradiance feature coefficients, historical power generation information and historical weather information to obtain a dataset reflecting historical time features; building a sliding window to slide in the dataset to obtain time series features; wherein the length of the sliding window represents that the photovoltaic power generation information at the to-be-predicted time is related to the features of the previous several times, and the width of the sliding window represents the number of comprehensive feature dataset features; taking the sliding result as the model input, i.e., the time series feature dataset; selecting the photovoltaic power generation information of the next time of the current time as the model output, i.e., the model label, during sliding.
5. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 4, wherein, The photovoltaic prediction model is used to establish a mapping relationship between time series features and power generation efficiency. The training set is input into a BiLSTM-Attention network to establish a mapping relationship between time series features and power generation efficiency. A bidirectional LSTM layer is added to obtain forward and reverse time series information in the time series. An Attention layer is added to give higher weights to important features. A fully connected layer is added to obtain a photovoltaic power generation prediction result. The photovoltaic power generation prediction based on the photovoltaic prediction model and the photovoltaic power station prediction time information of the target photovoltaic power station comprises:
6. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 5, wherein, obtaining cloud image data of several times before the to-be-predicted time, inputting the cloud image data into the trained capsule neural network, and selecting the output of the first fully connected layer as the irradiance feature coefficients of the corresponding cloud image data; obtaining historical power generation information and historical weather information of several times before the to-be-predicted time; The irradiance characteristic coefficient, historical power generation information and historical weather information are fused to obtain time series data, which is input into the trained BiLSTM-Attention network to obtain a photovoltaic power generation prediction result.
7. The photovoltaic power generation prediction method based on capsule network and multi-source data according to claim 6, wherein, The preprocessing of the satellite cloud image data includes normalization processing.
8. A photovoltaic power generation prediction system based on capsule network and multi-source data, applying the method of any one of claims 1-7, characterized in that, The method comprises the following steps: The data acquisition module is configured to acquire first historical data of a target photovoltaic power station, wherein the first historical data comprises satellite cloud image data, historical power generation information, historical weather data and corresponding time stamps. The characteristic coefficient acquisition module is configured to establish a capsule network, wherein the input of the capsule network is the preprocessed satellite cloud image data, and the output is an irradiance characteristic coefficient. The data set acquisition module is configured to fuse the irradiance characteristic coefficient with the historical power generation information and the historical weather information to construct a time series feature data set, and divide the time series feature data set into a training set and a test set. The prediction module is configured to obtain a photovoltaic prediction model according to the training set and the test set, and perform photovoltaic power generation prediction based on the photovoltaic prediction model and photovoltaic power station prediction time information of the target photovoltaic power station. 9.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to implement the steps of the photovoltaic power generation prediction method based on the capsule network and multi-source data according to any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the photovoltaic power generation prediction method based on the capsule network and multi-source data according to any one of claims 1-7.