Distributed photovoltaic output prediction method, electronic equipment and storage medium
By using photovoltaic output prediction models of generative adversarial networks and long and short-term memory networks in distributed photovoltaic output prediction, the problem of low prediction accuracy caused by poor data quality is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202411717692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
Distributed photovoltaic output prediction has low prediction accuracy due to poor data quality and missing values, and the existing technology has failed to effectively solve this problem.
The photovoltaic output prediction model based on the generative adversarial network and long-term short-term memory network is adopted. By obtaining historical meteorological data and photovoltaic output data, data abnormality detection, repair and screening are carried out, and finally input to the long-term short-term memory network for prediction.
By improving data quality, the accuracy of distributed photovoltaic output prediction is improved, and the problem of low prediction accuracy caused by poor data quality is solved.
Smart Images

Figure CN119647676A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic power generation technology, and in particular to a distributed photovoltaic output prediction method, electronic equipment and storage medium. Background Art
[0002] Distributed photovoltaic output forecasting aims to estimate the future power output of photovoltaic systems in advance by analyzing their operating characteristics and the environment in which they are located, so as to provide support for grid dispatching and stability management. Common forecasting methods include those based on physical models, statistical analysis, and machine learning. However, due to the dispersion of distributed photovoltaic systems and frequent changes in ownership, it is difficult to collect sufficient and accurate historical data, which makes distributed photovoltaic output forecasting face the problems of poor quality and missing values of collected data, resulting in low accuracy of distributed photovoltaic output forecasting.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a distributed photovoltaic output prediction method, an electronic device and a storage medium, so as to at least solve the technical problem in the related art that the distributed photovoltaic output prediction accuracy is low due to the poor quality of collected data.
[0005] According to one embodiment of the present invention, a distributed photovoltaic output prediction method is provided, comprising: obtaining historical meteorological data and historical photovoltaic output data of a target area; inputting the historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0006] Optionally, historical meteorological data and historical photovoltaic output data are input into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, including: performing data anomaly detection processing on the historical meteorological data to obtain the anomaly type of the historical meteorological data; performing data repair processing on the historical meteorological data based on the anomaly type to obtain a first data set; screening the first data set based on the historical photovoltaic output data to obtain a second data set; and inputting the second data set into a long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0007] Optionally, performing data anomaly detection processing on historical meteorological data to obtain the anomaly type includes: performing initial data anomaly detection processing on the historical meteorological data using a first anomaly detection algorithm to obtain a first detection result; determining the anomaly type of the abnormal data in the first detection result as an out-of-range type; performing data anomaly detection processing again on the non-abnormal data in the first detection result using a second anomaly detection algorithm to obtain a second detection result; and determining the anomaly type of the abnormal data in the second detection result as an abnormal fluctuation type.
[0008] Optionally, performing data repair processing on historical meteorological data based on the anomaly type to obtain a first data set includes: in response to the anomaly type being out of range, performing initial data repair processing on the anomaly data in the first detection result using an interpolation method to obtain a first repair result; in response to the anomaly type being an abnormal fluctuation type, performing data repair processing on the anomaly data in the second detection result using a generative adversarial network to obtain a second repair result; and determining the first data set based on the first repair result and the second repair result.
[0009] Optionally, filtering the first data set based on historical photovoltaic output data to obtain the second data set includes: performing correlation analysis on each type of data in the first data set with the historical photovoltaic output data to obtain a correlation coefficient; and filtering the historical meteorological data based on the correlation coefficient to obtain the second data set.
[0010] Optionally, the generative adversarial network includes at least: a generator and a discriminator. The generative adversarial network is used to perform data repair processing on the abnormal data in the second detection result to obtain the second repair result, including: using the generator to generate a third data set based on random noise data; using the discriminator to discriminate between historical meteorological data and the third data set to obtain a discrimination result; using the generator to adjust the third data set based on the discrimination result to obtain the second repair result.
[0011] Optionally, the long short-term memory network is constructed based on a frozen training method.
[0012] According to one embodiment of the present invention, a distributed photovoltaic output prediction device is also provided, including: an acquisition module for acquiring historical meteorological data and historical photovoltaic output data of a target area; a prediction module for inputting historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0013] Optionally, the distributed photovoltaic output prediction device also includes a detection module for performing data anomaly detection processing on historical meteorological data to obtain the anomaly type of the historical meteorological data; the distributed photovoltaic output prediction device also includes a processing module for performing data repair processing on the historical meteorological data based on the anomaly type to obtain a first data set; the distributed photovoltaic output prediction device also includes a screening module for screening the first data set based on the historical photovoltaic output data to obtain a second data set; the prediction module is also used to input the second data set into a long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0014] Optionally, the detection module is also used to perform initial data anomaly detection processing on historical meteorological data using a first anomaly detection algorithm to obtain a first detection result; the distributed photovoltaic output prediction device also includes a determination module, which is used to determine the anomaly type of the abnormal data in the first detection result as an out-of-range type; the detection module is also used to perform a second data anomaly detection processing on the non-abnormal data in the first detection result using a second anomaly detection algorithm to obtain a second detection result; the determination module is also used to determine the anomaly type of the abnormal data in the second detection result as an abnormal fluctuation type.
[0015] Optionally, the processing module is also used to: in response to the abnormality type being out of range, use interpolation method to perform initial data repair processing on the abnormal data in the first detection result to obtain a first repair result; in response to the abnormality type being abnormal fluctuation type, use generative adversarial network to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result; the determination module is also used to determine the first data set based on the first repair result and the second repair result.
[0016] Optionally, the screening module is further used to: perform correlation analysis on each type of data in the first data set and historical photovoltaic output data to obtain correlation coefficients; and screen the historical meteorological data based on the correlation coefficients to obtain the second data set.
[0017] Optionally, the distributed photovoltaic output prediction device also includes a generation module, which is used to use a generator to generate a third data set based on random noise data; the processing module is also used to: use a discriminator to discriminate historical meteorological data and the third data set to obtain a discrimination result; use the generator to adjust the third data set based on the discrimination result to obtain a second repair result.
[0018] Optionally, the long short-term memory network is constructed based on a frozen training method.
[0019] According to one embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned distributed photovoltaic output prediction method is executed when the program is running.
[0020] According to one embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the above-mentioned distributed photovoltaic output prediction method.
[0021] According to one embodiment of the present invention, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the distributed photovoltaic output prediction method described above is implemented.
[0022] In an embodiment of the present invention, a method is adopted in which historical meteorological data and historical photovoltaic output data of a target area are obtained, and the historical meteorological data and historical photovoltaic output data are input into a photovoltaic output prediction model to obtain a photovoltaic output prediction result. By using the photovoltaic output prediction model to perform data anomaly detection, data repair, and photovoltaic output prediction, the purpose of improving data quality is achieved, thereby achieving the technical effect of improving the accuracy of distributed photovoltaic output prediction, and further solving the technical problem of low accuracy of distributed photovoltaic output prediction due to poor quality of collected data in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 is a hardware structure block diagram of a distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0025] Figure 2 is a flow chart of a distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of a distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of another distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0028] Figure 5 is a schematic diagram of another distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0029] Figure 6 is a flow chart of another distributed photovoltaic output prediction method according to one embodiment of the present invention;
[0030] Figure 7It is a structural block diagram of a distributed photovoltaic output prediction device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] The distributed photovoltaic output prediction method provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 is a hardware structure diagram of a distributed photovoltaic output prediction method according to one embodiment of the present invention. Figure 1 As shown, the computer terminal 10 (or electronic device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0034] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or electronic device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the distributed photovoltaic output prediction method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned distributed photovoltaic output prediction method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0036] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] The display may be, for example, a touch screen type liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or electronic device).
[0038] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or electronic device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or electronic device).
[0039] According to an embodiment of the present invention, a method embodiment of a distributed photovoltaic output prediction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] Figure 2 is a flow chart of a distributed photovoltaic output prediction method according to one embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0041] Step S20, obtaining historical meteorological data and historical photovoltaic output data of the target area;
[0042] In step S20, the target area is used to characterize the area where the distributed photovoltaic system to be predicted is located.
[0043] The above historical meteorological data are used to characterize meteorological data that affect the output of distributed photovoltaic power generation, including but not limited to: Celsius temperature, relative humidity, total horizontal radiation, diffuse horizontal radiation, wind direction, daily rainfall, etc.
[0044] The above historical photovoltaic output data is used to characterize the active power of photovoltaic output.
[0045] Step S22, inputting historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0046] In step S22, the above-mentioned Generative Adversarial Network is used to repair abnormal data in historical meteorological data.
[0047] The above-mentioned Long Short-Term Memory Network (LSTM) is used to determine the time series characteristics of historical meteorological data and photovoltaic output data, capture the nonlinear dynamic relationship between meteorological factors and photovoltaic output, and is used for long-term and short-term output prediction.
[0048] Specifically, the above-mentioned photovoltaic output prediction model is used to first perform anomaly detection on historical meteorological data, filter out abnormal data, and classify the abnormal data; then, the data repair method is determined according to the classification of the abnormal data, and the historical meteorological data is repaired using the data repair method to obtain high-quality historical meteorological data; finally, the high-quality historical meteorological data is used to predict distributed photovoltaic output to obtain a photovoltaic output prediction result with high accuracy.
[0049] Based on the above steps S20 to S22, the historical meteorological data and historical photovoltaic output data of the target area are obtained, and the historical meteorological data and historical photovoltaic output data are input into the photovoltaic output prediction model to obtain the photovoltaic output prediction result. By using the photovoltaic output prediction model to detect anomalies in the data, repair the data, and predict the photovoltaic output, the purpose of improving the data quality is achieved, thereby achieving the technical effect of improving the accuracy of distributed photovoltaic output prediction, and further solving the technical problem of low accuracy of distributed photovoltaic output prediction due to poor quality of collected data in related technologies.
[0050] Optionally, in step S22, historical meteorological data and historical photovoltaic output data are input into a photovoltaic output prediction model, and the photovoltaic output prediction result obtained includes:
[0051] Step S221, performing data anomaly detection processing on the historical meteorological data to obtain the anomaly type of the historical meteorological data;
[0052] In step S221, the above-mentioned abnormality types include out-of-range type abnormality and abnormal fluctuation type abnormality.
[0053] Specifically, statistical methods are used to detect out-of-range anomalies. Clustering and machine learning methods are used to detect abnormal fluctuation anomalies. The detection results of abnormal types are marked, including normal data and different types of abnormal data.
[0054] Step S222, performing data repair processing on the historical meteorological data based on the anomaly type to obtain a first data set;
[0055] Specifically, interpolation is used to repair out-of-range abnormal data, and the interpolation method is selected based on the characteristics of the actual data. For abnormal fluctuation type abnormal data, the generator and discriminator of the Generative Adversarial Network (GAN) are used to repair the fluctuation abnormal data, and the repair quality is evaluated by the discriminator and the generator output is optimized. The first data set that completes the repair contains the repaired meteorological data.
[0056] Step S223, filtering the first data set based on historical photovoltaic output data to obtain a second data set;
[0057] Specifically, in order to reduce data dimension and redundancy, only the data most relevant to the PV output forecast is retained. The historical PV output data and meteorological data are used for correlation analysis. Meteorological data variables that are strongly correlated with PV output are screened. The second data set obtained contains the screened key meteorological data.
[0058] Step S224, inputting the second data set into the long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0059] Specifically, an LSTM network that performs well in time series prediction problems is selected to predict the second data set. Based on historical data, the future photovoltaic output is accurately predicted to assist in grid dispatch and optimization. The input of the LSTM network is the second data set (meteorological data that is strongly related to photovoltaic output). Its output is the photovoltaic output prediction result, generating a predicted value of photovoltaic active power for each time point.
[0060] Specifically, the LSTM network is good at processing time series data and can capture the law of meteorological variables changing over time. Based on frozen training, the LSTM can combine pre-trained parameters and current data characteristics to improve prediction accuracy. A variety of methods are used to optimize the original LSTM network, including adding a bidirectional information channel to the LSTM network so that it can more fully grasp the overall information, appropriately adjusting hyperparameters such as the number of neurons in the feedforward network layer, introducing a suitable fully connected layer to increase the network depth, complicating the network structure, and introducing frozen training to avoid overfitting. In the process of optimizing the original LSTM network, mean-square error (MSE), root mean square error (RMSE) and mean absolute error (MAE) are selected as performance indicators, and their calculation process is shown in expression (1).
[0061]
[0062] Among them, n represents the data format, y i Represents real data, Represents forecast data.
[0063] Specifically, the MSE, RMSE and MAE are weighted and proportioned, and the optimization of the original LSTM network is determined to be complete only after the comprehensive score reaches the preset threshold, and then it is used to predict the second data set to obtain the photovoltaic output prediction result.
[0064] Furthermore, the output of a small number of neurons to the lower layer is ignored in each round of training to prevent overfitting. Attempts are made to optimize the prediction performance of the LSTM-based model by increasing the number of neurons in the feedforward network layer, increasing the network depth, and complicating the network structure. The prediction performance of the LSTM network is improved by increasing the number of neurons in the feedforward network layer, introducing a bidirectional LSTM network to replace the original unidirectional network, introducing Dense with softmax as the activation function in the hidden layer, and freezing training.
[0065] Based on the above steps S221 to S224, the historical meteorological data is processed for data anomaly detection to obtain the anomaly type of the historical meteorological data; the historical meteorological data is processed for data repair based on the anomaly type to obtain a first data set; the first data set is screened based on the historical photovoltaic output data to obtain a second data set; the second data set is input into the long short-term memory network for prediction to obtain a photovoltaic output prediction result. By using the photovoltaic output prediction model to detect anomalies in the data, repair the data and predict the photovoltaic output, the purpose of improving the data quality is achieved, thereby achieving the technical effect of improving the accuracy of distributed photovoltaic output prediction, and further solving the technical problem of low accuracy of distributed photovoltaic output prediction due to poor quality of collected data in related technologies.
[0066] Optionally, in step S221, data anomaly detection processing is performed on the historical meteorological data, and the obtained anomaly types include:
[0067] Step S2211, using a first anomaly detection algorithm to perform initial data anomaly detection processing on historical meteorological data to obtain a first detection result;
[0068] In step S2211, the first anomaly detection algorithm is used to characterize a statistical anomaly data detection method, including: a 3-sigma method, a z-score method, and a box plot method.
[0069] The above-mentioned first detection result is used to characterize whether the data in the historical meteorological data passes the data anomaly detection. If it passes the data anomaly detection, it is normal data; if it does not pass the data anomaly detection, it is abnormal data.
[0070] Specifically, the 3-sigma anomaly detection algorithm is based on the concept of normal distribution, which characterizes data that falls outside the mean plus or minus three standard deviations as abnormal data.
[0071] The z-score anomaly detection algorithm defines data far from the mean as outliers. Its calculation process is shown in expression (2).
[0072]
[0073] Among them, zi For data point x i The z-score value of i The average value of the historical data; σ is x i The standard deviation of the historical data.
[0074] Box plot anomaly detection algorithm uses the upper quartile Q U and the lower quartile Q L The interquartile range (IQR) is calculated to construct the upper and lower limits, and the numbers outside the limits are characterized as outliers. The calculation process of IQR is shown in expression (3).
[0075] IQR=Q U -Q L (3)
[0076] Among them, Q U Indicates the upper quartile of the historical data; Q L Indicates the lower quartile of the historical data.
[0077] Specifically, Figure 3 is a schematic diagram of a distributed photovoltaic output prediction method according to one embodiment of the present invention, such as Figure 3 As shown, first calculate the lower quartile (Q L ), median, upper quartile (Q U ). The median is the number in the middle (i.e., 50%) of a set of numbers after they are sorted in ascending order. Similarly, the lower quartile and upper quartile are the numbers at 25% and 75% after they are sorted in ascending order. Using expression (3) to construct the upper and lower limits, we can get: U +1.5IQR and Q L The values between -1.5IQR are within the acceptable range, and the values outside these two values are considered outliers.
[0078] Step S2212, determining the abnormal type of the abnormal data in the first detection result as out-of-range type;
[0079] Specifically, the 3-sigma method, the z-score method, and the box plot method are used in sequence to perform initial data anomaly detection on the historical meteorological data, and the data that does not pass the initial data anomaly detection in the historical meteorological data is determined as abnormal data, and its abnormal type is determined to be out of range type, and the data that passes the initial data anomaly detection in the historical meteorological data is determined as normal data, and the first detection result is obtained. For example, the 3-sigma method, the z-score method, and the box plot method are used in sequence to perform initial data anomaly detection on the relative humidity in the historical meteorological data, and the data that does not pass the initial data anomaly detection in the relative humidity is determined as abnormal data, and the data that passes the initial data anomaly detection in the relative humidity is determined as normal data, and the first detection result is obtained.
[0080] Step S2213, using a second anomaly detection algorithm to perform data anomaly detection again on the non-abnormal data in the first detection result to obtain a second detection result;
[0081] In step S2213, the second anomaly detection algorithm includes density-based spatial clustering of applications with noise (DBSCAN) and isolation forest.
[0082] Specifically, DBSCAN is a density-based clustering algorithm that is often used for anomaly detection in data. Its basic principle is to identify clusters by density and determine whether a data point is an anomaly by the neighborhood relationship between points. In DBSCAN, the neighborhood radius (ε) defines the neighborhood range of a point, and the points within the range are considered to be adjacent to each other. The minimum number of neighborhood samples (MinPts) defines that a point must have at least MinPts points in its neighborhood to be considered a core point. Through these two parameters, DBSCAN divides data points into three categories: core points are located in areas with high density and have enough points in their neighborhood; boundary points are points located in the neighborhood of core points, but the number of points in their own neighborhood is insufficient; noise points (outliers) are neither core points nor boundary points, usually in sparse areas of data. If a data point is located in an area with very low density and there are not enough neighboring points around it, then this point will be judged as an outlier. Therefore, DBSCAN can effectively identify outliers that are significantly different from most data points when processing clusters.
[0083] Specifically, Isolation Forest is a decision tree-based algorithm specifically used for anomaly detection. It uses multiple random trees to split the data. Because the anomalies are sparse in the data, they are easily "isolated". By randomly selecting the features and split points of the data, Isolation Forest constructs multiple "isolation trees". Each tree randomly splits the data, and the anomalies are usually isolated with a shorter path. The path of normal data is longer because they are located in dense areas and are more difficult to be isolated. Because the anomalies are sparse, they usually require fewer splits to be isolated, so their paths are shorter. By calculating the average path length of each data point, the points with shorter paths are considered anomalies. Isolation Forest splits non-abnormal data through multiple decision trees. If the path of some data points is short, they will be marked as anomalies. Isolation Forest is particularly effective for data with outliers and sparse distribution, and can quickly and accurately identify anomalies.
[0084] Step S2214: determine the abnormal type of the abnormal data in the second detection result as an abnormal fluctuation type.
[0085] Specifically, first use DBSCAN to perform density clustering on the normal data in the first detection result, and set an appropriate neighborhood radius (ε) and the minimum number of neighborhood samples (MinPts). For areas with low density, DBSCAN will mark these points as noise points (abnormal points); then use isolation forest to segment the normal data in the first detection result, and by calculating the path length of each data point, find out those points that are easy to be isolated, that is, points with shorter paths will be marked as abnormal points; finally, through the output of DBSCAN and isolation forest, the second abnormal detection result is obtained. The data that did not pass the DBSCAN and isolation forest detection is determined as abnormal data, and its abnormal type is determined as abnormal fluctuation type. The data that passed the DBSCAN and isolation forest detection is determined as normal data to obtain the second detection result.
[0086] Based on the above steps S2211 to S2214, the historical meteorological data is initially subjected to data anomaly detection processing using a first anomaly detection algorithm to obtain a first detection result; the anomaly type of the abnormal data in the first detection result is determined to be an out-of-range type; the non-abnormal data in the first detection result is subjected to data anomaly detection processing again using a second anomaly detection algorithm to obtain a second detection result; the anomaly type of the abnormal data in the second detection result is determined to be an abnormal fluctuation type. This multi-level detection mechanism is an effective supplement to the traditional single detection method, which not only improves the accuracy of anomaly detection, but also optimizes the pertinence and reliability of the subsequent repair process.
[0087] Optionally, in step S222, data repair processing is performed on the historical meteorological data based on the abnormality type, and the first data set obtained includes:
[0088] Step S2221, in response to the abnormality type being out of range, performing initial data repair processing on the abnormal data in the first detection result by using an interpolation method to obtain a first repair result;
[0089] In step S2221, the above interpolation method is used to represent linear interpolation method, Lagrange interpolation method or regressor interpolation method.
[0090] Specifically, the linear interpolation method performs interpolation based on the values and distances of the neighboring data points of the to-be-interpolated point.
[0091] The Lagrange interpolation method is based on the selection of n+1 specific nodes (x i ,y i ), with the function f passing through each specific node i (x) is used as the basis to construct the target interpolation function f(x). The specific process is shown in expression (4).
[0092]
[0093] Among them, n+1 represents the number of data points; j represents the index of other points; f i (x) represents the basis function of the i-th point, f i (x) in x i The value is 1 at the interpolation point and 0 at other points; f(x) represents the function value at the interpolation point x, f i (x) multiplied by the coefficient y i After superposition, the target interpolation function is obtained.
[0094] Regressor interpolation is an interpolation method based on a machine learning model (regressor). Unlike traditional interpolation methods (such as Lagrange interpolation and polynomial interpolation), regressor interpolation predicts the value of unknown points by learning the distribution and trend of existing data points using a trained regression model. Regressor interpolation usually uses supervised learning algorithms to build regression models, such as linear regression, support vector machine regression (SVR), decision tree regression, random forest regression, neural network regression, etc.
[0095] Specifically, when the abnormality type is out of range, any one of the interpolation methods, namely, linear interpolation method, Lagrange interpolation method or regressor interpolation method, is used to perform initial data repair processing on the abnormal data in the first detection result to obtain a first repair result.
[0096] Step S2222, in response to the abnormal type being an abnormal fluctuation type, using a generative adversarial network to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result;
[0097] Specifically, when the anomaly type is an abnormal fluctuation type, the GAN network is used to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result.
[0098] Step S2223: determine a first data set based on the first restoration result and the second restoration result.
[0099] Specifically, the first repair result and the second repair result are merged. All repaired data are checked for consistency to ensure the reliability and continuity of the repair result. The merged data set is determined as the first data set. For example, the relative humidity value (unit: %) in the historical meteorological data is shown in Table 1.
[0100] Table 1 Relative humidity values in historical meteorological data
[0101] Time Humidity value Exception Type 1 55 normal 2 120 Out of range 3 48 normal 4 75 Abnormal fluctuation type 5 50 normal
[0102] As shown in Table 1, the anomaly type of the relative humidity value 120 is out of range, and the linear interpolation method is used to repair it: the average of the neighboring values of 120 is calculated, and the repair value is (55+48) / 2=51.5. In the first repair result, the humidity at time point 2 is repaired to 51.5. The anomaly type of the relative humidity value 75 is abnormal fluctuation type, and the normal humidity value generated by GAN is 52. In the second repair result, the humidity at time point 4 is repaired to 52. The two repair results are merged to form the first data set: [55,51.5,48,52,50]. Finally, the repaired high-quality historical relative humidity data is obtained.
[0103] Based on the above steps S2221 to S2223, in response to the abnormality type being out of range, the interpolation method is used to perform initial data repair processing on the abnormal data in the first detection result to obtain a first repair result; in response to the abnormality type being abnormal fluctuation type, the generative adversarial network is used to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result; based on the first repair result and the second repair result, the first data set is determined. The repair strategy combines the advantages of the interpolation method and the generative adversarial network, improves the processing efficiency and the quality of data repair through targeted repair, and takes into account local continuity and global distribution characteristics. Its multi-stage and multi-method design ensures that the repaired data is more real and reliable, thereby improving the accuracy of the prediction of photovoltaic output results.
[0104] Optionally, in step S223, the first data set is screened based on historical photovoltaic output data to obtain a second data set including:
[0105] Step S2231, performing correlation analysis on each type of data in the first data set and the historical photovoltaic output data to obtain a correlation coefficient;
[0106] Specifically, the data is normalized using the Min-Max Normalization method. After each data is normalized using the maximum and minimum values in the data, the data is normalized to a specified range through mapping. Taking the two-dimensional array processing by column operation as an example, the specific calculation process of the Min-Max Normalization method is shown in Expression (5).
[0107]
[0108] Among them, X.min is a row vector composed of the minimum value in each column; X.max is a row vector composed of the maximum value in each column; max and min are the upper and lower limits of the target mapping interval respectively; X std is the result after standardization, X scaled is the normalized result.
[0109] Specifically, after data normalization, the correlation coefficients between historical photovoltaic power data and each meteorological factor data are calculated, and correlation analysis is performed by calculating and comparing correlation coefficients. The Pearson correlation coefficient r, Kendall correlation coefficient Tau, and Spearman correlation coefficient ρ are selected for comprehensive correlation analysis. The specific calculation process is shown in expression (6).
[0110]
[0111] Where n represents the number of data. Respectively represent the average values of historical photovoltaic power data and meteorological factor data for which correlation analysis is being performed; σ X , σ Y They represent the standard deviation of the historical photovoltaic power data and the meteorological factor data being analyzed for correlation; Tau-b is the formula used to calculate the Kendall coefficient when there is a tie in the data; n c represents the number of concordant pairs in pairwise comparisons, n d represents the number of discordant pairs; t x ,t y Indicates the number of parallel rankings in the data; d i Indicates the difference in order.
[0112] Step S2232, filtering the historical meteorological data based on the correlation coefficient to obtain a second data set.
[0113] Specifically, after calculating the Pearson correlation coefficient r, Kendall correlation coefficient Tau and Spearman correlation coefficient ρ between the historical photovoltaic power data and each meteorological factor data, the historical meteorological data are screened using the above correlation coefficients, and the screened data are used as the second data set to predict the distributed photovoltaic output results. For example, the correlation coefficients between each meteorological factor and the distributed photovoltaic output are shown in Table 2. According to Table 2, it can be determined that Celsius temperature, relative humidity, total radiation and diffuse radiation with large correlation coefficients are selected as the second data set.
[0114] Based on the above steps S2231 to S2232, each type of data in the first data set is correlated with the historical photovoltaic output data to obtain a correlation coefficient; the historical meteorological data is screened based on the correlation coefficient to obtain a second data set. Through correlation analysis and data screening, the second data set is more streamlined and efficient, redundant and noisy data is eliminated, and the correlation between features and targets is strengthened, thereby improving the computational efficiency and prediction accuracy of the model.
[0115] Table 2 Correlation coefficients between meteorological factors and distributed photovoltaic output
[0116]
[0117] Optionally, in step S2222, the generative adversarial network includes at least: a generator and a discriminator, and the generative adversarial network is used to perform data repair processing on the abnormal data in the second detection result, and the second repair result is obtained, including:
[0118] Step S301, using a generator to generate a third data set based on random noise data;
[0119] Specifically, the generator G receives random noise z as input. Random noise z is a sample drawn from a specific distribution (such as uniform distribution or Gaussian distribution) to provide initial input for the generator. The generator G maps the random noise z into a set of data points similar to the structure of real historical meteorological data through its internal neural network. The output third data set is is the initial generated repair data.
[0120] Step S302, using a discriminator to discriminate the historical meteorological data and the third data set to obtain a discrimination result;
[0121] Specifically, the discriminator D receives two types of input: historical meteorological data x: normal historical meteorological data, as real data input. The data generated by the generator is used as the forged data input. The discriminator D outputs a probability value: D(x) is the probability that the historical meteorological data is real data (close to 1 indicates authenticity). is the probability that the third data set is real data (close to 0 indicates forgery). The discriminator distinguishes real data from forged data through training: maximize D(x) to improve the ability to identify real data; minimize To reduce the misjudgment of falsified data.
[0122] Step S303: Using the generator to adjust the third data set based on the discrimination result to obtain a second restoration result.
[0123] Specifically, the generator back propagates, and the goal of the generator is to generate a third data set that can deceive the discriminator, so that Approaches 1. Based on the discriminant result, the generator optimizes the generation process by gradient descent and adjusts its parameters so that the third data set looks more like real data. In multiple rounds of iterations, the generator continuously improves the data distribution it generates, making it difficult for the discriminator to distinguish the third data set from historical meteorological data. Ultimately, the repaired data output by the generator (i.e., the second repair result) is highly similar to the distribution of historical meteorological data and can replace abnormal data. Through the trained generator, the generated repaired data is used to replace the abnormal data in the second detection result, thereby forming complete and high-quality historical meteorological data.
[0124] Specifically, the torch framework is used to build a generator and discriminator based on a linear fully connected neural network, and noise with appropriate size and fluctuation is constructed for generator training. Then, adversarial training is continuously iterated based on the input original data value and missing data location information, and finally the completion result is returned by combining the estimated value generated by the generator and the output of the discriminator.
[0125] Specifically, Figure 4 is a schematic diagram of another distributed photovoltaic output prediction method according to one embodiment of the present invention, such as Figure 4 As shown, the generator G receives random noise z as input. Through its internal neural network, the random noise z is mapped into a set of data points with a structure similar to the real historical meteorological data. The generated third data set is the initially generated repair data. The discriminator D receives the input based on the historical meteorological data x and uses it to compare with the third data set The discriminant is performed to obtain the discriminant result. Based on the discriminant result, the generator optimizes the generation process by gradient descent and adjusts its parameters so that the third data set looks more like real data. In multiple rounds of iterations, the generator continuously improves the distribution of the data it generates, making it difficult for the discriminator to distinguish the third data set from the historical meteorological data. Finally, the repaired data output by the generator is highly similar to the distribution of the historical meteorological data and can replace the abnormal data. The repaired data generated by the trained generator is used to replace the abnormal data in the second detection result.
[0126] Based on the above steps S301 to S303, a generator is used to generate a third data set based on random noise data; a discriminator is used to discriminate the historical meteorological data and the third data set to obtain a discrimination result; the generator is used to adjust the third data set based on the discrimination result to obtain a second repair result. Through adversarial training of the generator and the discriminator, the generator can gradually generate higher quality repair data, so that the second repair result maintains the characteristics of being consistent with the distribution of historical meteorological data, thereby improving the authenticity and reliability of the repair data.
[0127] Optionally, the long short-term memory network is constructed based on a frozen training method.
[0128] Specifically, in the frozen training mode, some parameters or layers of LSTM can be fixed. The following is the implementation method:
[0129] (1) Freezing pre-trained layers: When using these layers, their parameters can be frozen so that they retain their original characteristics and reduce model degradation caused by the small amount of data for the new task.
[0130] (2) Freeze some parameters of the gating mechanism: The gating mechanism (input gate, forget gate, output gate) in LSTM controls the flow of information and has a large number of parameters. In the frozen training mode, some parameters of these gates can be frozen. For example, the weight matrix of the forget gate keeps the long-term memory characteristics stable, and only trains the task-related parts.
[0131] (3) Freeze specific network layers: In a hierarchical LSTM structure, the parameters of the bottom LSTM layer can be frozen and only the top network can be trained. This preserves the bottom network’s ability to model common features while improving the top network’s adaptability to specific tasks.
[0132] The long short-term memory network is built based on the frozen training method and has the following advantages:
[0133] (1) Reduce training time: After freezing some parameters, the number of weights that need to be updated is reduced, thereby speeding up the training process of the model.
[0134] (2) Avoid overfitting: Frozen parameters are usually pre-trained and have general feature representation capabilities. Fixing these parameters can reduce the risk of overfitting, especially when the amount of training data is insufficient.
[0135] (3) Improving model stability: Freezing training can avoid parameter collapse (such as gradient vanishing or exploding problems) caused by improper gradient updates during training, ensuring that the model maintains its pre-training characteristics.
[0136] Figure 5 is a schematic diagram of another distributed photovoltaic output prediction method according to one embodiment of the present invention, such as Figure 5As shown, the historical meteorological data is subjected to data anomaly detection processing to determine whether there is abnormal data in the historical meteorological data. If there is abnormal data in the historical meteorological data, the abnormal type of the abnormal data is determined, and the historical meteorological data is subjected to data repair processing based on the abnormal type to obtain a first data set. The first data set is screened based on the historical photovoltaic output data to obtain a second data set, wherein the first data set needs to be normalized and the normalized first data set is used for screening. The second data set is input into the optimized long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0137] Figure 6 is a flow chart of another distributed photovoltaic output prediction method according to one embodiment of the present invention. Figure 6 As shown, the method comprises the following steps:
[0138] Step S601, obtaining historical meteorological data and historical photovoltaic output data of the target area;
[0139] Step S602, using a first anomaly detection algorithm to perform initial data anomaly detection processing on historical meteorological data to obtain a first detection result;
[0140] Step S603, determining the abnormal type of the abnormal data in the first detection result as out-of-range type;
[0141] Step S604, using a second anomaly detection algorithm to perform data anomaly detection again on the non-abnormal data in the first detection result to obtain a second detection result;
[0142] Step S605, determining the abnormal type of the abnormal data in the second detection result as an abnormal fluctuation type;
[0143] Step S606, in response to the abnormal type being out of range, performing initial data repair processing on the abnormal data in the first detection result by using an interpolation method to obtain a first repair result;
[0144] Step S607, in response to the abnormal type being an abnormal fluctuation type, using a generative adversarial network to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result;
[0145] Step S608, determining a first data set based on the first restoration result and the second restoration result;
[0146] Step S609, performing correlation analysis on each type of data in the first data set and the historical photovoltaic output data to obtain a correlation coefficient;
[0147] Step S610, screening the historical meteorological data based on the correlation coefficient to obtain a second data set;
[0148] Step S611, inputting the second data set into the long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0149] Based on the above steps S601 to S611, the historical meteorological data and historical photovoltaic output data of the target area are obtained, and the historical meteorological data and historical photovoltaic output data are input into the photovoltaic output prediction model to obtain the photovoltaic output prediction result. By using the photovoltaic output prediction model to detect anomalies in the data, repair the data and predict the photovoltaic output, the purpose of improving the data quality is achieved, thereby achieving the technical effect of improving the accuracy of distributed photovoltaic output prediction, and further solving the technical problem of low accuracy of distributed photovoltaic output prediction due to poor quality of collected data in related technologies.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0151] In the embodiments of the present invention, a distributed photovoltaic output prediction device is also provided, which is used to implement the above embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0152] Figure 7 is a structural block diagram of a distributed photovoltaic output prediction device according to one embodiment of the present invention. Figure 7 As shown, the device comprises:
[0153] An acquisition module 701 is used to acquire historical meteorological data and historical photovoltaic output data of a target area;
[0154] The prediction module 702 is used to input historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0155] Optionally, the distributed photovoltaic output prediction device also includes a detection module 703, which is used to perform data anomaly detection processing on historical meteorological data to obtain the anomaly type of the historical meteorological data; the distributed photovoltaic output prediction device also includes a processing module 704, which is used to perform data repair processing on the historical meteorological data based on the anomaly type to obtain a first data set; the distributed photovoltaic output prediction device also includes a screening module 705, which is used to screen the first data set based on the historical photovoltaic output data to obtain a second data set; the prediction module 702 is also used to input the second data set into the long short-term memory network for prediction to obtain a photovoltaic output prediction result.
[0156] Optionally, the detection module 703 is also used to perform initial data anomaly detection processing on historical meteorological data using a first anomaly detection algorithm to obtain a first detection result; the distributed photovoltaic output prediction device also includes a determination module 706, which is used to determine the anomaly type of the abnormal data in the first detection result as an out-of-range type; the detection module 703 is also used to perform a second data anomaly detection processing on the non-abnormal data in the first detection result using a second anomaly detection algorithm to obtain a second detection result; the determination module 706 is also used to determine the anomaly type of the abnormal data in the second detection result as an abnormal fluctuation type.
[0157] Optionally, the processing module 704 is also used to: in response to the anomaly type being an out-of-range type, use an interpolation method to perform initial data repair processing on the abnormal data in the first detection result to obtain a first repair result; in response to the anomaly type being an abnormal fluctuation type, use a generative adversarial network to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result; the determination module 706 is also used to determine the first data set based on the first repair result and the second repair result.
[0158] Optionally, the screening module 705 is further used to: perform correlation analysis on each type of data in the first data set and the historical photovoltaic output data to obtain a correlation coefficient; and screen the historical meteorological data based on the correlation coefficient to obtain a second data set.
[0159] Optionally, the distributed photovoltaic output prediction device also includes a generation module 707, which is used to use a generator to generate a third data set based on random noise data; the processing module 704 is also used to: use a discriminator to discriminate historical meteorological data and the third data set to obtain a discrimination result; use the generator to adjust the third data set based on the discrimination result to obtain a second repair result.
[0160] Optionally, the long short-term memory network is constructed based on a frozen training method.
[0161] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0162] According to one embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned distributed photovoltaic output prediction method is executed when the program is running.
[0163] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0164] Step S1, obtaining historical meteorological data and historical photovoltaic output data of the target area;
[0165] Step S2, inputting historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0166] According to one embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the above-mentioned distributed photovoltaic output prediction method.
[0167] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0168] Step S1, obtaining historical meteorological data and historical photovoltaic output data of the target area;
[0169] Step S2, inputting historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0170] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0171] According to one embodiment of the present invention, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the distributed photovoltaic output prediction method described above is implemented.
[0172] Optionally, in this embodiment, the computer program product may be configured to store computer program instructions for performing the following steps:
[0173] Step S1, obtaining historical meteorological data and historical photovoltaic output data of the target area;
[0174] Step S2, inputting historical meteorological data and historical photovoltaic output data into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
[0175] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0176] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0179] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0181] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A distributed photovoltaic output prediction method, characterized in that: include: Obtain historical meteorological data and historical photovoltaic output data for the target area; The historical meteorological data and the historical photovoltaic output data are input into a photovoltaic output prediction model to obtain a photovoltaic output prediction result, wherein the photovoltaic output prediction model is determined based on a generative adversarial network and a long short-term memory network.
2. The distributed photovoltaic output prediction method according to claim 1, characterized in that: Inputting the historical meteorological data and the historical photovoltaic output data into the photovoltaic output prediction model to obtain the photovoltaic output prediction result includes: Performing data anomaly detection processing on the historical meteorological data to obtain anomaly types of the historical meteorological data; Performing data repair processing on the historical meteorological data based on the anomaly type to obtain a first data set; Filtering the first data set based on the historical photovoltaic output data to obtain a second data set; The second data set is input into the long short-term memory network for prediction to obtain the photovoltaic output prediction result.
3. The distributed photovoltaic output prediction method according to claim 2, characterized in that: The historical meteorological data is subjected to data anomaly detection processing, and the anomaly types obtained include: Performing initial data anomaly detection processing on the historical meteorological data using a first anomaly detection algorithm to obtain a first detection result; Determine the abnormal type of the abnormal data in the first detection result as an out-of-range type; Using a second anomaly detection algorithm to perform data anomaly detection again on the non-abnormal data in the first detection result to obtain a second detection result; The abnormal type of the abnormal data in the second detection result is determined to be an abnormal fluctuation type.
4. The distributed photovoltaic output prediction method according to claim 3 is characterized in that: The historical meteorological data is subjected to data repair processing based on the abnormality type to obtain a first data set including: In response to the abnormality type being an out-of-range type, performing initial data repair processing on the abnormal data in the first detection result by using an interpolation method to obtain a first repair result; In response to the abnormal type being an abnormal fluctuation type, using the generative adversarial network to perform data repair processing on the abnormal data in the second detection result to obtain a second repair result; The first data set is determined based on the first restoration result and the second restoration result.
5. The distributed photovoltaic output prediction method according to claim 2, characterized in that: The first data set is screened based on the historical photovoltaic output data to obtain a second data set including: Performing correlation analysis on each type of data in the first data set and the historical photovoltaic output data to obtain a correlation coefficient; The historical meteorological data is screened based on the correlation coefficient to obtain a second data set.
6. The distributed photovoltaic output prediction method according to claim 4, characterized in that: The generative adversarial network at least includes: a generator and a discriminator, and the generative adversarial network is used to perform data repair processing on the abnormal data in the second detection result, and the second repair result obtained includes: generating a third data set based on the random noise data using the generator; Using the discriminator to discriminate the historical meteorological data and the third data set to obtain a discrimination result; The generator is used to adjust the third data set based on the discrimination result to obtain the second restoration result.
7. The distributed photovoltaic output prediction method according to claim 1, characterized in that: The long short-term memory network is constructed based on a frozen training method.
8. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the distributed photovoltaic output prediction method according to any one of claims 1 to 7 is executed when the program is run.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the distributed photovoltaic output prediction method according to any one of claims 1 to 7.
10. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the distributed photovoltaic output prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Photovoltaic output prediction method and system based on neural network
CN116245220A
GRU-GAN-based power grid data restoration method
CN116578551A
Cited By
Method and system for predicting distributed photovoltaic output in changeable weather
CN120892843A