Distributed photovoltaic power prediction method and device, electronic equipment and storage medium

By generating virtual power stations around actual photovoltaic power stations, pre-training and prediction large models using historical weather data, and fine-tuning, the problem of insufficient prediction accuracy of distributed photovoltaic power is solved, achieving higher prediction accuracy and lighter deployment.

CN119721323AActive Publication Date: 2025-03-28TSINGHUA UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411542976.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-28
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

In the prior art, the distributed photovoltaic power prediction method has insufficient accuracy, resulting in challenges in the safe operation of the power grid and the formulation of scheduling plans.

Method used

A virtual power station is generated around the actual photovoltaic power station to be predicted, and the longitude and latitude information of the virtual photovoltaic are obtained, and the power data of the virtual photovoltaic are generated using historical weather data. Then, the prediction model is pre-trained with these data, and the model is fine-tuned by the power data of the actual photovoltaic power station to obtain the power prediction results of the actual photovoltaic power station.

Benefits of technology

It improves the accuracy of distributed photovoltaic power prediction, effectively deals with data scarcity, and supports lightweight deployment, reducing costs and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721323A_ABST
    Figure CN119721323A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed photovoltaic power prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: generating a corresponding virtual power station around a to-be-predicted actual photovoltaic power station, and obtaining the longitude and latitude information of the virtual photovoltaic of the virtual power station; acquiring historical weather data of the virtual photovoltaic surrounding environment based on the longitude and latitude information; and generating virtual photovoltaic power data by using the historical weather data, pre-training the large prediction model by using the power data, performing fine adjustment on the large prediction model based on the power data of the actual photovoltaic power station, and obtaining a power prediction result of the actual photovoltaic power station based on the large prediction model after fine adjustment. Therefore, the problem of distributed photovoltaic high-precision power prediction is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing methods for prediction purposes, and in particular to a distributed photovoltaic power prediction method, device, electronic device and storage medium. Background Art

[0002] Traditional power generation methods are highly polluting and unsustainable. In order to meet electricity demand and ensure sustainable development, renewable energy needs to replace traditional fossil energy on the power generation side to reduce carbon dioxide emissions per unit of energy and reduce energy consumption per unit of GDP. In recent years, with the rapid development of new energy power generation technology, new energy power generation equipment represented by photovoltaics has begun to be connected to the power grid in large numbers, changing the operation mode of traditional power grids and posing new challenges to the safe operation and management of power grids.

[0003] Photovoltaics is a device that uses the photovoltaic effect of semiconductors to convert light energy into electrical energy. It is mainly composed of solar panels, controllers and inverters, and has the characteristics of being pollution-free and occupying a small area. However, due to factors such as itself (such as shading) and meteorology, photovoltaic power generation is intermittent and volatile. In terms of safety, it will cause frequency and voltage fluctuations in the power grid, bring challenges to grid control, and cause abandoned light; in terms of economy, it will affect the determination of electricity prices and the investment of operators in photovoltaic construction. At present, distributed photovoltaics are connected to the grid in large quantities by self-generation and self-use, and surplus power is connected to the grid. Accurate distributed photovoltaic power prediction can provide support for the safe operation of the power grid and provide a reference for the formulation of scheduling plans.

[0004] The photovoltaic power prediction methods in related technologies can be mainly divided into mechanism-based methods and data-driven methods. The input of the former is mainly meteorological data, and then the power is calculated according to the photovoltaic mechanism model. This type of method requires less historical data, but requires photovoltaic module parameters; the latter uses a large amount of meteorological and historical power generation data to train machine learning models, such as regression, neural networks, etc.

[0005] After a large number of distributed photovoltaics are connected to the grid, the safe operation of the distribution network is seriously affected. It is urgent to predict their output power with high accuracy to guide the operation and dispatch of the distribution network. However, if each power station is equipped with environmental monitoring equipment and photovoltaic power prediction system, the cost is high and there is a shortage of historical data for newly built power stations. If each region is equipped with a centralized photovoltaic power prediction system, the local feature differences between different distributed power stations will seriously reduce the prediction accuracy. Summary of the invention

[0006] The present application provides a distributed photovoltaic power prediction method, device, electronic device and storage medium to solve the problem of insufficient accuracy of distributed photovoltaic power prediction methods in related technologies.

[0007] The first aspect of the present application provides a distributed photovoltaic power prediction method, comprising the following steps: generating a corresponding virtual power station around an actual photovoltaic power station to be predicted, and obtaining the longitude and latitude information of a virtual photovoltaic of the virtual power station; obtaining historical weather data of the surrounding environment of the virtual photovoltaic based on the longitude and latitude information; generating power data of the virtual photovoltaic using the historical weather data, pre-training a large prediction model using the power data, and fine-tuning the large prediction model based on the power data of the actual photovoltaic power station, so as to obtain a power prediction result of the actual photovoltaic power station based on the fine-tuned large prediction model.

[0008] Optionally, in one embodiment of the present application, the fine-tuning expression of the prediction large model is:

[0009]

[0010] Among them, L(w) is the objective function, w is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

[0011] Optionally, in one embodiment of the present application, before using the power data to pre-train the prediction large model, it also includes: introducing time coding in the embedding layer of the Transformer model, and deleting the output layer of the Transformer model to obtain a Transformer modified model; using the historical power sequence to train the Transformer modified model to obtain the prediction large model.

[0012] Optionally, in one embodiment of the present application, the historical weather data includes at least one of historical horizontal total radiation, historical temperature and historical rainfall.

[0013] The second aspect of the present application provides a distributed photovoltaic power prediction device, including: a first acquisition module, used to generate a corresponding virtual power station around the actual photovoltaic power station to be predicted, and obtain the longitude and latitude information of the virtual photovoltaic of the virtual power station; a second acquisition module, used to obtain historical weather data of the virtual photovoltaic surrounding environment based on the longitude and latitude information; a prediction module, used to generate power data of the virtual photovoltaic using the historical weather data, pre-train a prediction large model using the power data, and fine-tune the prediction large model based on the power data of the actual photovoltaic power station, so as to obtain the power prediction result of the actual photovoltaic power station based on the fine-tuned prediction large model.

[0014] Optionally, in one embodiment of the present application, the fine-tuning expression of the prediction large model is:

[0015]

[0016] Among them, L(w) is the objective function, w is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

[0017] Optionally, in one embodiment of the present application, it also includes: a control module, used to introduce time coding in the embedding layer of the Transformer model, and delete the output layer of the Transformer model to obtain a modified Transformer model; a training module, used to train the modified Transformer model using the historical power sequence to obtain the predicted large model.

[0018] Optionally, in one embodiment of the present application, the historical weather data includes at least one of historical horizontal total radiation, historical temperature and historical rainfall.

[0019] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the distributed photovoltaic power prediction method as described in the above embodiment.

[0020] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the distributed photovoltaic power prediction method as described in the above embodiment.

[0021] The fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above distributed photovoltaic power prediction method.

[0022] The embodiment of the present application can generate a corresponding virtual power station around the actual photovoltaic power station to be predicted, and obtain the historical weather data of the surrounding environment of the virtual photovoltaic of the virtual power station, so as to generate the power data of the virtual photovoltaic, and use the power data to pre-train the large prediction model, and fine-tune the model through the power data of the actual photovoltaic power station, so as to perform power prediction of the actual photovoltaic power station, that is, use the mechanism model to generate a virtual power station near the actual photovoltaic power station to be predicted, use the generated data to pre-train the large prediction model, and then perform transfer learning on the actual photovoltaic power station, the fine-tuning parameter amount is small, and lightweight deployment is supported while effectively coping with data scarcity. In this way, the problem of insufficient accuracy of distributed photovoltaic power prediction methods in related technologies is solved.

[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0025] Figure 1 A flowchart of a distributed photovoltaic power prediction method provided according to an embodiment of the present application;

[0026] Figure 2 A schematic diagram of the principle of a distributed photovoltaic power prediction method according to an embodiment of the present application;

[0027] Figure 3 A schematic diagram of the structure of a distributed photovoltaic power prediction device provided according to an embodiment of the present application;

[0028] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0030] The following describes the distributed photovoltaic power prediction method, device, electronic device and storage medium of the embodiment of the present application with reference to the accompanying drawings. In view of the fact that the distributed photovoltaic power prediction method is not accurate enough in the related technologies mentioned in the above background technology, the present application provides a distributed photovoltaic power prediction method, in which a corresponding virtual power station can be generated around the actual photovoltaic power station to be predicted, and the historical weather data of the surrounding environment of the virtual photovoltaic of the virtual power station is obtained, so as to generate the power data of the virtual photovoltaic, and use the power data to pre-train the prediction large model, and fine-tune the model through the power data of the actual photovoltaic power station, so as to perform power prediction of the actual photovoltaic power station, that is, a mechanism model is used to generate a virtual power station near the real photovoltaic power station to be predicted, and the generated data is used to pre-train the prediction large model, and then transfer learning is performed on the real photovoltaic power station, and the fine-tuning parameter amount is small, which effectively copes with data scarcity while supporting lightweight deployment. Thus, the problem of insufficient accuracy of the distributed photovoltaic power prediction method in the related technology is solved.

[0031] Specifically, Figure 1A schematic flow chart of a distributed photovoltaic power prediction method provided in an embodiment of the present application.

[0032] like Figure 1 As shown, the distributed photovoltaic power prediction method is applied to the model building stage, wherein the method includes the following steps:

[0033] In step S101, a corresponding virtual power station is generated around the actual photovoltaic power station to be predicted, and the longitude and latitude information of the virtual photovoltaic power station is obtained.

[0034] In the actual implementation process, the embodiment of the present application can use the mechanism model to generate a virtual power station near the real photovoltaic power station to be predicted, and determine the longitude and latitude of the virtual photovoltaic power station.

[0035] Due to the flexible layout of distributed photovoltaics, they are generally distributed on apartment roofs, factory roofs, industrial parks, and roadsides. Therefore, the determination of the photovoltaic construction site refers to the actual administrative divisions. For example, the embodiment of the present application can use the location of the administrative center as the center point to classify the grid locations with a spatial resolution of 5 kilometers at the minimum distance, where 5 kilometers is the minimum resolution of meteorological satellites. The classified points are randomly sampled to the required number. According to the map, some locations where photovoltaics cannot be built, such as points on the road, are translated by no more than two units by 0.05 degrees east / west / south / north.

[0036] In step S102, historical weather data of the virtual photovoltaic surrounding environment is obtained based on the longitude and latitude information.

[0037] It is understandable that photovoltaic power generation is mainly affected by geographical location, installation angle, its own parameters and weather. For a specific photovoltaic power station, its power generation mainly depends on meteorological factors, with irradiance and temperature having the greatest impact. According to the photovoltaic power generation mechanism, there is a direct relationship between power generation and horizontal total radiation. The power generation of a photovoltaic is similar to the fluctuation law of surface irradiance at its location. Surface radiation can be regarded as clear sky radiation minus cloud attenuation. Clear sky radiation is affected by the solar altitude angle and the length of sunshine, which is mainly determined by geographical location and has a clear mechanism. Cloud attenuation is mainly affected by weather, especially clouds, and has a complex mechanism.

[0038] Furthermore, the embodiment of the present application can obtain historical weather forecasts according to the determined longitude and latitude of the virtual photovoltaic, and process the historical weather forecasts into historical weather data of the corresponding virtual photovoltaic position with a resolution of 15 minutes after time-space interpolation, that is, meteorological data.

[0039] Optionally, in one embodiment of the present application, the historical weather data includes at least one of historical horizontal total radiation, historical temperature and historical rainfall.

[0040] Among them, historical weather data includes weather data such as horizontal total radiation, temperature and rainfall that affect the power of photovoltaic power stations.

[0041] In step S103, the power data of the virtual photovoltaic power station is generated using historical weather data, and the prediction model is pre-trained using the power data. The prediction model is fine-tuned based on the power data of the actual photovoltaic power station to obtain the power prediction result of the actual photovoltaic power station based on the fine-tuned prediction model.

[0042] Among them, the fine-tuning expression of the prediction large model is:

[0043]

[0044] Among them, L(w) is the objective function, w is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

[0045] As a possible implementation method, the embodiment of the present application can set corresponding virtual photovoltaic parameters according to the mechanism model and generate corresponding power data using weather data, which is expressed as:

[0046]

[0047] Among them, s represents the virtual photovoltaic number, and h represents the time range, which is 1 year here. s ,lat s denote the longitude and latitude of the photovoltaic, respectively. They represent the total horizontal radiation (W / m2), temperature (℃) and daily rainfall (mm) of photovoltaic power generation in one year, respectively. s ,tilt s ,cap s ,op s They represent the azimuth angle, tilt angle, installed capacity and operating years of photovoltaic power generation. Indicates the cleaning days of the photovoltaic in a year, They represent the initial efficiency and sensitivity of photovoltaics, Indicates the photovoltaic power generation in one year.

[0048] The embodiment of the present application may use the Z-Score method to normalize the data in order to better train the neural network.

[0049]

[0050] Among them, μ and σ are the mean and variance respectively, p′ and p are the normalized value and original value respectively.

[0051] Furthermore, the embodiments of the present application can use the generated data to pre-train a large prediction model, such as a Transformer model, to obtain a large prediction model, and perform transfer learning on a real photovoltaic power station to fine-tune the large prediction model to obtain a lightweight model, thereby using the lightweight model to predict the actual power generation power of the actual photovoltaic power station to be tested.

[0052] In actual execution, the principle of timing prediction can be expressed as:

[0053]

[0054] For photovoltaic power prediction, when a photovoltaic power generation power sequence is given When , the objective function can be defined as:

[0055]

[0056] Assume that the prediction error ∈ s ~N(0,σ 2 ),but:

[0057]

[0058] So,

[0059]

[0060]

[0061] Optionally, in one embodiment of the present application, before using the power data to pre-train the prediction large model, it also includes: introducing time coding in the embedding layer of the Transformer model, and deleting the output layer of the Transformer model to obtain a Transformer modified model; using the historical power sequence to train the Transformer modified model to obtain a prediction large model.

[0062] As a possible implementation method, the embodiment of the present application has made some changes to the structure of the Transformer model. First, the embodiment of the present application can remove the Softmax output layer and directly output it with a linear layer; because the power sequence has a clear time label, the time information is taken into account, and time coding is introduced in the embedding layer, and the day of the year, the day of the month, the day of the week, and the hour of the day are encoded respectively; a single variable multi-step prediction method is adopted, and the input and output of the model are only the power generation power. The input of the decoder can consider the historical input information, and the output is the power generation power sequence at multiple moments in the future. The specific process includes:

[0063] Time Code X t=[T1,T2,…,T k ]:

[0064]

[0065] in, Indicates the day of the year. Indicates the day of the month. Indicates the day of the week. Indicates the hour of the day.

[0066] Embed the input features:

[0067] X=val(X p )+pos(X p )+tem(X t ),

[0068] Value embedding is a convolutional layer that is used to embed the input feature X p =[P1,P2,…,P k ], position embedding is used to represent the position of the value in the sequence; time embedding is a linear layer used to encode the time X t To express.

[0069] Multi-head attention mechanism: define query Q = XW Q , key K = XW K , value V = XW V , the dot product attention is defined as:

[0070]

[0071] Multi-head attention is defined as:

[0072] MHA(Q,L,V)=Concat(head1,…,head H )W O ,

[0073] Among them, W i Q , W i K , W i V and W O Represent the query, key, value and linear transformation projection weights respectively.

[0074] Position feed-forward network:

[0075] FFN(X′)=GeLU(X′W1+b1)W2+b2,

[0076] Among them, X′ represents the output of the attention layer, GeLU is the activation function, W1 and W2 are projection weights, and b1 and b2 are biases.

[0077] For distributed photovoltaics, some power stations often have a short operating time and limited historical data. Therefore, the generated power data is used for pre-training and the actual power station data is used for fine-tuning.

[0078] Combination Figure 2 As shown, the working principle of the distributed photovoltaic power prediction method of the embodiment of the present application is described in detail with an embodiment.

[0079] The structure involved in the embodiments of the present application can be as follows Figure 2 As shown, the embodiment of the present application can deploy the pre-trained model on the cloud platform, collect and transmit distributed photovoltaic power generation data in different regions in real time, and store it on the cloud platform, and use real data to regularly fine-tune the pre-trained model to achieve data assimilation.

[0080] For example, the embodiments of the present application can be demonstrated through a specific experiment to prove the effectiveness of the embodiments of the present application.

[0081] The model data set may include: the required meteorological data mainly include horizontal total radiation, temperature and rainfall. Among them, the accuracy of horizontal total radiation has the greatest impact on power generation, and requires as high a resolution as possible, while the impact of temperature and rainfall is relatively small.

[0082] (1) Horizontal shortwave radiation: obtained from the Himawari-8 satellite, covering 60°S-60°N, 80°E-160°W, with a spatial resolution of 5 km and a temporal resolution of 10 min.

[0083] (2) Temperature: obtained from ERA5, covering the entire world, with a spatial resolution of 25 km and a temporal resolution of 1 h.

[0084] (3) Rainfall: obtained from ERA5, covering the entire world, with a spatial resolution of 25 km and a temporal resolution of 1 h.

[0085] (4) Power: data of five actual power stations from January 2022 to May 2023, with a resolution of 15 minutes.

[0086] In the power generation part, the embodiment of the present application can select 10 locations near 5 photovoltaic power stations in Shanxi Province, China to generate photovoltaic power generation data in 2020, with a resolution of 15min. According to the longitude and latitude of the photovoltaic, the surface shortwave radiation data for 2020 provided by the Himawari-8 satellite is read, and the resolution of 10min is processed to 15min in time. The rules are: the original data corresponds to the time of 0, 10, 20, 30, 40 and 50, and the points at 0 and 30 are retained. The point at 20 represents 15, and the point at 50 represents 45. The missing time is supplemented by the next time point. If the next time is also missing, linear interpolation is used. The processed data corresponds to the time of 0, 15, 30 and 45. For temperature and rainfall, the data for 2020 is downloaded from the ERA5 official website. Each photovoltaic location uses the known point data closest to itself. The rainfall is the 24h cumulative amount, and the temperature is interpolated from 1h to 15min. According to the mechanism model, the range of photovoltaic parameters can be shown in Table 1, where Table 1 is a table of photovoltaic parameters and value ranges.

[0087] Table 1

[0088] Photovoltaic parameters Value range Latitude and longitude Photovoltaic installation location Azimuth -10°~+10° Tilt Angle Latitude ±10° Installed capacity 5~15kW Cleaning days 4~8 Initial efficiency F0 0.8~1.0 Sensitivity Ai 0.001~0.010 Years of operation 3~8

[0089] In the experimental setting part, two aspects can be included: pre-training and fine-tuning (correction).

[0090] (1) Pre-training: 1 encoder layer el, 1 decoder layer dl, 8 attention heads, embedding layer dimension dm = 128, feedforward layer dimension df = 512, input length 112, output length 16, batch size batch_size = 32, training for 10 generations, the split of training set, validation set, and test set is 7:1:2, and the number of model parameters is 0.47M.

[0091] (2) Fine-tuning: Embedding layer and output projection layer are trained for 10 generations, and the number of fine-tuning parameters is 2K.

[0092] In terms of evaluation indicators, the embodiment of the present application can use mean absolute error and root mean square error to evaluate the prediction effect.

[0093]

[0094]

[0095] Among them, C s is the installed capacity, and n is the prediction time step.

[0096] Based on the above parameters and settings, the embodiments of the present application can obtain corresponding experimental results.

[0097] Among them, Table 2 gives the prediction error of the embodiment of the present application at different sites and fine-tuning data volumes, and compares the common long short-term memory network (LSTM) and linear method (DLinear), where the capacity range of the 5 power stations is 100-150MW. The experimental results show that when real historical data is scarce, when the amount of fine-tuning parameters is 2K, the mean absolute error is reduced by 39.60% and 36.28% respectively compared with the linear method and LSTM method. When the amount of fine-tuning data is 1 month, the prediction error of the embodiment of the present application decreases more than the comparison method. As the amount of fine-tuning data increases, the gap in prediction error between the proposed method and the comparison method is decreasing. Among them, Table 2 is a comparison table of prediction errors at different sites and fine-tuning data volumes (the indicators are MAE (MW) and RMSE (MW) respectively).

[0098] Table 2

[0099]

[0100] Experimental results show that when real historical data is scarce, the embodiment of the present application can achieve better prediction accuracy than related technologies by fine-tuning a small number of parameters.

[0101] According to the distributed photovoltaic power prediction method proposed in the embodiment of the present application, a corresponding virtual power station can be generated around the actual photovoltaic power station to be predicted, and the historical weather data of the surrounding environment of the virtual photovoltaic of the virtual power station can be obtained, so as to generate the power data of the virtual photovoltaic, and use the power data to pre-train the large prediction model, and fine-tune the model through the power data of the actual photovoltaic power station, so as to perform power prediction of the actual photovoltaic power station, that is, a virtual power station is generated near the actual photovoltaic power station to be predicted using a mechanism model, and the large prediction model is pre-trained using the generated data, and then transfer learning is performed on the actual photovoltaic power station, the fine-tuning parameter amount is small, and lightweight deployment is supported while effectively coping with data scarcity. Thus, the problem of insufficient accuracy of the distributed photovoltaic power prediction method in the related technology is solved.

[0102] Next, the distributed photovoltaic power prediction device proposed according to the embodiment of the present application is described with reference to the accompanying drawings.

[0103] Figure 3 It is a block diagram of a distributed photovoltaic power prediction device according to an embodiment of the present application.

[0104] like Figure 3 As shown, the distributed photovoltaic power prediction device 10 includes: a first acquisition module 100 , a second acquisition module 200 and a prediction module 300 .

[0105] Specifically, the first acquisition module 100 is used to generate a corresponding virtual power station around the actual photovoltaic power station to be predicted, and obtain the longitude and latitude information of the virtual photovoltaic of the virtual power station.

[0106] The second acquisition module 200 is used to acquire historical weather data of the virtual photovoltaic surrounding environment based on the longitude and latitude information.

[0107] The prediction module 300 is used to generate virtual photovoltaic power data using historical weather data, pre-train a large prediction model using the power data, and fine-tune the large prediction model based on the power data of the actual photovoltaic power station to obtain the power prediction result of the actual photovoltaic power station based on the fine-tuned large prediction model.

[0108] Optionally, in one embodiment of the present application, the fine-tuning expression of the prediction large model is:

[0109]

[0110] Among them, L(W) is the objective function, W is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

[0111] Optionally, in one embodiment of the present application, the distributed photovoltaic power prediction device 10 further includes: a control module and a training module.

[0112] Among them, the control module is used to introduce time coding in the embedding layer of the Transformer model and delete the output layer of the Transformer model to obtain the Transformer modified model.

[0113] The training module is used to train the Transformer modification model using the historical power sequence to obtain a large prediction model.

[0114] Optionally, in one embodiment of the present application, the historical weather data includes at least one of historical horizontal total radiation, historical temperature and historical rainfall.

[0115] It should be noted that the above explanations of the embodiment of the distributed photovoltaic power prediction method are also applicable to the distributed photovoltaic power prediction device of this embodiment, and will not be repeated here.

[0116] According to the distributed photovoltaic power prediction device proposed in the embodiment of the present application, a corresponding virtual power station can be generated around the actual photovoltaic power station to be predicted, and the historical weather data of the surrounding environment of the virtual photovoltaic of the virtual power station can be obtained, so as to generate the power data of the virtual photovoltaic, and use the power data to pre-train the large prediction model, and fine-tune the model through the power data of the actual photovoltaic power station, so as to perform power prediction of the actual photovoltaic power station, that is, a virtual power station is generated near the actual photovoltaic power station to be predicted using a mechanism model, and the large prediction model is pre-trained using the generated data, and then transfer learning is performed on the actual photovoltaic power station, the fine-tuning parameter amount is small, and lightweight deployment is supported while effectively coping with data scarcity. Thus, the problem of insufficient accuracy of distributed photovoltaic power prediction methods in related technologies is solved.

[0117] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0118] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0119] When the processor 402 executes the program, the distributed photovoltaic power prediction method provided in the above embodiment is implemented.

[0120] Furthermore, the electronic device further comprises:

[0121] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0122] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0123] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0124] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0125] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0126] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0127] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above distributed photovoltaic power prediction method is implemented.

[0128] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the distributed photovoltaic power prediction method provided by an embodiment of the present invention.

[0129] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0130] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0131] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0132] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0133] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0134] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0135] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0136] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A distributed photovoltaic power prediction method, characterized in that: The following steps are involved: Generate a corresponding virtual power station around the actual photovoltaic power station to be predicted, and obtain the longitude and latitude information of the virtual photovoltaic of the virtual power station; Acquire historical weather data of the virtual photovoltaic surrounding environment based on the longitude and latitude information; The power data of the virtual photovoltaic power station is generated by using the historical weather data, a large prediction model is pre-trained by using the power data, and the large prediction model is fine-tuned based on the power data of the actual photovoltaic power station to obtain a power prediction result of the actual photovoltaic power station based on the fine-tuned large prediction model.

2. The method according to claim 1, characterized in that: The fine-tuning expression of the prediction model is: Among them, L(w) is the objective function, w is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

3. The method according to claim 1, characterized in that Before using the power data to pre-train the prediction model, the method further includes: Introducing time encoding into the embedding layer of the Transformer model and deleting the output layer of the Transformer model to obtain a Transformer modified model; The Transformer modification model is trained using the historical power sequence to obtain the prediction large model.

4. The method according to claim 1, characterized in that: The historical weather data includes at least one of historical total horizontal radiation, historical temperature and historical rainfall.

5. A distributed photovoltaic power prediction device, characterized in that: include: A first acquisition module is used to generate a corresponding virtual power station around the actual photovoltaic power station to be predicted, and obtain the longitude and latitude information of the virtual photovoltaic of the virtual power station; A second acquisition module is used to acquire historical weather data of the virtual photovoltaic surrounding environment based on the longitude and latitude information; A prediction module is used to generate power data of the virtual photovoltaic power station using the historical weather data, pre-train a large prediction model using the power data, and fine-tune the large prediction model based on the power data of the actual photovoltaic power station to obtain a power prediction result of the actual photovoltaic power station based on the fine-tuned large prediction model.

6. The device according to claim 5, characterized in that The fine-tuning expression of the prediction model is: Among them, L(w) is the objective function, w is the weight of the prediction model, is the true value of power, To predict the input power of the large model, To predict the large model, is the power prediction value.

7. The device according to claim 5, characterized in that Also includes: A control module, used for introducing time coding into the embedding layer of the Transformer model and deleting the output layer of the Transformer model to obtain a Transformer modified model; A training module is used to train the Transformer modification model using the historical power sequence to obtain the prediction large model.

8. The device according to claim 5, characterized in that The historical weather data includes at least one of historical total horizontal radiation, historical temperature and historical rainfall.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the distributed photovoltaic power prediction method according to any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the distributed photovoltaic power prediction method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Wind power combination prediction method

    CN112613655A

  • Photovoltaic power prediction method, model training method, device, equipment and medium

    CN117200187A

  • Photovoltaic power prediction method, device and equipment based on Optuna-Transform model

    CN118133182A

  • Short-term photovoltaic power generation power prediction method, system and equipment based on similar weather discovery and medium

    CN118213987A

  • Photovoltaic power artificial intelligence prediction method based on retrieval enhancement generation and fine tuning large model

    CN118586547A