Photovoltaic power station supervised data generation method based on generative adversarial network

Through the photovoltaic power station with supervised data generation method based on a generative adversarial network, the problem of initial center selection deviation in traditional clustering methods is solved, and the quality and stability of generated data are improved , realizes the evaluation of the diversity and authenticity of generated data.

CN119322954AActive Publication Date: 2025-01-17NANTONG PROD QUALITY SUPERVISION & INSPECTION INST

Patent Information

Application Number
CN202411857055.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-01-17
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

Traditional K-means clustering is susceptible to randomness in the initial center selection, resulting in unstable clustering results, difficulty in accurately dividing feature clusters, lack of quantitative analysis of the quality of generated data, and difficulty in judging the diversity and truth of generated data. sex.

Method used

The supervised data generation method of photovoltaic power stations based on generative adversarial network is adopted. By initializing the generator and discriminator, the features are extracted using the convolutional layer, combined with K-means clustering and SIFT algorithm, the quality of the generated data is evaluated, and the cross-entropy loss is achieved. Functions and Adam optimizers optimize model parameters to ensure diversity and authenticity of generated data.

Benefits of technology

Improve the quality and detail restoration ability of generated data, ensure the stability and accuracy of clustering results, and can effectively generate samples with similar distributions to the real data, avoid the initial center selection bias during the clustering process, and achieve the correctness of the Generate a quantitative assessment of data quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322954A_ABST
    Figure CN119322954A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic power station supervised data generation method based on a generative adversarial network, which is used in the technical field of data augmentation, and comprises the following steps: initializing a generator and a discriminator, and randomly extracting training samples; training a generator and a discriminator by using the training sample, and generating a synthetic data set conforming to photovoltaic power station data set distribution through the generator; and clustering the features of the synthetic data set and the photovoltaic power station data set through a K-means clustering algorithm, observing a clustering center and feature distribution, evaluating the feature distribution difference between the generated data set and the real photovoltaic power station data set through an unsupervised clustering method, and evaluating the quality of the generated data set. According to the method, through the steps of density value sorting, initial center selection and the like, fine division of clustering is achieved, and initial center selection deviation in the clustering process is effectively avoided by combining density value calculation and a grid division method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data augmentation technology, and in particular to a supervised data generation method for a photovoltaic power station based on a generative adversarial network. Background Art

[0002] As a hot technology in recent years, artificial intelligence has achieved remarkable results in many fields. The rapid development of deep learning technology has provided new algorithms for photovoltaic power plants to increase the number of risk data sets. The results achieved by deep learning in image feature extraction are better than the more traditional machine learning methods that use manually designed features. It uses deep network models with learning capabilities to automatically extract image features.

[0003] Generative Adversarial Networks (GAN) is a new type of unsupervised network architecture, mainly composed of two parts: the generator and the discriminator. The goal of the generator is to capture the distribution of real data as much as possible, so as to generate data that is infinitely close to the real distribution, so as to deceive the discriminator; while the goal of the discriminator is to distinguish whether the input data distribution is derived from real data or generated data; the two continuously optimize through game (continuously update their own parameters to minimize the overall loss) so that the final generated image cannot be distinguished from the real one. Due to its excellent generation ability, this model and its derivative models have been applied to various fields, and the results achieved in the field of image generation are particularly remarkable, and in many tasks, it has even reached the level of being indistinguishable from the real one.

[0004] Traditional methods use fully connected layers to extract data features, which is computationally intensive and inefficient, and it is difficult to capture local features in complex data sets. Traditional GAN ​​methods also have difficulty ensuring the distribution consistency between generated data and real data, resulting in poor quality and lack of authenticity of generated data. In addition, traditional K-means clustering is easily affected by randomness in the selection of initial centers, resulting in unstable clustering results, difficulty in accurately dividing feature clusters, lack of quantitative analysis of the quality of generated data, and difficulty in judging the diversity and authenticity of generated data.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In order to overcome the above problems, the present invention aims to propose a supervised data generation method for photovoltaic power plants based on a generative adversarial network, with the aim of solving the problem that traditional K-means clustering is easily affected by randomness in the initial center selection, resulting in unstable clustering results, difficulty in accurately dividing feature clusters, lack of quantitative analysis of the quality of generated data, and difficulty in judging the diversity and authenticity of generated data.

[0007] To this end, the specific technical solution adopted by the present invention is as follows: A method for generating supervised data for a photovoltaic power station based on a generative adversarial network, comprising the following steps: S1, initialize the generator and discriminator, pre-process the photovoltaic power station data set containing environmental features and corresponding power generation labels, and randomly extract training samples; S2. Use the training samples to train the generator and the discriminator, and use the generator to generate a synthetic data set that conforms to the distribution of the photovoltaic power plant data set; during the training process, optimize the parameters of the generator and the discriminator based on the loss function of the discriminator, and evaluate the difference between the synthetic data set and the photovoltaic power plant data set through a numerical evaluation method; S3. Cluster the features of the synthetic dataset and the PV power plant dataset using the K-means clustering algorithm, observe the cluster centers and feature distribution, and evaluate the feature distribution differences between the generated dataset and the real PV power plant dataset using an unsupervised clustering method to evaluate the quality of the generated dataset. The features of the synthetic dataset and the PV power plant dataset are clustered using the K-means clustering algorithm, the cluster centers and feature distributions are observed, and the feature distribution differences between the generated dataset and the real PV power plant dataset are evaluated using an unsupervised clustering method. The quality evaluation of the generated dataset includes the following steps: S31, using a scale-invariant feature transformation operator to extract image features of the synthetic data set and the real photovoltaic power station data set to obtain a feature vector set; S32, clustering the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculating the cluster center of each cluster, and obtaining the representative feature vector of each class; S33, analyze the size and distribution of clusters and evaluate the quality of the generated data set. If the comprehensive evaluation score of the generator is higher than the preset threshold, it indicates that the synthetic data has diversity; if the comprehensive evaluation score of the generator is lower than the preset threshold, it indicates that the generator has mode collapse; S34, plotting the relationship between the number of clusters and the classification error, determining the number of clusters by the elbow point method, and comparing the classification error trends of the synthetic data set and the real data set as the number of clusters changes; S35. Based on the cluster analysis results, evaluate the difference in feature distribution between the generated data set and the real PV power station data set.

[0008] Optionally, initializing the generator and the discriminator, preprocessing the photovoltaic power station data set including environmental features and corresponding power generation labels, and randomly extracting training samples include the following steps: S11. Introduce a generative adversarial network model consisting of a generator and a discriminator, and use the ReLU activation function in the hidden layer of the generator, the tanh activation function in the output layer, and the sigmoid activation function in the fully connected layer of the discriminator; S12, preprocessing a photovoltaic power station data set including environmental features and corresponding power generation labels, and randomly extracting training samples from the photovoltaic power station data set; S13. According to the environmental characteristics and the corresponding power generation labels, the convolutional layers are used in the generator and the discriminator to extract features, and the parameters of the generative adversarial network model are optimized through the back propagation algorithm.

[0009] Optionally, the expression of the generative adversarial network model is: ; In the formula, x Represents real data; Indicates the distribution that the real data set obeys; Indicates discrimination x The probability of being the true data; Z represents the randomly selected training samples from the PV power station dataset; Indicates the probability distribution that the training sample Z obeys; represents synthetic data; Indicates that the discriminator judges the synthetic data in the generator The probability of being the true data; Represents the input real image x The expected value that the discriminator can distinguish; Represents synthetic data input to the generator The probability that the discriminator can distinguish; Represents the sum of the expected values ​​of the discriminator D and the generator G.

[0010] Optionally, according to the environmental features and the corresponding power generation labels, extracting features using convolutional layers in the generator and the discriminator, and optimizing the parameters of the generative adversarial network model by a back propagation algorithm include the following steps: S131, using a convolutional transpose layer in the generator to generate a feature map, and using a convolutional layer in the discriminator to extract environmental features and corresponding power generation labels of a photovoltaic power station data set; S132, configuring the convolutional layers of the generator and the discriminator according to the filter size, stride, and padding; S133, inputting the environmental features and the corresponding power generation labels into the generator to generate synthetic data, and inputting the synthetic data into the discriminator for classification; S134. Use the cross entropy loss function to calculate the losses of the generator and the discriminator, and adjust the parameters of the generator and the discriminator through back propagation and Adam optimizer.

[0011] Optionally, the generator and the discriminator are trained using the training samples, and a synthetic data set that conforms to the distribution of the photovoltaic power plant data set is generated by the generator; during the training process, the parameters of the generator and the discriminator are optimized based on the loss function of the discriminator, and the difference between the synthetic data set and the photovoltaic power plant data set is evaluated by a numerical evaluation method, including the following steps: S21. Use the photovoltaic power station dataset to train the generator and the discriminator. The generator generates synthetic data similar to the photovoltaic power station dataset by learning the distribution of real data. S22. During the training process, based on the loss functions of the generator and the discriminator, the parameters of the generator and the discriminator are optimized by back propagation and Adam optimizer respectively; S23. Evaluate the quality of the synthetic data generated by the generator through the Inception Score to obtain the Inception Score value; S24. Use KL divergence to calculate the difference between the conditional distribution of synthetic data and the marginal distribution of real data to obtain the KL divergence value; KL divergence (Kullback-Leibler Divergence) is used to measure the difference between two probability distributions, and is usually used to evaluate the distribution difference between synthetic data and real data; S25. Based on the KL divergence value, combined with the initial score value and the standard deviation value, the quality of the synthetic data is comprehensively evaluated.

[0012] Optionally, the expression for evaluating the quality of synthetic data generated by the generator through the initial score is: ; In the formula, represents a metric that quantifies the quality and diversity of generated images; Indicates the sample expectations; represents KL divergence; represents the conditional distribution; represents the marginal distribution.

[0013] Optionally, based on the KL divergence value, combined with the initial score value and the standard deviation value, comprehensively evaluating the quality of the synthetic data includes the following steps: S251, respectively set the weights of the KL divergence value, the initial score value and the standard deviation value; S252, using the weighted average method to fuse the KL divergence value, the initial score value and the standard deviation value, and calculate the comprehensive evaluation score; S253. Based on the calculation results, optimize the weight distribution of the KL divergence value, the initial score value, and the standard deviation value, and obtain the best comprehensive evaluation score; S254. Use the best comprehensive evaluation score to evaluate the performance of the generator and obtain the performance of the generator in terms of the quality of synthetic data.

[0014] Optionally, the expression for calculating the comprehensive evaluation score is: ; In the formula, represents the comprehensive evaluation score of synthetic data; Represents the KL divergence value between the conditional distribution of synthetic data and the marginal distribution of real data; Represents the weight of the KL divergence value; represents the initial score value; The weight representing the initial score value; represents the standard deviation value; Represents the weight of the standard deviation value.

[0015] Optionally, clustering the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculating the cluster center of each cluster, and obtaining the representative feature vector of each class includes the following steps: S321, calculating the density value of each feature vector in the synthetic data set and the real data set, and sorting them from high to low based on the density value; S322, selecting two eigenvectors with the largest density values, and dividing the feature space into grids according to the distance between the two eigenvectors; S323, repeating the step of S322 until the distance of the farthest feature vector in the grid is less than a set threshold or the number of feature vectors in the grid reaches a predetermined minimum value; S324, in each grid, determining an initial cluster center according to the density and distance of the feature vector; S325, using the cluster center as the starting point of the K-means algorithm, clustering the feature vectors in the grid, and iteratively adjusting the cluster center until the cluster center reaches a preset standard to obtain a cluster cluster in each grid; S326. Calculate the final cluster center of the clusters in each grid to obtain the representative feature vector of each category.

[0016] Optionally, in each grid, determining the initial cluster center according to the density and distance of the feature vectors comprises the following steps: S3241. In each grid, according to the calculated density values, feature vectors are selected in descending order as candidate objects; S3242, selecting two groups of feature vectors with the highest density as candidate cluster centers in turn; S3243, calculating the distance between the two groups of feature vectors with the highest density, and comparing it with a preset distance threshold and radius; S3244, if the distance is greater than a preset distance threshold, two groups of feature vectors with the highest density are selected in turn as initial cluster centers; if the distance is greater than a preset radius and less than a preset distance threshold, the feature vector with the highest density is retained as a single initial cluster center; if the distance is less than the radius, the line segment formed by the two groups of feature vectors with the highest density as endpoints is used as an extended cluster center; S3245. Continue to select the next candidate feature vector from the remaining high-density feature vectors, and repeat steps S3242-S3244 until all feature vectors in each grid have been evaluated, and finally all initial cluster centers in the grid are determined.

[0017] Compared with the prior art, this application has the following beneficial effects: 1. The generator of the present invention adopts the ReLU activation function, while the discriminator adopts the LeakyReLU and Sigmoid functions, which solves the gradient vanishing problem and ensures the stability of the network during training. The convolutional layer is used to extract the environmental characteristics and power generation labels in the photovoltaic power station data set. In particular, the convolutional neural network used in DCGAN replaces the fully connected layer, so that the generated synthetic data can better capture the complex data features and improve the quality and detail restoration capabilities. The losses of the generator and the discriminator are calculated through the cross entropy loss function, and the model parameters are adjusted through the back propagation and Adam optimizer process, which further improves the generation quality and discrimination ability of the model, and can effectively generate samples with similar distribution to the real data.

[0018] 2. The adversarial training between the generator and the discriminator of the present invention enables the generator to gradually learn the distribution pattern of real photovoltaic power station data, and generates synthetic data with similar characteristics to the real data by continuously optimizing the parameters of the generator and the discriminator.

[0019] 3. The SIFT algorithm of the present invention extracts stable key points of the image features of the synthetic data and the real data, and generates a set of feature vectors with characteristics such as rotation and scale invariance. The K-means clustering algorithm divides the feature vectors of the synthetic data and the real data set into multiple clusters, and obtains the representative feature vector of each cluster. Through the steps of density value sorting and initial center selection, the fine division of clusters is achieved, so that the clustering results can reflect the diversity and distribution characteristics of the data set. Combined with the calculation of density values ​​and the grid division method, the initial center selection bias in the clustering process is effectively avoided, so that the clusters can be evenly distributed in the feature space. By analyzing the number, size and distribution of clusters, the quality of the synthetic data set is comprehensively evaluated. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above characteristics, features and advantages of the present invention and their implementation methods and methods will become more clearly understood in conjunction with the following description of the embodiments, which are described in detail in conjunction with the accompanying drawings. Herein, a schematic diagram is shown: Figure 1 is a flow chart of a method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to an embodiment of the present invention; Figure 2 (a) is a loss value curve diagram after training using experimental method 1 according to an embodiment of the present invention; Figure 2 (b) is a loss value curve diagram after training using experimental method 2 according to an embodiment of the present invention; Figure 2 (c) is a loss value curve diagram after training using experimental method three according to an embodiment of the present invention; Figure 2 (d) is a loss value curve diagram after training using experimental method 4 according to an embodiment of the present invention; Figure 3 (a) is a curve showing the value change of the generator loss function according to an embodiment of the present invention; Figure 3 (b) is a curve showing the value change of the discriminator loss function according to an embodiment of the present invention; Figure 4 (a) is a total category error curve of the original image and the generated image before normalization according to an embodiment of the present invention; Figure 4 (b) is a total category error curve of the normalized original image and the generated image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] According to an embodiment of the present invention, a supervised data generation method for a photovoltaic power station based on a generative adversarial network is provided.

[0023] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1-Figure 4 As shown, according to an embodiment of the present invention, a method for generating supervised data for a photovoltaic power station based on a generative adversarial network includes the following steps: S1. Initialize the generator and discriminator, preprocess the PV power station dataset containing environmental features and corresponding power generation labels, and randomly extract training samples.

[0024] Preferably, initializing the generator and the discriminator, preprocessing the photovoltaic power station data set containing environmental features and corresponding power generation labels, and randomly extracting training samples include the following steps: S11. Introduce a generative adversarial network model consisting of a generator and a discriminator, and use the ReLU activation function in the hidden layer of the generator, the tanh activation function in the output layer, and the sigmoid activation function in the fully connected layer of the discriminator; S12, preprocessing a photovoltaic power station data set including environmental features and corresponding power generation labels, and randomly extracting training samples from the photovoltaic power station data set; It should be explained that a PV power plant dataset containing environmental features and power generation labels is loaded. Environmental features include temperature, humidity, irradiance, wind speed, etc., while the labels are the corresponding power generation data. Environmental features (such as temperature, humidity, etc.) and corresponding power generation labels are separated into two different datasets, which are used as input features and target outputs respectively; missing values ​​or outliers are handled. If there are missing environmental features or power generation records in the dataset, they can be processed by interpolation, deletion of incomplete records, or mean filling. Normalize or standardize numerical features. Since the environmental features of PV power plants (such as temperature, irradiance, etc.) may have different dimensions, they need to be normalized, such as scaling the data to between 0 and 1 or standardizing it to a distribution with a mean of 0 and a standard deviation of 1. Randomly extract samples from the preprocessed dataset for training. According to the size of the data set, you can set a certain proportion of random sampling (such as 80% for training and 20% for testing) to ensure that the samples are representative. The randomly selected training samples can be divided into training sets and validation sets (for example, 80% of the training data is used for model training and 20% of the data is used to verify the model effect) so that the model performance can be evaluated during the training process and overfitting can be prevented.

[0025] S13. According to the environmental characteristics and the corresponding power generation labels, the convolutional layers are used in the generator and the discriminator to extract features, and the parameters of the generative adversarial network model are optimized through the back propagation algorithm.

[0026] Preferably, the expression of the generative adversarial network model is: ; In the formula, x Represents real data; Indicates the distribution that the real data set obeys; Indicates discrimination x The probability of being the true data; Z represents the randomly selected training samples from the PV power station dataset; Indicates the probability distribution that the training sample Z obeys; represents synthetic data; Indicates that the discriminator judges the synthetic data in the generator The probability of being the true data; Represents the input real image x The expected value that the discriminator can distinguish; Represents synthetic data input to the generator The probability that the discriminator can distinguish; Representation DiscriminatorD With the generator G The sum of the expected values ​​of .

[0027] Preferably, according to the environmental characteristics and the corresponding power generation labels, extracting features using convolutional layers in the generator and the discriminator, and optimizing the parameters of the generative adversarial network model by the back propagation algorithm include the following steps: S131, using a convolutional transpose layer in the generator to generate a feature map, and using a convolutional layer in the discriminator to extract environmental features and corresponding power generation labels of a photovoltaic power station data set; S132, configuring the convolutional layers of the generator and the discriminator according to the filter size, stride, and padding; S133, inputting the environmental features and the corresponding power generation labels into the generator to generate synthetic data, and inputting the synthetic data into the discriminator for classification; S134. Use the cross entropy loss function to calculate the losses of the generator and the discriminator, and adjust the parameters of the generator and the discriminator through back propagation and Adam optimizer.

[0028] It needs to be explained that the initialization generator G and the discriminator D The network parameters, the input matrix size is 64×64×3, and the output matrix size of the generator is changed to 400×400×3. 12,000 fireworks image data including smoke and flames were obtained from on-site bridge photography and web crawling as training sets. A single sample was randomly selected, and the generator generated a single sample using the defined noise distribution. Fixed generator G , train the discriminator D , so that it can distinguish the real image data from the virtual image data as much as possible. Cyclic update of fixed times discriminator D After that, update the generator once G , making it as difficult as possible for the discriminator to distinguish between real image data and virtual image data.

[0029] The ReLU function solves the problem of gradient disappearance. Its gradient has only two options: 0 and 1. When the input is less than 0, the gradient is always 0, and the neuron chain stops forward transmission; when the input is greater than 0, the gradient is always 1, and the value of the neuron chain remains unchanged and continues to forward transmission. Considering that both the input and output are positive numbers, the ReLU function, as an activation function, can simplify the calculation process and improve calculation efficiency while ensuring the training effect.

[0030] A variant of GAN is selected, namely Deep Convolutional Generative Adversarial Networks (DCGAN). This network uses convolutional neural networks instead of multi-layer perceptrons in the generator and discriminator, and replaces the fully connected layer with a convolutional layer. It uses strided convolution instead of upsampling to better extract image features.

[0031] When the generator loss is less than 0.00001, the learning rate is readjusted to 0.002 to avoid the situation where the model cannot jump out of the layout minimum during training. At this time, the generator loss function tends to stabilize after oscillation, and the discriminator loss function first rises and then drops rapidly and tends to stabilize.

[0032] In the generator, except for the last layer, the activation function uses the ReLU function, and the last layer uses the Tanh function. The reason is that the last layer needs to output an image. The output of the ReLU function is 0 when it is less than 0, while the output of the Tanh function is between -1 and 1. The output of the Tanh function changes linearly, and the Tanh output value After the formula: , pixel values ​​of 0 to 255 can be obtained; in the discriminator, LeakyReLU is used as the activation function to prevent gradient sparseness. The LeakyReLU function is similar to the ReLU function, but when the input is a negative number, the LeakyReLU function is no longer 0, but a smaller number, usually 0.01, which effectively solves the problem of neuron death.

[0033] Inception Score is a commonly used indicator for evaluating the quality of data generated by the generator. It evaluates the diversity and quality of synthetic data by using a pre-trained Inception model (usually used in image generation tasks), including the following descriptions: 1. Calculate the classification probability of each synthetic data: Input the generated data into the pre-trained Inception model and calculate the probability distribution of each sample belonging to a certain category.

[0034] 2. Calculate the entropy value: Use the category distribution of the generated data to calculate its information entropy. A higher entropy value indicates better diversity of the generated data.

[0035] 3. Inception Score: The category distribution and predicted entropy generated by the Inception model are used to obtain an Inception score. The higher the score, the better the diversity and authenticity of the generated data.

[0036] S2. Use the training samples to train the generator and the discriminator, and use the generator to generate a synthetic data set that conforms to the distribution of the photovoltaic power plant data set. During the training process, the parameters of the generator and the discriminator are optimized based on the loss function of the discriminator, and the difference between the synthetic data set and the photovoltaic power plant data set is evaluated by a numerical evaluation method.

[0037] Preferably, the generator and the discriminator are trained using training samples, and a synthetic data set that conforms to the distribution of the photovoltaic power plant data set is generated by the generator; during the training process, the parameters of the generator and the discriminator are optimized based on the loss function of the discriminator, and the difference between the synthetic data set and the photovoltaic power plant data set is evaluated by a numerical evaluation method, which includes the following steps: S21. Use the photovoltaic power station dataset to train the generator and the discriminator. The generator generates synthetic data similar to the photovoltaic power station dataset by learning the distribution of real data. The generator and discriminator are trained using the photovoltaic power station dataset. The generator generates synthetic data similar to the photovoltaic power station dataset by learning the distribution of real data. The specific description is as follows: Input the real data set of the photovoltaic power station, including environmental characteristics and corresponding power generation. The generator generates synthetic data similar to the real data based on random noise, while the discriminator determines the authenticity of the data by learning to distinguish the difference between the real data and the generated data. The parameters of the generator and the discriminator are optimized through the loss function calculation. The generator continuously improves the quality of the data it generates by trying to "cheat" the discriminator, and finally generates synthetic data similar to the real photovoltaic power station data.

[0038] S22. During the training process, based on the loss functions of the generator and the discriminator, the parameters of the generator and the discriminator are optimized by back propagation and Adam optimizer respectively; S23. Evaluate the quality of the synthetic data generated by the generator through the initial score (IS, Inception Score) to obtain the initial score value; S24, using KL divergence to calculate the difference between the conditional distribution of the synthetic data and the marginal distribution of the real data, to obtain a KL divergence value; The KL divergence is used to calculate the difference between the conditional distribution of the synthetic data and the marginal distribution of the real data. The specific description of the KL divergence value is as follows: the conditional distribution of the generated synthetic data is calculated to represent the probability distribution of power generation under different conditions (such as different combinations of environmental characteristics); then, the corresponding marginal distribution is calculated from the real data set to represent the actual probability distribution of power generation under these conditions. Next, the KL divergence is calculated for the conditional distribution of the synthetic data and the marginal distribution of the real data to quantify the difference between the two. The smaller the KL divergence value, the closer the distribution of the synthetic data is to the distribution of the real data.

[0039] S25. Based on the KL divergence value, combined with the initial score value and the standard deviation value, the quality of the synthetic data is comprehensively evaluated.

[0040] It should be explained that the generator and discriminator of the Generative Adversarial Network (GAN) are trained using a photovoltaic power plant dataset. The goal of the generator is to generate synthetic data with similar characteristics to the real data by learning the distribution pattern of the real photovoltaic data, while the discriminator needs to determine whether the generated data is real data. During the training process, the parameters of the generator and the discriminator are optimized through the loss function. The loss of the generator measures the similarity between the generated data and the real data, and the loss of the discriminator measures whether it can correctly identify true and false data. The parameters are updated through the Adam optimizer, and the back propagation allows the model to be continuously improved. Inception Score (IS) is a common indicator for evaluating the quality of data generated by the generator. It evaluates the diversity and quality of the generated images by using the pre-trained Inception model (usually used in image generation tasks). KL divergence (Kullback-Leibler Divergence) is used to measure the difference between two probability distributions, and is usually used to evaluate the distribution difference between synthetic data and real data. The smaller the KL divergence, the closer the distribution of the generated data is to the distribution of the real data. The quality of the generated data will be comprehensively evaluated through multiple indicators, mainly including the KL divergence value, Inception Score (IS) and standard deviation. Through these indicators, the authenticity and diversity of the generated data can be comprehensively evaluated.

[0041] During the training process, in order to distinguish real images from virtual images generated by the generator, Should The maximum value, that is, for For the real distribution, To be close to 1, for From the generated distribution, To be close to 0; Should Take the smallest value and try to generate real images to deceive the discriminator. From the generated distribution, Close to 1. When the discriminator's recognition accuracy for any test image is 0.5, the discriminator cannot distinguish between real images and virtual images generated by the generator.

[0042] The learning rate is an important hyperparameter in deep learning. It represents the step size of the model in the opposite direction of the gradient during parameter optimization, that is, it is used to control the magnitude of the model's weight adjustment during the optimization process. A high learning rate means a large amplitude of weight updates, and it takes less time to find a new set of weights to minimize the loss value of network training. However, a high learning rate may cause the amplitude of weight updates to be too large, so that the weight update cannot reach the optimal point. A low learning rate ensures that no local minima are missed, but it also means that it will take longer to converge. Therefore, the following two experimental methods are compared to select a suitable learning rate during model training.

[0043] In addition, in order to find a training model that is more suitable for data set expansion, the following four training methods are designed. The initial learning rate of the four experiments is 0.002. The experimental methods are: Experimental method 1: The learning rate is exponentially slowed down, and the slowdown exponent is 0.95; Experimental method 2: The learning rate exponentially slowed down with a slowing exponent of 0.95, and the original fixed discrimination target (0 or 1) of the discriminator was replaced with a random number in the range of [0, 0.3] or [0.7, 1]; Experimental method 3: The learning rate is exponentially slowed down with a slowdown exponent of 0.95. The images generated by the generator three times are imported into the discriminator to calculate the common loss function. ,in is the mean square error, It is The predicted value indicates that the model The prediction results of input samples are No. True value, indicating the corresponding The actual result of samples; Experimental method 4: Use a periodic learning rate, slow down the learning rate exponentially, and the slowdown exponent is 0.95. When the generator loss is less than 0.00001, readjust the learning rate to 0.002; The loss values ​​during the four experiments are as follows Figure 2 As shown in the figure, in the four experiments, as the number of generations increases, the generator loss value of the deep convolutional adversarial neural network tends to stabilize, and the generator loss value gradually decreases. The data analysis for each experiment is as follows: For experimental method 1, the loss value curve after training is completed, such as Figure 2As shown in (a), at the 52nd generation, the generator loss value dropped to 0.1542 and then stopped decreasing, then slowly increased, but the discriminator loss value was 1.6534, still maintaining a downward trend and tending to converge. The reason why the generator loss value no longer decreases is that the discriminator effect is too accurate, and the generator cannot deceive the discriminator. In the end, the generator and discriminator loss values ​​converged to 3.3023 and 0.06 respectively; For the loss value curve after the training of experimental method 2, Figure 2 As shown in (b), since the original fixed discrimination target 0 or 1 is changed to a random number in the range of [0, 0.3] or [0.7, 1], the loss values ​​of the discriminator and generator are smaller than those of other experiments. In this experiment, the loss values ​​of the discriminator and generator stabilized after 820 generations, and the discriminator loss value was always around 0.031. The convergence speed slowed down. Although the possibility of missing the minimum value was reduced to a certain extent after the target was changed to a random number in the range of [0, 0.3] or [0.7, 1], it also increased the uncertainty of gradient descent. For the loss value curve after the training of experimental method three, Figure 2 As shown in (c), the generator loss value is larger than other experiments because the images generated by the generator three times are imported into the discriminator to calculate the common loss. In this experiment, the loss values ​​of the discriminator and the generator tend to stabilize after 200 generations and finally converge to 1.8624, which is faster than other experiments. For experimental method 4, the loss value curve after training is completed is as follows: Figure 2 As shown in (d), when the generator loss is less than 0.00001, the learning rate is readjusted to 0.002, which avoids the situation where the model cannot jump out of the layout minimum during training. In 2000 generations, the learning rate is readjusted 3 times. The loss value tends to be stable within 70 generations after the adjustment, which is in line with the expected effect. 12,000 fireworks images, including smoke and flames, were obtained by photographing bridges on site and crawling the web. After training, a generator was obtained and used to generate images. The loss function value change curves of the generator and discriminator during training are shown in the figure below: Figure 3 shown.

[0044] from Figure 3 As can be seen from (a), the generator loss function tends to stabilize after oscillation, given by Figure 3 As can be seen in (b), the discriminator loss function first rises and then drops rapidly and tends to be stable.

[0045] Table 1 Average gradient table of average synthetic data As shown in Table 1, the effect of Experiment 2 is not ideal, and the other results are similar. Experiment 4 has the best effect, which is 2.20% higher than Experiment 1, 16.06% higher than Experiment 2, and 0.40% higher than Experiment 3. In terms of the effect of graph synthesis data generation, the data generated by Experiment 4 is the clearest.

[0046] Table 2 GAN quantitative analysis evaluation value table As shown in Table 2, when the number of input synthetic data is between 100 and 400, as the number of input images increases, the IS value continues to increase, and the STD value fluctuates slightly, that is, the diversity of images increases with the number of images, and the quality of images remains basically unchanged; when the number of input images is between 500 and 1000, as the number of input images increases, the IS value fluctuates slightly, and the STD value shows a downward trend, that is, the diversity of images remains at a stable level, and the image quality increases with the number of images. Considering the diversity and quality of the generated images, the optimal number of samples for augmenting the data set is about 800-1000.

[0047] Preferably, the expression for evaluating the quality of the synthetic data generated by the generator through the initial score is: ; ; ; In the formula, Represents the samples in the generative adversarial network generation model , its conditional probability distribution The expected value of the entropy; Represents the samples in the generative model The conditional probability distribution of The expected value of the entropy; i Represents the index or identity of different elements in the sample space; Represents the entire generated sample set The marginal probability distribution of Entropy of Represents the samples in the generative model The probability distribution of express The marginal probability distribution of Unrelated Probability of occurrence; represents a metric that quantifies the quality and diversity of generated images; Express expectations; represents KL divergence; represents the conditional distribution; represents the marginal distribution.

[0048] Preferably, based on the KL divergence value, combined with the initial score value and the standard deviation value, comprehensively evaluating the quality of the synthetic data includes the following steps: S251, respectively set the weights of the KL divergence value, the initial score value and the standard deviation value; S252, using the weighted average method to fuse the KL divergence value, the initial score value and the standard deviation value, and calculate the comprehensive evaluation score; S253. Based on the calculation results, optimize the weight distribution of the KL divergence value, the initial score value, and the standard deviation value, and obtain the best comprehensive evaluation score; S254. Use the best comprehensive evaluation score to evaluate the performance of the generator and obtain the performance of the generator in terms of the quality of synthetic data.

[0049] Preferably, the expression for calculating the comprehensive evaluation score is: ; In the formula, represents the comprehensive evaluation score of synthetic data; Represents the KL divergence value between the conditional distribution of synthetic data and the marginal distribution of real data; Represents the weight of the KL divergence value; represents the initial score value; The weight representing the initial score value; represents the standard deviation value; Represents the weight of the standard deviation value.

[0050] S3. Cluster the features of the synthetic dataset and the PV power plant dataset using the K-means clustering algorithm, observe the cluster centers and feature distributions, and evaluate the feature distribution differences between the generated dataset and the real PV power plant dataset using an unsupervised clustering method to evaluate the quality of the generated dataset.

[0051] The features of the synthetic dataset and the PV power plant dataset are clustered using the K-means clustering algorithm, the cluster centers and feature distributions are observed, and the feature distribution differences between the generated dataset and the real PV power plant dataset are evaluated using an unsupervised clustering method. The quality evaluation of the generated dataset includes the following steps: S31. Use a scale-invariant feature transformation operator to extract image features of the synthetic data set and the real photovoltaic power station data set to obtain a set of feature vectors.

[0052] It should be noted that the image features of the synthetic dataset and the real PV power plant dataset are extracted using the scale-invariant feature transformation operator, and the specific description of the feature vector set is as follows: the synthetic dataset and the real PV power plant dataset are converted into image format, and the image is preprocessed to enhance the feature details. Then, the SIFT operator is applied to extract features from each image. The SIFT algorithm identifies key points and calculates the local image descriptors of these key points. Finally, a feature vector set of each image is obtained to analyze the similarity between the synthetic data and the real data.

[0053] S32. Cluster the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculate the cluster center of each cluster, and obtain the representative feature vector of each class.

[0054] Preferably, clustering the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculating the cluster center of each cluster, and obtaining the representative feature vector of each class includes the following steps: S321, calculating the density value of each feature vector in the synthetic data set and the real data set, and sorting them from high to low based on the density value; S322, selecting two eigenvectors with the largest density values, and dividing the feature space into grids according to the distance between the two eigenvectors; S323, repeating the step of S322 until the distance of the farthest feature vector in the grid is less than a set threshold or the number of feature vectors in the grid reaches a predetermined minimum value; S324, in each grid, determining an initial cluster center according to the density and distance of the feature vector; S325, using the cluster center as the starting point of the K-means algorithm, clustering the feature vectors in the grid, and iteratively adjusting the cluster center until the cluster center reaches a preset standard to obtain a cluster cluster in each grid; S326. Calculate the final cluster center of the clusters in each grid to obtain the representative feature vector of each category.

[0055] It should be explained that the density value of each eigenvector in the synthetic data set and the real data set is calculated. The density value indicates the density of the points of a certain eigenvector in its neighborhood. Then, all eigenvectors are sorted from high to low according to the density value, and the two eigenvectors with the largest density value are selected, and the distance between them is calculated. The feature space is preliminarily gridded based on the distance between the two eigenvectors to ensure that the grid after division contains eigenvectors that are as uniform as possible. The grid division step of S322 is repeated, and the two eigenvectors with the largest density are continuously selected in each divided grid for refinement until the distance of the farthest eigenvector in the grid is less than the preset threshold, or the number of eigenvectors in the grid reaches the set minimum value. In each grid, the initial cluster center is determined according to the density of the eigenvectors and the distance between them. Usually, points with higher density and more uniform distribution are selected as the initial cluster center to ensure the accuracy of the clustering results. The initially determined cluster center is used as the starting point of the K-means algorithm to start clustering the eigenvectors in the grid. The position of the cluster center is adjusted by repeated iterations until the cluster center is stable and no longer changes significantly, and the clusters in each grid are obtained. After the K-means algorithm converges, the final cluster center of each cluster is calculated to obtain the representative feature vector of each cluster for subsequent analysis and feature extraction.

[0056] Specific examples are as follows: Assume that there is a photovoltaic power plant dataset containing two feature vectors: temperature and irradiance, and a synthetic dataset similar to this has been generated. The goal is to perform feature clustering on these two datasets based on the K-means clustering algorithm and find the representative feature vector of each cluster.

[0057] Assume that in a real data set, some eigenvectors (such as temperature 30°C, irradiance 800W / m²) appear densely in local areas with high density values. The neighborhood density is calculated for each eigenvector, and the density values ​​are sorted from high to low to give priority to high-density areas.

[0058] Select the two eigenvectors with the highest density (e.g., 800W / m² irradiance at 30°C and 850W / m² irradiance at 28°C). If the distance between them is large, use them as the centers of the two grids to divide the entire feature space to distinguish different density areas.

[0059] In the divided grids, continue to select high-density feature vectors and divide the grids one by one. If the distance between the farthest feature vectors in a grid is less than the threshold (such as the set 10 unit distance), stop dividing.

[0060] In a certain grid, select the eigenvector with the highest density value (such as temperature 32°C irradiance 780W / m²) as the initial cluster center. If the distance between adjacent eigenvectors is within the set radius, select one as the extended initial cluster center.

[0061] Starting from the determined initial cluster center, the K-means algorithm is applied for iterative clustering. In each iteration, the feature vector (such as temperature 28°C, irradiance 850W / m²) is assigned to the nearest cluster center, and the new center position is calculated until the center is stable.

[0062] After clustering converges, the final cluster center of each cluster is calculated. Assuming that the center of a cluster is 29°C with an irradiance of 820W / m², this center represents the typical environmental characteristics of the cluster and provides a reference for subsequent data analysis.

[0063] Preferably, in each grid, determining the initial cluster center according to the density and distance of the feature vectors comprises the following steps: S3241. In each grid, according to the calculated density values, feature vectors are selected in descending order as candidate objects; S3242, selecting two groups of feature vectors with the highest density as candidate cluster centers in turn; S3243, calculating the distance between the two groups of feature vectors with the highest density, and comparing it with a preset distance threshold and radius; S3244, if the distance is greater than a preset distance threshold, two groups of feature vectors with the highest density are selected in turn as initial cluster centers; if the distance is greater than a preset radius and less than a preset distance threshold, the feature vector with the highest density is retained as a single initial cluster center; if the distance is less than the radius, the line segment formed by the two groups of feature vectors with the highest density as endpoints is used as an extended cluster center; S3245. Continue to select the next candidate feature vector from the remaining high-density feature vectors, and repeat steps S3242-S3244 until all feature vectors in each grid have been evaluated, and finally all initial cluster centers in the grid are determined.

[0064] S33. Analyze the size and distribution of clusters and evaluate the quality of the generated data set. If the comprehensive evaluation score of the generator is higher than the preset threshold, it means that the synthetic data is diverse; if the comprehensive evaluation score of the generator is lower than the preset threshold, it indicates that the generator has mode collapse.

[0065] S34, plotting the relationship between the number of clusters and the classification error, determining the number of clusters by the elbow point method, and comparing the classification error trends of the synthetic data set and the real data set as the number of clusters changes; It should be noted that the specific description of plotting the relationship between the number of clusters and the classification error, determining the number of clusters by the elbow method, and comparing the classification error trends of the synthetic and real datasets with the number of clusters is as follows: Perform multiple clustering analyses on the synthetic and real datasets, each with a different number of clusters (e.g., from 2 to 20), and calculate the classification error for each number of clusters (e.g., using mean square error or SSE). Then, plot the number of clusters and the corresponding classification error into a relationship graph, and observe the trend of the error with the number of clusters. According to the elbow method, find the position where the classification error decreases significantly in the graph, that is, the elbow point, and determine the optimal number of clusters. Finally, compare the classification error trends of the synthetic and real datasets at different numbers of clusters and analyze their differences.

[0066] S35. Based on the cluster analysis results, evaluate the difference in feature distribution between the generated data set and the real PV power station data set.

[0067] It should be added that, based on the cluster analysis results, the specific description of evaluating the difference in feature distribution between the generated data set and the real PV power station data set is as follows: Perform cluster analysis on the generated data set and the real data set respectively to obtain their respective cluster clusters and corresponding feature vector distributions. Then, count the cluster center, number, size and distribution form of each data set, and calculate the similarity index of various features (such as mean, variance, etc.). Finally, by comparing the differences in cluster center position, cluster size and form between the generated data and the real data, quantitatively evaluate the difference in feature distribution between the generated data set and the real data set, thereby judging the distribution quality and authenticity of the generated data.

[0068] like Figure 4 In order to avoid the problem that the numerical differences between features are too large, which may lead to the low contribution of some features to the model, Figure 4 (b) Both the original and generated data are normalized before classification. Figure 4 (a) is the total category error curve of the original image and the generated image before normalization. Figure 4 (b) is the total category error curve of the original image and the generated image after normalization, Figure 4 (a) with Figure 4 (b) It can be seen that as the number of categories increases, the total category error decreases rapidly and begins to stabilize when the number of categories is 5. When the number of categories is greater than the critical value of 5, the total category error tends to be stable with very little change. This critical value is the optimal number of categories.

[0069] In summary, with the help of the above technical solution of the present invention, the generator of the present invention adopts the ReLU activation function, and the discriminator adopts the LeakyReLU and Sigmoid functions, which solves the gradient vanishing problem and ensures the stability of the network during training. The convolutional layer is used to extract the environmental characteristics and power generation labels in the photovoltaic power station data set. In particular, the convolutional neural network used in DCGAN replaces the fully connected layer, so that the generated synthetic data can better capture complex data features and improve the quality and detail restoration capabilities; the losses of the generator and the discriminator are calculated through the cross entropy loss function, and the model parameters are adjusted through the process of back propagation and Adam optimizer, which further improves the generation quality and discrimination ability of the model, and can effectively generate samples with similar distribution to real data; the adversarial training of the generator and the discriminator of the present invention enables the generator to gradually learn the real data. The distribution pattern of real photovoltaic power station data is analyzed, and synthetic data with similar characteristics to real data is generated by continuously optimizing the parameters of the generator and the discriminator; the SIFT algorithm of the present invention extracts stable key points of the image features of the synthetic data and the real data, and generates a set of feature vectors with characteristics such as rotation and scale invariance; the K-means clustering algorithm divides the feature vectors of the synthetic data and the real data set into multiple clusters, and obtains the representative feature vector of each cluster cluster; through the steps of density value sorting and initial center selection, the fine division of clusters is realized, so that the clustering results can reflect the diversity and distribution characteristics of the data set; combined with the calculation of density values ​​and the grid division method, the initial center selection bias in the clustering process is effectively avoided, so that the cluster clusters can be evenly distributed in the feature space; by analyzing the number, size and distribution of cluster clusters, the quality of the synthetic data set is comprehensively evaluated.

[0070] Although the present invention has been disclosed as above with preferred embodiments, the embodiments are merely examples for the convenience of description and are not intended to limit the present invention. Those skilled in the art may make several changes and modifications without departing from the spirit and scope of the present invention. The scope of protection claimed by the present invention shall be based on the claims.

Claims

1. A supervised data generation method for photovoltaic power plants based on generative adversarial networks, characterized in that: The supervised data generation method of the photovoltaic power station includes the following steps: S1, initialize the generator and discriminator, pre-process the photovoltaic power station data set containing environmental features and corresponding power generation labels, and randomly extract training samples; S2. Use the training samples to train the generator and the discriminator, and use the generator to generate a synthetic data set that conforms to the distribution of the photovoltaic power plant data set; during the training process, optimize the parameters of the generator and the discriminator based on the loss function of the discriminator, and evaluate the difference between the synthetic data set and the photovoltaic power plant data set through a numerical evaluation method; S3. Cluster the features of the synthetic dataset and the PV power plant dataset using the K-means clustering algorithm, observe the cluster centers and feature distribution, and evaluate the feature distribution differences between the generated dataset and the real PV power plant dataset using an unsupervised clustering method to evaluate the quality of the generated dataset. The features of the synthetic data set and the photovoltaic power plant data set are clustered by the K-means clustering algorithm, the cluster centers and feature distributions are observed, and the feature distribution differences between the generated data set and the real photovoltaic power plant data set are evaluated by the unsupervised clustering method. The quality evaluation of the generated data set includes the following steps: S31, using a scale-invariant feature transformation operator to extract image features of the synthetic data set and the real photovoltaic power station data set to obtain a feature vector set; S32, clustering the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculating the cluster center of each cluster, and obtaining the representative feature vector of each class; S33, analyze the size and distribution of clusters and evaluate the quality of the generated data set. If the comprehensive evaluation score of the generator is higher than the preset threshold, it indicates that the synthetic data has diversity; if the comprehensive evaluation score of the generator is lower than the preset threshold, it indicates that the generator has mode collapse; S34, plotting the relationship between the number of clusters and the classification error, determining the number of clusters by the elbow point method, and comparing the classification error trends of the synthetic data set and the real data set as the number of clusters changes; S35. Based on the cluster analysis results, evaluate the difference in feature distribution between the generated data set and the real PV power station data set.

2. According to claim 1, a method for generating supervised data for a photovoltaic power station based on a generative adversarial network is characterized in that: The initialization of the generator and the discriminator, preprocessing of the photovoltaic power station data set including environmental features and corresponding power generation labels, and random extraction of training samples include the following steps: S11. Introduce a generative adversarial network model consisting of a generator and a discriminator, and use the ReLU activation function in the hidden layer of the generator, the tanh activation function in the output layer, and the sigmoid activation function in the fully connected layer of the discriminator; S12, preprocessing a photovoltaic power station data set including environmental features and corresponding power generation labels, and randomly extracting training samples from the photovoltaic power station data set; S13. According to the environmental characteristics and the corresponding power generation labels, the convolutional layers are used in the generator and the discriminator to extract features, and the parameters of the generative adversarial network model are optimized through the back propagation algorithm.

3. According to claim 2, a method for generating supervised data for a photovoltaic power station based on a generative adversarial network is characterized in that: The expression of the generative adversarial network model is: ; In the formula, x Represents real data; Indicates the distribution that the real data set obeys; Indicates discrimination x The probability of being the true data; Z represents the randomly selected training samples from the PV power station dataset; Indicates the probability distribution that the training sample Z obeys; represents synthetic data; Indicates that the discriminator judges the synthetic data in the generator The probability of being the true data; Represents the input real image x The expected value that the discriminator can distinguish; Represents synthetic data input to the generator The probability that the discriminator can distinguish; Represents the sum of the expected values ​​of the discriminator D and the generator G.

4. According to claim 3, a method for generating supervised data for a photovoltaic power station based on a generative adversarial network is characterized in that: The method of extracting features using convolutional layers in the generator and the discriminator according to the environmental features and the corresponding power generation labels, and optimizing the parameters of the generative adversarial network model by the back propagation algorithm includes the following steps: S131, using a convolutional transpose layer in the generator to generate a feature map, and using a convolutional layer in the discriminator to extract environmental features and corresponding power generation labels of a photovoltaic power station data set; S132, configuring the convolutional layers of the generator and the discriminator according to the filter size, stride, and padding; S133, inputting the environmental features and the corresponding power generation labels into the generator to generate synthetic data, and inputting the synthetic data into the discriminator for classification; S134. Use the cross entropy loss function to calculate the losses of the generator and the discriminator, and adjust the parameters of the generator and the discriminator through back propagation and Adam optimizer.

5. According to claim 1, a method for generating supervised data for a photovoltaic power station based on a generative adversarial network is characterized in that: The method of using the training samples to train the generator and the discriminator, generating a synthetic data set that conforms to the distribution of the photovoltaic power plant data set by the generator; during the training process, optimizing the parameters of the generator and the discriminator based on the loss function of the discriminator, and evaluating the difference between the synthetic data set and the photovoltaic power plant data set by a numerical evaluation method includes the following steps: S21. Use the photovoltaic power station dataset to train the generator and the discriminator. The generator generates synthetic data similar to the photovoltaic power station dataset by learning the distribution of real data. S22. During the training process, based on the loss functions of the generator and the discriminator, the parameters of the generator and the discriminator are optimized by back propagation and Adam optimizer respectively; S23, evaluating the quality of the synthetic data generated by the generator through the initial score to obtain an initial score value; S24, using KL divergence to calculate the difference between the conditional distribution of the synthetic data and the marginal distribution of the real data, to obtain a KL divergence value; S25. Based on the KL divergence value, combined with the initial score value and the standard deviation value, the quality of the synthetic data is comprehensively evaluated.

6. The method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to claim 5, characterized in that: The expression for evaluating the quality of the synthetic data generated by the generator through the initial score is: ; In the formula, represents a metric that quantifies the quality and diversity of generated images; Indicates the sample expectations; represents KL divergence; represents the conditional distribution; represents the marginal distribution.

7. A method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to claim 6, characterized in that: The method of comprehensively evaluating the quality of synthetic data based on the KL divergence value, combined with the initial score value and the standard deviation value, includes the following steps: S251, respectively set the weights of the KL divergence value, the initial score value and the standard deviation value; S252, using the weighted average method to fuse the KL divergence value, the initial score value and the standard deviation value, and calculate the comprehensive evaluation score; S253. Based on the calculation results, optimize the weight distribution of the KL divergence value, the initial score value, and the standard deviation value, and obtain the best comprehensive evaluation score; S254. Use the best comprehensive evaluation score to evaluate the performance of the generator and obtain the performance of the generator in terms of the quality of synthetic data.

8. The method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to claim 7, characterized in that: The expression for calculating the comprehensive evaluation score is: ; In the formula, represents the comprehensive evaluation score of synthetic data; Represents the KL divergence value between the conditional distribution of synthetic data and the marginal distribution of real data; Represents the weight of the KL divergence value; represents the initial score value; The weight representing the initial score value; represents the standard deviation value; Represents the weight of the standard deviation value.

9. The method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to claim 1, characterized in that: The method of clustering the feature vectors of the synthetic data set and the real data set based on the K-means clustering algorithm, calculating the cluster center of each cluster, and obtaining the representative feature vector of each class includes the following steps: S321, calculating the density value of each feature vector in the synthetic data set and the real data set, and sorting them from high to low based on the density value; S322, selecting two eigenvectors with the largest density values, and dividing the feature space into grids according to the distance between the two eigenvectors; S323, repeating the step of S322 until the distance of the farthest feature vector in the grid is less than a set threshold or the number of feature vectors in the grid reaches a predetermined minimum value; S324, in each grid, determining an initial cluster center according to the density and distance of the feature vector; S325, using the cluster center as the starting point of the K-means algorithm, clustering the feature vectors in the grid, and iteratively adjusting the cluster center until the cluster center reaches a preset standard to obtain a cluster cluster in each grid; S326. Calculate the final cluster center of the clusters in each grid to obtain the representative feature vector of each category.

10. A method for generating supervised data for a photovoltaic power station based on a generative adversarial network according to claim 9, characterized in that: Determining the initial cluster center in each grid according to the density and distance of the feature vector comprises the following steps: S3241. In each grid, according to the calculated density values, feature vectors are selected in descending order as candidate objects; S3242, selecting two groups of feature vectors with the highest density as candidate cluster centers in turn; S3243, calculating the distance between the two groups of feature vectors with the highest density, and comparing it with a preset distance threshold and radius; S3244, if the distance is greater than a preset distance threshold, two groups of feature vectors with the highest density are selected in turn as initial cluster centers; if the distance is greater than a preset radius and less than a preset distance threshold, the feature vector with the highest density is retained as a single initial cluster center; if the distance is less than the radius, the line segment formed by the two groups of feature vectors with the highest density as endpoints is used as an extended cluster center; S3245. Continue to select the next candidate feature vector from the remaining high-density feature vectors, and repeat steps S3242-S3244 until all feature vectors in each grid have been evaluated, and finally all initial cluster centers in the grid are determined.

Citation Information

Patent Citations

  • Large-scale image online clustering system and method based on comparison learning

    CN112668627A

  • Wheat germplasm recommendation method based on clustering algorithm

    CN115203527A

  • Image generation method based on progressive growth condition generative adversarial network

    CN115439323A

  • Large model image sample automatic generation method and system

    CN118155024A

Cited By

  • Unsupervised deep learning method based on synthetic data generation

    CN119862442A

  • Method, device and equipment for generating abnormal test data of photovoltaic monitoring system and medium

    CN120952056A

  • Photovoltaic monitoring system anomaly test data generation method and device, equipment and medium

    CN120952056B