Photovoltaic power prediction model, construction method, construction device and power prediction method

By combining a convolutional feature extraction network, a long short-term memory network, and an attention mechanism, the photovoltaic power prediction model solves the problem of high prediction error in existing photovoltaic power technologies, and achieves more accurate short-term photovoltaic power prediction, which is suitable for high-proportion photovoltaic grid connection and new power systems.

CN121584540APending Publication Date: 2026-02-27SHANGHAI INVESTIGATION DESIGN & RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511671242.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The existing photovoltaic power prediction models have high prediction errors, making it difficult to meet the application requirements of high-proportion photovoltaic grid connection and new power systems.

Method used

A combined model of convolutional feature extraction network, first long short-term memory network, attention mechanism and second long short-term memory network is adopted. By combining historical meteorological data and power generation data for feature extraction, encoding and decoding, the ability to pay attention to sudden weather changes is enhanced, and long-term dependent information is integrated to achieve more accurate short-term photovoltaic power prediction.

Benefits of technology

It improves the accuracy and precision of photovoltaic power prediction, meeting the application requirements of high-proportion photovoltaic grid connection and new power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121584540A_ABST
    Figure CN121584540A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photovoltaic power generation power prediction, and discloses a photovoltaic power prediction model, a construction method, a construction device and a power prediction method. The short-term trend change, the local disturbance mode and the nonlinear coupling relation of the historical meteorological data and the historical power generation data are obtained, and the feature representation capability between the obtained historical meteorological data and the historical power generation data can be improved; the first long short-term memory network is used for coding the dynamic change trend of the historical meteorological data and the historical power generation data in the middle and short term and the time sequence information; attention of the model on abnormal conditions such as sudden weather change, sudden increase or decrease of sunlight and the like is enhanced through an attention mechanism, and long-term dependence information and context features after attention optimization are further integrated by using a second long-short-term memory network, so that more accurate short-time photovoltaic power output prediction is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of photovoltaic power prediction, in particular to a photovoltaic power prediction model, a construction method and device, and a power prediction method. BACKGROUND

[0002] With the acceleration of global clean energy transformation, the proportion of photovoltaic power generation in the power system is rising. However, due to the strong dependence of photovoltaic power generation on meteorological conditions, there are significant randomness and intermittency characteristics, resulting in large fluctuations in output and high difficulty in prediction, which seriously affects the dispatching safety and operation stability of the power grid. Therefore, improving the prediction accuracy of photovoltaic power has become a key link in the process of high proportion of new energy access to the power grid.

[0003] However, the photovoltaic power prediction method in the related art includes a physical model, a statistical model, and a hybrid model based on artificial intelligence. The power prediction result output by the photovoltaic power prediction model disclosed in the related art has a high prediction error, which is difficult to meet the application requirements of current high proportion of photovoltaic grid connection, source-grid-load-storage collaborative operation and other new power system scenarios. SUMMARY

[0004] The present application provides a photovoltaic power prediction model, a construction method, a prediction method and device to solve the problem of high error of the power prediction result output by the photovoltaic power prediction model disclosed in the related art.

[0005] In a first aspect, the present application provides a photovoltaic power prediction model, comprising: a convolution feature extraction network, configured to perform one-dimensional convolution feature extraction on received historical meteorological data and historical power generation data to obtain a feature sequence of the historical meteorological data and the historical power generation data, the feature sequence of the historical meteorological data and the historical power generation data including short-term trend changes, local disturbance patterns and nonlinear coupling relationships of the historical meteorological data and the historical power generation data; a first long short-term memory network, configured to model time sequence features in the feature sequence of the historical meteorological data and the historical power generation data to obtain a high-dimensional time feature representation; an attention mechanism, configured to assign weights to features at each time in the high-dimensional time feature representation to obtain weighted time sequence features; a second long short-term memory network, configured to decode and predict the weighted time sequence features to obtain a short-time photovoltaic power prediction value.

[0006] By the above-mentioned embodiments, the received historical meteorological data and historical power generation data are subjected to one-dimensional convolution feature extraction by using a convolution feature extraction network, so that short-term trend changes, local disturbance patterns and nonlinear coupling relationships of the historical meteorological data and the historical power generation data are obtained, and the feature representation capability between the historical meteorological data and the historical power generation data can be improved; the first long short-term memory network is used to encode the dynamic change trend of the historical meteorological data and the historical power generation data in the medium and short term and the time sequence information; then the attention mechanism enhancement model is used to enhance the attention capability of the model to abnormal situations such as sudden weather changes, sudden increase or decrease of sunshine; and the decoder structure of the second long short-term memory network is further used to integrate long-term dependence information and context features optimized by attention, so that more accurate short-term photovoltaic power output prediction is realized.

[0007] In a second aspect, the present application provides a photovoltaic power prediction model construction method, comprising: Based on the historical meteorological data and the historical power generation data, a preprocessing method is used for cleaning processing to obtain cleaned historical meteorological data and historical power generation data, and the data is constructed into a sample data set, wherein the preprocessing method comprises time alignment, missing value filling, abnormal value elimination and normalization conversion; Based on the sample data set, a pre-constructed photovoltaic power prediction model is trained, a hybrid loss function is constructed based on the symmetric mean absolute percentage error and the mean absolute error, the model parameters are iterated by using an AdamW optimizer, and a model corresponding to the minimum loss value of the hybrid loss function is output as the final photovoltaic power prediction model, wherein the photovoltaic power prediction model comprises a convolution feature extraction network, a first long short-term memory network, an attention mechanism and a second long short-term memory network; The photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output as the final photovoltaic power prediction model.

[0008] By the above-mentioned embodiments, the cleaned historical meteorological data and the historical power generation data are used to train the photovoltaic power prediction model, a hybrid loss function is constructed based on the symmetric mean absolute percentage error and the mean absolute error, and the model parameters in the training are iterated by using an AdamW optimizer, so as to ensure the accuracy of the model parameters of the convolution feature extraction network, the first long short-term memory network, the attention mechanism and the second long short-term memory network obtained by training, and the accuracy of the short-term photovoltaic prediction result output by the photovoltaic power prediction model.

[0009] In an optional embodiment, based on the historical meteorological data and the historical power generation data, a preprocessing method is used for cleaning processing to obtain cleaned historical meteorological data and historical power generation data, and the data is constructed into a sample data set, comprising: Based on historical meteorological data and historical power generation data, the pre-processing method is used for cleaning to obtain cleaned historical meteorological data and historical power generation data; Based on the cleaned historical meteorological data and historical power generation data, a fixed-length sliding window is used to arrange in time sequence to obtain a plurality of samples; Based on the plurality of samples, a preset ratio is used for division to obtain a training set, a validation set and a test set, and is integrated into a sample data set.

[0010] Through the above implementation, the historical meteorological data and the historical power generation data are cleaned by using the pre-processing method, the missing values in the historical meteorological data and the historical power generation data are filled, and the abnormal values are cleaned, and then a plurality of samples are constructed by using the fixed-length sliding window, so that the accuracy of the photovoltaic power prediction model obtained by training is ensured, and the prediction result with higher output accuracy is ensured.

[0011] In an optional implementation, the missing value filling includes: When the continuous missing of the missing values in the historical meteorological data or the historical power generation data is less than or equal to 3, the linear interpolation method is used for filling; When the continuous missing of the missing values in the historical meteorological data or the historical power generation data is greater than 3, the same type of time period data of adjacent days is used for filling.

[0012] Through the above implementation, for the historical meteorological data or the historical power generation data with less continuous missing, the linear interpolation method is used for filling, which can not only increase the amount of sample data set, but also improve the acquisition efficiency of the amount of sample data; for the historical meteorological data or the historical power generation data with more continuous missing, the same type of time period data of adjacent days is used for filling, which reduces the workload of filling the historical meteorological data or the historical power generation data with more missing, and ensures the acquisition efficiency of the data in the sample data set.

[0013] In an optional implementation, the abnormal value elimination includes: Based on the historical meteorological data and the historical power generation data, the statistical threshold and the physical rule are used for identification, and the identified abnormal value is replaced by the median of the adjacent time period data.

[0014] Through the above implementation, the statistical threshold and the physical rule are used to identify the abnormal value in the historical meteorological data and the historical power generation data, and the median of the adjacent time period data is used for replacement, so as to ensure that the abnormal value is processed, improve the accuracy of the constructed sample data set, and further ensure the accuracy of the photovoltaic power prediction model obtained by training.

[0015] In a third aspect, the present application provides a photovoltaic power prediction model construction device, which comprises: The sample data acquisition module is used to clean historical meteorological data and historical power generation data using preprocessing methods to obtain cleaned historical meteorological data and historical power generation data, and construct a sample dataset. The preprocessing methods include: time alignment, missing value imputation, outlier removal and normalization transformation. The model training module is used to train the pre-built photovoltaic power prediction model based on the sample dataset, and to construct a hybrid loss function based on the symmetric mean absolute percentage error and the mean absolute error. The AdamW optimizer is used to iterate the parameters of the model, and the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output. The photovoltaic power prediction model includes a convolutional feature extraction network, a first long short-term memory network, an attention mechanism, and a second long short-term memory network. The model output module is used to output the photovoltaic power prediction model that minimizes the loss value of the hybrid loss function as the final photovoltaic power prediction model.

[0016] Fourthly, the present invention provides a photovoltaic power prediction method, comprising: Based on historical meteorological data and historical power generation data, a trained photovoltaic power prediction model is used to make predictions and obtain short-term photovoltaic power prediction values. The photovoltaic power prediction model is constructed using the photovoltaic power prediction model construction method described in the second aspect or any of its corresponding embodiments.

[0017] Fifthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the photovoltaic power prediction model construction method of the second aspect above or any corresponding embodiment above, or the photovoltaic power prediction method of the fourth aspect above.

[0018] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the photovoltaic power prediction model construction method or the photovoltaic power prediction method of the fourth aspect described above, according to any of the second aspect or any of its corresponding embodiments.

[0019] In a seventh aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the photovoltaic power prediction model construction method or the photovoltaic power prediction method of the fourth aspect described above, according to any of the second aspect or any corresponding embodiment. Attached Figure Description

[0020] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor based on these drawings.

[0021] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application; Figure 2 is a first flowchart of a photovoltaic power prediction model construction method according to an embodiment of the present application; Figure 3 is a second flowchart of a photovoltaic power prediction model construction method according to an embodiment of the present application; Figure 4 is a structural block diagram of a photovoltaic power prediction model construction device according to an embodiment of the present application; Figure 5 is a hardware structure schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0023] It can be understood that, before using the technical solutions disclosed in the embodiments of the present application, the type, use range, use scenario and the like of the personal information involved in the present application should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0024] The terms "first", "second" are only for descriptive purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more than two, unless otherwise specifically limited.

[0025] As an optional application scenario of the embodiments of the present application, as shown in Figure 1 , the terminal device 110 is installed with an application 101, and the user 130 can interact with the application 101 through the terminal device 110 and / or the access device of the terminal device 110.

[0026] Exemplarily, the application 101 can be any application that can provide a question and answer related service. For example, the application 101 can be a question and answer interaction application, such as a text-to-text application, a figure-to-text application, and the like. In Figure 1 In the illustrated application scenario, if the application 101 is in an active state, the terminal device 110 can present an interface 102 of the application 101. The interface 102 can include various pages that can be provided by the application 101, such as an interaction page, a setting page, a query page, and the like.

[0027] In some embodiments, the terminal device 110 is in communication connection with the server 120 to implement the provision of the service of the application 101. The terminal device 110 can be a mobile terminal, a fixed terminal, or a portable terminal, and the like, including but not limited to a mobile phone, a desktop computer, a notebook computer, a multimedia tablet, an electronic book device, a game device, or any combination of the foregoing, including accessories and peripherals of the foregoing devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface. The server 120 can be various types of computing systems, servers that can provide computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.

[0028] It should be noted that, Figure 1 The foregoing is merely an example of an application scenario and does not limit the protection scope of the present application.

[0029] The embodiments of the present application will be described below with reference to the accompanying drawings. It should be understood that the pages shown in the drawings are merely examples, and various page designs can actually exist. The various graphical elements in the pages can have different arrangements and different visual representations, one or more of which can be omitted or replaced, and one or more other elements can also exist, without any limitation in the embodiments of the present application. In addition, the embodiments are mainly described with respect to the terminal device 110 in the offline context. It should be understood that the actions described with respect to the terminal device 110 can be performed by the application 101 on the terminal device 110, or can be performed by the application 101 in cooperation with its server (e.g., the server 120).

[0030] The photovoltaic power prediction model disclosed in the related art includes a physical model, a statistical model, and a hybrid model based on artificial intelligence. The photovoltaic power prediction model disclosed in the related art fails to sufficiently fuse feature information at different time scales, is not timely responsive to sudden weather changes, and is not sensitive enough to local regional microclimate changes, thereby resulting in a high error in the output prediction result.

[0031] In order to overcome the above technical problems, the present application provides a photovoltaic power prediction model, which uses a convolution feature extraction network to perform one-dimensional convolution feature extraction on received historical meteorological data and historical power generation data, so as to obtain short-term trend changes, local disturbance patterns and nonlinear coupling relationships of the historical meteorological data and the historical power generation data, and improve the feature representation capability between the historical meteorological data and the historical power generation data; a first long short-term memory network is used to obtain dynamic change trends of the historical meteorological data and the historical power generation data in a medium and short term, and encode time sequence information; then an attention mechanism is used to enhance the attention capability to abnormal conditions such as sudden weather changes, sudden increase or decrease of sunshine, and a decoder structure of a second long short-term memory network is further used to integrate long-term dependence information and context features after attention optimization, so as to realize more accurate short-time photovoltaic power output prediction.

[0032] The photovoltaic power prediction model provided in the present application comprises: a convolution feature extraction network, which is used to perform one-dimensional convolution feature extraction on received historical meteorological data and historical power generation data, so as to obtain feature sequences of the historical meteorological data and the historical power generation data, wherein the feature sequences of the historical meteorological data and the historical power generation data comprise short-term trend changes, local disturbance patterns and nonlinear coupling relationships of the historical meteorological data and the historical power generation data; a first long short-term memory network, which is used to model time sequence features in the feature sequences of the historical meteorological data and the historical power generation data, so as to obtain high-dimensional time feature representations; an attention mechanism, which is used to perform weight distribution on features at each time in the high-dimensional time feature representations, so as to obtain weighted time sequence features; a second long short-term memory network, which is used to decode and predict the weighted time sequence features, so as to obtain short-time photovoltaic power prediction values.

[0033] The historical meteorological data comprises light intensity and air temperature. The historical meteorological data is derived from meteorological station monitoring data. The historical power generation data is derived from historical site data. The time intervals for obtaining the historical meteorological data and the historical power generation data are both 15 minutes, so as to ensure the uniformity of the sampling time between the historical meteorological data and the historical power generation data, and improve the accuracy of the photovoltaic power prediction model in obtaining the feature sequences between the historical meteorological data and the historical power generation data.

[0034] The convolution feature extraction network (Convolutional Neural Network, CNN) is a kind of feedforward neural network with convolution calculation and deep structure, which is used to perform one-dimensional feature extraction on the obtained historical meteorological data and historical power generation data, so as to obtain feature sequences of the historical meteorological data and the historical power generation data.

[0035] The first long short-term memory network can model the time sequence features in the feature sequence output by the convolution feature extraction network according to the time sequence features, so as to obtain a high-dimensional time feature representation, and facilitate obtaining the dynamic change trend of the historical meteorological data and the historical power generation data in a short term.

[0036] The attention mechanism is used for paying attention to special moments in the historical meteorological data and the historical power generation data, adjusting the importance weight of each moment feature on the prediction result, and guaranteeing the prediction accuracy in the face of abnormal conditions such as sudden weather changes, sudden increases or decreases in sunshine, etc.

[0037] The second long short-term memory network is used for processing the weighted time sequence features through a time sequence decoder structure, further integrating the long-term dependency information between the historical meteorological data and the historical power generation data and the context features optimized by attention, and realizing more accurate short-time photovoltaic power prediction output.

[0038] The photovoltaic power prediction model provided by the embodiment of the application can extract one-dimensional convolution features from the received historical meteorological data and historical power generation data through a convolution feature extraction network, obtain short-term trend changes, local disturbance patterns and nonlinear coupling relationships of the historical meteorological data and the historical power generation data, and improve the feature representation capability between the historical meteorological data and the historical power generation data; the dynamic change trend of the historical meteorological data and the historical power generation data in a short term is obtained through the first long short-term memory network, and the time sequence information is encoded; then the attention mechanism is used to enhance the attention capability to abnormal conditions such as sudden weather changes, sudden increases or decreases in sunshine, etc., and the decoder structure of the second long short-term memory network is used to further integrate the long-term dependency information and the context features optimized by attention, so as to realize more accurate short-time photovoltaic power output prediction.

[0039] According to the embodiment of the application, a photovoltaic power prediction model construction method embodiment is provided.

[0040] In the embodiment, a photovoltaic power prediction model construction method is provided, which can be used for the computer of the station edge computing terminal or the power dispatching center described above, Figure 2 The flowchart of the photovoltaic power prediction model construction method according to the embodiment of the application is shown in FIG. Figure 2 The flowchart includes the following steps: S201, based on historical meteorological data and historical power generation data, using a preprocessing method for cleaning processing to obtain cleaned historical meteorological data and historical power generation data, and constructing a sample data set; the preprocessing method includes: time alignment, missing value filling, outlier removal and normalization conversion.

[0041] The sampling interval of the historical meteorological data and the historical power generation data can be implemented as 15 minutes. By setting the sampling interval of the historical meteorological data and the historical power generation data to 15 minutes, sufficient sample data amount of the historical meteorological data and the historical power generation data can be ensured, and the case that too much sample data of the historical meteorological data and the historical power generation data affects the training efficiency of the model can be reduced.

[0042] Time alignment refers to aligning the time of each time point of historical meteorological data and historical power generation data by calibrating the time of the device or system, which is mainly used to eliminate the time deviation of historical meteorological data and historical power generation data at each time point and ensure the accuracy of the subsequent constructed time sequence feature sequence.

[0043] Missing value filling refers to filling the missing data by using context sample data or adjacent day data at the same period, so as to ensure the sufficiency of the obtained data sample and improve the accuracy of training the photovoltaic power prediction model.

[0044] Outlier removal refers to obtaining abnormal data in historical power generation data and historical meteorological data by using a statistical method. Since abnormal data can cause large errors in the trained photovoltaic power prediction model, by removing abnormal values, unreasonable data in the sample data set can be reduced, thereby ensuring that the trained photovoltaic prediction model outputs more accurate prediction results.

[0045] Normalization conversion is used to scale the historical power generation data and the historical meteorological data in a large range, so as to facilitate the subsequent acquisition of feature sequences of historical power generation data and historical meteorological data in the training process of the photovoltaic power prediction model, and also facilitate the subsequent attention mechanism to pay attention to the time of sudden weather changes, sudden increase or decrease of sunshine, etc. and adjust the weight of the corresponding time, thereby ensuring the accuracy of training the photovoltaic prediction model.

[0046] S202, based on the sample data set, training a pre-constructed photovoltaic power prediction model, and constructing a hybrid loss function based on the symmetric mean absolute percentage error and the mean absolute error, using the AdamW optimizer to perform parameter iteration of the model, and outputting the model of the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function. The photovoltaic power prediction model includes a convolution feature extraction network, a first long short-term memory network, an attention mechanism and a second long short-term memory network.

[0047] The expression of the symmetric mean absolute percentage error (SMAPE) satisfies: , wherein, denotes the symmetric mean absolute percentage error between the trained photovoltaic power prediction value and the true value of the historical power generation data; denotes the total number of the historical power generation data in the verification set; denotes the photovoltaic power prediction value output by the photovoltaic power prediction model at the moment t; denotes the historical power generation data corresponding to the moment t in the verification set. The expression of the mean absolute error (MAE) satisfies:

[0048] , wherein, denotes the mean absolute error between the trained photovoltaic power prediction value and the true value of the historical power generation data; denotes the total number of the historical power generation data in the verification set; denotes the photovoltaic power prediction value output by the photovoltaic power prediction model at the moment t; denotes the historical power generation data corresponding to the moment t in the verification set. The AdamW optimizer is introduced by adding an L2 regularization term to the loss function. The L2 regularization term is used in the calculation of the gradient of the photovoltaic power prediction model and the update of the parameters, which can reduce overfitting. By adding a penalty term composed of the square sum of all weights of the model to the loss function and multiplying it by a specific hyperparameter to control the penalty strength, the prediction accuracy of the obtained photovoltaic power prediction model is guaranteed.

[0049] S203, the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output as the final photovoltaic power prediction model.

[0050] The photovoltaic power prediction model with the minimum loss value of the hybrid loss function is used as the final photovoltaic power prediction model, which can guarantee that the photovoltaic power prediction model has high fitting degree for the photovoltaic power prediction generated by receiving historical meteorological data, facilitate the photovoltaic power prediction model to predict the photovoltaic power in the short term in the future, and improve the prediction accuracy of the photovoltaic power prediction result.

[0051] The photovoltaic power prediction model with the minimum loss value of the hybrid loss function is used as the final photovoltaic power prediction model, which can guarantee that the photovoltaic power prediction model has high fitting degree for the photovoltaic power prediction generated by receiving historical meteorological data, facilitate the photovoltaic power prediction model to predict the photovoltaic power in the short term in the future, and improve the prediction accuracy of the photovoltaic power prediction result.

[0052] ​​​The embodiment provides a photovoltaic power prediction model construction method, which can be used for the computer of the station edge computing terminal or the power dispatch center, Figure 3 is a flowchart of the photovoltaic power prediction model construction method according to the embodiment of the application, as shown in the figure, the flowchart comprises the following steps: Figure 3 S301, based on historical meteorological data and historical power generation data, cleaning processing is performed by using a preprocessing method to obtain cleaned historical meteorological data and historical power generation data, and the historical meteorological data and the historical power generation data are constructed into a sample data set; the preprocessing method comprises time alignment, missing value filling, abnormal value elimination and normalization conversion.

[0053] Specifically, the above S301 comprises: S3011, based on historical meteorological data and historical power generation data, cleaning processing is performed by using a preprocessing method to obtain cleaned historical meteorological data and historical power generation data.

[0054] Illustratively, the missing value filling comprises: When the consecutive missing of the missing value of the historical meteorological data or the historical power generation data is less than or equal to 3, linear interpolation is used for filling; When the consecutive missing of the missing value of the historical meteorological data or the historical power generation data is greater than 3, the same type of time period data of adjacent days is used for filling.

[0055] By using linear interpolation to fill the historical meteorological data or the historical power generation data with less consecutive missing, the data amount of the sample data set can be sufficient, and the data acquisition efficiency of the sample data can be improved; by using the same type of time period data of adjacent days to fill the historical meteorological data or the historical power generation data with more consecutive missing, the workload of filling the historical meteorological data or the historical power generation data with more missing is reduced, and the data acquisition efficiency in the sample data set is ensured.

[0056] Illustratively, the abnormal value elimination comprises: Based on the historical meteorological data and the historical power generation data, statistical thresholds and physical rules are used for identification, and the identified abnormal values are replaced by the median of the adjacent time period data.

[0057] By using statistical thresholds and physical rules to identify the abnormal values in the historical meteorological data and the historical power generation data, and using the median of the adjacent time period data for replacement, the abnormal values are processed, the accuracy of the constructed sample data set is improved, and the accuracy of the photovoltaic power prediction model obtained by training is ensured.

[0058] ​By using preprocessing methods to clean historical meteorological and power generation data, filling in missing values ​​and removing outliers, and then constructing multiple samples using a fixed-length sliding window, the accuracy of the trained photovoltaic power prediction model can be ensured, guaranteeing that the photovoltaic power prediction model outputs more accurate prediction results.

[0059] S3012, based on cleaned historical meteorological data and historical power generation data, uses a fixed-length sliding window to arrange them in chronological order to obtain multiple samples.

[0060] The sliding window can be implemented as a historical window of fixed length. In this embodiment of the invention, the sliding window includes 16 time steps, with an interval of 15 minutes between adjacent time steps. The sliding step size of the sliding window is also 15 minutes. The historical meteorological data and historical power generation data after cleaning are sorted according to the time series using the sliding window, and the historical meteorological data and historical power generation data in each sliding window are divided into a sample, thereby obtaining multiple samples.

[0061] S3013, based on multiple samples, divides them according to a preset ratio to obtain a training set, a validation set, and a test set, and combines them into a sample dataset.

[0062] The preset ratio can be 0.7:0.15:0.15, dividing multiple samples into training set, validation set and test set. The training set is used to train the photovoltaic prediction model, while the validation set is used to evaluate the photovoltaic prediction model during the training process, thereby facilitating the parameter iteration of the photovoltaic prediction model. The test set is used to evaluate the prediction results of the final photovoltaic prediction model.

[0063] S202, based on the aforementioned sample dataset, the pre-constructed photovoltaic power prediction model is trained. A hybrid loss function is constructed based on the symmetric mean absolute percentage error and the mean absolute error. The AdamW optimizer is used to iterate the model parameters, and the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output. The photovoltaic power prediction model includes a convolutional feature extraction network, a first long short-term memory network, an attention mechanism, and a second long short-term memory network. For details, please refer to [link to details]. Figure 2 S202 of the illustrated embodiment will not be described again here.

[0064] S203 outputs the photovoltaic power prediction model that minimizes the loss value of the hybrid loss function, as the final photovoltaic power prediction model. For details, please refer to [link to relevant documentation]. Figure 2 S203 of the illustrated embodiment will not be described again here.

[0065] The photovoltaic power prediction model construction method provided in the embodiment of the present application trains the photovoltaic power prediction model by using the cleaned historical meteorological data and historical power generation data, constructs a hybrid loss function based on the symmetric mean absolute percentage error and the mean absolute error, and iterates the model parameters in the training by using the AdamW optimizer, so as to ensure the accuracy of the model parameters of the convolution feature extraction network, the first long short-term memory network, the attention mechanism and the second long short-term memory network obtained by training, and guarantee the accuracy of the short-term photovoltaic prediction result output by the photovoltaic power prediction model.

[0066] A photovoltaic power prediction method is provided in the embodiment, which can be used for the computer of the station edge computing terminal or the power dispatch center described above, and includes the following steps: Based on the historical meteorological data and the historical power generation data, the trained photovoltaic power prediction model is used for prediction to obtain a short-time photovoltaic power prediction value. The photovoltaic power prediction model is constructed by using the photovoltaic power prediction model construction method provided in the above embodiment of the present application.

[0067] The photovoltaic power prediction method provided in the embodiment uses the trained photovoltaic prediction model and the historical meteorological data and the historical power generation data to obtain the future short-term photovoltaic power generation prediction power. The received historical meteorological data and historical power generation data are subjected to one-dimensional convolution feature extraction by using the convolution feature extraction network, so as to obtain the short-term trend change, the local disturbance mode and the nonlinear coupling relationship of the historical meteorological data and the historical power generation data, which can improve the feature representation capability between the historical meteorological data and the historical power generation data. The first long short-term memory network is used for encoding the dynamic change trend of the historical meteorological data and the historical power generation data in the medium and short term and the time sequence information. Then, the attention mechanism is used to enhance the attention capability of the model to the abnormal conditions such as sudden weather change, sudden increase or decrease of sunshine, and the like. The decoder structure of the second long short-term memory network is further used to integrate the long-term dependence information and the context features after attention optimization, so as to realize more accurate short-time photovoltaic power output prediction and meet the application requirements of the current high-proportion photovoltaic grid-connected, source-grid-load-storage collaborative operation and other new power system scenarios.

[0068] In the embodiment, a photovoltaic power prediction model construction device is also provided, which is used to implement the above embodiments and preferred embodiments and will not be described herein. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0069] The embodiment provides a photovoltaic power prediction model construction device, as shown in Figure 4 the device includes: The sample data acquisition module 410 is configured to perform cleaning processing on historical meteorological data and historical power generation data by using a preprocessing method to obtain cleaned historical meteorological data and historical power generation data, and construct a sample data set, the preprocessing method comprising: time alignment, missing value filling, outlier removal, and normalization conversion. The model training module 420 is configured to train a pre-constructed photovoltaic power prediction model based on the sample data set, construct a hybrid loss function based on the symmetric mean absolute percentage error and the mean absolute error, perform parameter iteration of the model by using an AdamW optimizer, and output a model of the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function, the photovoltaic power prediction model comprising a convolution feature extraction network, a first long short-term memory network, an attention mechanism, and a second long short-term memory network. The model output module 430 is configured to output the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function as a final photovoltaic power prediction model.

[0070] In some optional embodiments, the sample data acquisition module 410 comprises: The preprocessing unit 4101 is configured to perform cleaning processing on historical meteorological data and historical power generation data by using a preprocessing method to obtain cleaned historical meteorological data and historical power generation data. The sample construction unit 4102 is configured to arrange the cleaned historical meteorological data and historical power generation data in time sequence by using a fixed-length sliding window to obtain a plurality of samples. The sample division unit 4103 is configured to divide the plurality of samples by using a preset ratio to obtain a training set, a validation set, and a test set, and integrate the training set, the validation set, and the test set into a sample data set.

[0071] In some optional embodiments, when performing missing value filling, the preprocessing unit 4101 is specifically configured to: When the consecutive missing of missing values in the historical meteorological data or the historical power generation data is less than or equal to 3, perform filling by using a linear interpolation method; When the consecutive missing of missing values in the historical meteorological data or the historical power generation data is greater than 3, perform filling by using the same type of time period data of adjacent days.

[0072] In some optional embodiments, when performing outlier removal, the preprocessing unit 4101 is specifically configured to: Based on the historical meteorological data and the historical power generation data, identify outliers by using a statistical threshold and a physical rule, and replace the identified outliers with the median of adjacent time period data.

[0073] The photovoltaic power prediction model construction device provided by the embodiments of the present application can execute the photovoltaic power prediction model construction method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method. The further function description of each module and unit is the same as that of the corresponding embodiment, and will not be repeated here.

[0074] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is provided.

[0075] Reference will now be made in detail to Figure 5 which shows a structural schematic diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present application. The electronic device can include a processor (such as a central processor, a graphics processor, etc.) 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or programs loaded from a storage 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device are also stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0076] Generally, the following devices can be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device with various devices is shown, but it should be understood that it is not required to implement or have all the shown devices, and more or fewer devices can be alternatively implemented or had.

[0077] In particular, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for executing the method shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device 509, or installed from the storage 508, or installed from the ROM 502. When the computer program is executed by the processor 501, the above-mentioned functions defined in the photovoltaic power prediction model construction method or the photovoltaic power prediction method of the embodiments of the present application are performed.

[0078] Figure 5The electronic device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0079] The embodiments of the present application also provide a computer readable storage medium, the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network and then stored in the local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware, wherein the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc., and further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the photovoltaic power prediction model construction method or the photovoltaic power prediction method shown in the above embodiments are implemented.

[0080] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, the operation of the computer can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way of executing the computer program instructions by the computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0081] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A photovoltaic power prediction model, characterized in that, include: A convolutional feature extraction network is used to perform one-dimensional convolutional feature extraction on the received historical meteorological data and historical power generation data to obtain the feature sequences of historical meteorological data and historical power generation data. The feature sequences of historical meteorological data and historical power generation data include the short-term trend changes, local disturbance patterns and nonlinear coupling relationships of historical meteorological data and historical power generation data. The first long short-term memory network is used to model the temporal features in the feature sequences of historical meteorological data and historical power generation data to obtain a high-dimensional temporal feature representation; An attention mechanism is used to assign weights to features at each time step in a high-dimensional temporal feature representation to obtain weighted temporal features. The second long short-term memory network is used to decode and predict the weighted temporal features to obtain short-term photovoltaic power prediction values.

2. A method for constructing a photovoltaic power prediction model, characterized in that, The method includes: Based on historical meteorological data and historical power generation data, preprocessing methods are used to clean the data, resulting in cleaned historical meteorological data and historical power generation data, which are then constructed into a sample dataset. The preprocessing methods include: time alignment, missing value imputation, outlier removal, and normalization transformation. Based on the sample dataset, the pre-constructed photovoltaic power prediction model is trained, and a hybrid loss function is constructed based on the symmetric mean absolute percentage error and the mean absolute error. The AdamW optimizer is used to iterate the model parameters, and the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output. The photovoltaic power prediction model includes a convolutional feature extraction network, a first long short-term memory network, an attention mechanism, and a second long short-term memory network. The photovoltaic power prediction model that minimizes the loss value of the hybrid loss function is output as the final photovoltaic power prediction model.

3. The method according to claim 2, characterized in that, The historical meteorological data and historical power generation data are preprocessed and cleaned using preprocessing methods to obtain cleaned historical meteorological data and historical power generation data, which are then constructed into a sample dataset, including: Based on historical meteorological data and historical power generation data, preprocessing methods are used to clean the data, resulting in cleaned historical meteorological data and historical power generation data. Based on the cleaned historical meteorological data and historical power generation data, multiple samples were obtained by arranging them in chronological order using a fixed-length sliding window. Based on multiple samples, the dataset is divided into training, validation, and test sets using a preset ratio, and then combined into a sample dataset.

4. The method according to claim 2 or 3, characterized in that, The missing value imputation includes: When the number of consecutive missing values ​​in the historical meteorological data or historical power generation data is less than or equal to 3, linear interpolation is used to fill in the missing values. When the number of consecutive missing values ​​in the historical meteorological data or historical power generation data exceeds 3, the missing values ​​are filled using data from the same time period on adjacent days.

5. The method according to claim 2 or 3, characterized in that, The outlier removal includes: Based on historical meteorological and power generation data, statistical thresholds and physical rules are used to identify outliers, and the identified outliers are replaced with the median of data from adjacent time periods.

6. A photovoltaic power prediction model construction device, characterized in that, The device includes: The sample data acquisition module is used to clean historical meteorological data and historical power generation data using preprocessing methods to obtain cleaned historical meteorological data and historical power generation data, and construct a sample dataset. The preprocessing methods include: time alignment, missing value imputation, outlier removal and normalization transformation. The model training module is used to train the pre-built photovoltaic power prediction model based on the sample dataset, and to construct a hybrid loss function based on the symmetric mean absolute percentage error and the mean absolute error. The AdamW optimizer is used to iterate the parameters of the model, and the photovoltaic power prediction model corresponding to the minimum loss value of the hybrid loss function is output. The photovoltaic power prediction model includes a convolutional feature extraction network, a first long short-term memory network, an attention mechanism, and a second long short-term memory network. The model output module is used to output the photovoltaic power prediction model that minimizes the loss value of the hybrid loss function as the final photovoltaic power prediction model.

7. A photovoltaic power prediction method, characterized in that, include: Based on historical meteorological data and historical power generation data, a photovoltaic power prediction model was constructed to predict short-term photovoltaic power. The photovoltaic power prediction model is constructed using the photovoltaic power prediction model construction method as described in any one of claims 2 to 5.

8. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the photovoltaic power prediction model construction method of any one of claims 2 to 5 or the photovoltaic power prediction method of claim 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the photovoltaic power prediction model construction method of any one of claims 2 to 5 or the photovoltaic power prediction method of claim 6.

10. A computer program product, characterized in that, It includes computer instructions for causing a computer to execute the photovoltaic power prediction model construction method of any one of claims 2 to 5 or the photovoltaic power prediction method of claim 6.