Photovoltaic output prediction method and related equipment

Through Pearson correlation analysis and feature extraction of convolutional neural networks, combined with tuna algorithm to optimize LSTM neural networks, the problem of traditional LSTM's strong dependence on historical data is solved, and higher-precision photovoltaic output prediction is achieved.

CN120355254APending Publication Date: 2025-07-22FIBRLINK NETWORKS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510225320.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

Traditional long-term short-term memory neural networks (LSTMs) have strong dependence on the accuracy of historical data in photovoltaic output prediction, which is difficult to reflect the influence of meteorological factors, resulting in a decrease in prediction accuracy, especially in multivariate prediction.

Method used

Pearson correlation analysis was used to screen the influencing factors of meteorology, combine the channel and spatial attention mechanism of the convolutional neural network for feature extraction, and use the tuna algorithm to optimize the parameters of long-term and short-term memory neural networks, and introduce early stop mechanism to avoid overfitting.

Benefits of technology

It improves the accuracy of photovoltaic output prediction, reduces the burden of data processing, enhances the stability and robustness of the model, avoids overfitting, and improves the prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355254A_ABST
    Figure CN120355254A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic output prediction method, and the method is characterized in that the method comprises the steps: carrying out the analysis of obtained first data through Pearson correlation analysis, and obtaining second data; performing two-dimensional transformation and feature extraction on the second data to obtain third data; and inputting the third data into a trained prediction model to obtain a predicted value of photovoltaic output. According to the embodiment of the invention, the meteorological factors are preliminarily screened by using the Pearson correlation analysis, the corresponding threshold values are set, the parameters with high correlation with the photovoltaic power generation output are selected, the ratio of useless data is reduced, and the efficiency is improved. The key meteorological factors and the load data can be processed in space and time sequence through the improved convolutional neural network and the long-short-term memory neural network, and the photovoltaic output prediction precision can be improved through the data processed in space and time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of photovoltaic power output, and particularly relates to a method for predicting photovoltaic power output and related devices. Background Art

[0002] Nowadays, the proportion of distributed photovoltaics in power supply is gradually increasing. Higher-precision prediction of photovoltaic power generation can reduce the volatility and instability caused by distributed photovoltaics during grid connection. Due to the randomness and volatility of photovoltaic power generation, its power output is affected by meteorological factors, and factors such as light intensity, temperature, and humidity will directly affect the photovoltaic power generation.

[0003] With the gradual application of intelligent algorithms to photovoltaic power generation, by establishing a model and using relevant historical power generation data as original data, learning through the model, and optimizing using optimization algorithms, the prediction accuracy of photovoltaic power output has been gradually improved.

[0004] However, when using the traditional Long Short-Term Memory (LSTM) neural network for prediction, it has a strong dependence on the accuracy of historical data, and requires a large amount of historical data as data support. It is difficult to accurately reflect the impact of meteorological and other influencing factors on photovoltaic power output, resulting in a decrease in prediction accuracy, and problems such as the model being unable to converge may also occur. Moreover, the LSTM neural network mainly performs computational learning through time series. It is okay for predicting single variables, but problems such as a decrease in prediction accuracy will occur when predicting multiple variables. Summary of the Invention

[0005] In view of this, the purpose of this application is to propose a method for predicting photovoltaic power output and related devices.

[0006] Based on the above purpose, this application provides a method for predicting photovoltaic power output, including:

[0007] Analyze the obtained first data using Pearson correlation analysis to obtain second data;

[0008] Perform two-dimensional transformation and feature extraction on the second data to obtain third data;

[0009] Input the third data into the trained prediction model to obtain the predicted value of photovoltaic power output.

[0010] In a possible implementation, the first data is a historical time series containing meteorological influencing factors;

[0011] The step of analyzing the obtained first data using Pearson correlation analysis to obtain second data includes:

[0012] Analyze the correlation between the meteorological influencing factors and the power generation in the first data using Pearson correlation analysis to obtain the Pearson correlation coefficient, and determine the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold;

[0013] Use the first data corresponding to the target meteorological influencing factors as the second data.

[0014] In a possible implementation, the Pearson correlation analysis process is represented by the following formula:

[0015]

[0016] where r represents the Pearson correlation coefficient, A represents the meteorological influencing factor, B represents the power generation, and N represents the number of samples.

[0017] In a possible implementation, the determining of the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold includes:

[0018] In response to the absolute value of the Pearson correlation coefficient being less than the first threshold, eliminate the corresponding meteorological influencing factor;

[0019] In response to the absolute value of the Pearson correlation coefficient being greater than or equal to the first threshold, use the corresponding meteorological influencing factor as the target meteorological influencing factor.

[0020] In a possible implementation, the performing two-dimensional transformation and feature extraction on the second data to obtain the third data includes:

[0021] Perform two-dimensional transformation on the second data to obtain the first image;

[0022] Introduce a dual attention mechanism of channel dimension attention and spatial dimension attention to adjust the feature weights of the first image to obtain the second image;

[0023] Re-transform the second image into a time series to obtain the third data.

[0024] In a possible implementation, the prediction model is trained through the following steps:

[0025] Use a preset training set to train a long short-term memory neural network, and use the tuna algorithm to optimize the parameters of the long short-term memory neural network;

[0026] Stop training in response to meeting the first condition to obtain the prediction model; the first condition includes: in response to the root mean square error of the long short-term memory neural network being less than or equal to a second threshold, iterate five more times, and each iteration can satisfy that the root mean square error is less than or equal to the second threshold.

[0027] Based on the same inventive concept, an embodiment of the present application further provides a photovoltaic output prediction device, including:

[0028] An analysis module, configured to analyze the acquired first data by using Pearson correlation analysis to obtain second data;

[0029] An extraction module, configured to perform two-dimensional transformation and feature extraction on the second data to obtain third data;

[0030] A prediction module, configured to input the third data into the trained prediction model to obtain a predicted value of the photovoltaic output.

[0031] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the photovoltaic output prediction method as described in any one of the above.

[0032] Based on the same inventive concept, an embodiment of the present application further provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the photovoltaic output prediction method as described in any one of the above.

[0033] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, which includes computer program instructions, and the computer instructions are used to cause the computer program product to execute the photovoltaic output prediction method as described in any one of the above.

[0034] As can be seen from the above, the photovoltaic output prediction method and related devices provided by this application analyze the acquired first data through Pearson correlation analysis to obtain second data; perform two-dimensional transformation and feature extraction on the second data to obtain third data; and input the third data into a trained prediction model to obtain the predicted value of photovoltaic output. In the embodiments of this application, by using Pearson correlation analysis to screen the meteorological influencing factors that affect photovoltaic output, it is possible to effectively avoid the influence of meteorological influencing factors with low correlation on the final prediction result, effectively screen out invalid data, reduce the amount of data processed subsequently, relieve the burden, and at the same time improve the accuracy of prediction. In addition, the embodiments of this application also input the selected data into a convolutional neural network, and a dual mechanism of channel attention and spatial attention is introduced in the convolutional neural network to effectively extract the feature information in the data, effectively improving the accuracy of the final predicted value of photovoltaic output. In addition, during the training process of the prediction model of this application, a tuna algorithm and an early stopping mechanism are introduced. Using the tuna algorithm to optimize the parameters of the model can no longer rely on a large amount of historical data, and the introduced early stopping mechanism can effectively avoid the phenomenon of overfitting during the training process of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in this application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following descriptions are only the embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0036] Figure 1 Schematic flowchart of the photovoltaic output prediction method according to the embodiment of this application;

[0037] Figure 2 Schematic flowchart of the convolutional process according to the embodiment of this application;

[0038] Figure 3 Schematic structural diagram of the photovoltaic output prediction device according to the embodiment of this application;

[0039] Figure 4 Schematic structural diagram of the electronic device according to the embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following further elaborates on this application in detail with reference to specific embodiments and the accompanying drawings.

[0041] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those of ordinary skill in the field to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0042] It can be understood that before using the technical solutions of the various embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0043] For example, when a user's active request is received, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.

[0044] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving the user's active request may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0045] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the implementation manner of the present disclosure, and other manners that meet the relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0046] As described in the background art section, nowadays, the proportion of distributed photovoltaics in power supply is gradually increasing, and more accurate prediction of photovoltaic power generation can reduce the volatility and instability caused by distributed photovoltaics during grid connection. Due to the randomness and volatility of photovoltaic power generation, its power output is affected by meteorological factors, and factors such as light intensity, temperature, and humidity will directly affect the power generation power of photovoltaics.

[0047] As intelligent algorithms are gradually applied to photovoltaic power generation, through the establishment of a model and the use of relevant historical power generation data as original data, learning is carried out through the model, and optimization algorithms are used for optimization, so that the prediction accuracy of photovoltaic output is gradually improved.

[0048] However, when using the traditional Long Short-Term Memory (LSTM) neural network for prediction, it has a strong dependence on the accuracy of historical data, and a large amount of historical data is required as data support. It is difficult to accurately reflect the impact of meteorological and other influencing factors on photovoltaic output, resulting in a decrease in prediction accuracy, and problems such as the model being unable to converge may also occur. Moreover, the LSTM neural network mainly performs computational learning through time series, and it is okay for predicting single variables, but problems such as a decrease in prediction accuracy will occur when predicting multiple variables.

[0049] Considering the above comprehensively, the embodiment of the present application proposes a method for predicting photovoltaic output. By using Pearson correlation analysis to analyze the obtained first data, second data is obtained; two-dimensional transformation and feature extraction are performed on the second data to obtain third data; the third data is input into a trained prediction model to obtain the predicted value of photovoltaic output. The embodiment of the present application can effectively avoid the influence of meteorological influencing factors with low correlation on the final prediction result by using Pearson correlation analysis to screen the meteorological influencing factors affecting photovoltaic output, effectively screen out invalid data, reduce the amount of data for subsequent data processing, relieve the burden, and at the same time improve the prediction accuracy. In addition, the embodiment of the present application also inputs the selected data into a convolutional neural network, and a dual mechanism of channel attention and spatial attention is introduced in the convolutional neural network to effectively extract the feature information in the data, effectively improving the accuracy of the final predicted value of photovoltaic output. In addition, the tuna algorithm and the early stopping mechanism are introduced in the training process of the prediction model of the present application. The parameters of the model are optimized by using the tuna algorithm, and it is no longer necessary to rely on a large amount of historical data. The introduced early stopping mechanism can effectively avoid the phenomenon of overfitting in the training process of the model.

[0050] Hereinafter, the technical solutions of the embodiments of the present application will be described in detail through specific embodiments.

[0051] Refer to Figure 1 , the method for predicting photovoltaic output according to the embodiment of the present application includes the following steps:

[0052] Step S101, using Pearson correlation analysis to analyze the obtained first data to obtain second data;

[0053] Step S102, performing two-dimensional transformation and feature extraction on the second data to obtain third data;

[0054] Step S103: Input the third data into the trained prediction model to obtain the predicted value of photovoltaic power output.

[0055] Regarding step S101, before analyzing the acquired first data using Pearson correlation analysis, it is necessary to first perform corresponding processing on the acquired initial data.

[0056] Specifically as follows:

[0057] First, perform data preprocessing on the selected historical load data and historical meteorological factors. First, calculate the mean value of the selected photovoltaic power output data and variance σ 2 , and then standardize it through the Z-Score method.

[0058]

[0059] Z-Score standardization:

[0060]

[0061] In the formula: represents the mean value of the original photovoltaic power output data, n represents the number of data, σ represents the standard deviation of the original photovoltaic power output data, and D i represents the original photovoltaic power output data, represents the standardized data.

[0062] After preprocessing the data, the aforementioned first data is obtained.

[0063] In some embodiments, the first data is a historical time series containing meteorological influencing factors; the analyzing the acquired first data using Pearson correlation analysis to obtain second data includes: analyzing the correlation between the meteorological influencing factors and the power generation power in the first data using Pearson correlation analysis to obtain the Pearson correlation coefficient, determining the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold; using the first data corresponding to the target meteorological influencing factors as the second data.

[0064] In this embodiment, the Pearson correlation analysis (Pearson Correlation Coefficient, PCC) method is used to analyze the correlation of key meteorological factors and initially screen out meteorological influencing factors. For photovoltaic cells, their power generation power is affected by factors such as temperature, light intensity, and humidity. Taking the historical time series containing meteorological influencing factors as the research object.

[0065] In some embodiments, the Pearson correlation analysis process is represented by the following formula:

[0066]

[0067] Among them, r represents the Pearson correlation coefficient, A represents meteorological influencing factors, B represents power generation, and N represents the number of samples.

[0068] In some embodiments, determining the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold includes: in response to the absolute value of the Pearson correlation coefficient being less than the first threshold, eliminating the corresponding meteorological influencing factor; in response to the absolute value of the Pearson correlation coefficient being greater than or equal to the first threshold, taking the corresponding meteorological influencing factor as the target meteorological influencing factor.

[0069] In this embodiment, to ensure more accurate subsequent feature extraction, after calculating the value of r by the PCC method, a threshold discrimination mechanism needs to be set. The first threshold is set to M. When |r| < M, the result is automatically eliminated. If |r| > M, the current result is retained and input downward. The selection of the threshold should be appropriate. If it is too large, some key factors will be lost. If it is too small, it cannot play a filtering role. Therefore, after a large number of experiments in this application, the optimal threshold is set to 0.6.

[0070] Further, after screening to obtain the target meteorological influencing factors whose correlation satisfies the first threshold requirement, the first data corresponding to the target meteorological influencing factors is used as the second data.

[0071] Further, for step S102, two-dimensional transformation and feature extraction are performed on the second data to obtain third data.

[0072] In some embodiments, performing two-dimensional transformation and feature extraction on the second data to obtain third data includes: performing two-dimensional transformation on the second data to obtain a first image; introducing a dual attention mechanism of channel dimension attention and spatial dimension attention to adjust the feature weights of the first image to obtain a second image; re-transforming the second image into a time series to obtain the third data.

[0073] Reference Figure 2 , which is a schematic diagram of the convolution process of the embodiment of the present application. First, the second data obtained in the previous steps is transformed into a two-dimensional image, and then it is input into a convolutional neural network introducing a Convolutional Block Attention Module (CBAM) module for re-distributing the weights of the features to obtain the processed second image. To cooperate with subsequent calculations, the second image is subjected to a time series transformation and re-transformed into time series data to obtain the third data.

[0074] In this embodiment, the features (second data) preliminarily screened through PCC correlation analysis are input into a convolutional neural network. In this application, the structure of the convolutional neural network (Convolutional Neural Network, CNN) is set with a two-dimensional convolutional layer, a pooling layer, and two fully connected layers.

[0075] First, the time series data processed by PCC correlation analysis is transformed into a two-dimensional image (first image). The image features of the first image are processed through two-dimensional convolution to extract key information. Here, the CBAM module is introduced, and the intermediate feature map is introduced into this module. This module includes a channel attention module and a spatial attention module. The image will sequentially enter the two modules independently in two dimensions, and then the attention map and the input intermediate feature map are combined to perform adaptive training until the feature information is refined.

[0076] After the feature information is extracted by the convolutional neural network (second image), which is still in the form of a two-dimensional image, the two-dimensional image (second image) needs to be transformed back into a time series (third data) for subsequent input into the LSTM neural network for time series prediction.

[0077] The CBAM module is divided into two core parts: the channel attention module (Channel Attention Module, CAM) and the spatial attention module (Spatial Attention Module, SAM). The two work in series to optimize the input features in sequence.

[0078] The role of the channel attention module is to focus on the importance of the feature map in the channel dimension and assign a weight to each channel.

[0079] The specific implementation solution is to pass the input feature map through global max pooling (Max Pooling) and global average pooling (Average Pooling) respectively to obtain the global information of each channel. The pooled information is passed through two fully connected layers with shared weights to generate the channel importance weights. The weights are combined and the Sigmoid activation function is used to generate the final channel weights. The input features are weighted to highlight the important channels.

[0080] The role of the spatial attention module is to focus on the importance of the feature map in the spatial dimension (pixel position) and assign a weight to each position.

[0081] The specific implementation solution is to compress the input feature map through the channel dimension to obtain a two-dimensional feature map (such as taking max pooling and average pooling). The result is used to generate spatial attention weights through a convolution operation. The input features are weighted to highlight key spatial positions.

[0082] After being processed by the convolutional neural network, the screening process of key feature information is completed, which can be used as data support for the LSTM neural network to predict the power load.

[0083] For step S103, the third data is input into the trained prediction model to obtain the predicted value of the photovoltaic output.

[0084] In some embodiments, the prediction model is trained through the following steps: using a preset training set to train the long short-term memory neural network, and using the tuna algorithm to optimize the parameters of the long short-term memory neural network; in response to meeting the first condition, stop training to obtain the prediction model; the first condition includes: in response to the root mean square error of the long short-term memory neural network being less than or equal to the second threshold, iterate five more times, and each iteration can meet the root mean square error being less than or equal to the second threshold.

[0085] In this embodiment, after data feature extraction, the load data containing key influencing factors is used as the input, and the photovoltaic output is predicted through the TSO-LSTM neural network. During the training of this model, the cells in the hidden layer learn, and the adaptive moment estimation (ADAM) solver is used to optimize the weight coefficients, and finally the output layer outputs the data.

[0086] First, the parameter optimization process is described.

[0087] First, before performing hyperparameter optimization, the following parameters need to be set, as shown in Table 1:

[0088] Table 1 Parameter Description

[0089]

[0090] After that, the population is initialized.

[0091] The population initialization is represented by the initial position where the tuna is located and the specific expression is:

[0092]

[0093] In the formula: $x_i^0$ represents the initial position of the $i$-th individual of tuna, $ub$ represents the upper boundary of the set space, $lb$ represents the lower boundary of the set space, and $rand$ represents a random number uniformly distributed within $[0, 1]$.

[0094] Specific description of spiral foraging:

[0095] Tuna foraging is carried out in the form of a spiral, sharing information with each other and gradually spreading. The mathematical expression of spiral foraging is:

[0096]

[0097] In the formula: $x_i^{t + 1}$ represents the position information of the $i$-th tuna at the $(t + 1)$-th iteration, $r$ is a randomly generated reference point in the space; $pbest_i^t$ is the position of the optimal individual at the $t$-th iteration; $\alpha_1$ represents the first weight of the tuna's movement trend, affecting the degree to which the tuna moves towards the reference point or the optimal individual, $\alpha_2$ represents the second weight of the tuna's movement trend, determining the degree to which the current individual maintains its own position when updating its position, $\beta$ is an exploration parameter related to the optimal individual, and $N$ represents the number of tuna in the population.

[0098] Specific description of parabolic foraging:

[0099] The tuna group can also forage in the form of a parabola. The two foraging methods are carried out randomly, and the sum of the probabilities of the two foraging methods is 1. The mathematical expression of parabolic foraging is:

[0100]

[0101] In the formula: $TF$ is a random number of 1 or -1, $TF$ represents a random number, $TF\in\{-1, 1\}$, $P$ represents a non-linear decreasing coefficient, $P$ s represents the probability of spiral foraging, $t$ represents the current iteration number, $t$ max represents the maximum iteration number.

[0102] While optimizing the parameters of the model, to prevent overfitting and improve the training performance, an early stopping mechanism is added to the model. In this application, the root mean square error (RMSE) is selected as the judgment criterion, as follows:

[0103] When $RMSE\leq10\%$, the model continues to iterate backward 5 times.

[0104] If $RMSE\leq10\%$ can be satisfied in each iteration, then the training stops;

[0105] If there are iterations outside the set standard range, then continue to iterate until there are 5 consecutive iterations that meet the conditions;

[0106] If the situation that meets the conditions still does not occur after the set maximum number of iterations, it is necessary to manually adjust the hyperparameter of the maximum number of iterations and continue the optimization.

[0107] After training and prediction by the TSO-LSTM neural network, set R 2 as an evaluation index to judge the quality of model training.

[0108]

[0109] Among them, R 2 represents the coefficient of determination, D i ′ represents the actual value of the photovoltaic output power data during training, represents the predicted value of the photovoltaic output power data during training, represents the mean value of the actual values of the photovoltaic output power data during training.

[0110] After the model completes the corresponding training, it can be directly put into use to predict the photovoltaic output power of the corresponding data.

[0111] Above, using Pearson correlation analysis to screen the meteorological factors affecting photovoltaic output can effectively remove redundant data that is irrelevant or has low correlation with photovoltaic output, thereby reducing the interference of data noise on the prediction model and at the same time reducing the computational complexity. This data preprocessing method makes the input of the subsequent model more concise and efficient, improving the accuracy of modeling and the speed of training. By eliminating meteorological factors with low correlation and only retaining feature variables highly correlated with photovoltaic output, it provides more targeted data input for the learning of the model and avoids unnecessary parameter interference.

[0112] Introducing the CBAM module into the convolutional neural network can further enhance the model's ability in feature extraction. The CBAM module dynamically adjusts the importance of features from different dimensions through the channel attention mechanism and the spatial attention mechanism, enabling the model to focus more on key information while weakening the influence of irrelevant or redundant information. This feature enables the convolutional neural network to more comprehensively understand the local and global features of the input data. Especially when dealing with the non-linear relationship between photovoltaic output affected by complex meteorological factors, the CBAM module significantly improves the network's ability to capture key features and further enhances the prediction accuracy. In addition, since the CBAM module is designed in a lightweight manner, introducing this module will not significantly increase the computational amount of the network, ensuring the efficiency of the model.

[0113] After restoring the features extracted by the convolutional neural network into time series data and inputting them into the prediction model, the integrity of the time series characteristics can be effectively retained, enabling the model to better capture the time-dependent changes in photovoltaic power output. By using the tuna algorithm for parameter optimization, a globally optimal hyperparameter configuration is provided for the prediction model, overcoming the subjectivity and limitations of traditional manual parameter tuning methods. At the same time, it speeds up the convergence rate of the model and improves the prediction accuracy. With its excellent global search ability, the tuna algorithm can effectively prevent the model from falling into local optima, enabling the prediction model to efficiently find the optimal solution in a complex optimization space.

[0114] Introducing an early stopping mechanism further improves the stability and robustness of model training. When the root mean square error (RMSE) of the model reaches a stable state within the set standard range, overfitting problems are avoided by stopping the training, and at the same time, unnecessary waste of computing resources is reduced. By setting the number of consecutive iterations that satisfy RMSE ≤ 10% as the stopping condition, the training depth and performance optimization of the model can be dynamically balanced, ensuring that the model obtains the best prediction effect while being efficiently trained. In addition, if the model fails to meet the requirements within the set maximum number of iterations, the hyperparameters can be manually adjusted for re-optimization. This flexible parameter tuning mechanism provides a guarantee for the application of the model in complex scenarios.

[0115] In addition, the combination of the above different technical solutions produces a synergistic technical effect. Pearson correlation analysis provides the model with concise high-correlation data input, reducing unnecessary computational overhead, and complements the feature enhancement ability of the CBAM module, further improving the expression quality of the input data. After restoring the features processed by the convolutional neural network and the CBAM module into time series data and inputting them into the prediction model, the importance of the time series features is fully retained, enabling the model to make more accurate photovoltaic power output predictions on the basis of comprehensively considering spatio-temporal correlations. The combination of the global optimal parameter optimization of the tuna algorithm and the early stopping mechanism not only accelerates the training process of the model but also ensures the stability and robustness of the prediction performance. These technical means, through synergistic effects, jointly construct an efficient, accurate, and robust photovoltaic power output prediction system.

[0116] This application organically combines a variety of technical means to form a complete prediction framework in the full-process design from data screening, feature extraction, time-series modeling to prediction optimization. By integrating data screening, attention mechanism, time-series modeling and intelligent optimization into the same method, the prediction accuracy and efficiency of photovoltaic power output are significantly improved. Compared with the prior art, this solution can adaptively cope with the complex spatio-temporal correlation and non-linear dynamic changes of photovoltaic power generation, which are technical effects difficult to predict in the prior art. Its overall design not only improves the prediction performance of the model, but also shows significant advantages in the efficient utilization of computing resources, the stability and generalization ability of the model, and has great application value and promotion potential.

[0117] As can be seen from the above embodiments, for the photovoltaic power output prediction method described in the embodiments of this application, the first data obtained is analyzed by using Pearson correlation analysis to obtain the second data; the second data is subjected to two-dimensional transformation and feature extraction to obtain the third data; the third data is input into the trained prediction model to obtain the predicted value of the photovoltaic power output. By using Pearson correlation analysis to screen the meteorological influencing factors affecting the photovoltaic power output, the embodiments of this application can effectively avoid the influence of meteorological influencing factors with low correlation on the final prediction result, effectively screen out invalid data, reduce the amount of data processed subsequently, relieve the burden, and at the same time improve the prediction accuracy. In addition, the embodiments of this application also input the selected data into a convolutional neural network, and a dual mechanism of channel attention and spatial attention is introduced into the convolutional neural network to effectively extract the feature information in the data, effectively improving the accuracy of the final predicted value of the photovoltaic power output. In addition, during the training process of the prediction model of this application, the tuna algorithm and the early stopping mechanism are introduced. Using the tuna algorithm to optimize the parameters of the model can no longer rely on a large amount of historical data, and the introduced early stopping mechanism can effectively avoid the phenomenon of overfitting during the training process of the model.

[0118] It should be noted that the method of the embodiments of this application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of this application, and these multiple devices will interact with each other to complete the described method.

[0119] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0120] Based on the same inventive concept, corresponding to any of the above-described method embodiments, the present application further provides a photovoltaic output prediction device.

[0121] Referring to Figure 3 , the photovoltaic output prediction device includes:

[0122] An analysis module 31, configured to analyze the acquired first data using Pearson correlation analysis to obtain second data;

[0123] An extraction module 32, configured to perform two-dimensional transformation and feature extraction on the second data to obtain third data;

[0124] A prediction module 33, configured to input the third data into a trained prediction model to obtain a predicted value of the photovoltaic output.

[0125] For the sake of convenience of description, when describing the above device, it is divided into various modules according to functions and described separately. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0126] The device of the above embodiment is used to implement the corresponding photovoltaic output prediction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0127] Based on the same inventive concept, corresponding to any of the above-described method embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the photovoltaic output prediction method described in any of the above embodiments when executing the program.

[0128] Figure 4 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0129] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0130] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0131] The input / output interface 1030 is used to connect to the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0132] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to realize the communication interaction between this device and other devices. Among them, the communication module can realize communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).

[0133] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0134] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0135] The electronic device in the above embodiments is used to implement the corresponding photovoltaic output prediction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0136] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the photovoltaic output prediction method described in any of the above embodiments.

[0137] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0138] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the photovoltaic output prediction method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0139] Based on the same inventive concept, corresponding to the photovoltaic output prediction method described in any of the above embodiments, the present disclosure also provides a computer program product including computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of the computer to cause the computer and / or the processor to execute the photovoltaic output prediction method. Corresponding to the execution subject corresponding to each step in the embodiments of the photovoltaic output prediction method, the processor executing the corresponding step can belong to the corresponding execution subject.

[0140] The computer program product of the above embodiments is used to cause the computer and / or the processor to execute the photovoltaic output prediction method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0141] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; within the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.

[0142] In addition, for the sake of simplicity of explanation and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the devices may be shown in block diagram form in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0143] Although the present application has been described in connection with specific embodiments of the present application, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) can be used with the embodiments discussed.

[0144] The embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. A method for predicting photovoltaic power output, characterized in that, Including: Analyze the obtained first data using Pearson correlation analysis to obtain second data; Perform two-dimensional transformation and feature extraction on the second data to obtain third data; Input the third data into the trained prediction model to obtain the predicted value of photovoltaic output.

2. The method according to claim 1, characterized in that, The first data is a historical time series containing meteorological influencing factors; The step of analyzing the obtained first data using Pearson correlation analysis to obtain second data includes: Analyze the correlation between the meteorological influencing factors and the power generation power in the first data using Pearson correlation analysis to obtain the Pearson correlation coefficient, and determine the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold; Use the first data corresponding to the target meteorological influencing factors as the second data.

3. The method according to claim 2, characterized in that, The Pearson correlation analysis process is represented by the following formula: where r represents the Pearson correlation coefficient, A represents the meteorological influencing factor, B represents the power generation power, and N represents the number of samples.

4. The method according to claim 2, wherein The step of determining the target meteorological influencing factors according to the relationship between the Pearson correlation coefficient and the first threshold includes: In response to the absolute value of the Pearson correlation coefficient being less than the first threshold, eliminate the corresponding meteorological influencing factor; In response to the absolute value of the Pearson correlation coefficient being greater than or equal to the first threshold, use the corresponding meteorological influencing factor as the target meteorological influencing factor.

5. The method according to claim 1, characterized in that The step of performing two-dimensional transformation and feature extraction on the second data to obtain third data includes: Perform two-dimensional transformation on the second data to obtain a first image; Introduce a dual attention mechanism of channel dimension attention and spatial dimension attention to adjust the feature weights of the first image to obtain a second image; Re-transform the second image into a time series to obtain the third data.

6. The method according to claim 1, wherein The prediction model is trained through the following steps: Use a preset training set to train a long short-term memory neural network, and use the tuna algorithm to optimize the parameters of the long short-term memory neural network; In response to meeting the first condition, stop training to obtain the prediction model; the first condition includes: in response to the root mean square error of the long short-term memory neural network being less than or equal to the second threshold, iterate five more times, and each iteration can satisfy that the root mean square error is less than or equal to the second threshold.

7. A prediction device for photovoltaic output, characterized in that, Including: An analysis module configured to analyze the obtained first data using Pearson correlation analysis to obtain second data; An extraction module configured to perform two-dimensional transformation and feature extraction on the second data to obtain third data; A prediction module configured to input the third data into the trained prediction model to obtain the predicted value of photovoltaic output.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

10. A computer program product including computer program instructions, which when running on a computer, cause the computer to execute the method according to any one of claims 1 to 6.