Method and system for increasing training data samples based on generative adversarial network
By using generative adversarial network synthesis and screening data samples in the photovoltaic power prediction model, the problem of insufficient new site or historical data is solved, the accuracy and generalization capabilities of the prediction model are improved, and the stable operation of the power system is enhanced.
Patent Information
- Application Number
- CN202510094655.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-06-06
AI Technical Summary
The existing photovoltaic power prediction model has insufficient prediction accuracy and generalization capabilities when new stations are built or historical data are insufficient, resulting in the stable operation of the power system being affected.
Using a generative adversarial network (GAN)-based method, new data samples are synthesized from the historical data of surrounding sites, and the synthetic data is screened through the discriminant model, and the training data samples are extended to improve the training data scale and quality of the model.
By adding training data samples, the accuracy and generalization ability of the power generation prediction model are improved, the dependence on a large amount of historical data is reduced, and the robustness and prediction effect of the model are enhanced.
Smart Images

Figure CN120105092A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of photovoltaic power generation technology, and specifically to a method and system for increasing training data samples based on a generative adversarial network. Background Art
[0002] With the increasing application of photovoltaic power generation systems, more and more photovoltaic power sources are connected to the distribution network, which brings huge challenges to the planning, operation, control and other aspects of the power system. Since the amount of solar radiation is closely related to meteorological conditions, the output power of photovoltaic power generation systems is inherently random and volatile. In the case that the mismatch between power storage facilities and new energy grid-connected power is difficult to change in the short term, the access of large-scale photovoltaic power generation systems to the power grid will have a great impact on the safe and stable operation of the power system. This is also a key technical problem that needs to be solved for the large-scale access of photovoltaic power generation to the power grid. Countries around the world have successively carried out technical research on photovoltaic power generation power prediction, which is of great significance to the stable operation of the power system, and helps the power system dispatching department to coordinate the power generation planning of conventional energy and photovoltaic power generation, and reasonably arrange the operation mode of the power grid.
[0003] At present, most of the models used to predict photovoltaic power generation are machine learning models and deep learning models. The existing photovoltaic power generation prediction model constructs a mapping relationship between forecast weather, historical weather data and historical power generation data and power generation of the power station, and uses this mapping relationship to predict the power generation of photovoltaic stations in the future time period. In addition, the existing methods are mainly data-driven methods. The model mines the mapping relationship between forecast weather, historical weather and historical power generation and actual power generation from the data. In conventional scenarios, it is generally hoped that there will be at least one year of historical data to train the model. However, for newly operated stations, there may be less than one year of historical data, and some stations even have only one or two months of historical data.
[0004] To ensure the prediction performance of the model, for stations with less than one year of historical data, or even only one or two months, the conventional processing method is to use the data of the surrounding stations together with the data of the target station to train the model, that is, to increase the number of samples. The target station here refers to the station that needs to configure the power prediction model. If the surrounding stations are close to the target station (less than 100 kilometers) and the weather scenes are similar, the historical data form of the surrounding stations will have a certain similarity with the data form of the target station. In this case, the model obtained by fusing the historical data of the surrounding stations with the data of the target station is often better than the model obtained by training only based on the data of the target station. However, if the surrounding stations are far away from the target station and there are differences in the weather scenes, the similarity of the historical data forms is not high. In this case, the effect of fusing the data of the surrounding stations with the data of the target station is not necessarily better than the model obtained by training only based on the data of the target station. Summary of the invention
[0005] In view of the technical problems existing in the prior art, the present invention provides a method and system for increasing training data samples based on a generative adversarial network to improve the accuracy and generalization ability of a power generation prediction model.
[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0007] A method for increasing training data samples based on a generative adversarial network comprises the following steps:
[0008] Acquire historical data of the target station and surrounding stations; the historical data includes historical power generation and historical meteorological data;
[0009] Based on the historical data of surrounding stations, the generative model is used to synthesize data; based on the historical data of the target station, the discriminant model is used to filter the synthesized data to obtain extended sample data;
[0010] The historical data of the target station and surrounding stations, as well as the extended sample data, are input into the model to train the model, and the final power generation prediction model is obtained for power prediction.
[0011] Preferably, the historical data of the target station and the surrounding stations, as well as the extended sample data are fused, that is, data splicing, to obtain the final training data sample.
[0012] Preferably, the historical data of the target station is marked as X 1 , the data dimension is n 1 ×d, the corresponding label is y 1 , dimension is n 1 ×1;
[0013] Historical data of surrounding stations, marked with X 2 , the data dimension is n 2 ×d, the corresponding label is y 2 , dimension is n 2 ×1;
[0014] Filtered synthetic data, marked with X 3 , the data dimension is n 3 ×d, the corresponding label is y 3 , dimension is n 3 ×1;
[0015] The fused data is X=[X 1 ;X 2 ;X 3 ], the dimension is (n 1 +n 2 +n3 )×d, marked as y=[y 1 ;y 2 ;y 3 ], the dimension is (n 1 +n 2 +n 3 )×1;
[0016] Among them, n 1 、n 2 、n 3 is the number of samples, and d is the number of variables.
[0017] Preferably, the generative model and the discriminative model are models for processing time series data, including LSTM, GRU, TCNs or transform.
[0018] Preferably, the loss function of the generative model G is:
[0019]
[0020] Among them, z (i) Represents the surrounding station data, x (i) is the target station data, i represents the i-th point of the sequence data, m represents the length of the sequence data, G(z (i) ) means to convert z (i) The output obtained by inputting into the generative model.
[0021] Preferably, the loss function of the discriminant model D is:
[0022]
[0023] z (i) Represents the surrounding station data, x (i) is the target station data, i represents the i-th point of the sequence data, m represents the length of the sequence data, D(x (i) ) means to convert x (i) Input to the discriminant model to get the output; G(z (i) ) means to convert z (i) The output obtained by inputting into the generative model.
[0024] Preferably, the historical data of the target station and surrounding stations, and the extended sample data are used as training data and divided into a training set, a validation set and a test set; wherein the test set is the historical data from the target station.
[0025] The present invention also discloses a computer program product, comprising a computer program, wherein the computer program executes the steps of the method described above when executed by a processor.
[0026] The present invention further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are executed.
[0027] The present invention also discloses a system for increasing training data samples based on a generative adversarial network, comprising a memory and a processor connected to each other, wherein a computer program is stored on the memory, and when the computer program is run by the processor, the steps of the method described above are executed.
[0028] Compared with the prior art, the advantages of the present invention are:
[0029] The present invention generates new data samples from limited historical data by using the technology of generative adversarial network (GAN), thereby increasing the sample size of training data. This step uses the historical data of surrounding stations as input to synthesize new data samples, thereby expanding the scale of training data. While the generative adversarial network synthesizes data, the discriminant model can screen out the differences between real and synthesized data, so that the generated data samples are closer to the real data distribution (more similar to the data of the target station). This method can not only improve the generalization ability of the model, but also reduce the risk of overfitting. By inputting the historical data of the target station and surrounding stations and the extended sample data into the model for training, the information and features in the historical data can be captured more comprehensively, thereby improving the accuracy of power generation prediction.
[0030] By combining a generative adversarial network, the present invention can improve the accuracy and generalization ability of the power generation prediction model under limited training data, while reducing the dependence on a large amount of historical data, and has strong practical value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The present invention is a flowchart of a method according to an embodiment.
[0032] Figure 2 The flowchart of the embodiment of synthesizing data in the present invention. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0034] For newly built stations with little historical data, the method for increasing training data samples based on a generative adversarial network provided in an embodiment of the present invention can generate historical weather forecast data and historical power generation data with certain similarities to the target station based on the historical weather forecast data and historical power generation data of surrounding stations.
[0035] like Figure 1As shown, the method for increasing training data samples based on a generative adversarial network provided by an embodiment of the present invention includes the steps of:
[0036] Obtain historical data of the target station and surrounding stations; historical data includes historical power generation and historical meteorological data;
[0037] Based on the historical data of surrounding stations, the generative model is used to synthesize data; based on the historical data of the target station, the discriminant model is used to filter the synthesized data to obtain extended sample data;
[0038] The historical data of the target station and surrounding stations, as well as the extended sample data, are input into the model to train the model, and the final power generation prediction model is obtained for power prediction.
[0039] Specifically, assuming the input Figure 1 The data of the model in is labeled X; Figure 1 The model in can be any machine learning model or deep learning model; the samples of this method training model have three data sources, namely:
[0040] Historical data of the target station, marked with X 1 , the data dimension is n 1 ×d, the corresponding label is y 1 , dimension is n 1 ×1;
[0041] Historical data of surrounding stations, marked with X 2 , the data dimension is n 2 ×d, the corresponding label is y 2 , dimension is n 2 ×1;
[0042] Data synthesized based on the historical data of surrounding stations using the cyclic generative adversarial network, marked as X 3 , the data dimension is n 3 ×d, the corresponding label is y 3 , dimension is n 3 ×1.
[0043] These three parts of data are input into the model together for model training.
[0044] The way to merge the three parts of data is data splicing, that is, the final input is Figure 1 The data of the model is X = [X 1 ;X 2 ;X 3 ], the dimension is (n 1 +n 2 +n 3 )×d, marked as y=[y 1 ;y2 ;y 3 ], the dimension is (n 1 +n 2 +n 3 )×1;
[0045] Among them, n 1 、n 2 、n 3 And n is the number of samples, d is the number of variables, that is, the number of features input into the model.
[0046] The historical data of the target station and the surrounding stations are relatively easy to obtain.
[0047] The historical data generated by the cyclic generative adversarial network model based on the surrounding station data is Figure 2 The Generative Adversarial Networks (GANs) model was first used for image generation. It is implemented by letting two networks compete with each other. One of them is called the Generator Network, which continuously captures data in the training library to generate new samples. The other is called the Discriminator Network, which also uses relevant data to determine whether the data provided by the Generator is real enough.
[0048] Based on the data of surrounding stations, a recurrent generative adversarial network is used to generate more training data in order to make the generated data closer to the shape of the target station data. Therefore, instead of inputting noise into the generative model, the data of surrounding stations are input into the generative model, and the generative model is allowed to adjust the data of surrounding stations to obtain synthetic data, and the closer the shape of this synthetic data is to the data of the target station, the better.
[0049] Input to Figure 2 The data of the generative model and the discriminative model are all time series data. The generative model and the discriminative model can be any model that can process time series data, such as Long short-term memory (LSTM), gated recurrent unit (GRU), TCNs (temporal convolutional networks), transform series, etc.
[0050] Figure 2 The loss functions of the generative model (G) and the discriminative model (D) are shown in formula (1) and formula (2) respectively:
[0051]
[0052] Among them, z (i) Represents the surrounding station data, x (i) is the target station data, i represents the i-th point of the sequence data, m represents the length of the sequence data, G(z (i) ) means to convert z (i) The output obtained by inputting into the generative model, D(x (i) ) means to convert x (i) The output obtained by inputting into the discriminant model; x (i) and x (i) The dimension is 1×(d+1), which is larger than the input Figure 1 The reason why the dimension of the data in the model is one more is that the input Figure 2 The data for generative and discriminative models need to increase actual power, i.e., annotation.
[0053] In specific application, the specific implementation steps of the above method are:
[0054] Determine the length and characteristics of input sequence data;
[0055] Determine the structure and parameters of the generative model and the discriminative model;
[0056] Generate an adversarial network model based on the training cycle of surrounding station data and target station data, and generate more training samples based on the trained model;
[0057] Merge the target station data, surrounding station data, and generated data, and divide the training data into training set, validation set, and test set; the test set can only come from the target station;
[0058] The model is trained based on the training data and used for prediction.
[0059] The present invention generates new data samples from limited historical data by using the technology of generative adversarial network (GAN), thereby increasing the sample size of training data. This step uses the historical data of surrounding stations as input to synthesize new data samples, thereby expanding the scale of training data. While the generative adversarial network synthesizes data, the discriminant model can screen out the differences between real and synthesized data, so that the generated data samples are closer to the real data distribution (more similar to the data of the target station). This method can not only improve the generalization ability of the model, but also reduce the risk of overfitting. By inputting the historical data of the target station and surrounding stations and the extended sample data into the model for training, the information and features in the historical data can be captured more comprehensively, thereby improving the accuracy of power generation prediction.
[0060] By combining a generative adversarial network, the present invention can improve the accuracy and generalization ability of the power generation prediction model under limited training data, while reducing the dependence on a large amount of historical data, and has strong practical value and application prospects.
[0061] The present invention also discloses a computer program product, comprising a computer program, wherein the computer program executes the steps of the method described above when executed by a processor.
[0062] The present invention further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are executed.
[0063] The present invention also discloses a system for increasing training data samples based on a generative adversarial network, comprising a memory and a processor connected to each other, wherein a computer program is stored on the memory, and when the computer program is run by the processor, the steps of the method described above are executed.
[0064] The product, medium and system of the present invention correspond to the above method and also have the advantages described in the above method.
[0065] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiment when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. The memory is used to store computer programs and / or modules, and the processor implements various functions by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0066] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for increasing training data samples based on a generative adversarial network, characterized in that: Includes steps: Acquire historical data of the target station and surrounding stations; the historical data includes historical power generation and historical meteorological data; Based on the historical data of surrounding stations, the generative model is used to synthesize data; based on the historical data of the target station, the discriminant model is used to filter the synthesized data to obtain extended sample data; The historical data of the target station and surrounding stations, as well as the extended sample data, are input into the model to train the model, and the final power generation prediction model is obtained for power prediction.
2. The method for increasing training data samples based on a generative adversarial network according to claim 1, characterized in that: The historical data of the target station and surrounding stations, as well as the extended sample data, are fused, i.e., data splicing, to obtain the final training data sample.
3. The method for increasing training data samples based on a generative adversarial network according to claim 2, characterized in that: The historical data of the target station is marked as X1, with a data dimension of n1×d, and the corresponding annotation is y1 with a dimension of n1×1; The historical data of the surrounding stations is marked as X2, with a data dimension of n2×d, and the corresponding annotation is y2, with a dimension of n2×1; The filtered synthetic data is labeled as X3, the data dimension is n3×d, and the corresponding annotation is y3, the dimension is n3×1; The fused data is X = [X1; X2; X3], with a dimension of (n1+n2+n3)×d, and is annotated as y = [y1; y2; y3], with a dimension of (n1+n2+n3)×1; Among them, n1, n2, n3 are the number of samples, and d is the number of variables.
4. The method for increasing training data samples based on a generative adversarial network according to claim 1, 2 or 3, characterized in that: The generative model and discriminative model are models for processing time series data, including LSTM, GRU, TCNs or transform.
5. The method for increasing training data samples based on a generative adversarial network according to claim 1, 2 or 3, characterized in that: The loss function L of the generative model G G for: Among them, z (i) Represents the surrounding station data, x (i) is the target station data, i represents the i-th point of the sequence data, m represents the length of the sequence data, G(z (i) ) means to convert z (i) The output obtained by inputting into the generative model.
6. The method for increasing training data samples based on a generative adversarial network according to claim 1, 2 or 3, characterized in that: The loss function L of the discriminant model D D for: z (i) Represents the surrounding station data, x (i) is the target station data, i represents the i-th point of the sequence data, m represents the length of the sequence data, D(x (i) ) means to convert x (i) Input to the discriminant model to get the output; G(z (i) ) means to convert z (i) The output obtained by inputting into the generative model.
7. The method for increasing training data samples based on a generative adversarial network according to claim 1, 2 or 3, characterized in that: The historical data of the target station and surrounding stations, as well as the extended sample data, are used as training data and divided into a training set, a validation set, and a test set; the test set is the historical data from the target station.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 7.
10. A system for increasing training data samples based on a generative adversarial network, comprising a memory and a processor connected to each other, wherein a computer program is stored on the memory, characterized in that: When the computer program is executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 7.