Industrial time series data enhancement method and device based on cooperative constraint
By combining data preprocessing, an improved variational autoencoder, and a conditional generative adversarial network with a time-series feature constraint model, the problems of scarcity and noise in industrial time-series data are solved, generating high-quality and diverse industrial time-series data.
Patent Information
- Application Number
- CN202510994883.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-07-18
AI Technical Summary
In industrial IoT scenarios, time-series data is scarce, skewed, and contains signal noise and outliers. Existing data augmentation methods struggle to effectively capture complex time-series patterns, resulting in low-quality data and insufficient sample size.
Industrial time-series data augmentation is achieved through the synergistic use of data preprocessing, an improved variational autoencoder model, a conditional generative adversarial network (GAN), and a temporal feature constraint model. Data preprocessing removes anomalies and noise; the improved variational autoencoder generates initial samples; the GAN optimizes the data; the temporal feature constraint model ensures relevance; and finally, sample evaluation and selection are performed.
The quality and sample size of the generated data have been improved, ensuring that the data conforms to the industrial time sequence logic, and the authenticity and diversity of the generated data have been enhanced.
Smart Images

Figure CN120873404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for enhancing industrial time-series data based on cooperative constraints. Background Technology
[0002] In Industrial Internet of Things (IIoT) scenarios, time-series data (such as sensor readings and equipment status monitoring data) is a crucial data type. This type of data typically exhibits characteristics such as scarcity, skewness, and the presence of signal noise and outliers. Data scarcity refers to the difficulty in obtaining data on critical faults or extreme operating conditions in some industrial equipment or scenarios. Skewness refers to the potential imbalance in time-series data, with a large amount of data concentrated in "normal states," making it difficult to cover "abnormal states" or failure scenarios. The presence of unstable factors such as signal noise and outliers can affect accurate data analysis. To address these issues, data augmentation has become an effective solution. In traditional industrial systems, data augmentation methods are mainly based on rules or simple transformations, such as scaling or shifting signals. However, these methods struggle to effectively capture complex time-series patterns.
[0003] In recent years, deep learning-based generative models (such as Conditional Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs) have demonstrated outstanding performance in fields such as image generation and natural language processing. However, the application of these generative models in the field of industrial time-series data augmentation remains limited, mainly due to the following three difficulties. First, the generation of time-series data needs to consider the temporal structure and long-term dependencies. Second, the industrial sector has high requirements for data quality, demanding highly reliable and near-real-world data. Finally, when generating rare or anomalous data, deep generative models are easily limited by the distribution of the training data. These traditional techniques often result in low-quality generated data and insufficient sample size. Summary of the Invention
[0004] This invention provides an industrial time-series data augmentation method and apparatus based on collaborative constraints, which can ensure the data quality of the generated data and increase the sample size of the generated data.
[0005] Acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data;
[0006] Standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples;
[0007] The initial data sample is input into a conditional generative adversarial network to perform data optimization operations, resulting in an optimized data sample.
[0008] By using a time-series feature constraint model to impose industrial time-series correlation constraints on the optimization data samples, industrial constraint data samples are obtained.
[0009] The target generated data sample is obtained by evaluating and screening the industrial constraint data sample.
[0010] Optionally, the step of using the data preprocessing module to perform data preprocessing operations on the industrial time-series data to obtain standard industrial time-series data includes:
[0011] Statistical analysis methods are used to detect outlier data in industrial time series data and outlier data are removed to obtain normal industrial time series data.
[0012] Denoising industrial time series data is obtained by using a smoothing filter to remove noise from normal industrial time series data.
[0013] The dynamic time warping algorithm is used to align the normalized and standardized denoised industrial time series data to obtain standardized industrial time series data.
[0014] The missing values in the standardized industrial time series data are imputed to obtain the standard industrial time series data.
[0015] Optionally, the step of using statistical analysis methods to detect outlier data in industrial time-series data and performing outlier data removal processing includes:
[0016] Calculate the mean and standard deviation of industrial time-series data;
[0017] An outlier range standard is constructed using the mean and standard deviation, and outliers in industrial time series data are marked and removed using the outlier range standard.
[0018] Optionally, the step of inputting standard industrial time-series data into the improved variational autoencoder model to generate initial data samples includes:
[0019] Input standard industrial time-series data into the encoder of the improved variational autoencoder model to output the latent distribution parameters;
[0020] Construct a latent distribution using the latent distribution parameters, and sample latent variables from the latent distribution;
[0021] The loss function of the improved variational autoencoder model is constructed based on the latent variables, and the weight values of the divergence expression part in the loss function are dynamically adjusted using hyperparameters. The weight values of the divergence expression part in the loss function are then used to make the latent distribution approximate the standard normal prior.
[0022] Potential sampling points are obtained by randomly sampling from the standard normal prior, and these potential sampling points are input into the decoder of the improved variational autoencoder model to generate initial data samples.
[0023] Optionally, the step of performing data optimization operations in a conditional generative adversarial network to obtain optimized data samples includes:
[0024] The input layer of the generator in a conditional generative adversarial network receives initial data samples and conditional information, and transforms the conditional information into a conditional vector.
[0025] Obtain the random noise distribution, and combine the random noise distribution with the conditional vector and the initial data sample to generate the initial sample of noisy data;
[0026] The generator and discriminator in the conditional generative adversarial network are optimized using the perceptual loss function, and the optimized generator and discriminator are then used for adversarial learning to obtain optimized data samples.
[0027] Optionally, the step of using a time-series feature constraint model to constrain the industrial time-series correlation of the optimized data samples includes:
[0028] The time-series feature constraint model includes: constructing a smoothing constraint on the rate of change of adjacent time points using a regularization algorithm; constructing a time dependency constraint using a pre-constructed time memory network; constructing a range of change constraint and a rate of change constraint using application scenario knowledge; calculating and optimizing the correlation matrix in the data sample and constructing a multivariate correlation constraint using the correlation matrix.
[0029] The total constraint of time series features is obtained by integrating the constraints of smoothing of rate of change, time dependence, range of change, rate of change, and multivariate correlation.
[0030] By applying the total constraint of time series features to the optimization data sample, an industrial time series correlation constraint is obtained to obtain an industrial constraint data sample.
[0031] Optionally, the sample evaluation of the industrial constraint data sample includes:
[0032] The first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula.
[0033] A comprehensive evaluation index is obtained by integrating the first evaluation index, the second evaluation index, and the third evaluation index.
[0034] A comprehensive evaluation score is calculated using comprehensive evaluation indicators, and the industrial constraint data sample is evaluated based on the comprehensive evaluation score to obtain the sample evaluation results.
[0035] To address the aforementioned problems, the present invention also provides an industrial time-series data augmentation device based on cooperative constraints, the device comprising:
[0036] The data generation module is used to acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data; the standard industrial time-series data is then input into the improved variational autoencoder model to generate initial data samples.
[0037] The data filtering module is used to perform data optimization operations in a generative adversarial network to obtain optimized data samples from the initial data sample input conditions; to apply industrial time-series correlation constraints to the optimized data samples using a time-series feature constraint model to obtain industrial constraint data samples; and to evaluate and filter the industrial constraint data samples to obtain target generated data samples.
[0038] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:
[0039] At least one processor; and,
[0040] A memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the above-described cooperative constraint-based industrial time-series data augmentation method.
[0042] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the aforementioned cooperative constraint-based industrial time-series data augmentation method.
[0043] This invention utilizes a data preprocessing module to perform data preprocessing operations on industrial time-series data. This removes outliers and missing data, improving data quality and providing high-quality foundational data for subsequent data generation. Furthermore, standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples. The use of this improved model ensures reconstruction quality and data diversity. Additionally, the initial data samples are input into a conditional generative adversarial network (GAN) for data optimization, resulting in optimized data samples. Introducing conditional information into the GAN enhances the realism of the generated data. Moreover, a time-series feature constraint model is used to impose industrial time-series correlation constraints on the optimized data samples, strengthening the time-series structure and long-term dependency characteristics, ensuring that the generated data conforms to industrial time-series logic. Finally, the industrial constraint data samples are evaluated and screened to select high-quality samples and balance data distribution, ensuring data quality and increasing the sample size of the generated data. Attached Figure Description
[0044] Figure 1 This is a flowchart illustrating an embodiment of the industrial time-series data augmentation method based on collaborative constraints provided by the present invention.
[0045] Figure 2 A functional block diagram of an industrial time-series data enhancement device based on cooperative constraints is provided in an embodiment of the present invention.
[0046] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the industrial time-series data augmentation method based on cooperative constraints, according to an embodiment of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0049] This application provides a method for industrial time-series data augmentation based on collaborative constraints. The executing entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0050] Reference Figure 1 The diagram shown is a flowchart illustrating an industrial time-series data augmentation method based on collaborative constraints according to an embodiment of the present invention. In this embodiment, the industrial time-series data augmentation method based on collaborative constraints includes:
[0051] S1. Acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data.
[0052] In this embodiment of the invention, industrial time-series data is a set of time-series data in an industrial time-series dataset. The industrial time-series dataset refers to a collection of continuous observations recorded in chronological order by temperature sensors, humidity sensors, and other industrial sensors in an Industrial Internet of Things (IIoT) scenario.
[0053] As one embodiment of the present invention, a data preprocessing module is used to perform data preprocessing operations on industrial time-series data to obtain standard industrial time-series data, including:
[0054] Statistical analysis methods are used to detect outlier data in industrial time series data and outlier data are removed to obtain normal industrial time series data.
[0055] Denoising industrial time series data is obtained by using a smoothing filter to remove noise from normal industrial time series data.
[0056] The dynamic time warping algorithm is used to align the normalized and standardized denoised industrial time series data to obtain standardized industrial time series data.
[0057] The missing values in the standardized industrial time series data are imputed to obtain the standard industrial time series data.
[0058] For example, the following implementation steps can be used to perform data preprocessing operations on industrial time-series data using a data preprocessing module to obtain standard industrial time-series data:
[0059] Input: The original industrial time series dataset, denoted as X = {x1, x2, ..., x...} N},in For each set of time series data (length T), i is the sequence number of the i-th set of time series data.
[0060] Output: Preprocessed time series data X′={x′1,x′2,…,x′ N This process removes noise, eliminates outliers, and completes normalization and augmentation to meet the input requirements of subsequent models.
[0061] The first step is data cleaning, which involves outlier detection and removal. The core of this process is eliminating abnormal data from industrial time-series data (such as invalid data generated during equipment malfunctions). This is primarily done through statistical analysis or simple rule-based detection. First, the mean μ of each time-series data point is calculated. i and standard deviation σ i :
[0062]
[0063] Then, outliers are defined as data points that exceed a certain range. If k=3, then mark it as an outlier.
[0064] The second step is to perform data denoising, i.e., signal smoothing and filtering. Acquired industrial time-series data often contains high-frequency noise, which can be smoothed using the following methods. First, a smoothing filter is used. The moving average is defined with a window size of w, and the moving average formula is:
[0065]
[0066] Where j is the j-th window, x i ′ t Let be the moving average of the i-th time series data of length t. The moving average effectively smooths out small-range fluctuations. Then, signal decomposition is performed to complete wavelet denoising. Discrete Wavelet Transform (DWT) can be used to decompose the signal, removing high-frequency noise and retaining low-frequency and mid-frequency components.
[0067] x i =L i +H i
[0068] Among them, L i It is a low-frequency component, H i It is a high-frequency component. You can choose to retain L. i Discard or reduce the weight of H i .
[0069] The third step is to perform data normalization and standardization. Scaling the data to a uniform range helps improve the convergence speed of deep learning models. There are generally two methods: min-max normalization and standardization. Min-max normalization is suitable for data where the input features are within known limits.
[0070]
[0071] Where max(x) i ) represents the maximum value of each set of time series data, min(x) i () represents the minimum value of each set of time series data. Let be the i-th time series data set of length t. Standardization is commonly used for time series data, removing the mean and scaling by the standard deviation:
[0072]
[0073] The fourth step is to achieve time alignment using Dynamic Time Warping (DTW). Since industrial equipment operation can cause time misalignment in timing data, time alignment is a crucial step. The Dynamic Time Warping method is defined as follows: given two segments of timing data x... m ={x 1,x 2 ,…,x T} and x n ={y 1 ,y 2 ,…,y T}, find the optimal alignment path (i.e., minimize distance D) through DTW:
[0074] D(m,n)=|x m -x n |+min{D(m-1,n),D(m,n-1),D(m-1,n-1)}
[0075] Where D(m,n) is the cumulative distance between the m-th point and the n-th point, the main function of DTW is to align time series and form a normalized series.
[0076] The fifth step is to complete the data. Since industrial data may contain a large number of missing values, these missing points need to be filled in to achieve better experimental results. For some data, linear interpolation can be used, such as interpolating between two adjacent known values. and Insert linear points between:
[0077]
[0078] For some complex data, model-based interpolation can be used to predict missing values using deep learning models (such as simple autoencoders or RNN networks).
[0079] Furthermore, statistical analysis methods are used to detect outlier data in industrial time-series data and to remove outlier data, including:
[0080] Calculate the mean and standard deviation of industrial time-series data;
[0081] An outlier range standard is constructed using the mean and standard deviation, and outliers in industrial time series data are marked and removed using the outlier range standard.
[0082] S2. Input standard industrial time-series data into the improved variational autoencoder model to generate initial data samples.
[0083] In this embodiment of the invention, the improved variational autoencoder model refers to the data generation model that introduces hyperparameters into the variational autoencoder.
[0084] As an embodiment of the present invention, standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples, including:
[0085] Input standard industrial time-series data into the encoder of the improved variational autoencoder model to output the latent distribution parameters;
[0086] Construct a latent distribution using the latent distribution parameters, and sample latent variables from the latent distribution;
[0087] The loss function of the improved variational autoencoder model is constructed based on the latent variables, and the weight values of the divergence expression part in the loss function are dynamically adjusted using hyperparameters. The weight values of the divergence expression part in the loss function are then used to make the latent distribution approximate the standard normal prior.
[0088] Potential sampling points are obtained by randomly sampling from the standard normal prior, and these potential sampling points are input into the decoder of the improved variational autoencoder model to generate initial data samples.
[0089] For example, the following implementation steps can be used to input standard industrial time-series data into an improved variational autoencoder model to generate initial data samples:
[0090] (1) Encoder: The input is the preprocessed time-series data X′={x′1,x′2,…,x′ N The output is the latent distribution parameters μ and σ. The encoder structure uses a deep convolutional neural network (CNN) or an LSTM network with an attention mechanism to capture the local features and temporal dependencies of the time series.
[0091] (2) Decoder: The input is the latent variable z, and the output is the generated data. The decoder structure uses deconvolution operations or neural networks combined with attention mechanisms to reconstruct temporal features.
[0092] (3) Loss Function: ωVAE introduces a hyperparameter ω to adjust the weights of the KL divergence, thereby achieving more flexible distribution control in the latent space. The loss function of tVAE is defined as:
[0093]
[0094] in, For the expected operation, q φ (z|x) represents the probability distribution of the encoder output, φ represents the encoder neural network parameters, and logP θ (x|z) represents the log-likelihood of the decoder, θ represents the parameters of the decoder neural network, and p(z) represents the latent distribution. It is the reconstruction error, representing the similarity between the generated data and the real data, KL(q) φ(z|x)||p(z)) is the KL divergence, representing the difference between the latent distribution and the prior distribution. ω is a hyperparameter used to balance the weights of reconstruction error and KL divergence. When ω>1, the weight of KL divergence increases, the distribution of the latent space is closer to the prior distribution (usually a standard normal distribution), and the diversity of generated data increases, but the reconstruction quality may decrease slightly. When ω<1, the weight of KL divergence decreases, the model focuses more on reconstruction quality, the generated data is closer to the real data, but the diversity may be insufficient.
[0095] The improved variational autoencoder model described in this invention dynamically adjusts the weights of the KL divergence in the loss function through the hyperparameter ω. By dynamically adjusting the value of ω, both reconstruction quality and data diversity are ensured. In the early stages of training, a smaller ω value is set to prioritize reconstruction quality; in the later stages of training, the ω value is gradually increased to strengthen the distribution constraints of the latent space and improve the diversity of generated data.
[0096] Furthermore, the normal operating mechanism of a VAE captures the overall distribution of the data, while outliers are often few and difficult to model explicitly. Therefore, before inputting standard industrial time-series data into the improved variational autoencoder model to generate initial data samples, an outlier priority mechanism is established, implemented using the following steps:
[0097] First, anomaly detection-guided generation is performed, using a preliminary anomaly detection mechanism to divide the input time-series data x into normal samples x. normal and abnormal sample x anormaly Abnormal samples are given higher weights during the encoding phase to highlight their distribution characteristics. The guiding objective is expressed as follows:
[0098]
[0099] Wherein, weight w i =α (α>1) is used to amplify the importance of outlier samples, so that more attention is paid to outlier regions during optimization. The final loss function is adjusted to,
[0100]
[0101] Then, the latent spatial anomaly distribution is enhanced, and the latent representation z of the anomaly samples is obtained. anormaly In the latent space of tVAE, the data may be located in a sparse region. To prioritize the generation of outlier samples, anomaly prior adjustment and resampling mechanisms can be used to strengthen the outlier distribution. When performing anomaly prior adjustment, the prior distribution of the latent space needs to be modified to give a higher probability of generating outlier regions. Assuming p(z) is typically a standard normal distribution N(0,1), then adjusting the anomaly prior distribution p... anomaly (z) is:
[0102]
[0103] Where, μ anomaly and This represents the distribution parameters of outlier samples in the latent space. A resampling mechanism is then established, where, during the generation phase, sampling weights are allocated skewed towards outlier regions (from p). anomaly The probability of sampling in (z) is greater than that in the normal distribution.
[0104] Finally, post-processing for anomaly enhancement is performed. The generated samples are further filtered through anomaly characteristic matching to ensure that they reflect anomaly characteristics while avoiding unrealistic scenarios. Anomaly characteristic matching metrics include distribution matching and temporal continuity. That is, the characteristics of the generated anomaly samples should be consistent with the first-order (mean, variance) and higher-order characteristics (frequency components, etc.) of the original anomaly samples, while also possessing the continuity of the true time series.
[0105] L dist =||μ gen -μ real ||+||σ gen -σ real ||
[0106]
[0107] Among them, L dist For anomalous feature matching loss, μ gen To generate the mean of the outlier samples, μ real σ is the mean of the original outlier samples. gen To generate the standard deviation of outlier samples, σ real L represents the standard deviation of the original outlier samples. smooth1 This is a continuous smooth loss.
[0108] In this embodiment of the invention, the anomaly matching loss calculates the difference in mean and standard deviation between the generated anomaly sample and the original anomaly sample. The smaller the difference, the closer the distribution of the generated sample is to the distribution of the real anomaly sample. The continuity smoothness loss calculates the smoothness of the generated sample in the time dimension. By minimizing this loss function, it can be ensured that the generated sample has continuity and smoothness in time, avoiding abrupt changes or discontinuities. After the above screening, truly effective anomaly samples are retained.
[0109] S3. Input the initial data samples into the conditional generative adversarial network to perform data optimization operations and obtain optimized data samples.
[0110] In this embodiment of the invention, a conditional generative adversarial network refers to a generative adversarial network with added conditional information, which can guide the generative adversarial network to generate data that better meets actual needs.
[0111] As one embodiment of the present invention, optimizing data samples is obtained by performing data optimization operations in a generative adversarial network on the initial data sample input conditions, including:
[0112] The input layer of the generator in a conditional generative adversarial network receives initial data samples and conditional information, and transforms the conditional information into a conditional vector.
[0113] Obtain the random noise distribution, and combine the random noise distribution with the conditional vector and the initial data sample to generate the initial sample of noisy data;
[0114] The generator and discriminator in the conditional generative adversarial network are optimized using the perceptual loss function, and the optimized generator and discriminator are then used for adversarial learning to obtain optimized data samples.
[0115] Furthermore, the conditional information is transformed into a conditional vector, including:
[0116] Identify the condition category of condition information;
[0117] When the condition category is a discrete category, the condition information is mapped to a low-dimensional space to obtain a condition vector;
[0118] When the condition category is continuous, the condition information is transformed into a condition vector.
[0119] For example, converting conditional information into a conditional vector can be achieved using the following implementation steps:
[0120] The initial input to the generator of a conditional generative adversarial network is a sample initially generated based on tVAE. And conditional information c, and further improve the sample distribution through random noise ε,
[0121]
[0122] When the conditional information is a discrete label (such as device status or category label), the discrete label is mapped to a low-dimensional embedding space. For example, if there are three device statuses (normal, abnormal, and faulty), they can be embedded in a 2-dimensional space.
[0123] c embed =E(c)
[0124] Here, E is the embedding matrix, which maps the discrete label c to a d-dimensional conditional vector c. embed .
[0125] When the conditional information is a continuous value (such as a timestamp or physical parameter), it can be directly used as a vector input, or it can be transformed through a simple fully connected layer, for example, by concatenating the timestamp with the input data to form a new input vector.
[0126] c proj =W c c+b c
[0127] Among them, W c For learnable weights and b c This is a bias term.
[0128] In this embodiment of the invention, in an industrial IoT scenario, conditional information may change dynamically over time. To adapt to this change, a dynamic adjustment mechanism can be designed to combine conditional information with a time window and dynamically update the conditional information. For example, within an hourly time window, conditional information (such as current device status and ambient temperature) is updated. This allows for dynamic adjustment of the conditional information based on the real-time characteristics of the data. When data anomalies are detected, the conditional information is automatically updated to generate data containing the abnormal patterns. Conditional information is introduced into the intermediate layer of the discriminator to enhance its discrimination capability. Conditional normalization is used to adjust the mean and variance of the intermediate layer output through the conditional information.
[0129] h cond =γ(c)·BN(h)+β(c)
[0130] Where BN(h) is the batch normalization operation performed on feature h, γ(c) is the scaling parameter learned through conditional information c, and β(c) is the offset parameter learned through conditional information c.
[0131] For example, optimizing data samples by performing data optimization operations on the initial data sample input conditions in a generative adversarial network can be achieved using the following implementation steps:
[0132] Using generator G ψ (z) and discriminator D η The adversarial game (X) further optimizes the initially generated data, producing high-quality samples that more closely approximate the true distribution. Perceptual loss is a loss function based on high-level features of a deep learning model. It utilizes features extracted by a pre-trained deep neural network (usually a convolutional neural network) to measure the difference between generated and real data. To better capture the semantic and structural information of the data, thus making the generated data closer to real data at the high-level feature level, perceptual loss is introduced. Therefore, the objective of generator optimization, L... G for:
[0133]
[0134] The target of discriminator optimization is L p for:
[0135]
[0136] Where, Φ l It is the feature map of the l-th layer, C l H represents the number of channels in the feature map of layer l. l W represents the height of the feature map at layer l. l Let L and ωVAE represent the widths of the feature maps at the l-th layer, respectively. Therefore, cGAN-ωVAE joint optimization can be achieved by combining the objective functions of ωVAE and cGAN, resulting in the following joint optimization objective constraint L. Hybrid The process from latent representation to generated results forms a complete generative system.
[0137] L Hybrid =L VAE +λL G +ρL D
[0138] Among them, L VAE L is used to ensure that the generated data is consistent with the potential distribution of the real data. G L is used to ensure that the adversarially generated samples approximate the true distribution. D To improve the discriminator's classification performance in distinguishing between real and generated data, λ is the first weight parameter, and ρ is the second weight parameter, used to balance the contributions of sub-networks.
[0139] S4. Use the time series feature constraint model to impose industrial time series correlation constraints on the optimization data sample to obtain industrial constraint data sample.
[0140] As an embodiment of the present invention, the step of using a time-series feature constraint model to constrain the industrial time-series correlation of the optimized data samples includes:
[0141] The time-series feature constraint model includes: constructing a smoothing constraint on the rate of change of adjacent time points using a regularization algorithm; constructing a time dependency constraint using a pre-constructed time memory network; constructing a range of change constraint and a rate of change constraint using application scenario knowledge; calculating and optimizing the correlation matrix in the data sample and constructing a multivariate correlation constraint using the correlation matrix.
[0142] The total constraint of time series features is obtained by integrating the constraints of smoothing of rate of change, time dependence, range of change, rate of change, and multivariate correlation.
[0143] By applying the total constraint of time series features to the optimization data sample, an industrial time series correlation constraint is obtained to obtain an industrial constraint data sample.
[0144] Furthermore, a regularization algorithm is used to construct a smoothing constraint on the rate of change between adjacent time points, as shown in the following formula:
[0145] For the generated time series data The requirement is to smooth the rate of change between adjacent time points, subject to constraint L. smooth2 as follows:
[0146]
[0147] in, The value of the time-series data output by the generator at time t+1. The value of the time-series data output by the generator at time t, ||·|| 2 It is the square norm operator.
[0148] Furthermore, time-dependent constraints are constructed using a pre-built time-memory network, as shown in the following formula:
[0149] We use a pre-built time memory network to model the time-dependent constraints of latent variables.
[0150] h t =LSTM(z) t ,h t-1 )
[0151] Among them, z t h is the input noise or the latent variable of the encoder output. t It is a hidden state, h t-1 This represents the hidden state of the previous time step in the temporal memory network, used to maintain temporal dependencies. At this point, the time-series output generated by the LSTM is...
[0152]
[0153] Where f(·) is the decoding network.
[0154] In this embodiment of the invention, the pre-constructed time memory network can be an LSTM (Long Short-Term Memory) network.
[0155] Furthermore, by utilizing knowledge of the application scenario, constraints on the range of change and the rate of change are constructed, as shown in the following formula:
[0156] Within the range of variation constraint L range In terms of processing, the generated industrial time-series data The equipment should meet the following normal operating range:
[0157]
[0158] Where A is the lower limit of the operating range, and B is the upper limit of the operating range. A penalty mechanism is applied to samples that exceed the range, as shown in the following formula:
[0159]
[0160] Among them, Lrange Constraints on the range of variation.
[0161] Under the constraint of rate of change L rate In terms of processing, the rate of change of the generated data Set physical constraints (such as the rate of change not exceeding a certain threshold C), as shown in the following formula:
[0162]
[0163] Furthermore, multivariate correlation constraints are constructed using the correlation matrix, and the implementation steps are as follows:
[0164] It is noteworthy that industrial IoT time-series data is often multivariate, and these variables have significant dependencies, such as multiple sensors influencing each other. Therefore, it is necessary to maintain the dynamic characteristics of multivariate data. Thus, in handling multivariate correlation constraints, it is assumed that the multivariate time-series data is... The correlation matrix R is calculated during training:
[0165] R[π,τ]=Corr(x π ,x τ )
[0166] Where Corr represents the correlation coefficient, x π For the complete time series of the π-th variable, x τ This represents the complete time series of the τ-th variable. To ensure the multivariate correlation matrix of the generated data... To approximate R as closely as possible to the real data, a loss function needs to be constructed:
[0167] Furthermore, by integrating the constraints on rate of change smoothing, time dependence, range of change, rate of change, and multivariate correlation, a total constraint on time-series characteristics is obtained, including:
[0168] Total constraint L of temporal features constraint The formula is as follows: L constraint =λ1L smooth2 +λ2L range +λ3L rate +λ4L corr λ1 is the first weight parameter, λ2 is the second weight parameter, λ3 is the third weight parameter, and λ4 is the fourth weight parameter.
[0169] This invention embodiment achieves joint optimization of objective constraints L by fusing and co-optimizing them. Hybrid With time series feature total constraint L constraint The final constraint L is obtained from the following formula: L = L Hybrid +α*L constraint α is the constraint weight of the total constraint of the time series features.
[0170] S5. Evaluate and screen the industrial constraint data samples to obtain the target generated data samples.
[0171] As an embodiment of the present invention, sample evaluation of industrial constraint data samples includes:
[0172] The first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula.
[0173] A comprehensive evaluation index is obtained by integrating the first evaluation index, the second evaluation index, and the third evaluation index.
[0174] A comprehensive evaluation score is calculated using comprehensive evaluation indicators, and the industrial constraint data sample is evaluated based on the comprehensive evaluation score to obtain the sample evaluation results.
[0175] Furthermore, the first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula. The implementation steps are as follows:
[0176] (1) First evaluation indicator: statistical distribution matching, i.e., the generated data It should be consistent with the target distribution x ~ p data Maintain consistency. For example, the distribution of energy consumption may exhibit specific characteristics over time (such as peak and off-peak periods), and the generated samples should be restricted to a similar statistical range. Therefore, the method of matching distributions can be defined as follows:
[0177] D KL =D KL (P data ||P gen )
[0178] Among them, P data It is the distribution of real time series data, P gen This refers to the distribution of the generated data. If the generated sample distribution deviates significantly from the true distribution (high KL divergence), the evaluation score of that sample will be reduced.
[0179] (2) Second evaluation indicator: Constraint compliance rate, which considers the compliance of industrial equipment operating data with physical constraints (such as parameter range constraints, maximum rate of change limits, etc.). The corresponding constraint rules can be modeled as follows:
[0180]
[0181] At the same time, generate data The constraint compliance rate is defined as:
[0182]
[0183] Where m is the total number of generated samples, and C(·) indicates whether the sample satisfies the constraint rules.
[0184] (3) The third evaluation metric: contextual continuity, that is, the generated time series data should maintain smoothness and contextual consistency in the time dimension.
[0185]
[0186] For multivariate time series data, correlation consistency is calculated by comparing the Pearson correlation coefficient matrix.
[0187] L corr =||R data -R gen || 2
[0188] Among them, R data For the correlation matrix of real data, R gen To generate a correlation matrix for the data.
[0189] Based on the above indicators, a quality evaluation score for the generated samples can be obtained.
[0190]
[0191] Among them, parameters The first equilibrium parameter is... The second equilibrium parameter, parameter This is the third balancing parameter, used to balance the importance of various indicators.
[0192] Furthermore, using quality evaluation scores Set a sample screening threshold, and use the sample screening threshold to screen the industrial constraint data samples to obtain the target generated data samples.
[0193] For example, using quality assessment scores Set a sample selection threshold, and use the sample selection threshold to select industrial constraint data samples to obtain target generated data samples. The following implementation steps are adopted:
[0194] By setting quality evaluation scores threshold Q min Automatically filter out samples marked as abnormal.
[0195]
[0196] As another embodiment of the present invention, the implementation of anomaly detection can also be combined with a more complex discriminative model, such as anomaly detection (AE) based on an autoencoder:
[0197]
[0198] The anomaly score reflects whether a sample deviates from the true target distribution of the data, and represents the effective set of samples obtained after filtering. for:
[0199]
[0200] Furthermore, to avoid pattern collapse (i.e., generating samples with too small a coverage area), sample diversity assessment and resampling are necessary. Measuring sample diversity ensures that the generated data broadly covers the target distribution. Based on the latent representation of the generated data, the distribution P of the generated data in the latent space is... latent The underlying distribution Q of the real data latent Comparison:
[0201] L div =D KL (Q latent ||P latent )
[0202] The latent distribution can be achieved using an ωVAE encoder or a deep feature extraction network. If insufficient sample coverage is found in the data, the generator is used to resample (incorporating latent spatial diversity) to supplement the samples in sparse regions.
[0203] This invention utilizes a data preprocessing module to perform data preprocessing operations on industrial time-series data. This removes outliers and missing data, improving data quality and providing high-quality foundational data for subsequent data generation. Furthermore, standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples. The use of this improved model ensures reconstruction quality and data diversity. Additionally, the initial data samples are input into a conditional generative adversarial network (GAN) for data optimization, resulting in optimized data samples. Introducing conditional information into the GAN enhances the realism of the generated data. Moreover, a time-series feature constraint model is used to impose industrial time-series correlation constraints on the optimized data samples, strengthening the time-series structure and long-term dependency characteristics, ensuring that the generated data conforms to industrial time-series logic. Finally, the industrial constraint data samples are evaluated and screened to select high-quality samples and balance data distribution, ensuring data quality and increasing the sample size of the generated data.
[0204] like Figure 2The diagram shown is a functional block diagram of an industrial time-series data enhancement device based on cooperative constraints provided in an embodiment of the present invention.
[0205] The industrial time-series data enhancement device 100 based on cooperative constraints described in this invention can be installed in an electronic device. Depending on the functions implemented, the industrial time-series data enhancement device 100 based on cooperative constraints may include a data generation module 101 and a data filtering module 102.
[0206] The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0207] In this embodiment, the functions of each module / unit are as follows:
[0208] The data generation module 101 is used to acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data; the standard industrial time-series data is input into the improved variational autoencoder model to generate initial data samples.
[0209] In this embodiment of the invention, industrial time-series data is a set of time-series data in an industrial time-series dataset. The industrial time-series dataset refers to a collection of continuous observations recorded in chronological order by temperature sensors, humidity sensors, and other industrial sensors in an Industrial Internet of Things (IIoT) scenario.
[0210] As one embodiment of the present invention, a data preprocessing module is used to perform data preprocessing operations on industrial time-series data to obtain standard industrial time-series data, including:
[0211] Statistical analysis methods are used to detect outlier data in industrial time series data and outlier data are removed to obtain normal industrial time series data.
[0212] Denoising industrial time series data is obtained by using a smoothing filter to remove noise from normal industrial time series data.
[0213] The dynamic time warping algorithm is used to align the normalized and standardized denoised industrial time series data to obtain standardized industrial time series data.
[0214] The missing values in the standardized industrial time series data are imputed to obtain the standard industrial time series data.
[0215] For example, the following implementation steps can be used to perform data preprocessing operations on industrial time-series data using a data preprocessing module to obtain standard industrial time-series data:
[0216] Input: The original industrial time series dataset, denoted as X = {x1, x2, ..., x...} N},in For each set of time series data (length T), i is the sequence number of the i-th set of time series data.
[0217] Output: Preprocessed time series data X′={x′1,x′2,…,x′ N This process removes noise, eliminates outliers, and completes normalization and augmentation to meet the input requirements of subsequent models.
[0218] The first step is data cleaning, which involves outlier detection and removal. The core of this process is eliminating abnormal data from industrial time-series data (such as invalid data generated during equipment malfunctions). This is primarily done through statistical analysis or simple rule-based detection. First, the mean μ of each time-series data point is calculated. i and standard deviation σ i :
[0219]
[0220] Then, outliers are defined as data points that exceed a certain range. If k=3, then mark it as an outlier.
[0221] The second step is to perform data denoising, i.e., signal smoothing and filtering. Acquired industrial time-series data often contains high-frequency noise, which can be smoothed using the following methods. First, a smoothing filter is used. The moving average is defined with a window size of w, and the moving average formula is:
[0222]
[0223] Where j is the j-th window, x i ′ t Let be the moving average of the i-th time series data of length t. The moving average effectively smooths out small-range fluctuations. Then, signal decomposition is performed to complete wavelet denoising. Discrete Wavelet Transform (DWT) can be used to decompose the signal, removing high-frequency noise and retaining low-frequency and mid-frequency components.
[0224] x i =L i +H i
[0225] Among them, L i It is a low-frequency component, H i It is a high-frequency component. You can choose to retain L. i Discard or reduce the weight of H i .
[0226] The third step is to perform data normalization and standardization. Scaling the data to a uniform range helps improve the convergence speed of deep learning models. There are generally two methods: min-max normalization and standardization. Min-max normalization is suitable for data where the input features are within known limits.
[0227]
[0228] Where max(x) i ) represents the maximum value of each set of time series data, min(x) i () represents the minimum value of each set of time series data. Let be the i-th time series data set of length t. Standardization is commonly used for time series data, removing the mean and scaling by the standard deviation:
[0229]
[0230] The fourth step is to achieve time alignment using Dynamic Time Warping (DTW). Since industrial equipment operation can cause time misalignment in timing data, time alignment is a crucial step. The Dynamic Time Warping method is defined as follows: given two segments of timing data x... m ={x 1 ,x 2 ,…,x T} and x n ={y 1 ,y 2 ,…,y T}, find the optimal alignment path (i.e., minimize distance D) through DTW:
[0231] D(m,n)=|x m -x n |+min{D(m-1,n),D(m,n-1),D(m-1,n-1)}
[0232] Where D(m,n) is the cumulative distance between the m-th point and the n-th point, the main function of DTW is to align time series and form a normalized series.
[0233] The fifth step is to complete the data. Since industrial data may contain a large number of missing values, these missing points need to be filled in to achieve better experimental results. For some data, linear interpolation can be used, such as interpolating between two adjacent known values. and Insert linear points between:
[0234]
[0235] For some complex data, model-based interpolation can be used to predict missing values using deep learning models (such as simple autoencoders or RNN networks).
[0236] Furthermore, statistical analysis methods are used to detect outlier data in industrial time-series data and to remove outlier data, including:
[0237] Calculate the mean and standard deviation of industrial time-series data;
[0238] An outlier range standard is constructed using the mean and standard deviation, and outliers in industrial time series data are marked and removed using the outlier range standard.
[0239] In this embodiment of the invention, the improved variational autoencoder model refers to the data generation model that introduces hyperparameters into the variational autoencoder.
[0240] As an embodiment of the present invention, standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples, including:
[0241] Input standard industrial time-series data into the encoder of the improved variational autoencoder model to output the latent distribution parameters;
[0242] Construct a latent distribution using the latent distribution parameters, and sample latent variables from the latent distribution;
[0243] The loss function of the improved variational autoencoder model is constructed based on the latent variables, and the weight values of the divergence expression part in the loss function are dynamically adjusted using hyperparameters. The weight values of the divergence expression part in the loss function are then used to make the latent distribution approximate the standard normal prior.
[0244] Potential sampling points are obtained by randomly sampling from the standard normal prior, and these potential sampling points are input into the decoder of the improved variational autoencoder model to generate initial data samples.
[0245] For example, the following implementation steps can be used to input standard industrial time-series data into an improved variational autoencoder model to generate initial data samples:
[0246] (4) Encoder: The input is the preprocessed time-series data x′={x′1,x′2,…,x′ N The output is the latent distribution parameters μ and σ. The encoder structure uses a deep convolutional neural network (CNN) or an LSTM network with an attention mechanism to capture the local features and temporal dependencies of the time series.
[0247] (5) Decoder: The input is the latent variable z, and the output is the generated data. The decoder structure uses deconvolution operations or neural networks combined with attention mechanisms to reconstruct temporal features.
[0248] (6) Loss Function: ωVAE achieves more flexible distribution control in the latent space by introducing a hyperparameter ω to adjust the weights of the KL divergence. The loss function of tVAE is defined as:
[0249]
[0250] in, For the expected operation, q φ (z|x) represents the probability distribution of the encoder output, φ represents the encoder neural network parameters, and logp θ (x|z) represents the log-likelihood of the decoder, θ represents the parameters of the decoder neural network, and p(z) represents the latent distribution. It is the reconstruction error, representing the similarity between the generated data and the real data, KL(q) φ (z|x)||p(z)) is the KL divergence, representing the difference between the latent distribution and the prior distribution. ω is a hyperparameter used to balance the weights of reconstruction error and KL divergence. When ω>1, the weight of KL divergence increases, the distribution of the latent space is closer to the prior distribution (usually a standard normal distribution), and the diversity of generated data increases, but the reconstruction quality may decrease slightly. When ω<1, the weight of KL divergence decreases, the model focuses more on reconstruction quality, the generated data is closer to the real data, but the diversity may be insufficient.
[0251] The improved variational autoencoder model described in this invention dynamically adjusts the weights of the KL divergence in the loss function through the hyperparameter ω. By dynamically adjusting the value of ω, both reconstruction quality and data diversity are ensured. In the early stages of training, a smaller ω value is set to prioritize reconstruction quality; in the later stages of training, the ω value is gradually increased to strengthen the distribution constraints of the latent space and improve the diversity of generated data.
[0252] Furthermore, the normal operating mechanism of a VAE captures the overall distribution of the data, while outliers are often few and difficult to model explicitly. Therefore, before inputting standard industrial time-series data into the improved variational autoencoder model to generate initial data samples, an outlier priority mechanism is established, implemented using the following steps:
[0253] First, anomaly detection-guided generation is performed, using a preliminary anomaly detection mechanism to divide the input time-series data x into normal samples x. normal and abnormal sample x anormaly Abnormal samples are given higher weights during the encoding phase to highlight their distribution characteristics. The guiding objective is expressed as follows:
[0254]
[0255] Wherein, weight w i=α (α>1) is used to amplify the importance of outlier samples, so that more attention is paid to outlier regions during optimization. The final loss function is adjusted to,
[0256]
[0257] Then, the latent spatial anomaly distribution is enhanced, and the latent representation z of the anomaly samples is obtained. anormaly In the latent space of tVAE, the data may be located in a sparse region. To prioritize the generation of outlier samples, anomaly prior adjustment and resampling mechanisms can be used to strengthen the outlier distribution. When performing anomaly prior adjustment, the prior distribution of the latent space needs to be modified to give a higher probability of generating outlier regions. Assuming p(z) is typically a standard normal distribution N(0,1), then adjusting the anomaly prior distribution p... anomaly (z) is:
[0258]
[0259] Where, μ anomaly and This represents the distribution parameters of outlier samples in the latent space. A resampling mechanism is then established, where, during the generation phase, sampling weights are allocated skewed towards outlier regions (from p). anomaly The probability of sampling in (z) is greater than that in the normal distribution.
[0260] Finally, post-processing for anomaly enhancement is performed. The generated samples are further filtered through anomaly characteristic matching to ensure that they reflect anomaly characteristics while avoiding unrealistic scenarios. Anomaly characteristic matching metrics include distribution matching and temporal continuity. That is, the characteristics of the generated anomaly samples should be consistent with the first-order (mean, variance) and higher-order characteristics (frequency components, etc.) of the original anomaly samples, while also possessing the continuity of the true time series.
[0261] L dist =||μ gen -μ real ||+||σ gen -σ real ||
[0262]
[0263] Among them, L dist For anomalous feature matching loss, μ gen To generate the mean of the outlier samples, μ real σ is the mean of the original outlier samples. gen To generate the standard deviation of outlier samples, σ real L represents the standard deviation of the original outlier samples. smooth1 This is a continuous smooth loss.
[0264] In this embodiment of the invention, the anomaly matching loss calculates the difference in mean and standard deviation between the generated anomaly sample and the original anomaly sample. The smaller the difference, the closer the distribution of the generated sample is to the distribution of the real anomaly sample. The continuity smoothness loss calculates the smoothness of the generated sample in the time dimension. By minimizing this loss function, it can be ensured that the generated sample has continuity and smoothness in time, avoiding abrupt changes or discontinuities. After the above screening, truly effective anomaly samples are retained.
[0265] The data filtering module 102 is used to perform data optimization operations in the generative adversarial network to obtain optimized data samples from the initial data sample input conditions; to apply industrial time-series correlation constraints to the optimized data samples using a time-series feature constraint model to obtain industrial constraint data samples; and to evaluate and filter the industrial constraint data samples to obtain target generated data samples.
[0266] In this embodiment of the invention, a conditional generative adversarial network refers to a generative adversarial network with added conditional information, which can guide the generative adversarial network to generate data that better meets actual needs.
[0267] As one embodiment of the present invention, optimizing data samples is obtained by performing data optimization operations in a generative adversarial network on the initial data sample input conditions, including:
[0268] The input layer of the generator in a conditional generative adversarial network receives initial data samples and conditional information, and transforms the conditional information into a conditional vector.
[0269] Obtain the random noise distribution, and combine the random noise distribution with the conditional vector and the initial data sample to generate the initial sample of noisy data;
[0270] The generator and discriminator in the conditional generative adversarial network are optimized using the perceptual loss function, and the optimized generator and discriminator are then used for adversarial learning to obtain optimized data samples.
[0271] Furthermore, the conditional information is transformed into a conditional vector, including:
[0272] Identify the condition category of condition information;
[0273] When the condition category is a discrete category, the condition information is mapped to a low-dimensional space to obtain a condition vector;
[0274] When the condition category is continuous, the condition information is transformed into a condition vector.
[0275] For example, converting conditional information into a conditional vector can be achieved using the following implementation steps:
[0276] The initial input to the generator of a conditional generative adversarial network is a sample initially generated based on tVAE. And conditional information c, and further improve the sample distribution through random noise ε,
[0277]
[0278] When the conditional information is a discrete label (such as device status or category label), the discrete label is mapped to a low-dimensional embedding space. For example, if there are three device statuses (normal, abnormal, and faulty), they can be embedded in a 2-dimensional space.
[0279] c embed =E(c)
[0280] Here, E is the embedding matrix, which maps the discrete label c to a d-dimensional conditional vector c. embed .
[0281] When the conditional information is a continuous value (such as a timestamp or physical parameter), it can be directly used as a vector input, or it can be transformed through a simple fully connected layer, for example, by concatenating the timestamp with the input data to form a new input vector.
[0282] c proj =W c c+b c
[0283] Among them, W c For learnable weights and b c This is a bias term.
[0284] In this embodiment of the invention, in an industrial IoT scenario, conditional information may change dynamically over time. To adapt to this change, a dynamic adjustment mechanism can be designed to combine conditional information with a time window and dynamically update the conditional information. For example, within an hourly time window, conditional information (such as current device status and ambient temperature) is updated. This allows for dynamic adjustment of the conditional information based on the real-time characteristics of the data. When data anomalies are detected, the conditional information is automatically updated to generate data containing the abnormal patterns. Conditional information is introduced into the intermediate layer of the discriminator to enhance its discrimination capability. Conditional normalization is used to adjust the mean and variance of the intermediate layer output through the conditional information.
[0285] h cond =γ(c)·BN(h)+β(c)
[0286] Where BN(h) is the batch normalization operation performed on feature h, γ(c) is the scaling parameter learned through conditional information c, and β(c) is the offset parameter learned through conditional information c.
[0287] For example, optimizing data samples by performing data optimization operations on the initial data sample input conditions in a generative adversarial network can be achieved using the following implementation steps:
[0288] Using generator G ψ (z) and discriminator D η The adversarial game (X) further optimizes the initially generated data, producing high-quality samples that more closely approximate the true distribution. Perceptual loss is a loss function based on high-level features of a deep learning model. It utilizes features extracted by a pre-trained deep neural network (usually a convolutional neural network) to measure the difference between generated and real data. To better capture the semantic and structural information of the data, thus making the generated data closer to real data at the high-level feature level, perceptual loss is introduced. Therefore, the objective of generator optimization, L... G for:
[0289]
[0290] The target of discriminator optimization is L p for:
[0291]
[0292] Where, Φ l It is the feature map of the l-th layer, C l H represents the number of channels in the feature map of layer l. l W represents the height of the feature map at layer l. l Let L and ωVAE represent the widths of the feature maps at the l-th layer, respectively. Therefore, cGAN-ωVAE joint optimization can be achieved by combining the objective functions of ωVAE and cGAN, resulting in the following joint optimization objective constraint L. Hybrid The process from latent representation to generated results forms a complete generative system.
[0293] L Hybrid =L VAE +λL G +ρL D
[0294] Among them, L VAE L is used to ensure that the generated data is consistent with the potential distribution of the real data. G L is used to ensure that the adversarially generated samples approximate the true distribution. D To improve the discriminator's classification performance in distinguishing between real and generated data, λ is the first weight parameter, and ρ is the second weight parameter, used to balance the contributions of sub-networks.
[0295] As an embodiment of the present invention, the step of using a time-series feature constraint model to constrain the industrial time-series correlation of the optimized data samples includes:
[0296] The time-series feature constraint model includes: constructing a smoothing constraint on the rate of change of adjacent time points using a regularization algorithm; constructing a time dependency constraint using a pre-constructed time memory network; constructing a range of change constraint and a rate of change constraint using application scenario knowledge; calculating and optimizing the correlation matrix in the data sample and constructing a multivariate correlation constraint using the correlation matrix.
[0297] The total constraint of time series features is obtained by integrating the constraints of smoothing of rate of change, time dependence, range of change, rate of change, and multivariate correlation.
[0298] By applying the total constraint of time series features to the optimization data sample, an industrial time series correlation constraint is obtained to obtain an industrial constraint data sample.
[0299] Furthermore, a regularization algorithm is used to construct a smoothing constraint on the rate of change between adjacent time points, as shown in the following formula:
[0300] For the generated time series data The requirement is to smooth the rate of change between adjacent time points, subject to constraint L. smooth2 as follows:
[0301]
[0302] in, The value of the time-series data output by the generator at time t+1. The value of the time-series data output by the generator at time t, ||·|| 2 It is the square norm operator.
[0303] Furthermore, time-dependent constraints are constructed using a pre-built time-memory network, as shown in the following formula:
[0304] We use a pre-built time memory network to model the time-dependent constraints of latent variables.
[0305] h t =LSTM(z) t ,h t-1 )
[0306] Among them, z t h is the input noise or the latent variable of the encoder output. t It is a hidden state, h t-1 This represents the hidden state of the previous time step in the temporal memory network, used to maintain temporal dependencies. At this point, the time-series output generated by the LSTM is...
[0307]
[0308] Where f(·) is the decoding network.
[0309] In this embodiment of the invention, the pre-constructed time memory network can be an LSTM (Long Short-Term Memory) network.
[0310] Furthermore, by utilizing knowledge of the application scenario, constraints on the range of change and the rate of change are constructed, as shown in the following formula:
[0311] Within the range of variation constraint L range In terms of processing, the generated industrial time-series data The equipment should meet the following normal operating range:
[0312]
[0313] Where A is the lower limit of the operating range, and B is the upper limit of the operating range. A penalty mechanism is applied to samples that exceed the range, as shown in the following formula:
[0314]
[0315] Among them, L range Constraints on the range of variation.
[0316] Under the constraint of rate of change L rate In terms of processing, the rate of change of the generated data Set physical constraints (such as the rate of change not exceeding a certain threshold C), as shown in the following formula:
[0317]
[0318] Furthermore, multivariate correlation constraints are constructed using the correlation matrix, and the implementation steps are as follows:
[0319] It is noteworthy that industrial IoT time-series data is often multivariate, and these variables have significant dependencies, such as multiple sensors influencing each other. Therefore, it is necessary to maintain the dynamic characteristics of multivariate data. Thus, in handling multivariate correlation constraints, it is assumed that the multivariate time-series data is... The correlation matrix R is calculated during training:
[0320] R[π,τ]=Corr(x π ,x τ )
[0321] Where Corr represents the correlation coefficient, x π For the complete time series of the π-th variable, x τ This represents the complete time series of the τ-th variable. To ensure the multivariate correlation matrix of the generated data... To approximate R as closely as possible to the real data, a loss function needs to be constructed:
[0322] Furthermore, by integrating the constraints on rate of change smoothing, time dependence, range of change, rate of change, and multivariate correlation, a total constraint on time-series characteristics is obtained, including:
[0323] Total constraint L of temporal features constraint The formula is as follows: L constraint =λ1L smooth2 +λ2L range +λ3L rate +λ4L corr λ1 is the first weight parameter, λ2 is the second weight parameter, λ3 is the third weight parameter, and λ4 is the fourth weight parameter.
[0324] This invention embodiment achieves joint optimization of objective constraints L by fusing and co-optimizing them. Hybrid With time series feature total constraint L constraint The final constraint L is obtained from the following formula: L = L Hybrid +α*L constraint α is the constraint weight of the total constraint of the time series features.
[0325] As an embodiment of the present invention, sample evaluation of industrial constraint data samples includes:
[0326] The first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula.
[0327] A comprehensive evaluation index is obtained by integrating the first evaluation index, the second evaluation index, and the third evaluation index.
[0328] A comprehensive evaluation score is calculated using comprehensive evaluation indicators, and the industrial constraint data sample is evaluated based on the comprehensive evaluation score to obtain the sample evaluation results.
[0329] Furthermore, the first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula. The implementation steps are as follows:
[0330] (1) First evaluation indicator: statistical distribution matching, i.e., the generated data It should be consistent with the target distribution x ~ p data Maintain consistency. For example, the distribution of energy consumption may exhibit specific characteristics over time (such as peak and off-peak periods), and the generated samples should be restricted to a similar statistical range. Therefore, the method of matching distributions can be defined as follows:
[0331] D KL =D KL (Pdata ||P gen )
[0332] Among them, P data It is the distribution of real time series data, P gen This refers to the distribution of the generated data. If the generated sample distribution deviates significantly from the true distribution (high KL divergence), the evaluation score of that sample will be reduced.
[0333] (4) Second evaluation indicator: Constraint compliance rate, which considers the compliance of industrial equipment operating data with physical constraints (such as parameter range constraints, maximum rate of change limits, etc.). The corresponding constraint rules can be modeled as follows:
[0334]
[0335] At the same time, generate data The constraint compliance rate is defined as:
[0336]
[0337] Where m is the total number of generated samples, and C(·) indicates whether the sample satisfies the constraint rules.
[0338] (5) The third evaluation metric: contextual continuity, that is, the generated time series data should maintain smoothness and contextual consistency in the time dimension.
[0339]
[0340] For multivariate time series data, correlation consistency is calculated by comparing the Pearson correlation coefficient matrix.
[0341] L corr =||R data -R gen || 2
[0342] Among them, R data For the correlation matrix of real data, R gen To generate a correlation matrix for the data.
[0343] Based on the above indicators, a quality evaluation score for the generated samples can be obtained.
[0344]
[0345] Among them, parameters The first equilibrium parameter is... The second equilibrium parameter, parameter This is the third balancing parameter, used to balance the importance of various indicators.
[0346] Furthermore, using quality evaluation scores Set a sample screening threshold, and use the sample screening threshold to screen the industrial constraint data samples to obtain the target generated data samples.
[0347] For example, using quality assessment scores Set a sample selection threshold, and use the sample selection threshold to select industrial constraint data samples to obtain target generated data samples. The following implementation steps are adopted:
[0348] By setting quality evaluation scores threshold Q min Automatically filter out samples marked as abnormal.
[0349]
[0350] As another embodiment of the present invention, the implementation of anomaly detection can also be combined with a more complex discriminative model, such as anomaly detection (AE) based on an autoencoder:
[0351]
[0352] The anomaly score reflects whether a sample deviates from the true target distribution of the data, and represents the effective set of samples obtained after filtering. for:
[0353]
[0354] Furthermore, to avoid pattern collapse (i.e., generating samples with too small a coverage area), sample diversity assessment and resampling are necessary. Measuring sample diversity ensures that the generated data broadly covers the target distribution. Based on the latent representation of the generated data, the distribution P of the generated data in the latent space is... latent The underlying distribution Q of the real data latent Comparison:
[0355] L div =D KL (Q latent ||P latent )
[0356] The latent distribution can be achieved using an ωVAE encoder or a deep feature extraction network. If insufficient sample coverage is found in the data, the generator is used to resample (incorporating latent spatial diversity) to supplement the samples in sparse regions.
[0357] Reference Figure 3The diagram shown is a schematic representation of an electronic device that implements the collaborative constraint-based industrial time-series data augmentation method according to an embodiment of the present invention.
[0358] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a method program for industrial time-series data augmentation based on cooperative constraints.
[0359] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing a program for industrial time-series data augmentation based on cooperative constraints) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0360] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of an industrial time-series data augmentation method program based on cooperative constraints, but also to temporarily store data that has been output or will be output.
[0361] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0362] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0363] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0364] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0365] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0366] The program for an industrial time-series data augmentation method based on cooperative constraints, stored in the memory 11 of the electronic device, is a combination of multiple instructions that, when run in the processor 10, can achieve the following:
[0367] Acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data;
[0368] Standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples;
[0369] The initial data sample is input into a conditional generative adversarial network to perform data optimization operations, resulting in an optimized data sample.
[0370] By using a time-series feature constraint model to impose industrial time-series correlation constraints on the optimization data samples, industrial constraint data samples are obtained.
[0371] The target generated data sample is obtained by evaluating and screening the industrial constraint data sample.
[0372] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.
[0373] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0374] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0375] Acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data;
[0376] Standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples;
[0377] The initial data sample is input into a conditional generative adversarial network to perform data optimization operations, resulting in an optimized data sample.
[0378] By using a time-series feature constraint model to impose industrial time-series correlation constraints on the optimization data samples, industrial constraint data samples are obtained.
[0379] The target generated data sample is obtained by evaluating and screening the industrial constraint data sample.
[0380] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0381] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0382] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0383] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0384] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0385] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0386] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0387] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0388] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for augmenting industrial time-series data based on collaborative constraints, characterized in that, The method includes: Acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data; Standard industrial time-series data is input into an improved variational autoencoder model to generate initial data samples; The initial data sample is input into a conditional generative adversarial network to perform data optimization operations, resulting in an optimized data sample. By using a time-series feature constraint model to impose industrial time-series correlation constraints on the optimization data samples, industrial constraint data samples are obtained. The target generated data sample is obtained by evaluating and screening the industrial constraint data sample.
2. The industrial time-series data augmentation method based on collaborative constraints as described in claim 1, characterized in that, The process of using a data preprocessing module to perform data preprocessing operations on industrial time-series data to obtain standard industrial time-series data includes: Statistical analysis methods are used to detect outlier data in industrial time series data and outlier data are removed to obtain normal industrial time series data. Denoising industrial time series data is obtained by using a smoothing filter to remove noise from normal industrial time series data. The dynamic time warping algorithm is used to align the normalized and standardized denoised industrial time series data to obtain standardized industrial time series data. The missing values in the standardized industrial time series data are imputed to obtain the standard industrial time series data.
3. The industrial time-series data augmentation method based on collaborative constraints as described in claim 2, characterized in that, The method of using statistical analysis to detect outlier data in industrial time-series data and performing outlier data removal includes: Calculate the mean and standard deviation of industrial time-series data; An outlier range standard is constructed using the mean and standard deviation, and outliers in industrial time series data are marked and removed using the outlier range standard.
4. The industrial time-series data augmentation method based on collaborative constraints as described in claim 1, characterized in that, The step of inputting standard industrial time-series data into the improved variational autoencoder model to generate initial data samples includes: Input standard industrial time-series data into the encoder of the improved variational autoencoder model to output the latent distribution parameters; Construct a latent distribution using the latent distribution parameters, and sample latent variables from the latent distribution; The loss function of the improved variational autoencoder model is constructed based on the latent variables, and the weight values of the divergence expression part in the loss function are dynamically adjusted using hyperparameters. The weight values of the divergence expression part in the loss function are then used to make the latent distribution approximate the standard normal prior. Potential sampling points are obtained by randomly sampling from the standard normal prior, and these potential sampling points are input into the decoder of the improved variational autoencoder model to generate initial data samples.
5. The industrial time-series data augmentation method based on collaborative constraints as described in claim 1, characterized in that, The step of performing data optimization operations in a generative adversarial network (GAN) to obtain optimized data samples from initial data sample input conditions includes: The input layer of the generator in a conditional generative adversarial network receives initial data samples and conditional information, and transforms the conditional information into a conditional vector. Obtain the random noise distribution, and combine the random noise distribution with the conditional vector and the initial data sample to generate the initial sample of noisy data; The generator and discriminator in the conditional generative adversarial network are optimized using the perceptual loss function, and the optimized generator and discriminator are then used for adversarial learning to obtain optimized data samples.
6. The industrial time-series data augmentation method based on collaborative constraints as described in claim 1, characterized in that, The method of using a time-series feature constraint model to constrain the industrial time-series correlation of the optimized data samples includes: The time-series feature constraint model includes: constructing a smoothing constraint on the rate of change of adjacent time points using a regularization algorithm; constructing a time dependency constraint using a pre-constructed time memory network; constructing a range of change constraint and a rate of change constraint using application scenario knowledge; calculating and optimizing the correlation matrix in the data sample and constructing a multivariate correlation constraint using the correlation matrix. The total constraint of time series features is obtained by integrating the constraints of smoothing of rate of change, time dependence, range of change, rate of change, and multivariate correlation. By applying the total constraint of time series features to the optimization data sample, an industrial time series correlation constraint is obtained to obtain an industrial constraint data sample.
7. The industrial time-series data augmentation method based on collaborative constraints as described in claim 1, characterized in that, The sample evaluation of the industrial constraint data sample includes: The first evaluation index is calculated using a pre-built statistical distribution matching formula, the second evaluation index is calculated using a pre-built constraint compliance rate formula, and the third evaluation index is calculated using a pre-built continuity consistency formula. A comprehensive evaluation index is obtained by integrating the first evaluation index, the second evaluation index, and the third evaluation index. A comprehensive evaluation score is calculated using comprehensive evaluation indicators, and the industrial constraint data sample is evaluated based on the comprehensive evaluation score to obtain the sample evaluation results.
8. An industrial time-series data augmentation device based on cooperative constraints, characterized in that, The apparatus implements the industrial time-series data augmentation method based on cooperative constraints as described in any one of claims 1-7, and the apparatus comprises: The data generation module is used to acquire industrial time-series data and perform data preprocessing operations on the industrial time-series data using the data preprocessing module to obtain standard industrial time-series data; the standard industrial time-series data is then input into the improved variational autoencoder model to generate initial data samples. The data filtering module is used to perform data optimization operations in a generative adversarial network to obtain optimized data samples from the initial data sample input conditions; to apply industrial time-series correlation constraints to the optimized data samples using a time-series feature constraint model to obtain industrial constraint data samples; and to evaluate and filter the industrial constraint data samples to obtain target generated data samples.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the industrial time-series data augmentation method based on cooperative constraints as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the industrial time-series data augmentation method based on cooperative constraints as described in any one of claims 1-7.
Citation Information
Patent Citations
Ultrasonic data noise reduction method and system and electronic equipment
CN118013206A
Conditional generative adversarial network-based Mura defect classification method and related equipment
CN118781102A
Method and system for constrained time series generation
US20250094522A1