Time series data missing value filling method based on diffusion model

Through the filling method based on the diffusion model, combined with the DiffWave and Transformer/GRU modules, the problem of insufficient feature correlation and time variation in the filling of missing value of time series data is solved, and efficient and accurate data filling is achieved, which improves data quality and value.

CN119202555AActive Publication Date: 2024-12-27CIVIL AVIATION UNIV OF CHINA

Patent Information

Application Number
CN202411260499.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

The existing time series data missing value filling algorithms are insufficient in terms of feature correlation and time variation, and the filling process based on the generative model has problems such as error accumulation and insufficient spatiotemporal feature capture.

Method used

Using a filling method based on diffusion model, combined with the DiffWave denoising diffusion module and the evaluation filling module of Transformer and GRU, the timing attention module and feature attention layer are used through multi-level and multi-angle attention calculation and incremental filling algorithm. Data characteristics are extracted and data filling is filled with self-supervised training and unsupervised clustering algorithm.

Benefits of technology

It realizes efficient and accurate filling of missing values ​​in time series data, improves data quality and value, solves the problem of missing data, and enhances attention capture ability and filling effect of time series.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202555A_ABST
    Figure CN119202555A_ABST
Patent Text Reader

Abstract

The invention provides a time sequence data missing value filling method based on a diffusion model. The method comprises the following steps: constructing a filling model, training the filling model, and performing data missing value filling by utilizing the trained filling model. The filling model comprises a denoising diffusion module and an evaluation filling module; the de-noising diffusion module comprises an input data processing module, a residual connection block and an output integration module; the evaluation filling module comprises an incremental filling module and a sampling result integration module; according to the method, based on the current most advanced diffusion model architecture DiffWave, a self-supervised training mode is adopted, a filling target is generated through data of a Mask non-missing part, and meanwhile, an observable part information is used for assisting a diffusion model to predict noise, so that efficient and accurate training of the diffusion model is realized; according to the method, the time sequence missing value filling effect can be effectively improved, the problem of data missing in the time sequence is solved, and the data quality and value are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a method for filling missing values ​​of time series data based on a diffusion model. Background Art

[0002] In order to solve the problem of missing values ​​in time series, a large number of scholars have conducted in-depth research and proposed various filling algorithms based on different technologies. They are mainly divided into filling algorithms based on statistical learning, filling algorithms based on deep learning, and filling algorithms based on generative models.

[0003] In the filling algorithm based on statistical learning, the early algorithms used statistical values ​​such as mean, median, mode to fill in missing values, lacking consideration of the correlation of features and time variability, resulting in poor filling effects. The filling algorithm based on deep learning infers new filling values ​​from biased historical filling values, which is inevitably affected by error accumulation. Most of the generative models use the standard attention mechanism for non-missing data, lacking the capture of the spatiotemporal features of time series, and the filling process also has the problem of directly applying the workflow of image generation and speech synthesis, lacking research on the law of missing data and the use of observable information. Summary of the invention

[0004] In view of this, the present invention aims to overcome the deficiencies of the above-mentioned problems in the prior art and proposes a method for filling missing values ​​of time series data based on a diffusion model.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] A method for filling missing values ​​of time series data based on a diffusion model, comprising constructing a filling model, training the filling model, and filling missing values ​​of data using the trained filling model;

[0007] The filling model includes a denoising diffusion module based on the classic speech generation model Diffwave, and an evaluation filling module based on Transformer and GRU; the denoising diffusion module includes an input data processing module, a residual connection block and an output integration module; the evaluation filling module includes an incremental filling module and a sampling result integration module;

[0008] The input data processing module is used to manually mask the input data containing missing values, generate a mask matrix and a conditional information matrix, and randomly sample the diffusion step t, and project and embed the data, diffusion step and conditional information through a convolution layer and an activation function;

[0009] The residual connection block is used to perform multi-level and multi-dimensional mapping, attention calculation and fusion processing on the input data, including a temporal attention module TAM, a diffusion step embedded projection convolution layer, a conditional information embedded projection convolution layer and an intermediate expansion decomposition layer. The diffusion step embedded projection convolution layer is used to map the input diffusion step to the input dimension of the residual connection block through a convolution network, and the conditional information embedded projection convolution layer is used to map the input conditional information to the input dimension of the residual connection block through a convolution network. The temporal attention module TAM is used to decompose the temporal attention into a parallel connection of static attention within a channel and dynamic attention between channels, and a series connection of temporal attention along the time dimension and feature attention along the feature dimension; the intermediate expansion decomposition layer is used to decompose the data into two parts of equal size, one as the input of the residual block of the next layer, and the other as the output of the current residual block;

[0010] The output integration module is used to add and integrate the inputs of multiple residual connection blocks, and map the data mapped to high dimensions back to the original dimensions of the data through convolutional layers and activation functions;

[0011] The incremental filling module evaluates the rationality of observable data with adjacent distances or high attention scores on the data points to be filled, and inputs the filling values ​​that meet the constraints as observable information into the next round of generation model according to the evaluation results to achieve incremental filling;

[0012] The sampling result integration module uses an unsupervised clustering algorithm to automatically weight and integrate the sampling results.

[0013] Furthermore, the temporal attention module TAM includes a time attention layer and a feature attention layer. The time attention layer takes the tensor of each feature as input to extract the time dependency of the data, and the feature attention layer takes the tensor of each time point as input to extract the feature dependency of the data.

[0014] Furthermore, the temporal attention layer and the feature attention layer are both 1-layer Transformer encoders.

[0015] Furthermore, the rationality evaluation module TSRE uses sequence evaluation from two perspectives: time and features. The time rationality evaluation divides the data according to time points, combines all feature values ​​at each time point into a sequence, uses Transformer to calculate the attention of observable values ​​to fill values, and then outputs whether each time point meets the requirements of the original data distribution through a linear layer. The feature rationality evaluation divides the data according to the feature dimension, and combines the data within a period of time corresponding to each feature into a sequence, and inputs the data in the sequence into the GRU network in chronological order. With the help of GRU, the information of the entire sequence is condensed, and then after a linear layer, the data under the feature meets the requirements of the original data distribution. The results of time rationality and feature rationality are multiplied to obtain the evaluation result of the entire sequence.

[0016] Furthermore, the sampling result integration module is implemented as follows:

[0017] The result set of multiple sampling of the model is input into the K-Means model, and the sampling results are aggregated into two categories according to the distance between samples, recorded as set 1 、set 2 , count the number of samples in each category, denoted as n 1 、n 2 , the final filling is as follows:

[0018]

[0019] p 1 and p 2 They respectively represent the proportion of the number of samples of the opposing category to the total number of samples, and the logarithm of the proportion will be used to determine the weight of each category, which will be multiplied by the filling mean of each category as the final filling result, thereby achieving weighted integration of the sampling results.

[0020] Furthermore, the training of the filling model includes training of a denoising diffusion module and an evaluation filling module based on Transformer and GRU, wherein the training of the denoising diffusion module adopts a self-supervised training method, and a masking strategy is used to delete the values ​​of a part of non-missing parts in the multivariate time series X containing missing values ​​to obtain a new X and a corresponding mask matrix M, and the true value of the masked part is used to guide the training of the denoising diffusion module.

[0021] Compared with the prior art, the method for filling missing values ​​of time series data based on a diffusion model described in the present invention has the following advantages:

[0022] 1. This invention is based on the most advanced diffusion model architecture DiffWave, adopts a self-supervised training method, generates filling targets by masking the data of non-missing parts, and uses observable part information to assist the diffusion model in predicting noise, thus achieving efficient and accurate training of the diffusion model;

[0023] 2. In terms of feature extraction, the present invention designs a temporal attention module that integrates multi-level and multi-angle attention such as inter-channel, intra-channel, time dimension, and feature dimension to improve the ability to capture attention for time series with missing values;

[0024] 3. The present invention designs an incremental filling algorithm, which retains some phased filling results as observable information for the subsequent filling process, and fully explores the value of the phased results generated by the filling work;

[0025] 4. The present invention can effectively improve the effect of filling missing values ​​in time series, solve the problem of missing data in time series, and improve data quality and value. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0027] Figure 1 It is a schematic diagram of the filling model structure of the present invention;

[0028] Figure 2 Schematic diagram of the structure of the temporal attention module TAM of the present invention;

[0029] Figure 3 This is a training flow chart of the denoising diffusion module of the present invention;

[0030] Figure 4 A flow chart of the evaluation filling module of the present invention. DETAILED DESCRIPTION

[0031] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0032] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0033] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0034] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0035] The present invention provides a method for filling missing values ​​of time series data based on a diffusion model, comprising constructing a filling model, training the filling model, and filling missing values ​​of data using the trained filling model; the filling model is as follows: Figure 1 As shown in the figure, it mainly consists of two parts: one is the denoising diffusion module based on the classic speech generation model Diffwave, and the other is the evaluation filling module based on Transformer and GRU. In the denoising diffusion module, it is mainly divided into input data processing module, residual connection block and output integration module.

[0036] Specifically, the input data processing module is responsible for manually masking the input data with missing values, generating a mask matrix and a conditional information matrix, and randomly sampling diffusion steps t. The data, diffusion steps, and conditional information are then projected and embedded through convolutional layers and activation functions.

[0037] Specifically, the residual connection block is responsible for multi-level and multi-dimensional mapping of the input data and attention calculation and fusion processing. It includes the temporal attention module TAM, the diffusion step embedding projection convolution layer, the conditional information embedding projection convolution layer and the intermediate expansion decomposition layer. The diffusion step embedding projection convolution is responsible for mapping the input diffusion step to the input dimension of the residual connection block through the convolution network, and the conditional information embedding projection convolution layer is responsible for mapping the input conditional information to the input dimension of the residual connection block through the convolution network. The temporal attention module TAM decomposes the temporal attention into the parallel connection of static attention within the channel and dynamic attention between channels, as well as the series connection of temporal attention along the time dimension and feature attention along the feature dimension. The intermediate expansion decomposition layer is used to decompose the data into two parts of equal size, one as the input of the next layer of residual block, and the other as the output of the current residual block. The two parts of data are mapped with activation functions and differentiated nonlinear transformations are performed to meet different task requirements. In the present invention, the diffusion step embedding projection convolution layer is responsible for mapping the input diffusion step to the input dimension of the residual connection block through the convolution network, then adding it to the input data, and finally inputting the result to the temporal attention module TAM. The conditional information embedding projection convolution layer is responsible for mapping the input conditional information to the input dimension of the residual connection block through the convolution network, then adding it to the calculation result of the temporal attention module TAM, and inputting it to the intermediate expansion decomposition layer to obtain the input of the next layer of residual connection block and the output of the current residual connection block.

[0038] Specifically, the model structure of the temporal attention module TAM is as follows Figure 2 As shown in the figure, for the attention within the channel, the model uses depthwise separable convolution, holed depthwise separable convolution and 1×1 convolution to simulate large kernel convolution, splitting the large kernel convolution into three parts, capturing long-distance dependencies while saving the model calculation overhead. For the attention between channels, the model uses an average pooling layer to condense the information of each channel, and then uses a linear layer and activation function to capture the dependencies between channels, and finally uses the product form to connect the attention within the channel with the attention between channels. In addition, in view of the two major characteristics of time order and multi-dimensionality in multivariate time series, the model designs a temporal attention layer and a feature attention layer, both of which are 1-layer Transformer encoders. The temporal attention layer takes the tensor of each feature as input to extract the temporal dependency of the data; while the feature attention layer takes the tensor of each time point as input to extract the feature dependency of the data. By performing attention calculations at multiple levels and angles, such as between channels, within channels, in time dimensions, and in feature dimensions, and by leveraging the insensitivity of modules such as dilated convolution and average pooling to missing values, the impact of missing values ​​on attention calculations is weakened, thereby improving the model's ability to capture attention for time series with missing values.

[0039] Specifically, the output integration module is responsible for adding and integrating the inputs of multiple residual connection blocks, and then mapping the data mapped to high dimensions back to the original dimensions of the data through convolutional layers and activation functions.

[0040] The evaluation filling module mainly includes an incremental filling module and a sampling result integration module.

[0041] Specifically, the incremental filling module designs an incremental filling algorithm for the lack of utilization of the interim results generated by the filling work in the existing time series filling algorithm. Different from the time series prediction algorithm, when the prediction algorithm is running, the real value to be predicted has not yet been generated, so the predicted value of the prediction algorithm cannot be evaluated during operation. Therefore, the continuous use of new predicted values ​​as input in the sliding window-based prediction algorithm is prone to error accumulation. For the time series filling algorithm, the missing value is the data that has been generated but not recorded. In other words, the real value already exists but is unobservable. Therefore, the observable data with adjacent distance or high attention score on the data point to be filled can be used for rationality evaluation, and then according to the evaluation results, some of the filling values ​​that meet the constraints are used as observable information and input into the next round of generation model to achieve incremental filling. Borrowing the entropy theory in thermodynamics to describe, the entropy of the time series with missing values ​​in the initial state is the highest. As the filling work proceeds, some of the positions to be filled tend to be stable or replaced by filling values ​​that meet the constraint rules, and the entropy of the time series gradually decreases. As the entropy gradually decreases, the filling work will also become simpler, more stable and more accurate. Therefore, using incremental filling can make the filling process more stable and the filling result more accurate. The present invention relates to a rationality evaluation module TSRE, which uses sequence evaluation from two perspectives: time and features. Figure 1 As shown in the lower right part of , the time rationality evaluation divides the data according to the time point, combines all the feature values ​​of each time point into a sequence, and then uses Transformer to calculate the attention of the observable value to the filling value, and then outputs whether each time point meets the requirements of the original data distribution through the linear layer. The feature rationality evaluation divides the data according to the feature dimension, and combines the data within a period of time corresponding to each feature into a sequence, and then inputs the data in the sequence into the GRU network in chronological order. With the help of GRU, the information of the entire sequence is condensed, and then after a linear layer, the data under the feature is output whether it meets the requirements of the original data distribution. Finally, the evaluation result of the entire sequence can be obtained by multiplying the results of time rationality and feature rationality. For the filling results that are evaluated as reasonable and stable, they are used as known information for the next round of filling, so that they can be trained effectively and stably, and the necessary information can be adaptively transmitted, thereby improving the accuracy of the time series missing value filling algorithm based on the diffusion model.

[0042] Specifically, in order to further reduce the impact of some sampling results with large deviations generated by the probability filling model on the final filling results, the sampling result integration module designs an automatic weighted integration algorithm for sampling results based on an unsupervised clustering algorithm. Specifically, the result set of multiple samplings of the model is input into the K-Means model, and the sampling results are aggregated into two categories according to the distance between samples, recorded as set 1 、set 2 , count the number of samples in each category, denoted as n 1 、n 2 , then the final filling is as shown in formula (1)(2)(3):

[0043]

[0044]

[0045] p 1 and p 2 They represent the proportion of the number of samples of the opposing categories to the total number of samples, and the logarithmic value of the proportion is used to determine the weight of each category, which is then multiplied by the filling mean of each category as the final filling result, thereby achieving weighted integration of the sampling results. Formula (1) mainly relies on the functional characteristics of the logarithmic function with a base greater than 0 when the independent variable is less than 1, that is, amplifying the role of the main category and suppressing the influence of the secondary category, thereby weakening some sampling results with large deviations and improving the accuracy of the final filling result.

[0046] Model training and filling are also divided into two stages, including diffusion model training and incremental filling. For a multivariate time series X∈R with missing values K×L , where K is the number of features of the time series and L is the length of the time series. For the mask matrix that identifies missing data, it is denoted as M = {m 1:K,1:L}∈{0,1} K×L ,in

[0047]

[0048] Therefore, each time series can be represented as {X, M}. The task of filling missing values ​​in a time series is to estimate the distribution of the values ​​of the missing part of X using the values ​​of the observable part of X.

[0049] The diffusion model consists of two Markov chains. The Markov chain of the forward diffusion process converts data into noise, and the Markov chain of the reverse diffusion process converts noise into data. Both the forward diffusion and reverse diffusion processes consist of T diffusion steps, x 0 Represents the original data, x Trepresents random noise, usually a simple normal distribution. The transition kernel q(x t |x t-1 ) is usually pre-designed, and its goal is to gradually add noise to the data in T diffusion steps, transforming the original data distribution q(x 0 ) is transformed into a simple prior distribution N(0,I). θ (x t-1 |x t ) is the transfer kernel of the reverse Markov chain, whose goal is to gradually transform the random noise x into T The noise added in the forward diffusion process is gradually removed to generate a distribution that conforms to the original data q(x 0 ) Sample x 0 .

[0050] The process of diffusion model training in the present invention is as follows Figure 3 As shown in Figure 1, for the missing value filling task, the model adopts a self-supervised training method. It uses a masking strategy to delete the values ​​of some non-missing parts in X to obtain a new X and the corresponding mask matrix M, and then uses the true value of the masked part to guide the diffusion model training. Among them, the true value of the masked part is recorded as X m , which is also the filling target in the training phase. The observable part of the masked data is recorded as X s , which is also the conditional information in the training phase, so X = X m +X s Therefore, in the present invention, the training goal of the diffusion model is to use the model distribution p θ (x m |x s ) to approximate the true data distribution q(x m |x s ), the transfer kernel of the reverse Markov chain of the diffusion model is expanded as shown in equations (4) and (5):

[0051]

[0052] At the same time, the final optimization objective of the diffusion model is also expanded as shown in formula (6):

[0053]

[0054] Where t represents the diffusion step, x 0 is the data to be filled, for x 0 Perform masking to obtain the fill target and observable information In the initial state, that is, when t=T, the data of the part to be filled is normally distributed random noise. Indicates the value of the part to be filled at the tth diffusion step in the reverse diffusion denoising process. The task of filling is to After T diffusion steps, the value of the part to be filled is recovered to make it close to the original value of the filling target.

[0055] In formula (6), ∈ θ is the diffusion model in the present invention, where represents the noise added in the tth diffusion step during the forward diffusion process, It means that the model predicts the noise value of the part to be filled in the tth diffusion step based on the observed information. In this way, the training goal of the model changes from predicting the data of the filling part in each step to predicting the noise value added to the filling part in each step, and then gradually removing the noise value to restore the original data.

[0056] In each iteration of the model training phase, we first treat the padding data x 0 , diffusion step t and Gaussian noise ∈ are sampled, and then x 0 Perform masking to obtain the filling target and observable information Finally, model calculation and gradient descent are performed based on this until the model converges.

[0057] Model filling process Figure 4 As shown, the present invention uses the trained noise prediction model ∈ θ This is different from the previous filling algorithm based on the diffusion model. The previous model directly outputs the previous round As the input of the next round, the observable information The present invention adds a time series evaluation network to the denoising results. Evaluate and retain the data of the filling points that meet the distribution constraints to form a new and As the next round of input for the diffusion model, it can achieve incremental filling.

[0058] In order to evaluate the performance of the model proposed in the present invention, a comprehensive comparison is made between the present invention and the classical models and the latest time series filling models. The benchmark models include mean filling Median, RNN-based filling model BRITS, GAN-based filling model GAIN, attention mechanism-based filling model SAITS, and diffusion model-based missing value filling models CSDI and SSSD.

[0059] The experiment was conducted 10 times on three public datasets, namely the air quality dataset AQI, the power transformer dataset ETTh1, and the weather dataset Weather. The data missing mode adopted a completely random missing mode, and the data missing rates were set to 10%, 20%, 50% and 90% respectively. When evaluating the model performance under different missing rates, 10% to 90% of the data points were randomly masked to simulate different degrees of missingness.

[0060] Tables 1, 2, and 3 show the MAE and RMSE values ​​of the I2TDM model and the baseline model on the AQI, ETTh1, and Weather datasets, respectively. On all experimental datasets, the simple statistical-based Meanian method performed poorly, and the deep learning-based method outperformed the simple filling method. As can be seen from the table, the filling model GAIN, which is not designed for time series data, performs poorly when the missing rate is less than 50%. The RNN-based filling model BRITS has a better filling effect when the missing rate is low. This is because the RNN is heavily dependent on the output value of the previous moment. When the missing rate is high, the deviation of the value filled at the previous moment is relatively large. When inferring new filling values ​​from historical values ​​with deviations, the effect of error accumulation will continue to amplify, resulting in poor filling effect. Benefiting from the excellent performance of the self-attention mechanism, SAITS has better filling effects than BRITS at all missing rates in all datasets. However, compared with the diffusion model-based CSDI, CSDI once again surpasses SAITS because the data generated by the diffusion model is of higher quality and more diverse. However, SSSD, which is also based on the diffusion model, failed to surpass SAITS in filling effect because it did not use a multi-channel input format. I2TDM uses a multi-channel input format, and designs a temporal attention module for time series with missing values, as well as an incremental filling scheme for missing values. Only in the case of 90% missing rates in the AQI dataset and ETTh1 dataset, I2TDM lags behind CSDI. I2TDM exceeds the above-mentioned benchmark models in the evaluation indicators of the filling results of almost all missing rates in the above datasets. Compared with the current optimal results, I2TDM improves the MAE indicator by 3%-8% and the RMSE indicator by 4%-10%.

[0061] Table 1 Experimental results of missing value filling on AQI dataset

[0062]

[0063] Table 2 Experimental results of missing value filling on the ETT-h1 dataset

[0064]

[0065] Table 3 Experimental results of missing value filling on the Weather dataset

[0066]

[0067]

[0068] A large number of experiments have proved that the present invention can effectively improve the effect of filling missing values ​​in time series, solve the problem of missing data in time series, and improve data quality and value.

[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for filling missing values ​​in time series data based on a diffusion model, characterized by: Including building a filling model, training the filling model, and using the trained filling model to fill in missing data values; The filling model includes a denoising diffusion module based on the classic speech generation model Diffwave, and an evaluation filling module based on Transformer and GRU; the denoising diffusion module includes an input data processing module, a residual connection block and an output integration module; the evaluation filling module includes an incremental filling module and a sampling result integration module; The input data processing module is used to manually mask the input data containing missing values, generate a mask matrix and a conditional information matrix, and randomly sample the diffusion step t, and project and embed the data, diffusion step and conditional information through a convolution layer and an activation function; The residual connection block is used to perform multi-level and multi-dimensional mapping, attention calculation and fusion processing on the input data, including a temporal attention module TAM, a diffusion step embedded projection convolution layer, a conditional information embedded projection convolution layer and an intermediate expansion decomposition layer. The diffusion step embedded projection convolution layer is used to map the input diffusion step to the input dimension of the residual connection block through a convolution network, and the conditional information embedded projection convolution layer is used to map the input conditional information to the input dimension of the residual connection block through a convolution network. The temporal attention module TAM is used to decompose the temporal attention into a parallel connection of static attention within a channel and dynamic attention between channels, and a series connection of temporal attention along the time dimension and feature attention along the feature dimension; the intermediate expansion decomposition layer decomposes the data into two parts of equal size, one as the input of the residual block of the next layer, and the other as the output of the current residual block; The output integration module is used to add and integrate the inputs of multiple residual connection blocks, and map the data mapped to high dimensions back to the original dimensions of the data through convolutional layers and activation functions; The incremental filling module evaluates the rationality of observable data with adjacent distances or high attention scores on the data points to be filled, and inputs the filling values ​​that meet the constraints as observable information into the next round of generation model according to the evaluation results to achieve incremental filling; The sampling result integration module uses an unsupervised clustering algorithm to automatically weight and integrate the sampling results.

2. The method for filling missing values ​​of time series data based on a diffusion model according to claim 1, characterized in that: The temporal attention module TAM includes a time attention layer and a feature attention layer. The time attention layer takes the tensor of each feature as input to extract the time dependency of the data, and the feature attention layer takes the tensor of each time point as input to extract the feature dependency of the data.

3. The method for filling missing values ​​of time series data based on a diffusion model according to claim 2, characterized in that: The temporal attention layer and the feature attention layer are both 1-layer Transformer encoders.

4. The method for filling missing values ​​of time series data based on a diffusion model according to claim 1, characterized in that: The rationality evaluation module TSRE uses two perspectives, time and feature, to evaluate the sequence. The time rationality evaluation divides the data according to the time points, combines all the feature values ​​at each time point into a sequence, uses Transformer to calculate the attention of the observable value to the fill value, and then outputs whether each time point meets the requirements of the original data distribution through the linear layer. The feature rationality evaluation divides the data according to the feature dimension, and combines the data within a period of time corresponding to each feature into a sequence, and inputs the data in the sequence into the GRU network in chronological order. With the help of GRU, the information of the entire sequence is condensed, and then after a linear layer, the data under the feature is output whether it meets the requirements of the original data distribution. The results of time rationality and feature rationality are multiplied to obtain the evaluation result of the entire sequence.

5. The method for filling missing values ​​of time series data based on a diffusion model according to claim 1, characterized in that: The sampling result integration module implementation process is as follows: The result set of multiple sampling of the model is input into the K-Means model, and the sampling results are aggregated into two categories according to the distance between samples, recorded as set1 and set2. The number of samples in each category is counted, recorded as n1 and n2, and the final filling is shown as follows: p1 and p2 represent the proportion of the number of samples of the opposing category to the total number of samples, and the logarithmic value of the proportion is used to determine the weight of each category, which is multiplied by the filling mean of each category as the final filling result, thereby achieving weighted integration of the sampling results.

6. The method for filling missing values ​​of time series data based on a diffusion model according to claim 1, characterized in that: The training of the filling model includes training the denoising diffusion module and using the trained denoising diffusion module for filling, wherein the training of the denoising diffusion module adopts a self-supervised training method, and a masking strategy is used to delete the values ​​of a part of the non-missing parts in the multivariate time series X containing missing values ​​to obtain a new X and a corresponding mask matrix M, and the true value of the masked part is used to guide the training of the denoising diffusion module.

Citation Information

Patent Citations

  • Space-time data filling method, system and equipment based on guide information and medium

    CN116166642A

  • Conditional diffusion model-based time series data prediction method and system

    CN117076931A

  • Knowledge embedding and filling soft measurement method based on conditional score diffusion

    CN117370771A

  • Pre-training model based on dynamic bidirectional time convolution mask self-coding

    CN118211612A

  • Time series data generation method and system based on diffusion model

    CN118410289A

Cited By

  • Time sequence missing value filling method and system based on diffusion model

    CN119537816A

  • A Method and System for Filling Missing Values in Time Series Based on Diffusion Model

    CN119537816B

  • Aero-engine residual life uncertainty quantification method under online prediction scene

    CN119862800A

  • Intelligent denoising and missing value filling method for distributed optical fiber strain data

    CN120011720A

  • Feature data processing method and device, equipment, medium and product

    CN120508759A