Power system data generation method based on outlier detection and depth generation model

By combining outlier detection and deep generation models with cubic spline interpolation and moving average data completion, and using the CAD-TCN-Adaptive Skip-LSTM adversarial autoencoder model, the problem of local temporal and long-range dependencies in power system data generation is solved, thereby improving the integrity and accuracy of the data.

CN121167313AActive Publication Date: 2025-12-19QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

Application Number
CN202511706418.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2025-12-19
Estimated Expiration
2045-11-20

AI Technical Summary

Technical Problem

Existing power system data generation methods struggle to effectively capture the local temporal context and long-range dependencies of high-dimensional, strongly correlated power system data. The local details of the generated samples are not precise enough, and outliers cannot be effectively identified and processed, resulting in limited usability and accuracy of the generated data in complex scenarios.

Method used

A method based on outlier detection and deep generative model is adopted. Data is completed by cubic spline interpolation and moving average, and combined with the adversarial autoencoder model CAD-TCN-Adaptive Skip-LSTM to capture the local temporal and long-range dependencies of the data and generate new power system data samples.

Benefits of technology

It improves the integrity and accuracy of power system data, and the generated data is more consistent with the characteristics of real data in terms of time and space, thus improving the usability and representativeness of the data in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121167313A_ABST
    Figure CN121167313A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and particularly provides a power system data generation method based on outlier detection and a depth generation model. The method comprises the following steps: collecting original operation data of a power system, and carrying out outlier detection and elimination on the original operation data; after outliers are detected and removed, missing and removed data are complemented through cubic spline interpolation and moving average; according to the constructed confrontation auto-encoder model based on CAD-TCN-Adaptive Skip-LSTM, fitting is carried out on the complemented data, and a local time sequence and long-range dependence of the data are captured; and a new power system data sample is generated by adopting the fitted model so as to expand the data volume, and the method improves the integrity of the power system data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a power system data generation method based on outlier detection and deep generation model. BACKGROUND

[0002] With the continuous increase of the penetration rate of renewable energy such as wind power and photovoltaic in the power system, the operation environment of the power system is becoming more and more complex. Compared with traditional thermal power units, new energy power generation has obvious volatility, intermittency and uncertainty, which makes the system present diversified operation states at different operation moments. In the actual operation process, the key indicators of the power system such as bus voltage and phase angle, load active power and reactive power are not only large in quantity, but also have obvious high-dimensional characteristics and time sequence correlation. The states of the power system at different time points are often related to each other, and the short-term fluctuations will affect the long-term operation trend. At the same time, in space, the changes between each bus and load point also have high coupling. This complex dynamic evolution law makes the power system data have high non-linear characteristics in time and space dimensions.

[0003] Under this background, it is a major challenge to obtain sufficient and balanced data. First, the data samples corresponding to extreme operation scenarios or rare special events (such as large-scale new energy rapid grid connection, sudden load fluctuation or equipment abnormality) are very limited, and the data scarcity of these key scenarios directly affects the reliability of system analysis, simulation and policy making. Secondly, the data of the conventional operation state accounts for the vast majority, and the data distribution of different types or different time periods is significantly different, resulting in a serious imbalance problem in the data itself. When training the generation model or expanding the data, if the imbalance is ignored, the generated samples are often biased towards the high-frequency states, and the rare but key operation modes may not be effectively generated, thereby weakening the representativeness and effectiveness of the generated data in engineering applications.

[0004] The existing data generation and expansion methods also have significant limitations in dealing with these problems. Although methods such as traditional autoencoders or generative adversarial networks (GAN) can generate new samples, they usually focus on the reconstruction of overall numerical values or the alignment of sample distribution, and it is difficult to ensure the reasonableness of the generated data in the hidden space and the consistency of the time series dynamic characteristics at the same time. For example, the generated data may be close to the real samples in terms of point values, but there may be deviations in the time series evolution trend, spectral characteristics or local fluctuation details, resulting in errors in the simulation of dynamic processes or the training of downstream algorithms. For high-dimensional and strongly correlated power system data, traditional methods are difficult to fully capture the local time series context and long-range dependence, and the local details of the generated samples are often not accurate enough, further affecting the usability of the data in complex scenarios. On the other hand, before data generation and expansion, the quality of the data needs to be effectively guaranteed. There is usually a certain proportion of outliers (outliers) in the actual measured data of the power system, and the causes include sampling bias, equipment failure or sensor error, etc. If these data are not identified and removed, it will interfere with the subsequent processing process and reduce accuracy and robustness; and if the distribution characteristics of different variables are not fully considered and a unified detection method is used, normal data may be misjudged and removed incorrectly. SUMMARY

[0005] Therefore, the present application provides a power system data generation method based on outlier detection and deep generation model to improve the integrity of power system data.

[0006] In a first aspect, the present application provides a power system data generation method based on outlier detection and deep generation model, which comprises: Step 1, collecting the original operation data of the power system, detecting and removing outliers from the original operation data; Step 2, after detecting and removing outliers, using cubic spline interpolation and moving average to complete the missing and removed data; Step 3, fitting the completed data according to the constructed CAD-TCN-Adaptive Skip-LSTM based adversarial autoencoder model, capturing the local time series and long-range dependence of the data; Step 4, generating new power system data samples using the fitted model to expand the data volume.

[0007] Optionally, the step 1 comprises: identifying abnormal data according to the distribution characteristics of the original operation data using statistical analysis and clustering methods; First, check the potential distribution characteristics of the original operation data, use D'Agostino'K 2D'Agostino's K-squared test, which is used to assess normality by standardizing skewness and kurtosis to construct a test statistic that approximately follows a chi-squared distribution, so as to quantify the deviation of the sample from the normal distribution; the p-value of the D'Agostino's K-squared test is compared with the significance level a1, where the p-value represents the probability of the current or extreme test statistic occurring if the null hypothesis is true, the greater the value, the more difficult it is to reject the null hypothesis, and then the data is subject to the normal distribution; if p > a1, the data is subject to the normal distribution, and the 2 p-value of the Shapiro-Wilk test is compared with the significance level a2, where the p-value represents the probability of the current or extreme test statistic occurring if the null hypothesis is true, the greater the value, the more difficult it is to reject the null hypothesis, and then the data is subject to the normal distribution; if p > a2, the data is subject to the normal distribution, and the principle is adopted for outlier detection, the abnormal value discrimination interval is: the sample points exceeding the abnormal value discrimination interval range are determined as outliers and are removed; Secondly, for the original running data not subject to the normal distribution, K-means and interquartile range IQR are combined for detection; K-means is used to divide the data into internally consistent subsets, and IQR is used to identify outliers; the original running data is clustered first, and then outliers are identified within each cluster; the optimal cluster number is determined by the silhouette coefficient method , and the corresponding to the maximum silhouette coefficient is selected as the final cluster number: ; wherein, ; after determining the optimal cluster number, K-means is used for clustering, and the abnormal value within the jth cluster is detected based on IQR; the first quartile range , the third quartile range and the interquartile range are calculated, and the expression for non-normal or skewed distribution data is: ; according to , the abnormal value judgment interval within the cluster is determined: the sample points exceeding the abnormal value judgment interval range within the cluster are determined as outliers and are removed.

[0008] Optionally, the step 2 comprises: After detecting and removing the outliers, the missing data is completed by using the nonlinear interpolation method, i.e. cubic spline interpolation; the spline interpolation constructs a local cubic polynomial on each interval , and the expression is: ; wherein, represents the coefficient, which is uniquely determined by the interpolation condition and the continuity condition of the first and second derivatives at the nodes; The missing values at the beginning and end of the data sequence are filled by using moving average, a fixed length sliding window is set, the mean value of adjacent known data in the window is calculated, and the mean value is used as the substitute for the missing value; then the window moves forward or backward by a certain step until all the boundary missing values are filled, and the expression is: , or ; wherein, is the estimated value of the tth missing value; and are the known data adjacent to the missing point; k is the length of the sliding window.

[0009] Optionally, the step 3 comprises: The complex high-dimensional time series data are modeled and generated by fusing a cellular automaton driven time convolution network CAD-TCN and an adaptive skip long short-term memory network Adaptive Skip-LSTM structure; an adversarial autoencoder AAE is used as the core framework, and an adversarial regularization is introduced in the latent space to make the encoder output consistent with the preset Gaussian distribution; the continuity and the samplability are enhanced while ensuring the reconstruction accuracy, so that samples matching the characteristics of the real data are generated through standard normal sampling; the data are input to the encoder after normalization and sliding window sampling processing; The CAD-TCN module is one of the core feature extractors in the encoder, and is used for hierarchical, multi-scale and dynamic interaction capable representation learning of high-dimensional time series data; first, the CAD-TCN module uses causal dilated convolution as the initial transformation: one-dimensional causal dilated convolution is applied to the input of time step t to obtain the initial feature vector : ; wherein, d is the dilution rate, which takes the value of 8, 4, 2 and 1; K is the convolution kernel size, W k is the convolution weight; after convolution, batch normalization BN and an activation function LeakyReLU are sequentially used to stabilize the training and increase the nonlinear expression; On the initial convolution feature, the CAD-TCN module uses a differentiable cellular automaton evolution unit to realize dynamic interaction modeling between local neighborhoods; each feature is regarded as a state vector of a cell, a lightweight rule network is defined, the rule network is a multilayer perceptron MLP, which is used to generate a state update from the neighborhood : ; For parallel computation and boundary processing, the input is symmetrically padded in the time dimension, the neighborhood index is constructed in batches, and the neighborhood information is extracted using efficient tensor operations and then flattened before being sent to the regular network. Cell evolution changes the neighborhood interaction from linear mixing of fixed convolution kernels to learnable nonlinear updating, allowing the model to adaptively determine the way information propagates along time within a local range. Cell evolution is performed in an iterative manner, with each step updated in small steps to ensure stability, and its expression is: ; where a2 is the update step size, and k is the evolution iteration number. The residual connection and projection mapping are preserved in each CAD-TCN module, and the final output of the CAD-TCN module is expressed as the sum of the evolved features and the linearly mapped input: ; where is a 1x1 convolution or linear transformation for dimension alignment. The CAD-TCN module combines the multi-scale receptive field of dilated convolution with learnable cell evolution based on neighborhoods to improve the modeling capability of temporal patterns. It also provides high-order features for the learned latent distribution in the AAE generation framework. The high-order features extracted by the CAD-TCN module are passed to the Adaptive Skip-LSTM module for further integration of cross-step dependencies and adaptive preservation of key time step information, which are jointly used for the generation and expansion of temporal data. The Adaptive Skip-LSTM module is another important component of the encoder, responsible for modeling key moments while highlighting important information in local time slices while ensuring efficiency. The Adaptive Skip-LSTM module dynamically determines the update of the hidden state based on the difference between the current input and the historical state through a gating mechanism, which includes: Let the input sequence be x t , the previous time hidden state be h t-1 , and the memory state be c t-1 . The expression of the gate function g t is: ; where is a sigmoid function, W g and b g are the weight parameters and bias terms of the gate, and the output gate value indicates the update strength or update frequency of the current time step. When g t is close to 1, it indicates that the current time step information is important, and the model will update the hidden and memory states. When g tWhen approaching 0, the model tends to skip the update and inherit the state of the last time; if g t is in the middle value, partial update is performed, i.e., soft update, which realizes smooth transition through weighted fusion of new and old states: ; ; wherein, and are the update results of the standard LSTM unit at the current time; In the entire encoder design, the input power system time series data first passes through four CAD-TCN modules, the expansion rate d of each module is 1, 2, 4, and 8 respectively, and the number of convolution kernels is 32, 64, 128, and 256 respectively, to extract local time series dynamics; the CAD-TCN module uses a learnable cellular automaton driving mechanism to consider the features of each time step as a cell on the basis of capturing multi-scale temporal dependencies through causal dilated convolution; then the Adaptive Skip-LSTM module integrates the dependency information to model the key global time series structure; finally, the high-dimensional time series features are mapped to the latent space representation z through the fully connected layer; the discriminator takes the latent variable output by the encoder as input, passes through three fully connected layers containing 128 neurons and the activation function LeakyReLU, and finally obtains the discrimination value through a single neuron output layer to judge the authenticity of the input sample; in the fitting process of AAE, in order to ensure that the latent variable z output by the encoder can approximate the preset real distribution, the discriminator is introduced to realize the distribution matching of the latent space; the input of the discriminator includes two latent vectors: one is the latent representation obtained by encoding the original running data by the encoder, which follows the posterior distribution Q z learned by the model; the other is a real sample sampled from the standard normal distribution ; the goal of the discriminator is to distinguish the samples from the real distribution P z from the samples output by the encoder Q z ; the optimization objective of the discriminator is based on the Wasserstein distance: ; wherein, D(•) represents the output of the discriminator; At the same time, the optimization objective of the encoder is to make the distribution of the latent vector output by the encoder Q z consistent with the real distribution P z , achieving the effect of confrontation; the loss function of the encoder is: ; To further verify the consistency of the encoder output latent space distribution with the preset standard normal distribution, the maximum mean difference MMD is introduced to measure the distribution difference between the two: ; wherein z and are samples from the real distribution and the encoder distribution respectively, is a kernel function; Subsequently, the decoder is mirror-symmetrically related to the encoder in the overall structure, and the input of the decoder is the latent vector z. Firstly, the vector repetition RepeatVector operation and the Adaptive Skip-LSTM layer are used to restore the time dependence, and then the CAD-TCN module with gradually reduced expansion rate and gradually reduced convolution kernel is used to realize the layer-by-layer reconstruction of multi-scale features. The expansion rate d is designed as 8, 4, 2, 1, and the number of convolution kernels is 256, 128, 64, 32. Finally, the output sequence is generated by using the time step-by-step residual connection, thereby completing the mapping process from the latent space to the original data space. The reconstruction loss function is measured by using the mean square error MSE between the reconstructed samples output by the decoder and the original input samples: ; wherein represents the original input sample, represents the sample reconstructed by the decoder; To further improve the continuity and authenticity of the data, a time consistency loss is introduced to constrain the dynamic change characteristics of the generated data: ; The total loss is composed of the above 3 items: ; The reconstruction loss is used to ensure the point value reconstruction accuracy of the generated sequence in the sample space; The maximum mean difference loss is used to make the encoded z close to the preset prior; The time consistency loss is used to ensure that the dynamic evolution characteristics of the generated sample are consistent with the real sequence; In the training process, the multi-loss function weight dynamic adjustment is adopted by using the adaptive mechanism. Firstly, the three types of core loss values are calculated in each batch t of the training, and the exponential moving average processing is performed on the loss values: ; wherein represents the smoothed value of the i-th loss at the t-th time, and a3 is the smoothing coefficient, which is in the range of [0.9, 0.99] and is used to balance the historical trend and the current value; is the original loss value; After obtaining the smoothed loss value, the inverse of each loss is calculated as the corresponding initial weight: ; where, is the original weight of the ith loss at batch t, is a tiny constant to prevent the denominator from being zero, and is set to 1 x 10 -8 ; All initial weights are normalized: ; where, indicates the maximum weight of the ith loss at batch t, and the denominator is the sum of all initial weights; after normalization, the sum of all loss weights is always equal to 1, so that the total loss remains consistent in numerical scale; the final training objective function is obtained by weighting and summing each type of loss function according to the adaptive weight: ; The structure of the decoder is designed symmetrically with the encoder to ensure that the latent features are restored to the original time sequence space; the decoder first receives the latent vector output by the encoder and expands it to the preset time step length through the RepeatVector to form a time-sequenced input; on this basis, the Adaptive Skip-LSTM and CAD-TCN modules symmetric with the encoder are introduced to recover the time sequence dependence and feature dimension of different scales layer by layer, and finally the TimeDistributed is used to map the features of each time step to the original input dimension to output the complete reconstructed sequence.

[0010] Optionally, the step 4 comprises: after the model completes the training fitting and the overall loss function converges, using the trained decoder to map the latent space vector to generate a new power system operation data sample; First, load the saved decoder parameters to ensure that the structure of the generation stage is consistent with the training stage; then, randomly sample the latent vector from the standard normal distribution and input it into the decoder to generate a time sequence sample with the same dimension as the original data through step-by-step time expansion and convolution feature recovery; in this process, the model decodes the latent distribution information learned by the encoder into a new data sequence; finally, the generated result is de-normalized to restore the same numerical scale as the original operation data; through this process, the sample quantity is expanded while ensuring the consistency of data features.

[0011] In a second aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium comprising a stored program, wherein the program, when executed, controls a device in which the computer readable storage medium is located to perform the power system data generation method based on outlier detection and deep generation model in the first aspect or any possible implementation manner of the first aspect.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions that, when executed by the device, cause the device to perform the power system data generation method based on outlier detection and deep generation model in the first aspect or any possible implementation manner of the first aspect.

[0013] The technical scheme provided by the present application includes collecting original operation data of a power system, performing outlier detection on the original operation data and eliminating outliers, using cubic spline interpolation and moving average to complete the missing and eliminated data after outlier detection and elimination, fitting the completed data according to the constructed CAD-TCN-Adaptive Skip-LSTM-based adversarial autoencoder model, capturing local time series and long-range dependence of the data, and generating new power system data samples by using the fitted model to expand the data quantity, thereby improving the completeness of the power system data. BRIEF DESCRIPTION OF DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0015] Figure 1 A flowchart of the power system data generation method based on outlier detection and deep generation model provided by the embodiment of the present application is provided. Figure 2 A schematic diagram of the CAD-TCN-Adaptive Skip-LSTM-based adversarial autoencoder model provided by the embodiment of the present application is provided. Figure 3 A line graph of the generator and discriminator adversarial loss provided by the embodiment of the present application is provided. Figure 4 A line graph of the reconstruction loss provided by the embodiment of the present application is provided. Figure 5 A line graph of the maximum mean difference loss provided by the embodiment of the present application is provided. Figure 6 A broken line graph of timing consistency loss provided for an embodiment of the present application; Figure 7 A schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0017] It should be clear that the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0018] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms “a”, “an” and “the” used in the embodiments of the present application are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0019] It should be understood that the term “and / or” used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character “ / ” herein generally represents an “or” relationship between the front and rear associated objects.

[0020] Depending on the context, the word “if” as used herein can be interpreted as “when” or “upon” or “in response to determining” or “in response to detecting”. Similarly, depending on the context, the phrase “if it is determined” or “if (a stated condition or event) is detected” can be interpreted as “when it is determined” or “in response to determining” or “when (a stated condition or event) is detected” or “in response to detecting (a stated condition or event)”.

[0021] Figure 1 A flowchart of a power system data generation method based on outlier detection and deep generation model provided for an embodiment of the present application is shown in FIG. 1, which comprises the following steps. Figure 1 The method comprises the following steps. Step 1, collect the original operation data of the power system, and perform outlier detection and elimination on the original operation data.

[0022] In the embodiment of the present application, step 1 comprises: according to the distribution characteristics of the original operation data, using statistical analysis and clustering method to identify abnormal data; First, check the potential distribution characteristics of the original operation data, use D'Agostino'K 2 Test, which is used to assess normality by standardizing skewness and kurtosis, to construct a test statistic that approximately follows a chi-square distribution, so as to quantify the deviation of the sample from the normal distribution; compare the D'Agostino'K 2 Test p-value with the significance level a1 (a1 = 0.05), where the p-value represents the probability of the current or extreme test statistic occurring under the null hypothesis, the greater the value, the more difficult it is to reject the null hypothesis, and the data follows the normal distribution; if p > a1, the data follows the normal distribution, and under this condition, the Principle is used for outlier detection, The abnormal value judgment interval is: The sample points beyond the abnormal value judgment interval range are determined as outliers and are removed; Secondly, for the original operation data not following the normal distribution, K-means and interquartile range IQR are combined for detection; K-means is used to divide the data into internally consistent subsets, and IQR is used to identify outliers; this combination effectively reduces the threshold distortion caused by global distribution differences. First, the original operation data is clustered, and then outliers are identified within each cluster; since K-means is sensitive to the number of clusters, the optimal number of clusters is determined by the silhouette coefficient method , and the corresponding to the maximum silhouette coefficient is selected as the final number of clusters: ; Among them, ; after determining the optimal number of clusters, K-means is used for clustering, and the abnormal value within the jth cluster is detected based on IQR; the first quartile range , the third quartile range and the interquartile range , the expression for non-normal or skewed distribution data is: ; according to , the abnormal value judgment interval within the cluster is determined: The sample points beyond the abnormal value judgment interval range within the cluster are determined as outliers and are removed.

[0023] Step 2, after detecting and removing outliers, use cubic spline interpolation and moving average to complete the missing and removed data.

[0024] In the embodiment of the present application, step 2 comprises: After detecting outliers and removing them, in order to ensure the integrity of the data, the missing values need to be reasonably filled. Due to the complex and changeable operation state of the power system, the measurement data usually shows significant nonlinear characteristics. In order to more accurately reflect the change trend of the data itself, a nonlinear interpolation method, i.e. cubic spline interpolation, is used to complete the missing data; the spline interpolation constructs a local cubic polynomial in each interval , and its expression is: ; wherein, represents the coefficient, which is uniquely determined by the interpolation condition and the continuity condition of the first and second derivatives at the nodes; compared with the traditional high-order polynomial interpolation, the spline interpolation method has better numerical stability and local adaptability, and can effectively avoid the oscillation phenomenon.

[0025] However, the application range of the spline interpolation method has certain limitations, and the processing ability of the boundary data is insufficient. Since the spline interpolation needs to rely on the data adjacent to the interpolation point to determine the interpolation polynomial, when the missing value appears at the head or tail of the data sequence, due to the lack of necessary adjacent known data points, the interpolation function cannot be effectively constructed, which leads to the difficulty of applying the method in the data completion at both ends of the sequence. Therefore, a sliding average method based on the mean value of the data in the local neighborhood is used to fill the missing values at both ends of the data sequence, a fixed length sliding window is set, the mean value of the adjacent known data in the window is calculated, and the mean value is used as the substitute for the missing value; then the window moves forward or backward by a certain step until all the boundary missing values are filled, and the expression is: , or ; wherein, is the estimation value of the tth missing value; and are the known data adjacent to the missing point; k is the length of the sliding window. The length of the sliding window can be flexibly set according to the data characteristics, so as to balance the smoothness and the local feature retention ability.

[0026] Step 3, fitting the completed data according to the constructed CAD-TCN-Adaptive Skip-LSTM based adversarial autoencoder model, capturing the local time sequence and long-range dependence of the data.

[0027] In the embodiment of the application, the completed data is fitted to capture the local time sequence and long-range dependence of the data, so that the adversarial autoencoder model can learn the characteristics of the original operation data.

[0028] In the embodiment of the application, as shown in Figure 2 , step 3 comprises: The complex high-dimensional time series data is modeled and generated by fusing a cellular automaton-driven timing convolution network CAD-TCN and an adaptive skip long short-term memory network Adaptive Skip-LSTM structure; an adversarial autoencoder AAE is used as a core framework, and an adversarial regularization is introduced in the latent space to make the encoder output consistent with the preset Gaussian distribution; while ensuring the reconstruction accuracy, the continuity and the samplability are enhanced, so that samples matching the characteristics of the real data are generated through standard normal sampling, and the model stability and the generalization ability are improved; after the data are normalized and sampled by a sliding window, the data are input to the encoder; first, the data are sampled by a sliding window, that is, the window is sequentially slid on the time sequence, and the data in each continuous time period are cut off as an independent sample, so that a group of sequence fragments containing local time correlation are formed. The data in each window remain in the time sequence, which is used to capture short-term dynamic characteristics and enhance the time sequence continuity of the samples. Subsequently, the windowed data after standardization are input to the encoder for feature extraction and latent representation learning.

[0029] The CAD-TCN module is one of the core feature extractors in the encoder, and is used for hierarchical, multi-scale and dynamic interaction capable representation learning of high-dimensional time series data; first, the CAD-TCN module uses causal dilated convolution as the initial transformation: the input of time step t is subjected to one-dimensional causal dilated convolution to obtain an initial feature vector : ; wherein d is the dilated rate, which takes a value of 8, 4, 2, 1; K is the convolution kernel size, W k is the convolution weight; after the convolution, batch normalization BN and an activation function LeakyReLU are sequentially used to stabilize the training and increase the nonlinear expression; the use of dilated causal convolution can efficiently capture short-term details while expanding the receptive field by an exponential factor without significantly increasing the parameter amount.

[0030] On the initial convolution features, the CAD-TCN module uses a differentiable cellular automaton-driven unit to realize dynamic interaction modeling between local neighborhoods; each feature is regarded as a state vector of a cell, a lightweight rule network is defined, the rule network is a multi-layer perceptron MLP, and is used to generate a state update amount from the neighborhood : ; For parallel computation and boundary processing, the input is symmetrically padded in the time dimension, the neighborhood index is constructed in batches, and the neighborhood information is extracted using efficient tensor operations and then flattened and sent to the regular network. Cell evolution changes the neighborhood interaction from linear mixing of fixed convolution kernels to learnable nonlinear updating, allowing the model to adaptively determine the way information propagates along time within a local range, thereby improving sensitivity and modeling ability for non-stationary or locally coupled patterns. For generation tasks, this local evolution allows the encoded features to better reflect the patterns of short-term dynamic propagation in real sequences, forming a more coherent and sampleable distribution in the latent space. Cell evolution is performed in an iterative manner, with each step updated in small steps to ensure stability, and its expression is: ; where a2 is the update step size, k is the evolution iteration number; a2 is 0.1; By gradually accumulating local updates, both multi-scale information extracted by convolution and the temporal consistency and smoothness of features are enhanced. To avoid information loss or gradient degradation during the multi-step evolution process, residual connections and projection mappings are preserved in each CAD-TCN module. The final output of the CAD-TCN module is expressed as the sum of the evolved features and the linearly mapped input: ; where is a 1x1 convolution or linear transformation for dimension alignment; The CAD-TCN module combines the multi-scale receptive field of dilated convolution with learnable cell evolution based on neighborhoods to improve the modeling ability of time series patterns. In the generation framework of AAE, it provides a smoother, more consistent, and controllable high-order feature for the learned latent distribution, thereby directly improving the continuity and robustness of sequence generation. The high-order features extracted by the CAD-TCN module are passed to the Adaptive Skip-LSTM module for further integration of cross-step dependencies and adaptive preservation of key time step information, which are combined for high-quality generation and extension of time series data; The Adaptive Skip-LSTM module is another important component of the encoder, responsible for modeling key moments while highlighting important information in local time slices while ensuring efficiency. Unlike traditional fixed-step skip-LSTM, the Adaptive Skip-LSTM module dynamically determines the update of the hidden state based on the difference between the current input and the historical state through a gating mechanism, thereby achieving automatic skipping of redundant calculations and preservation of key moment information. It includes: Let the input sequence be x t , the previous hidden state be h t-1 , and the memory state be c t-1 , then the gate function gt The expression is: ; wherein, is a sigmoid function, W g and b g are the weight parameters and bias terms of the gating, and the output of the gating represents the update strength or update frequency of the current time step; when g t is close to 1, it means that the current time step information is important, and the model will update the hidden and memory states; when g t is close to 0, the model tends to skip updating and inherit the state at the last time; if g t is in the middle value, partial updating, i.e. soft updating, is performed, which realizes smooth transition by weighted fusion of new and old states: ; ; wherein, and are the update results of the standard LSTM unit at the current time; this design ensures that the model is fully updated at key moments, while saving computational resources at redundant or stable stages. Adaptive Skip-LSTM can automatically adjust the update strategy according to the changes in input data, enabling the model to capture sudden information, thereby achieving efficient feature representation in high-dimensional time series modeling of power systems.

[0031] In the entire encoder (generator) design, the input power system time series data is first passed through four layers of CAD-TCN modules, with expansion rates d of 1, 2, 4, and 8 respectively, and the number of convolution kernels is 32, 64, 128, and 256 respectively, to extract local time series dynamics; the CAD-TCN module uses a learnable cellular automaton driving mechanism to treat the features at each time step as a cell based on the causal dilated convolution to capture multi-scale temporal dependencies, which enables the model to capture complex dynamic patterns while maintaining temporal causality; then the Adaptive Skip-LSTM module integrates the dependency information to model the key global time series structure; finally, the fully connected layer is used to map the high-dimensional time series features to the latent space representation z; the discriminator uses the latent variable For input, after three layers of full connection containing 128 neurons and activation function LeakyReLU, the final output layer of a single neuron is obtained to judge the authenticity of the input sample; in the fitting process of AAE, in order to ensure that the latent variable z output by the encoder can approximate the preset real distribution, the discriminator is introduced to realize the distribution matching of the latent space; the input of the discriminator includes two latent vectors: one is the latent representation obtained by encoding the original running data by the encoder, which is subject to the posterior distribution Q z learned by the model; the other is the real sample sampled from the standard normal distribution ; the goal of the discriminator is to distinguish the sample from the real distribution P z from the sample output by the encoder Q z ; the optimization goal of the discriminator is based on the Wasserstein distance: ; Where D(·) represents the output of the discriminator; Compared with the traditional cross entropy or JS divergence, the Wasserstein distance can alleviate the problems of training instability and gradient disappearance, and still provide effective optimization signals when the support sets of the generated distribution and the real distribution do not overlap, so as to improve the effect of latent space distribution matching and the stability of model training.

[0032] At the same time, the optimization goal of the encoder is to make the latent vector distribution Q z output by the encoder consistent with the real distribution P z , so as to achieve the effect of confrontation; the loss function of the encoder is: ; In order to further verify the consistency of the latent space distribution output by the encoder and the preset standard normal distribution, the maximum mean difference MMD is introduced to measure the distribution difference between the two, which is a non-parametric distance measurement method based on reproducing kernel Hilbert space, which can effectively measure the difference of moment characteristics of two distributions in high-dimensional space: ; Where z and are samples from the real distribution and the encoder distribution respectively, is the kernel function; The smaller the value of MMD is, the closer the generated latent variable distribution is to the standard normal distribution, and the more consistent the latent space structure learned by the model is with the expectation.

[0033] Subsequently, the decoder is mirror-symmetric to the encoder in the overall structure, and its input is the latent vector z. Firstly, the temporal dependency is recovered by the vector repetition RepeatVector operation and the Adaptive Skip-LSTM layer. Then, the CAD-TCN module with four layers of gradually reduced dilation rates and gradually reduced convolution kernel sizes is used to realize the layer-by-layer reconstruction of multi-scale features. The dilation rates d are designed as 8, 4, 2, and 1, and the number of convolution kernels is 256, 128, 64, and 32. Finally, the output sequence is generated by using the time-step-by-time-step residual connection, so as to complete the mapping process from the latent space to the original data space. The mean square error (MSE) is used as the reconstruction loss function to measure the difference between the reconstructed samples output by the decoder and the original input samples: ; wherein, represents the original input sample, represents the sample reconstructed by the decoder. The MSE can effectively measure the difference in numerical amplitude between the reconstructed sample and the original sample, but it only guarantees the similarity in amplitude and cannot guarantee the consistency of dynamic behavior, which is insufficient to guarantee the smoothness and rationality of the generated sequence in the time dimension.

[0034] In order to further improve the continuity and authenticity of the data, a temporal consistency loss is introduced to constrain the dynamic change characteristics of the generated data: ; This loss constrains the differential change between adjacent time steps, so that the generated sequence not only maintains the overall numerical accuracy, but also conforms to the change rule of the original sequence, thereby effectively maintaining and optimizing the temporal characteristics.

[0035] The total loss is composed of the above three items: ; The reconstruction loss is used to ensure the point value reconstruction accuracy of the generated sequence in the sample space. The maximum mean difference loss is used to make the encoded z close to the preset prior, so as to ensure that the hidden vector obtained by sampling from the prior is a reasonable sample after decoding, and to solve the problem of poor quality of the generated sample from the prior sampling; The temporal consistency loss is used to ensure that the dynamic evolution characteristics of the generated sample are consistent with the real sequence. In the training process, the adaptive mechanism is adopted to dynamically adjust the weights of the multi-loss function. The importance of different loss functions is not the same in different stages, so the comprehensive optimization of reconstruction accuracy, distribution constraint and time consistency is realized by dynamically adjusting the weights. First, the three types of core loss values are calculated in each batch t of training. Through this process, the model can fully capture different levels of information from single-point accuracy to global distribution to time continuity, providing basic data for subsequent weight adjustment. Due to the gradient shock or local abnormal points in the training process of neural network, directly using the original loss value may lead to too drastic weight update, which will affect the stability of the model. Therefore, the exponential moving average processing is performed on the loss values: ; wherein, represents the smoothed value of the ith loss at the tth time, and a3 is the smoothing coefficient, which is in the range of [0.9, 0.99], and is used to balance the historical trend and the current value; is the original loss value; By introducing this mechanism, the influence of instantaneous fluctuations can be effectively reduced, making the weight adjustment process more stable and ensuring that the training direction always focuses on the overall optimization goal.

[0036] After obtaining the smoothed loss value, the reciprocal of each loss is calculated as the corresponding initial weight: ; is the original weight of the ith loss in batch t, is a small constant for preventing the denominator from being zero, and the value is 1×10 -8 ; This embodies the idea of reciprocal weighting, that is, when a certain loss value is large, the corresponding weight will automatically decrease; on the contrary, if a certain loss value is small, it means that the target has been relatively easy to optimize, and a higher weight will be obtained. The advantage of this design is that it can achieve dynamic balance between different goals, avoiding the dominance of a certain loss in the model update for a long time, thereby maintaining the overall coordination of the training process.

[0037] Since the initial weights of different losses may be in different numerical intervals, directly using them may lead to inconsistent scales of the overall loss function. Therefore, all initial weights are normalized: ; ​​​denotes the maximum weight of the ith loss in batch t, and the denominator is the sum of all initial weights; after normalization, the sum of all loss weights is always equal to 1, so that the total loss remains consistent in numerical scale; this mechanism ensures that different losses are combined in the same numerical scale, thereby avoiding the destruction of the overall optimization goal due to the large or small value of a certain type of loss. The final training objective function is obtained by weighting and summing each type of loss function according to the adaptive weight: ; In this way, the model realizes layer-by-layer optimization from global distribution to local fitting, and can adaptively allocate attention points at different training stages, avoiding the excessive dominance of a single target and ensuring the coordination between different optimization targets. This dynamic weight adjustment mechanism not only guarantees the multi-target consideration of the model, but also improves the robustness and convergence efficiency of the overall process.

[0038] In the embodiment of the application, the changes of each loss in the model training process are recorded, as shown in Figures 3 to 6 From the loss change trend, with the increase of the number of iterations, the loss values of each item present the rule of first decreasing and then stabilizing, and the model gradually converges. Among them, the adversarial loss of the encoder and the discriminator fluctuates greatly in the early stage of training, and then tends to be balanced, indicating that the adversarial process is stable and there is no mode collapse phenomenon; the reconstruction loss and the maximum mean difference loss remain at a low level after decreasing in the early stage of training, indicating that the model can effectively learn the original data features and make the latent distribution gradually approach the standard normal distribution; the time consistency loss stably decreases, further verifying the advantages of the model in maintaining time correlation and dynamic smoothness, and the generated sequence is consistent with the real data in overall trend and local change.

[0039] The structure of the decoder is designed to be symmetrical with the encoder to ensure that the latent features are restored to the original time sequence space; the decoder first receives the latent vector output by the encoder, and expands it to the preset time step length through the RepeatVector to form a time sequence input; on this basis, the Adaptive Skip-LSTM and CAD-TCN modules symmetrical with the encoder are introduced to recover the time sequence dependence and feature dimension of different scales layer by layer, and finally the features of each time step are mapped to the original input dimension through the TimeDistributed to output the complete reconstructed sequence.

[0040] Step 4, using the fitted model to generate new power system data samples to expand the data quantity.

[0041] In the embodiment of the application, step 4 comprises: after the model completes the fitting and the overall loss function converges, the trained decoder is used to map the latent space vector to generate new power system operation data samples, and the data distribution imbalance problem is alleviated. First, the saved decoder parameters are loaded to ensure that the structure of the generation stage is consistent with that of the training stage; then, latent vectors are randomly sampled from a standard normal distribution and input into the decoder to generate time series samples with the same dimension as the original data through step-by-step time series expansion and convolution feature recovery. In this process, the model decodes the latent distribution information learned by the encoder into new data sequences. Finally, the generated results are de-normalized to restore the same numerical scale as the original operation data. Through this process, the sample quantity is expanded and the distribution imbalance problem in the original data is alleviated while ensuring data feature consistency, thereby improving the data support capability and model training robustness in subsequent tasks.

[0042] It should be noted that the encoder in the application assumes the function of the generator in the generative adversarial network (GAN), and the encoder can be referred to as the generator in the adversarial training part.

[0043] The application compares different indicators (mean square error, maximum mean difference loss, time series consistency loss, generator loss, and discriminator loss), and the experimental results are shown in Table 1. The adversarial autoencoder model based on CAD-TCN-AdaptiveSkip-LSTM proposed in the application is significantly better than the traditional LSTM-GAN model in terms of key performance indicators. In comparison, the difference between the generated samples and the real samples of the model of the application is significantly reduced, and the model has stronger modeling ability in capturing time dependence and dynamic evolution rules. Overall, the model of the application performs significantly better in terms of generation accuracy, time series consistency, and training stability, which indicates that the method can more effectively learn the distribution characteristics of complex time series data and achieve high-fidelity, stable, and generalizable data generation.

[0044] Table 1 Comparison of experimental results .

[0045] The method combines outlier detection, generates and expands data according to the constructed CAD-TCN-Adaptive Skip-LSTM-based adversarial autoencoder model, can increase the number of samples, alleviate the imbalance of data distribution, and generate high-quality samples while keeping the original data features and dynamic evolution law; before data generation, first, the original operation data is detected and processed according to the statistical characteristics of the variable, to eliminate abnormal values and complete the missing data, and the quality of the subsequent generated input data is ensured. Subsequently, the CAD-TCN (Cellular Automata Driven Temporal Convolutional Network) is added in the encoder and decoder to capture complex local temporal correlation; combined with the Adaptive Skip-LSTM (Adaptive Skip-Long Short Term Memory Network), the state is dynamically updated according to the input and history difference, and the time sequence information is kept complete. The combination of the two can realize efficient modeling of complex high-dimensional time sequence characteristics while ensuring time causality. Combined with the adversarial autoencoder framework and the dynamic weight adjustment strategy of the multi-loss function, a three-part weighted loss is adopted, including reconstruction loss, maximum mean difference loss and temporal consistency loss, to ensure the reliability of the generated data in numerical value and dynamic evolution characteristics. The method can not only make up for the shortage of historical data, but also provide reliable generated data to support power system analysis and research, to meet the urgent demand for high-quality data of high-penetration new energy power system.

[0046] The technical scheme provided by the application comprises the following steps: collecting original operation data of a power system, detecting outliers of the original operation data and eliminating the outliers, completing the missing and eliminated data by using cubic spline interpolation and moving average, fitting the completed data according to a constructed CAD-TCN-Adaptive Skip-LSTM-based adversarial autoencoder model, capturing local time sequence and long-range dependence of the data, and generating new power system data samples by using the fitted model to expand the data quantity, thereby improving the integrity of the power system data.

[0047] The various steps of the embodiment of the application can be executed by an electronic device. The electronic device includes but is not limited to a tablet computer, a portable PC, a desktop computer, etc.

[0048] The embodiment of the application provides a computer readable storage medium, which comprises a stored program, wherein the program controls an electronic device in which the computer readable storage medium is located to execute the embodiment of the power system data generation method based on outlier detection and deep generation model described above when the program is running.

[0049] Figure 7 A schematic diagram of an electronic device provided by the embodiment of the application is shown in Figure 7As shown, the electronic device 21 comprises a processor 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the processor 211, which, when executed by the processor 211, implements the power system data generation method based on outlier detection and deep generation model in the embodiments. For the sake of brevity and conciseness, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.

[0050] The electronic device 21 comprises, but is not limited to, the processor 211 and the memory 212. Those skilled in the art can understand that the electronic device 21 can further comprise other components, such as an input / output device, a network access device, a bus, etc. Figure 7 The electronic device 21 is only an example and does not constitute a limitation on the electronic device 21, and can comprise more or fewer components than those shown, or combine certain components, or different components, for example, the electronic device can further comprise an input / output device, a network access device, a bus, etc.

[0051] The processor 211 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0052] The memory 212 can be an internal storage unit of the electronic device 21, such as a hard disk or a memory of the electronic device 21. The memory 212 can also be an external storage device of the electronic device 21, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 21. Further, the memory 212 can include both the internal storage unit and the external storage device of the electronic device 21. The memory 212 is used to store computer programs and other programs and data required by the network device. The memory 212 can also be used to temporarily store data that has been output or will be output.

[0053] Those skilled in the art can clearly understand that, for the sake of brevity and conciseness, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.

[0054] The above merely provides the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A power system data generation method based on outlier detection and deep generative model, characterized in that, The method comprises: Step 1, collecting original operation data of a power system, performing outlier detection on the original operation data and removing outliers; Step 2, after the outlier detection and removal, the missing and removed data are completed by using cubic spline interpolation and moving average; Step 3, fitting the completed data according to the constructed CAD-TCN-Adaptive Skip-LSTM-based adversarial autoencoder model, capturing local time sequence and long-range dependence of the data; Step 4, generating new power system data samples by using the fitted model to expand the data quantity.

2. The method of claim 1, wherein, The step 1 comprises: identifying abnormal data by using statistical analysis and clustering methods according to the distribution characteristics of the original operation data; Firstly, the potential distribution characteristics of the original operation data were checked, and D'Agostino'K 2 test was adopted to evaluate normality by standardizing skewness and kurtosis, to construct a test statistic approximately following chi-square distribution, so as to quantify the deviation of the sample from the normal distribution; the D'Agostino'K 2 test p value was compared with the significance level a1, wherein the p value represents the probability of the current or extreme test statistic occurring under the condition that the zero hypothesis is true, the greater the value, the more difficult it is to reject the zero hypothesis, and the data is subject to the normal distribution; if p > a1, the data is subject to the normal distribution, and under this condition, the principle is adopted for outlier detection, the abnormal value discrimination interval is: the sample points exceeding the abnormal value discrimination interval range are determined as outliers and are removed; Secondly, for the original operation data not following normal distribution, K-means and interquartile range (IQR) are combined for detection; K-means is used to divide data into subsets consistent with each other, and IQR is used to identify outliers; first, the original operation data are clustered, and then outliers are identified in each cluster; the optimal cluster number is determined by the silhouette coefficient method , and the cluster number corresponding to the maximum silhouette coefficient is selected as the final cluster number : ; in, After determining the optimal number of clusters, K-means clustering is used, and outliers are detected within the j-th cluster based on IQR; the first quartile distance is calculated. Third and fourth intervals and interquartile range The expression for non-normal or skewed distributed data is: ;according to Determine the interval for judging outliers within the cluster: Sample points that exceed the outlier judgment range within the cluster are identified as outliers and removed.

3. The method of claim 2, wherein, The step 2 comprises: After detecting outliers and removing them, the missing data is completed by using a non-linear interpolation method, i.e. cubic spline interpolation. The spline interpolation constructs a local cubic polynomial in each interval The local cubic polynomial is constructed as follows: ; wherein denote the coefficients, uniquely determined by the interpolation conditions and their first and second order derivative continuity conditions at the nodes; The missing values at the beginning and end of the data sequence are filled by using the moving average, a fixed-length sliding window is set, the mean value of the adjacent known data in the window is calculated, and the mean value is used as the replacement of the missing value; then the window moves forward or backward by a certain step, and all the boundary missing values are filled, and the expression is: , or ; wherein, is the estimate for the tth missing value; and are the known data adjacent to the missing point; k is the length of the sliding window.

4. The method of claim 3, wherein, The step 3 comprises: The complex high-dimensional time series data are modeled and generated by fusing the cellular automaton-driven time series convolution network CAD-TCN and the adaptive skip long short-term memory network Adaptive Skip-LSTM structure; the adversarial autoencoder AAE is used as the core framework, the adversarial regularization is introduced in the latent space to make the encoder output consistent with the preset Gaussian distribution; the continuity and samplability are enhanced while ensuring the reconstruction accuracy, so that the samples matching the characteristics of the real data are generated by standard normal sampling; the data are normalized and sampled by using the sliding window, and then input to the encoder; As one of the core feature extractors in the encoder, the CAD-TCN module is used for hierarchical, multi-scale, and dynamic interaction capable representation learning of high-dimensional time series data. First, the CAD-TCN module uses a causal dilated convolution as the initial transformation: the input at time step t Applying a one-dimensional causal dilated convolution obtains an initial feature vector : ; Wherein d is the expansion rate, which takes the value of 8, 4, 2, 1; K is the convolution kernel size, W k is the convolution weight; after convolution, batch normalization BN and activation function LeakyReLU are followed to stabilize the training and increase the nonlinear expression; On top of the initial convolutional features, the CAD-TCN module employs a differentiable cellular automaton evolution unit to model the dynamic interactions between local neighborhoods; each feature is considered as a state vector of a cell , and a lightweight rule network is defined The rule network is a multi-layer perceptron (MLP) that takes as input the state of the neighborhood and produces a state update ; In order to perform parallel calculation and boundary processing, the input is symmetrically filled in the time dimension, the neighborhood index is constructed in batches, the neighborhood information is extracted by using efficient tensor operation and then flattened and sent to the regular network; the cellular evolution changes the linear mixing of the fixed convolution kernel to the learnable nonlinear update, allowing the model to adaptively determine the way of information propagation along time in a local range; the cellular evolution is executed in an iterative manner, and each step is updated by a small step to ensure stability, and the expression is: ; Wherein, alpha2 is the update step, and k is the evolution iteration number; Residual connection and projection mapping are reserved in each CAD-TCN module, and the final output of the CAD-TCN module is expressed in the form of adding the evolved features and the input of linear mapping: ; wherein, is a 1 x 1 convolution or linear transformation for dimension alignment; The CAD-TCN module combines the multi-scale receptive field of dilated convolution with the learnable cellular evolution based on neighborhood to improve the modeling ability of time series patterns; and provides high-order features for the learned latent distribution in the generation framework of AAE; the high-order features extracted by the CAD-TCN module are transmitted to the Adaptive Skip-LSTM module for further integrating cross-step dependence and adaptively retaining information of key time steps, which are jointly used for generation and expansion of time series data; The Adaptive Skip-LSTM module, as another important component of the encoder, is responsible for modeling key moments while highlighting important information in local time slices while ensuring efficiency. The Adaptive Skip-LSTM module dynamically determines the update of the hidden state according to the difference between the current input and the historical state through a gating mechanism. It includes: Let the input sequence be x t , the hidden state at the last time be h t-1 , and the memory state be c t-1 , then the expression of the gate function g t is ; wherein, is a sigmoid function, W g and b g are the weight parameters and bias term of the gating, the output of the gating represents the update strength or update frequency at the current time step; when g t is close to 1, it indicates that the information at the current time step is important, and the model will update the hidden and memory states; when g t is close to 0, the model tends to skip the update and inherit the state at the previous time; if g t is in the middle value, partial update, i.e. soft update, is performed, and smooth transition is achieved by weighted fusion of the new and old states: ; ; wherein, with is the update result of the standard LSTM unit at the current time point; In the whole encoder design, the input power system time series data first passes through four layers of CAD-TCN modules, and the expansion rate d of each module is 1, 2, 4, and 8 respectively, and the number of convolution kernels is 32, 64, 128, and 256 respectively, to extract local time series dynamics; On the basis of capturing multi-scale time dependence by causal dilated convolution, the CAD-TCN module uses a learnable cellular automaton driving mechanism to consider the features of each time step as a cell; Then the Adaptive Skip-LSTM module integrates the dependence information to model the key global time series structure; Finally, the fully connected layer is used to map the high-dimensional time series features to the latent space representation z; The discriminator takes the latent variable z output by the encoder as input , and passes through three layers of fully connected layers containing 128 neurons and the activation function LeakyReLU, and finally obtains the discriminant value through a single neuron output layer to judge the authenticity of the input sample; In the fitting process of AAE, in order to ensure that the latent variable z output by the encoder can approximate the preset true distribution, the discriminator is introduced to realize the distribution matching of the latent space; The input of the discriminator includes two latent vectors: one is the latent representation obtained by the encoder encoding the original running data, which is subject to the posterior distribution Q z learned by the model; The other is a real sample sampled from the standard normal distribution ; The goal of the discriminator is to distinguish samples from the true distribution P z from samples from the encoder output Q z ; The optimization goal of the discriminator is based on the Wasserstein distance: ; where D(•) represents the output of the discriminator; At the same time, the optimization goal of the encoder is to make the latent vector distribution Q z tend to be consistent with the real distribution P z , achieving the effect of confrontation; the loss function of the encoder is: ; To further verify the consistency of the encoder output latent space distribution with the preset standard normal distribution, the maximum mean difference MMD is introduced to measure the distribution difference between the two: ; where z and are samples from the true and encoder distributions, respectively, is a kernel function; Subsequently, the decoder maintains a mirror symmetry relationship with the encoder in the overall structure. The input of the decoder is the latent vector z. First, the vector repetition RepeatVector operation and the Adaptive Skip-LSTM layer are used to restore the time dependence. Then, the CAD-TCN module with four layers of gradually decreasing dilation rates and gradually decreasing convolution kernel sizes is used to realize the reconstruction of multi-scale features layer by layer. The dilation rate d is designed as 8, 4, 2, and 1, and the number of convolution kernels is 256, 128, 64, and 32. Finally, the output sequence is generated using the time step-by-time step residual connection, thereby completing the mapping process from the latent space to the original data space. The mean square error MSE between the reconstructed samples output by the decoder and the original input samples is used as the reconstruction loss function to measure the difference: ; wherein, denotes the original input sample, denotes the decoder reconstructed sample; To further improve the continuity and authenticity of the data, a temporal consistency loss is introduced to constrain the dynamic change characteristics of the generated data: ; The total loss is composed of the above three items: ; The reconstruction loss is used to ensure the point value reconstruction accuracy of the generated sequence in the sample space; The maximum mean difference loss is used to make the encoded z close to the preset prior; The timing consistency loss is used to ensure that the dynamic evolution characteristics of the generated sample are consistent with the real sequence; During the training process, the weights of the multiple loss functions are dynamically adjusted using an adaptive mechanism. First, the three core loss values are calculated in each batch t of the training process, and the exponential moving average is used to process the loss values: ; wherein, represents the smoothing value of the ith loss at the tth time, and a3 is a smoothing coefficient, which is in the range of [0.9, 0.99] and is used to balance the historical trend and the current value; is the original loss value; After obtaining the smoothed loss values, the inverse of each loss is calculated as the corresponding initial weight: ; wherein, is the original weight of the ith loss at batch t, is a small constant to prevent the denominator from being zero, and is set to 1 x 10 -8 ; The initial weights are normalized: ; wherein, denotes the maximum weight of the ith loss at batch t, and the denominator is the sum of all initial weights; after normalization, the sum of all loss weights is always equal to 1, so that the total loss remains consistent in numerical scale; the final training objective function is obtained by weighting and summing each loss function according to the adaptive weight: ; The structure of the decoder is designed to be symmetrical with the encoder to ensure that the latent features are restored to the original time sequence space. The decoder first receives the latent vector output by the encoder and expands it to the preset time step length using the RepeatVector operation to form a time series input. On this basis, the Adaptive Skip-LSTM and CAD-TCN modules symmetric with the encoder are introduced to restore the time dependence and feature dimension of different scales layer by layer, and finally the TimeDistributed layer is used to map the features of each time step to the original input dimension to output the complete reconstruction sequence.

5. The method of claim 4, wherein, Step 4 includes: after the model is trained and the overall loss function converges, the decoder obtained by training is used to map the latent space vector to generate new power system operation data samples; First, load the saved decoder parameters to ensure consistency between the generation phase and the training phase; then, randomly sample latent vectors from the standard normal distribution and input them into the decoder to generate time series samples with the same dimensions as the original data through step-by-step temporal unfolding and convolution feature recovery. In this process, the model decodes the latent distribution information learned by the encoder into new data sequences. Finally, the generated results are denormalized to recover the same numerical scale as the original operational data. Through this process, the sample size is expanded while ensuring consistency in data features.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program controls the device where the computer-readable storage medium is located to execute the power system data generation method based on the outlier detection and deep generation model according to any one of claims 1 to 5 when the program is running.

7. An electronic device, comprising: including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions, which when executed by the device, cause the device to perform the power system data generation method based on outlier detection and deep generative model of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Long-term pavement monitoring data enhancement method based on highway sensor network layout

    CN115374903A

  • Power system false data positioning and recovering system based on deep learning

    CN120508996A

  • Deep sea manned submersible unsupervised anomaly detection method and system based on multi-modal feature fusion

    CN120805012A

  • Small sample industrial defect detection system based on multi-stage diffusion model

    CN120953220A

  • Deep learning-based high-precision point cloud completion method and apparatus

    WO2024060395A1

Cited By

  • Non-inductive access method and device based on Bluetooth key, medium and program product

    CN121617169A