Novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization

By employing LSTM autoencoders, TD3 reinforcement learning, and TimeGAN data augmentation methods, combined with an improved sparrow search algorithm to optimize the LightGBM model, the reliability and accuracy issues of data transmission in distributed photovoltaic systems were resolved, enabling efficient virtual data acquisition in complex environments.

CN122389934APending Publication Date: 2026-07-14TIANJIN UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-06-09
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Distributed photovoltaic systems suffer from low data transmission reliability, insufficient data transmission equipment, and a lack of historical data, leading to a decrease in the accuracy of virtual acquisition and making it difficult to effectively monitor and manage the photovoltaic operation status under complex geographical environments and weather conditions.

Method used

Data reconstruction is performed using an LSTM autoencoder, feature weights are optimized by combining TD3 reinforcement learning, data augmentation is performed using TimeGAN, and an improved sparrow search algorithm is constructed to optimize the LightGBM ensemble learning model to achieve virtual data acquisition.

Benefits of technology

It improves the reliability and accuracy of data acquisition in distributed photovoltaic systems, and significantly enhances the accuracy and robustness of virtual acquisition, especially under complex weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122389934A_ABST
    Figure CN122389934A_ABST
Patent Text Reader

Abstract

The present application relates to a new type of distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization, belonging to the technical field of electric power. The present application reconstructs the target area distributed photovoltaic data by constructing an LSTM autoencoder, mines the time series correlation features and evaluates the data quality of each power station; secondly, taking the autoencoder as the inference engine, introducing a reference power station optimization framework based on TD3 reinforcement learning, dynamically allocating and adjusting the input weight of each candidate power station, and selecting the reference power station according to the average weight order; then constructing a data enhancement method based on TimeGAN to generate diversified distributed photovoltaic output scenarios to expand the training data; finally, developing a LightGBM integrated learning model optimized based on an improved sparrow search algorithm as a virtual collector, using the power data of the selected reference power station to complete the high-precision and low-cost virtual acquisition of all distributed photovoltaic power in the region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power technology, and in particular to a novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization. Background Technology

[0002] With increasing energy shortages and environmental pollution, photovoltaic (PV) systems have become a crucial means of addressing energy and environmental issues. Compared to centralized PV systems, distributed PV systems have developed rapidly due to their advantages such as flexible installation and high energy efficiency. However, the increasing number of distributed PV systems necessitates a large number of sensors and communication equipment for monitoring their operational status.

[0003] In addition, due to the complex and variable geographical environment and weather conditions of distributed photovoltaic installation locations, the transmission process often suffers from low reliability issues such as data loss, transmission congestion, and equipment failure.

[0004] Therefore, it is necessary to develop a new distributed photovoltaic virtual acquisition method for distributed photovoltaic clusters. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization. First, by constructing a noise-reducing autoencoder based on LSTM, multi-scale feature extraction and robust reconstruction of photovoltaic time-series data are achieved. Second, the feature weight allocation is optimized using the dual-delay deep deterministic strategy gradient algorithm (TD3), and a set of key reference power stations is selected based on the weight magnitude. Third, to overcome the problem of decreased virtual acquisition accuracy due to insufficient historical data, a distributed photovoltaic power station data augmentation method based on TimeGAN is proposed. Finally, an ensemble learning virtual acquisition device with an improved sparrow optimization algorithm is designed, significantly improving acquisition accuracy under complex weather conditions.

[0006] The technical problem solved by this invention is achieved through the following technical solution: A novel distributed photovoltaic virtual data acquisition method based on autoencoder feature weight optimization includes the following steps: Step 1: Construct an LSTM autoencoder to reconstruct the distributed photovoltaic data of the target area, use the time series modeling capability of the LSTM autoencoder to mine the time series correlation features between photovoltaic power stations in the area, and use the reconstruction error as the basis for selecting the reference power station set. Step 2: Using the LSTM autoencoder constructed in Step 1 as the inference engine, construct a reference power plant optimization framework based on TD3 reinforcement learning. The reference power plant optimization framework based on TD3 reinforcement learning dynamically assigns adaptive weights to each input reference power plant through the TD3 algorithm. Design a reward function based on the reconstruction error in Step 1, and select the reference power plant set according to the weight ranking results. Step 3: Construct a distributed photovoltaic data augmentation method based on TimeGAN. Drive the adversarial time-series generation network to learn the inherent distribution law of the data using historical operation data of photovoltaic power plants in the region, and output a diversified distributed photovoltaic output data augmentation set. Step 4: Construct a LightGBM ensemble learning model based on an improved sparrow search algorithm as a virtual data collector. Use the power data of the reference power station selected in Step 2 as input and train it with the enhanced data from Step 3 to complete the virtual acquisition of regional distributed photovoltaic power.

[0007] Furthermore, the LSTM autoencoder in step 1 reconstructs the distributed photovoltaic data of the target area, including the following steps: Step 1.1: In the encoding stage, the LSTM autoencoder structure controls the information state of the network at each time step through forget gates, input gates, and output gates, transforming the original input data into a compressed representation; Step 1.2: In the decoding stage, the time series is reconstructed using the state of the last hidden layer as the initial state. Step 1.3: With the goal of minimizing the reconstruction error, update the model parameters through backpropagation and gradient descent.

[0008] Furthermore, step 2 includes the following steps: Step 2.1: Construct the state space of the TD3 reinforcement learning framework, including the first-order difference of the current time period, weather, irradiance and output power, current irradiance and output power, and the input feature weights of the LSTM autoencoder; Step 2.2: Construct the action space of the TD3 reinforcement learning framework, which is a set of input feature weights; Step 2.3: Construct a reward function based on the change in reconstruction error before and after the action; Step 2.4: Based on the state space, action space, and reward function constructed in Steps 2.1 to 2.3, guide the TD3 reinforcement learning framework to dynamically adjust the input feature weights: Step 2.5: Introduce the target policy smoothing technique as described in Step 2.4. Step 2.6: Based on Step 2.5, random batches of data are randomly extracted from the experience replay pool using the random experience replay method as training data. Then, the target Q value is substituted into the Bellman equation to calculate the temporal difference error and loss function. The loss function is minimized through the gradient descent algorithm to train the Critic network. In steps 2.7 and 2.6, a delayed update strategy was adopted for the Actor network during training, so that the update frequency of the Actor network was lower than that of the Critic network. Step 2.8: Update the parameters of the TD3 reinforcement learning framework; Step 2.9: After the update in step 2.8, the TD3 reinforcement learning framework performs online adaptive adjustment of feature weights and generates a candidate set of reference power stations by calculating the average weight ranking of each distributed photovoltaic power station over a period of time.

[0009] Furthermore, step 3 includes the following steps: Step 3.1: Construct a TimeGAN-based distributed photovoltaic data augmentation method using embedding functions, recovery functions, sequence generators, and sequence discriminators; Step 3.2: By setting the joint loss function This provides a basis for updating embedded function parameters and restoring function parameters; Step 3.3: The output of the sequence generator is the hidden layer variables in the embedding space. The sequence discriminator discriminates the synthesized distributed photovoltaic power data. Its inputs are the output of the generator and the hidden layer output of the real data. The neural network of the sequence discriminator is replaced by a bidirectional GRU, and the two are linked by a joint loss function. train; Step 3.4: Introduce additional supervision loss Make the generator accept and Alternating training: Step 3.5: Use the K-shape clustering algorithm to mine different power output patterns in historical data, and use the clustering labels as conditional inputs to construct a conditional time series generative adversarial network (CTimeGAN) to generate photovoltaic data of the specified patterns.

[0010] Furthermore, step 4 includes the following steps: Step 4.1: Construct the LightGBM model based on gradient one-sided sampling and proprietary feature binding techniques; Step 4.2: Construct an improved sparrow search algorithm to optimize the hyperparameters of LightGBM; Step 4.3: Divide the sparrows into discoverers, joiners, and early warning providers, and define their position iteration formulas respectively; Step 4.4: Initialize the population using the tent chaotic mapping; Step 4.5: Optimize the LightGBM model using the average virtual acquisition error of each power station to be acquired as the fitness function; Step 4.6: Using the optimized LightGBM model and the selected reference power plant power data, complete the virtual acquisition of all distributed photovoltaic power in the region.

[0011] The advantages and positive effects of this invention are: 1. The "virtual acquisition" method proposed in this invention can collect distributed photovoltaic power data in the entire area by selecting a portion of power stations as reference power stations, thus solving the data acquisition problems such as insufficient data transmission equipment and reduced data transmission reliability during the construction of massive distributed photovoltaic systems.

[0012] 2. This invention uses an LSTM autoencoder to reconstruct the power data of distributed photovoltaic power stations in the region, and combines it with the dual-delay deep deterministic strategy gradient algorithm (TD3) to realize the dynamic adjustment of the input weight of the reference power station, thus solving the problem of reference power station selection in virtual acquisition.

[0013] 3. This invention proposes a data augmentation method for distributed photovoltaic power plants for virtual acquisition tasks. It uses the K-shape clustering algorithm to mine distributed photovoltaic power output patterns and uses TimeGAN to achieve data augmentation for different distributed photovoltaic power output patterns, thus overcoming the problem of decreased accuracy in virtual acquisition caused by insufficient historical data.

[0014] 4. This invention develops a LightGBM ensemble learning virtual data acquisition device based on an improved sparrow search algorithm. It achieves virtual acquisition of distributed photovoltaic power within a region by learning the spatiotemporal characteristics of a reference power plant. A sparrow search algorithm with chaotic initialization mapping is introduced to optimize the hyperparameters of LightGBM, thereby effectively improving the fitting accuracy of the ensemble model in virtual data acquisition tasks. Attached Figure Description

[0015] Figure 1 This is a flowchart of a novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization provided by the present invention.

[0016] Figure 2 This is a schematic diagram of the reference power plant selection method involved in this invention.

[0017] Figure 3 This is a schematic diagram of the TimeGAN data augmentation method involved in this invention.

[0018] Figure 4 This is a flowchart illustrating the optimization of LightGBM hyperparameters using the improved sparrow search algorithm involved in this invention.

[0019] Figure 5 This is a graph showing the changes in the feature weights of a photovoltaic power station at different time steps involved in this invention.

[0020] Figure 6 This is a graph showing the change in reconstruction accuracy after using TD3 to dynamically adjust the input weights, which is involved in this invention.

[0021] Figure 7This is a comparison chart of the virtual acquisition accuracy of different feature weight adjustment methods under different numbers of reference power stations involved in this invention.

[0022] Figure 8 This is a comparison chart of the virtual acquisition accuracy of various data augmentation methods under different weather types involved in this invention.

[0023] Figure 9 This is a comparison chart of the virtual acquisition accuracy of various data augmentation methods under different numbers of reference power stations involved in this invention. Detailed Implementation

[0024] The present invention will be further described in detail below with reference to the accompanying drawings.

[0025] A novel distributed photovoltaic virtual data acquisition method based on autoencoder feature weight optimization, such as... Figure 1 As shown, it includes the following steps: Step S1: An LSTM autoencoder is used to learn and reconstruct distributed photovoltaic data within the selected area in an unsupervised manner. This model effectively captures the high-dimensional spatiotemporal correlation features between the outputs of various power plants through its encoder-decoder mechanism. The reconstruction error generated during this process is defined as a core indicator for evaluating the data contribution of each power plant, thus providing data support for the dynamic selection of the reference power plant in Step S2.

[0026] The process of reconstructing distributed photovoltaic data using an LSTM autoencoder in step S1 includes: Step S101: The autoencoder structure proposed in this invention uses the input distributed photovoltaic power itself as supervision to guide the neural network in a mapping process, ultimately obtaining a reconstructed output sequence. The encoding process from the input layer to the hidden layer is as follows: in: H Indicates hidden variables; It is an activation function; This represents the weights from the input layer to the hidden layer; X Represents the original input sequence; This represents the deviation from the input layer to the hidden layer.

[0027] Step S102: The LSTM autoencoder completes the encoding and decoding process based on the autoencoder, and its structure is as follows: Figure 2 As shown. During the encoding phase, LSTM controls the information state of the network at each time step through forget gates, input gates, and output gates, thereby processing the original input data of the distributed photovoltaic system. Convert to compressed representation Among them, LSTM in t There are 3 inputs at any given time: the network's input value at the current time step. The output value of the LSTM hidden layer at the previous time step. The cell state at the previous moment LSTM cells in t There are two outputs at any given time: the output value of the hidden layer at the current time step. and unit state The specific calculation process is as follows:

[0028] in: These are the gating coefficients for the forget gate, input gate, and output gate of the LSTM, respectively. These are the bias terms for the corresponding units; , , , These are the weight matrices for the corresponding units; This indicates element-wise multiplication; Candidate cell state; This represents the sigmoid activation function.

[0029] Step S103: During the decoding stage, the state of the last hidden layer. The current state is used as the initial state and decoded using LSTM to reconstruct the time series. The calculation formula for the reconstruction process is as follows: in: This represents the reconstructed sequence of the original data; It is an activation function; This represents the deviation from the hidden layer to the output layer of the network; Indicates hidden variables; This represents the deviation from the hidden layer to the output layer.

[0030] Step S104: The LSTM autoencoder is trained based on the reconstruction error, with the aim of making the decoded image more accurate and accurate. As close as possible to the input sequence X The model parameters are continuously updated through backpropagation and gradient descent to minimize the reconstruction error. The reconstruction error will then serve as a basis for evaluating the quality of the power plant in subsequent tests. The specific calculation formula is as follows: in: N and M These represent the dimension and number of samples of the original data, respectively. and They represent the first i Line number j The original input and reconstructed values ​​of the column data; These are the regularization coefficients; the goal of model training is to find the weights that minimize the loss function. and bias terms b ; For weight Specific elements in J ( ) represents the model function; Step S2: Using the LSTM autoencoder constructed in S1 as the inference engine, a reference power plant optimization framework based on the dual-delay deep deterministic policy gradient algorithm (TD3) is proposed. This framework dynamically assigns adaptive weights to each input reference power plant through the TD3 algorithm, designs a reward function based on the reconstruction error in step S1, and selects the best reference power plant according to the weight ranking results, thereby realizing the representation of the overall photovoltaic operation status of the region using sensor data from selected sites.

[0031] The TD3 reference power plant selection process in step S2 includes: Step S201: The goal of this step is to adaptively adjust the weights of input features to improve reconstruction accuracy under complex weather scenarios. The agent's state space needs to reflect not only the output trend of the DPV but also the hyperparameter states. Therefore, the state space of TD3 is set as follows: in: Represents the current time period W Represents weather, DR and DP Represent T 2. First-order difference of irradiance and output power within the time step R and P Represents the current irradiance and the output power of all RPVs. H The weights represent the input features of the LSTM autoencoder.

[0032] Step S202: Design the set of input feature weights This is the action space of the intelligent agent; where, Indicates the first Each input feature weight; Represents the number of input features; Step S203: The reward function guides the agent to take actions that improve reconstruction accuracy. Therefore, this step uses the change in reconstruction before and after the action as the reward function. in: and denoted as mean square error of reconstruction under the current state and after the agent's action within a 2T2 step size, respectively.

[0033] Step S204: Based on the action, state, and reward functions designed in steps S201-S203, guide the TD3 reinforcement learning model to dynamically adjust the input feature weights. First, introduce the pruning double Q learning technique, using two independent Critic networks to calculate the Q-value, and select the smaller of the two estimates as the target Q-value. in, Represents the target Q value; yes t The actions of the intelligent agent in real time; yes t The state space at any given moment; The discount factor represents the reward function; s t+1 The state space represents the state space at the next moment; To avoid actions that combine local optima with random noise during the agent's exploration process; The target Critic function; The parameters of the target Critic network are represented; the Q-value indicates the agent's state. s Next, take action a The expected return that can be obtained afterward.

[0034] Step S205: In step S204, a target policy smoothing technique is introduced. Clipped random noise is added to the target actions, making the Critic function smoother across different actions and reducing the possibility of the policy exploiting Critic function errors. Therefore... It can be represented as: in: Represents the target policy function; The parameters representing the target policy network; This represents the clipped normal distribution noise, where -M and M represent the upper and lower limits of the clipped noise, respectively. Representative parameters are The policy network, based on the state The given observation values.

[0035] Step S206: Based on step S205, random batches of data are randomly extracted from the experience replay pool using the random experience replay method as training data. Then, the target Q value is substituted into the Bellman equation to calculate the temporal difference error and loss function. Finally, the loss function is minimized using the gradient descent algorithm to train the Critic network. in: Represents the Critic function; The number of exercise pairs representing the state of participation in training; Represents the parameters of the Critic network; Represents the loss function of the Critic network; This represents the learning rate of the Critic network; This represents the target Q value.

[0036] Step S207: During the training process described in step S206, a delayed update strategy was adopted for the Actor network, meaning the update frequency of the Actor network was lower than that of the Critic network. Unlike the Critic network update, the Actor network updated its parameters using a gradient ascent method. in: These are the parameters of the Actor network; Let Actor be the objective function of the Actor network; For the objective function relative to The gradient; The learning rate of the Actor network. For the index of the sampled sample, In the state s t The actions output by the Actor network are as follows: For Critic network parameters, Given a state s t and parameters Below, the Actor network outputs; Step S208: TD3 network parameter update; to avoid error divergence, target network parameters and Approach slowly through a soft update strategy and : in: This represents the soft update factor.

[0037] Step S209: After the update in step S208, TD3 can perform adaptive adjustment of feature weights online. This process generates a candidate set of reference power stations by calculating the average weight ranking of each distributed photovoltaic power station over a period of time.

[0038] in: Indicates the first N F The average weight of each input feature.

[0039] Step S3: To overcome the problem of decreased accuracy in virtual data acquisition caused by scarce training data, a distributed photovoltaic data augmentation method based on TimeGAN is designed. Driven by historical operating data of various photovoltaic power plants within the region, an adversarial time-series generative network learns the inherent distribution patterns of the data, outputting diverse distributed photovoltaic power output scenarios, significantly improving the model's generalization ability under diverse weather conditions.

[0040] Among them, combined Figure 3 The distributed photovoltaic data augmentation method based on TimeGAN in step S3 includes: Step S301: To overcome the performance degradation of virtual acquisition caused by insufficient data, a distributed photovoltaic (PV) multi-type scenario data generation method based on TimeGAN is proposed. TimeGAN consists of four network components: an embedding function, a recovery function, a sequence generator, and a sequence discriminator. The embedding function provides a mapping between distributed PV power data and the latent space, allowing the adversarial network to learn the key temporal dynamics of the PV power data through dimensionality reduction representation. The recovery function reconstructs the PV power data, ensuring that the temporal characteristics learned by the embedding function are important.

[0041] in: and They represent t Time-series dynamic feature vectors and recovered values; h t This represents the dynamic feature vector after dimensionality reduction; h s This represents the static feature vector after dimensionality reduction; all variables in this paper are dynamic feature vectors, therefore the static vectors are all 0. Function e and r This is achieved through a gated recurrent unit (GRU) network.

[0042] Step S302: In order to enable the embedding function and the recovery function to accurately construct the low-dimensional feature space and reconstruct the original feature space, a joint loss function is defined. To embed network parameters and restore network parameters The update provides the basis for:

[0043] in: P The probability distribution of the real dataset. This represents all samples from the true distribution. P State s and time series x 1:T Find the expected value.

[0044] Step S303: Unlike before, the generator's output is the hidden layer variables in the embedding space. The discriminator discriminates the synthesized distributed photovoltaic power data, with the generator's output and the hidden layer output of the real data as inputs. The discriminator's neural network is replaced by a bidirectional GRU. Both are analyzed through a joint loss function. train:

[0045] in: Classification results representing real photovoltaic data; This represents the classification results of the synthetic photovoltaic data.

[0046] Step S304: Relying solely on This is insufficient to incentivize the generator to capture the stepwise dynamic conditional distribution in photovoltaic data. Therefore, this step introduces an additional supervised loss. Make the generator accept and Alternating training:

[0047] Where: G represents the generator function; It is a dynamic random vector that follows a Wiener process.

[0048] Step S305: This step uses the K-shape clustering algorithm to mine different output patterns of distributed photovoltaics in the training set. To enable TimeGAN to generate photovoltaic data with specified patterns, a conditional time-series generative adversarial network (CTimeGAN) model is designed. The clustering results are then processed... As a conditional supervision term, it is simultaneously input into the TimeGAN along with the dynamic random vector z, enabling the TimeGAN to generate photovoltaic data of a specified pattern. The joint loss function of the CTimeGAN generator and discriminator is defined as:

[0049] Where D is the discriminator function, and the supervised loss function is defined as:

[0050] During training, the global optimization loss function guides the adjustment of network parameters in the embedding layer, recovery layer, generator, and discriminator. The global optimization loss function is defined as follows:

[0051] in: , , , These represent the network parameters of the embedding layer, recovery layer, generator, and discriminator, respectively. and These are the weighting coefficients.

[0052] Step S4: A LightGBM ensemble learning model optimized based on the Improved Sparrow Search Algorithm (ISSA) is proposed for regional distributed photovoltaic power virtual acquisition. The LightGBM hyperparameters are optimized by introducing a chaotic initialization mapping sparrow search algorithm, thereby improving the model's fitting accuracy in virtual acquisition tasks.

[0053] Among them, combined Figure 4 The LightGBM ensemble learning virtual collector based on improved sparrow optimization in step S4 includes: Step S401: The Boosting strategy in ensemble learning continuously adjusts the weights of erroneous samples through serial iteration, effectively preventing overfitting and achieving higher accuracy compared to other ensemble strategies. Specifically, LightGBM effectively shortens data processing time by using gradient-based one-sided sampling and proprietary feature bundling techniques. First, the training samples are sorted in descending order of their absolute gradient values, retaining samples with larger gradients to obtain a subset of samples. A L For the remaining small gradient sample set, the proportion is... b Random sampling yields a subset of samples. B Finally, based on the subset at the point d Splitting characteristics at the location k The variance gain of the data is estimated to segment the samples. By excluding samples with small gradients and retaining samples with large gradients that have high information gain, information can be estimated quickly and accurately even for small datasets, as data with large gradients is more critical. Furthermore, LightGBM uses a histogram algorithm to find the optimal split point and employs a depth-constrained leaf-wise tree growth strategy to reduce model complexity, avoiding a large amount of unnecessary computation and achieving good performance with a shorter training time. The specific formula is as follows:

[0054] in: Representative characteristics k 1 at the dividing point d The estimated variance gain at the location; Representative characteristics k 1 at the dividing point d The estimated variance gain at the location; Representative characteristics k 2 at the dividing point d The estimated variance gain at the location; This represents the proportion of large gradient samples retained in the GOSS algorithm. The proportion of small gradient samples randomly sampled in the GOSS algorithm; n For subset The number of samples; and Representing features respectively k The value is less than d Greater than d The number of samples; For the sample i The negative gradient; , , , , A This is the set of gradient samples that are retained by reserving all samples in descending order of their absolute gradient values.

[0055] Step S402: This invention constructs an improved Sparrow Search Algorithm (SSA) to optimize the hyperparameters of LightGBM, thereby improving virtual acquisition performance. Based on the foraging behavior of sparrows, SSA divides them into three roles: discoverer, joiner, and early warning. Among them, the discoverer has high fitness and a wide search range, and is responsible for finding food and guiding the population in foraging. Its position iteration formula is as follows:

[0056] in: MaxIter This represents the maximum number of iterations. t Indicates the current iteration number; sparrow i In the d Dimensional location information; It is a random number; This represents a warning value; Represents a safety value; Q These are random numbers that follow a normal distribution. L The dimension is A matrix whose elements are all 1s. This indicates a safe environment; there are no predators around the forager, allowing for a wide search. This indicates an environmental danger, at which point the foraging strategy needs to be adjusted, and the group should move to a safe area.

[0057] Step S403: The joiner follows the discoverer in searching for food and may compete with it to improve its predation rate. If the discoverer fails to take the lead during foraging, the joiner will update its foraging route to find other producers with higher fitness. Its position iteration formula is as follows: Where: rand is a random number function. China indicates t +1 iteration number of the th d The worst position for a sparrow; China indicates t +1 iteration number of the th d The optimal position of the sparrow; when At that time, sparrows with low adaptability i Being extremely hungry, they need to move their foraging area; when At that time, sparrows with high adaptability i They forage near the optimal location in the current iteration of the thorn genus.

[0058] Step S404: The early warning sparrows comprise 10%~20% of the sparrow population, and their initial locations are randomly determined. When faced with danger, they notify other sparrows to engage in anti-predation behavior. The specific location iteration formula is as follows: in: and K All are step size coefficients, where These are normally distributed random numbers. Indicates the direction the sparrows are moving; To represent extremely small constants, avoid having a denominator of 0; The fitness of sparrow i; and These represent the worst and best fitness of the current sparrow population, respectively; when When, it indicates that the sparrow is on the edge of the group; when This indicates that the sparrow is currently in the middle of the group.

[0059] Step S405: This step will use a tent mapping to generate a population sequence, the expression of which is as follows: Step S406: The LightGBM proposed in step S301 will be optimized through steps S302~S305: in: This represents the average error of each power station to be collected; Represents the number of reference power plants; Indicates the first j The mean absolute error of the power stations to be collected. N This represents the total number of training samples for the power station. n This represents the total number of photovoltaic power stations; and The first j The first power station to be collected k Virtual and real values ​​of each sampling point; For hyperparameters L The LightGBM model at that time.

[0060] Based on the above-described novel distributed photovoltaic virtual acquisition method optimized by autoencoder feature weights, the effectiveness of the invention was verified through testing.

[0061] To achieve virtual data acquisition of distributed photovoltaic (PV) power, it is first necessary to find a suitable distributed PV power dataset and preprocess the collected dataset to provide data support for subsequent computational analysis. This invention selected 31 distributed PV (DPV) installations for virtual data acquisition testing. Data collected from February 1, 2018 to December 31, 2018 was collected in 15-minute intervals from 07:15 to 17:00. To facilitate network training and validation, data from February 1 to October 31 was used as the training and validation sets, while the remaining data was used to validate the effectiveness of the distributed PV virtual data acquisition. The accuracy of the virtual acquisition was evaluated using error metrics: mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). in: Indicates the number of test samples; and These represent the virtual and actual values ​​of the distributed photovoltaic output power, respectively; when evaluating the virtual acquisition performance using MAPE, sampling points with an actual power of 0 need to be removed.

[0062] The experiment first constructed a test sequence with 10 time steps to simulate the operation of a photovoltaic power station under different weather conditions. In the dynamic weighting method, TD3 was used to evaluate the importance scores of each power station feature, and normalized weights were generated after exponential smoothing. In contrast, the fixed weighting method adopted an equal weight allocation strategy. Both methods used the same LSTM autoencoder reconstruction model, and the experimental results are as follows: Figure 5 and Figure 6 As shown, the dynamic weighting method significantly improves reconstruction accuracy, with an average error of 4.11%, a 34.9% reduction compared to the fixed weighting method (6.30%). The improvement is particularly significant during periods of sudden weather changes (up to 48.1%), and error volatility is reduced by 31%. Visual analysis further demonstrates that dynamic weighting effectively captures the time-varying characteristics of feature correlation.

[0063] Using distributed photovoltaic power data from March, June, September, and December as input, the average weight of each photovoltaic power station during this period is obtained through the reference power station selection method proposed in step S2. The first... N One reference power station was used. Referring to methods in other studies, SAC and DDPG reinforcement learning methods were employed to optimize the reference power stations. Then, the virtual acquisition accuracy under different numbers of reference power stations was compared. Figure 7 As shown.

[0064] To verify the effectiveness of the virtual data acquisition device, a total of 14 reference power stations were selected. TD3 was used for optimization, resulting in reference power station numbers: 3, 6, 9, 11, 13, 15, 17, 19, 21, 22, 23, 26, 28, and 31. First, the performance of the proposed improved Sparrow Search Algorithm (ISSA) in optimizing hyperparameters is demonstrated, and it is compared with the Honey Badger Optimization Algorithm (HBA), Coyote Algorithm (COA), and Grey Wolf Algorithm (GWO). The virtual acquisition accuracy of LightGBM after optimization by different algorithms is shown in Table 1.

[0065] Table 1. Virtual acquisition error of LightGBM hyperparameters optimized by different optimization algorithms.

[0066] To demonstrate the superiority of the proposed virtual acquisition device, the performance of different virtual acquisition devices is compared, as shown in Table 2. From a model perspective, the BP neural network has the highest MAE and RMSE, making it difficult to complete the virtual acquisition task with high accuracy. Ensemble learning exhibits good fitting performance. Specifically, XGBoost has a higher RMSE than LightGBM, but a lower MAPE. This is because XGBoost's outliers mostly appear at sampling points with higher actual power, while LightGBM does the opposite. Future research could consider fusing the two models to improve acquisition accuracy. From the perspective of the power plants, compared to other power plants, the virtual acquisition accuracy of Power Plant 1 and Power Plant 13 is lower. Using them as reference power plants might affect the virtual acquisition accuracy of all power plants; therefore, IHBA uses them as non-reference power plants, reflecting the rationality of IHBA's choice of reference power plants.

[0067] Table 2 Virtual acquisition errors after adaptive hyperparameter adjustment for different virtual acquisition devices

[0068] Finally, to verify the improvement effect of the TimeGAN data augmentation method on virtual data acquisition, this invention selected four typical weather conditions—sunny, cloudy, overcast, and rainy—and conducted virtual data acquisition tests under fixed conditions of 10 reference power stations. The experiment employed five-fold cross-validation, with each weather type including 120 hours of continuous observation data, comparing four strategies: no augmentation baseline, VAE augmentation, GAN augmentation, and TimeGAN augmentation. The results are as follows: Figure 8 As shown, TimeGAN achieved optimal accuracy across various weather conditions: the MAE in sunny scenarios was 129.7W, a reduction of 8.8% compared to the baseline; the most significant improvement was observed in heavy rain scenarios, with the MAE decreasing to 218.9W, an additional reduction of 9.8% compared to GAN enhancement. Further analysis revealed that TimeGAN effectively preserved the characteristics of temporal abrupt changes, suppressing the standard deviation of error fluctuation to 15.4W during periods of rapid cloud cover changes in cloudy weather. Through latent space state continuity modeling, it significantly improved the robustness of virtual data acquisition in scenarios of sudden irradiance changes, validating the superiority of this method under complex meteorological conditions. Furthermore, to systematically evaluate the advantages of TimeGAN's enhancement mechanism, this experiment compared its performance with VAE and GAN generative models under 2-14 reference power station configurations. Figure 9 As shown, when there are 10 reference stations, TimeGAN's MAE is significantly lower than that of GAN and VAE, and its advantage is more significant in scenarios with a low number of stations: with 2 reference stations, TimeGAN reduces the error by 8.4% compared to GAN.

[0069] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.

Claims

1. A novel distributed photovoltaic virtual data acquisition method based on autoencoder feature weight optimization, characterized in that: Includes the following steps: Step 1: Construct an LSTM autoencoder to reconstruct the distributed photovoltaic data of the target area, use the time series modeling capability of the LSTM autoencoder to mine the time series correlation features between photovoltaic power stations in the area, and use the reconstruction error as the basis for selecting the reference power station set. Step 2: Using the LSTM autoencoder constructed in Step 1 as the inference engine, construct a reference power plant optimization framework based on TD3 reinforcement learning. The reference power plant optimization framework based on TD3 reinforcement learning dynamically assigns adaptive weights to each input reference power plant through the TD3 algorithm. Design a reward function based on the reconstruction error in Step 1, and select the reference power plant set according to the weight ranking results. Step 3: Construct a distributed photovoltaic data augmentation method based on TimeGAN. Drive the adversarial time-series generation network to learn the inherent distribution law of the data using historical operation data of photovoltaic power plants in the region, and output a diversified distributed photovoltaic output data augmentation set. Step 4: Construct a LightGBM ensemble learning model based on an improved sparrow search algorithm as a virtual data collector. Use the power data of the reference power station selected in Step 2 as input and train it with the enhanced data from Step 3 to complete the virtual acquisition of regional distributed photovoltaic power.

2. The novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization according to claim 1, characterized in that: The LSTM autoencoder reconstructing the distributed photovoltaic data of the target area in step 1 includes the following steps: Step 1.1: In the encoding stage, the LSTM autoencoder structure controls the information state of the network at each time step through forget gates, input gates, and output gates, transforming the original input data into a compressed representation; Step 1.2: In the decoding stage, the time series is reconstructed using the state of the last hidden layer as the initial state. Step 1.3: With the goal of minimizing the reconstruction error, update the model parameters through backpropagation and gradient descent.

3. The novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization according to claim 1, characterized in that: Step 2 includes the following steps: Step 2.1: Construct the state space of the TD3 reinforcement learning framework, including the first-order difference of the current time period, weather, irradiance and output power, current irradiance and output power, and the input feature weights of the LSTM autoencoder; Step 2.2: Construct the action space of the TD3 reinforcement learning framework, which is a set of input feature weights; Step 2.3: Construct a reward function based on the change in reconstruction error before and after the action; Step 2.4: Based on the state space, action space, and reward function constructed in Steps 2.1 to 2.3, guide the TD3 reinforcement learning framework to dynamically adjust the input feature weights: Step 2.5: Introduce the target policy smoothing technique as described in Step 2.

4. Step 2.6: Based on Step 2.5, random batches of data are randomly extracted from the experience replay pool using the random experience replay method as training data. Then, the target Q value is substituted into the Bellman equation to calculate the temporal difference error and loss function. The loss function is minimized through the gradient descent algorithm to train the Critic network. In steps 2.7 and 2.6, a delayed update strategy was adopted for the Actor network during training, so that the update frequency of the Actor network was lower than that of the Critic network. Step 2.8: Update the parameters of the TD3 reinforcement learning framework; Step 2.9: After the update in step 2.8, the TD3 reinforcement learning framework performs online adaptive adjustment of feature weights and generates a candidate set of reference power stations by calculating the average weight ranking of each distributed photovoltaic power station over a period of time.

4. The novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization according to claim 1, characterized in that: Step 3 includes the following steps: Step 3.1: Construct a TimeGAN-based distributed photovoltaic data augmentation method using embedding functions, recovery functions, sequence generators, and sequence discriminators; Step 3.2: By setting the joint loss function This provides a basis for updating embedded function parameters and restoring function parameters; Step 3.3: The output of the sequence generator is the hidden layer variables in the embedding space. The sequence discriminator discriminates the synthesized distributed photovoltaic power data. Its inputs are the output of the generator and the hidden layer output of the real data. The neural network of the sequence discriminator is replaced by a bidirectional GRU, and the two are linked by a joint loss function. train; Step 3.4: Introduce additional supervision loss Make the generator accept and Alternating training: Step 3.5: Use the K-shape clustering algorithm to mine different power output patterns in historical data, and use the clustering labels as conditional inputs to construct a conditional time series generative adversarial network (CTimeGAN) to generate photovoltaic data of the specified patterns.

5. The novel distributed photovoltaic virtual acquisition method based on autoencoder feature weight optimization according to claim 1, characterized in that: Step 4 includes the following steps: Step 4.1: Construct the LightGBM model based on gradient one-sided sampling and proprietary feature binding techniques; Step 4.2: Construct an improved sparrow search algorithm to optimize the hyperparameters of LightGBM; Step 4.3: Divide the sparrows into discoverers, joiners, and early warning providers, and define their position iteration formulas respectively; Step 4.4: Initialize the population using the tent chaotic mapping; Step 4.5: Optimize the LightGBM model using the average virtual acquisition error of each power station to be acquired as the fitness function; Step 4.6: Using the optimized LightGBM model and the selected reference power plant power data, complete the virtual acquisition of all distributed photovoltaic power in the region.