Multivariate time series filling method and system based on time-frequency prior enhanced diffusion model

By employing a multivariate time series imputation method based on a time-frequency prior enhanced diffusion model, and combining time-frequency information for iterative conditional denoising, the problem of insufficient fusion of time-domain and frequency-domain information in existing technologies is solved, achieving high-precision and robust time series reconstruction.

CN122173782APending Publication Date: 2026-06-09SHENZHEN TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610357740.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-06-09

Smart Images

  • Figure CN122173782A_ABST
    Figure CN122173782A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for multivariate time series imputation based on a time-frequency prior enhanced diffusion model, belonging to the field of artificial intelligence and time series data processing technology. The method includes: S1, acquiring the multivariate time series to be imputed and a binary observation mask, separating the observation data; S2, performing preliminary imputation on the multivariate time series to be imputed to form a complete sequence, processing the complete sequence, and generating structured spectral prior features; S3, using the observation data and structured spectral prior features as joint conditions, performing iterative conditional denoising on the missing parts through a denoising diffusion model; and S4, outputting the imputed complete multivariate time series based on the denoising results. This invention, employing the above-mentioned method and system for multivariate time series imputation based on a time-frequency prior enhanced diffusion model, overcomes the technical bottlenecks of existing diffusion models' difficulty in capturing dynamic shifts and frequency domain methods' tendency to smooth high-frequency details, providing a more reliable and complete data foundation for downstream data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and time series data processing technology, and in particular to a method and system for imputing multivariate time series data based on a time-frequency prior enhanced diffusion model. Background Technology

[0002] Time series data, due to its dynamic and continuous nature, has become a key analytical tool in many fields such as finance, healthcare, and meteorology. However, in practical applications, this type of data is often incomplete due to problems such as sensor failure, transmission errors, or missing acquisition data, which seriously interferes with subsequent time series analysis and decision-making. Therefore, data interpolation has become an indispensable preprocessing step in time series analysis.

[0003] Early interpolation methods were primarily based on statistical heuristics or matrix factorization techniques. While effective for time series data with low-rank structures, these methods typically relied on linear assumptions, making it difficult to characterize the complex nonlinear temporal dependencies prevalent in the real world. With the development of deep learning, methods based on recurrent neural networks (such as BRITS) have shown excellent performance in modeling local temporal contexts, while Transformer-based architectures have effectively captured long-range dependencies through attention mechanisms. However, most of these methods only output deterministic point estimates and cannot quantify the uncertainty of the interpolation results.

[0004] In recent years, denoised diffusion probabilistic models have gradually become the mainstream of generative models. In time series interpolation tasks, observation-conditional diffusion models (such as CSDI, PriSTI, and FGTI) have significantly improved the fidelity of generated values. However, existing diffusion models still have significant shortcomings: their denoising process mainly relies on time-domain information, failing to fully utilize the inherent periodic structure and frequency-domain features of time-series data, resulting in limited ability to capture complex periodic shifts and dynamic pattern changes. Meanwhile, frequency-domain learning methods have attracted attention due to their ability to clearly reveal periodic patterns (such as FreTS, FEDformer, and TimesNet). These methods improve the learning efficiency of periodic patterns through frequency-domain sparsity or time-frequency transformation, but when dealing with high-frequency, non-stationary transient pulses, they often tend to over-smooth or lose details, making it difficult to accurately reconstruct sudden events during interpolation.

[0005] In summary, existing time-series interpolation methods, especially mainstream methods based on diffusion models, still have significant shortcomings in effectively fusing time-domain and frequency-domain information to simultaneously maintain periodic consistency and transient fidelity. Summary of the Invention

[0006] The purpose of this invention is to provide a multivariate time series imputation method and system based on a time-frequency prior enhanced diffusion model, which overcomes the technical bottlenecks of existing diffusion models in capturing dynamic shifts and frequency domain methods in smoothing high-frequency details, thus providing a more reliable and complete data foundation for downstream data analysis.

[0007] To achieve the above objectives, this invention provides a multivariate time series imputation method based on a time-frequency prior enhanced diffusion model (hereinafter referred to as the CDTI method), comprising the following steps: S1. Obtain the multivariate time series to be filled and the binary observation mask used to identify the observation location of the data, and separate the observation data from the time series according to the binary observation mask; S2. Perform preliminary interpolation on the multivariate time series to be filled to form a complete sequence, process the complete sequence, and generate structured spectral prior features; S3. Using the observation data and structured spectrum prior features as joint conditions, iterative conditional denoising is performed on the missing parts through a denoising diffusion model. The iterative conditional denoising is based on the forward diffusion and backward denoising logic of the denoising diffusion model. In each denoising step, the structured spectrum prior features are dynamically fused into the denoising process through a cross-view interaction mechanism. S4. Based on the denoising results, output the complete multivariate time series after imputation.

[0008] Preferably, step S2 specifically includes: S21. Perform preliminary interpolation on the multivariate time series to be filled to form a complete series. Preliminary interpolation can be replaced by zero-value filling or spline interpolation. S22. Perform a short-time Fourier transform (STFT) on the complete sequence to generate a two-dimensional time spectrum. The short-time Fourier transform can be replaced by a continuous wavelet transform, a discrete wavelet transform, or a Hilbert-Huang transform. S23. Use hierarchical attention mechanism to process two-dimensional time-spectrum graphs to extract structured spectral prior features.

[0009] Preferably, the cross-view interaction mechanism module is implemented using a cross-attention mechanism, specifically configured to: use the temporal features of the current denoising step as the query, and the structured spectral prior features as the key and value, to perform information retrieval and fusion.

[0010] Preferably, the cross-view interaction mechanism includes parallel temporal attention branches and variable attention branches, which are used to capture the dependencies in the temporal dimension and the variable dimension, respectively, and the outputs of the two branches are fused. The temporal attention branch computes attention along the time dimension to generate a time-aware representation. The variable attention branch computes attention along the variable dimension, generating a variable-perceptual representation. Time-aware representation is converted through a fusion converter. As a query and variable-aware representation Interacting as keys and values, synthesizing fully integrated output features. This enables the synergistic fusion of time-domain and frequency-domain information.

[0011] Preferably, the denoising diffusion model is trained through the following steps: Obtain the complete sequence as training data; A mask replacement strategy is applied to the training data to simulate data missing scenarios, thereby obtaining simulated observation data; wherein, the mask replacement strategy is used to simulate at least one missing scenario among completely random missing (MCAR), random missing (MAR), and non-random missing (MNAR); The denoising diffusion model is trained using simulated observation data and structured spectral prior features extracted from training data as joint conditions.

[0012] Preferably, in the inference phase, the iterative conditional denoising in step S3 begins by initializing the missing part with pure Gaussian noise.

[0013] Preferably, the iterative conditional denoising process in step S3 is achieved by predicting noise through a denoising network, and the mean of the predicted noise in the denoising step is... Determined by the following formula: ; in, For the first Noisy data of the step, For observation data, This is a time-frequency spectrum. , indicating the first The intensity of the added noise, , , This represents the noise estimate output by the denoising network.

[0014] Preferably, step S4 specifically outputs the complete multivariate time series using the following formula. : ; in, For the final fully denoised output, For multivariate time series to be filled, This is the original mask. This indicates element-level multiplication.

[0015] This invention also provides a multivariate time series imputation system based on a time-frequency prior enhancement diffusion model, comprising: The time-frequency domain feature learning module is configured to perform preliminary interpolation on the multivariate time series to be filled to form a complete sequence, perform time-frequency transformation on the complete sequence to generate a time-frequency spectrum, and use a hierarchical attention mechanism to process the time-frequency spectrum to extract structured spectral prior features. The denoising and diffusion module is used to execute the denoising and diffusion model, which is trained by minimizing the mean square error loss between the predicted noise and the actual added noise. The cross-view interaction mechanism module connects the time-frequency domain feature learning module and the denoising diffusion module, and is used to dynamically fuse the structured spectral prior features into the processing of the denoising diffusion module at each step of iterative conditional denoising. The output module, connected to the denoising and diffusion module, is configured to generate and output the imputed complete multivariate time series based on the output of the denoising and diffusion module.

[0016] Preferably, the hierarchical attention mechanism is a channel-space-temporal attention mechanism, which includes three sub-modules connected in sequence: channel attention, spatial attention, and temporal attention.

[0017] Therefore, this invention employs the aforementioned multivariate time series imputation method and system based on a time-frequency prior enhanced diffusion model. By introducing a time-frequency dual-path architecture and a cross-view interaction mechanism, it significantly improves the imputation accuracy and robustness of multivariate time series. It not only reconstructs the periodic trends of data with high fidelity but also accurately captures transient abrupt changes. It exhibits superior and stable performance under different missing rates and complex missing mechanisms (such as MCAR, MAR, and MNAR), overcoming the shortcomings of existing technologies in smoothing details and capturing dynamic shifts.

[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0019] Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 The following are comparative experimental figures of the present invention on the Pems08 dataset: (a) is the interpolation performance of variable 7 in the Pems08 dataset of different models; (b) is the interpolation component performance analysis figure of different models; Figure 3 This is a CDTI model framework diagram according to an embodiment of the present invention; Figure 4 This is a performance comparison chart of four dataset imputation methods with different missing rates according to embodiments of the present invention; Figure 5 These are performance graphs of CDTI in different scenarios with a missing rate of 10% on the Pems08 dataset according to embodiments of the present invention: (a) MAR scenario; (b) MNAR scenario; Figure 6 The following are visualization results of imputation of the Pems08 dataset with a missing rate of 40% according to an embodiment of the present invention: (a) Result of variable x_9 at different timestamps; (b) Result of variable x_89 at different timestamps; (c) Result of variable x_6 at different timestamps; (d) Result of variable x_96 at different timestamps. Detailed Implementation

[0020] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0022] Example This embodiment provides a multivariate time series imputation method based on a time-frequency prior enhanced diffusion model, the process of which is as follows: Figure 1 As shown, hereinafter referred to as the CDTI method, the core of the CDTI model consists of two paths: a time-frequency domain feature learning path and a conditional denoising diffusion path, dynamically coupled through a cross-view interaction mechanism (CVI). The model architecture is as follows: Figure 3 As shown, CDTI’s core innovation lies in its dual-path design, which processes the input time series from a complementary perspective: one path performs denoising and diffusion in the time domain, while the other path extracts structured priors in the frequency domain. The two work together to significantly improve the conditionalization capability and accuracy of interpolation.

[0023] The architecture operates through two parallel but interacting paths: The first path: the denoising diffusion path, primarily operating in the time domain. It starts from the original multivariate time series to be imputed. Initially, based on the binary observation mask... To distinguish between observed values ​​and missing values, a masking replacement strategy is employed during the training phase to simulate real missing values ​​and achieve self-supervised learning: a subset of observed values ​​is randomly selected and an artificial mask is applied. This is set to "missing" to obtain artificially missing sequences for training. Multiple missing data scenarios (MCAR - completely random missing, MAR - random missing, and MNAR - non-random missing) are used to generate these sequences. This is to enhance the model's generalization ability. Subsequently, in the diffusion process... The first step involves sampling the artificially missing locations and adding Gaussian noise to generate noisy data. Observations The noise subset, after being concatenated and projected, forms one of the inputs to the denoising network. The diffusion step embeds (encodes the noise level). ) is added to the input to guide the denoising network.

[0024] The second path: the time-frequency domain feature learning path, used to capture significant periodic and non-stationary patterns in the data, which are often difficult to identify directly in the time domain. The input sequence is first converted into time-frequency domain features using a short-time Fourier transform, generating a time-spectrum graph. The spectrogram is then processed by the multidimensional attention mechanism (Channel-Space-Time Attention, CSTA) in the TFFL module to adaptively extract and refine the discriminative frequency structure and dynamic evolution patterns, outputting structured spectral prior features.

[0025] The Cross-View Interaction (CVI) module, serving as the core hub of the architecture, dynamically combines the temporal context information from the denoising path with the time-frequency features extracted by the TFFL path. This integration ensures that the reconstruction process can guarantee the accuracy of point-by-point interpolation while adhering to the underlying periodic dynamic patterns of the data.

[0026] CDTI operates based on the principle of a denoising diffusion probability model. Its learning objective is to reverse the progressively increasing forward diffusion process through a conditional denoising process. The framework mainly consists of two phases: training and inference. During training, the denoising network learns to predict injected noise, and its loss function is the mean squared error (MSE) between the predicted noise and the actual noise. After training, in the inference phase, the model can then predict the injected noise based on real observation data. Using spectral prior features extracted from the sequence to be imputed, high-fidelity iterative reconstruction of the missing parts is performed. Finally, the imputed values ​​from the denoised output are merged with the original observations to generate a complete multivariate time series. .

[0027] Suppose the multivariate time series data to be filled is a matrix. ,in Indicates the number of variables. Represents the length of the sequence. Matrix each line For a single variable, its first element Indicates at time step The observed values. Missing data is determined by the binary observation mask matrix. Identification, when When observed, If it is 1, then... When missing, It is 0.

[0028] Example 1 S1. Obtain the multivariate time series to be filled. and binary observation mask used to identify the location of data observations And based on the binary observation mask From time series The elements with a value of 1 at the corresponding position are extracted to form the observation data set. , used for subsequent conditional input; S2. Perform preliminary interpolation on the time series to form a complete sequence, and use the Time-Frequency Domain Feature Learning (TFFL) module to process the complete sequence and generate structured spectral prior features; S21. To meet the data integrity requirements of time-frequency transformation, the multivariate time series to be filled... The missing position in (i.e.) Initial interpolation is performed at the position where =0 to form a complete sequence. Preliminary interpolation can be replaced by zero-value filling or spline interpolation. S22, For the complete sequence Perform short-time Fourier transform to generate a two-dimensional time-frequency spectrum. Its dimensions Window size determined by short-time Fourier transform and number of jumps The decision is made that the time-frequency spectrum is processed by the TFFL's multidimensional attention mechanism (combining CA, SA, and TA) to adaptively extract and refine the discriminative frequency structure and dynamic patterns. The short-time Fourier transform can be replaced by a continuous wavelet transform, a discrete wavelet transform, or a Hilbert-Huang transform. S23. Process the two-dimensional time-frequency spectrum using the hierarchical attention mechanism in the time-frequency domain feature learning module. Extracting structured spectral prior features The encoder uses two consecutive convolutional blocks to... Convert to Each convolutional block contains a 3×3 convolution, batch normalization, and a ReLU activation function. While linear interpolation effectively addresses input integrity issues, it can only capture linear trends and cannot model non-stationary dynamic changes and high-frequency abrupt changes. Therefore, to recover this missing dynamic information, this embodiment proposes a novel Channel-Spatial-Temporal Attention (CSTA) module. This module utilizes a hierarchical attention mechanism to extract rich structured features from the time-frequency domain. It transforms coarse interpolation priors into refined conditional representations, effectively encoding nonlinear temporal relationships and transient fluctuations, providing crucial frequency-aware guidance for the accurate reconstruction of abrupt changes during denoising. The Channel-Space-Time Attention (CSTA) mechanism consists of three sub-modules executed sequentially: Channel Attention (CA), Spatial Attention (SA), and Temporal Attention (TA). CA first identifies important frequency channels, SA then models the correlation between variables within each time frame, and TA finally captures long-range dependencies across timestamps.

[0029] S3. Using the observation data and structured spectral prior features as joint conditions, iterative conditional denoising is performed on the missing parts through a denoising diffusion model. The iterative conditional denoising is based on two processes: forward diffusion and backward denoising logic of the denoising diffusion model.

[0030] Forward diffusion process: First, obtain the original data sample, and then follow the fixed Markov chain... Gaussian noise is gradually added to the original data at each time step; the noise addition process satisfies the following equation: ; in, Indicates given initial data Under the condition of (i.e., noise-free sampled data), from time step 1 to The joint conditional probability distribution corresponding to the forward diffusion process, This indicates the process of forward diffusion from time step Time to step The single-step transition probability distribution, This indicates clean sampled data (i.e.) (noise-free sampled data) Indicates the time step index during the diffusion process. , Indicates a multivariate Gaussian distribution. , indicating the first The intensity of the added noise, Represents the identity matrix. Indicates at time step Noisy data, Indicates at time step Noisy data, Indicates from time step 1 to time step 2. The set of sequences consisting of all intermediate noisy variables; And achieve arbitrary time steps through the following formula Noisy data sampling: ; in, , , , representing noise randomly sampled from a multivariate Gaussian distribution with a mean of 0 and a covariance of the identity matrix; Backward noise reduction process: This step requires utilizing a trained denoising network at each denoising time step. In the middle, the noisy data of the current step and the observed known parts will be included. and the time spectrum generated by the TFFL module As a joint condition input. The reverse process is as follows: ; in, Indicates by parameters Parameterized backdiffusion probability distribution Represents variance. This represents the mean of the predicted noise. Indicates the time step from time step 0 to time step 1. A sequence of random variables, Represents the learnable parameters of a neural network model; By predicting the noise mean and variance To iteratively restore the original data distribution: ; in, This represents the noise estimate output by the denoising network. , , Indicates the first The intensity of the added noise; train: The model is trained to predict noise added during forward diffusion. In each iteration, a random selection is made. A subset of , and noise is added according to the diffusion step of random sampling, to obtain Then, the denoising network predicts the injected noise, through... and The mean square error between them is used to optimize the network parameters: ; in, This represents the loss function used to train the diffusion model. It represents the mathematical expectation of a random variable. Denotes the Euclidean norm; S4. Based on the denoising results, output the complete multivariate time series after imputation.

[0031] During the inference process, all missing values ​​(including original missing values ​​and artificially masked values) are treated as... This allows the model to jointly interpolate these unknown values. Initialization from Gaussian noise. Initially, the trained denoising network is iteratively refined through a backdiffusion process. Until the final fully denoised output is obtained. Finally, use the original mask. Element-wise selection is performed, and the observed and interpolated values ​​are combined to obtain the complete multivariate time series. : ; in, For the final fully denoised output, For multivariate time series to be filled, This is the original mask. This indicates element-level multiplication.

[0032] Experimental Results and Verification: To verify the effectiveness of this embodiment, experiments were conducted on public datasets such as Pems08.

[0033] like Figure 2 As shown, the CDTI provided in this embodiment exhibits powerful interpolation capabilities compared to existing state-of-the-art methods: like Figure 2 (a) The interpolation curve of CDTI is closest to the true value and can accurately restore trend turning points and high-frequency abrupt changes (see periodic components and residual components), which is significantly better than CSDI and FGTI.

[0034] like Figure 2 (b) After decomposing the sequence into three components—trend, seasonality, and residual—CDTI's errors (RMSE / MAE) across all components are significantly lower than those of mainstream baseline models, including TimesNet, SAITS, and FGTI. This directly demonstrates that this embodiment, through a time-frequency dual-path design, successfully solves the problem of simultaneously maintaining periodic consistency and transient fidelity as pointed out in the background art, achieving high-fidelity interpolation.

[0035] A comprehensive evaluation of 17 imputation methods was conducted. As shown in Tables 1 and 2, CDTI demonstrated leading or highly competitive performance in the MCAR scenario across various datasets and missing rates, achieving the lowest RMSE and MAE in most cases. A key advantage of CDTI lies in its strong robustness to increasing missing rates. When the missing rate gradually increases from 10% to 40%, CDTI's error increment remains significantly lower than expected. Within this range, the total error increase for most datasets is limited to within 22%, with an average error increase of only 12% for every 10% increase in the missing rate—significantly better than other models. The total error increase for most datasets is limited to approximately 22%, equivalent to an average increase of approximately 12% for every 10% increase in the missing rate, indicating more stable performance compared to competing methods.

[0036] Figure 4 This stability is visually confirmed, showing that CDTI's RMSE and MAE growth curves are exceptionally flat compared to other methods. CDTI's absolute error increment falls within a narrow band of 0.016 to 0.142, highlighting its consistent and robust performance.

[0037] To further stress test the model, its performance was evaluated on the PEMSD08 dataset (Table 1) at extreme missing rates ranging from 50% to 70%. This dataset was chosen because its inherent completeness reduces confounding factors in robustness analysis, thus helping to mitigate the confusion effect in robustness analysis.

[0038] The results show that although simple methods and matrix factorization-based methods are relatively insensitive to high missing rates, CDTI still demonstrates considerable potential under these challenging conditions.

[0039] Table 1. Performance comparison of 17 imputation methods with missing rates ranging from 10% to 70%. Table 2 Comparison of imputation performance for three real-world datasets in a completely random missing scenario. To evaluate the interpolation performance of CDTI under more realistic and challenging conditions, this embodiment extends the evaluation scope to both MAR and MNAR scenarios. Figure 5 As shown, CDTI maintained stable and excellent performance in all missing scenarios.

[0040] Quantitative results further confirm its significant advantages: compared with 17 baseline models, CDTI reduced RMSE by an average of 58.2% and MAE by an average of 60.8% in the MAR scenario. Similarly, in the more complex MNAR scenario, its RMSE was reduced by an average of 61.9% and MAE by an average of 60.7%. These results demonstrate that the proposed time-frequency conditional paradigm can effectively enable CDTI to capture the complex dependencies inherent in various missing data scenarios, thereby achieving robust and high-precision imputation.

[0041] This embodiment further benchmarks CDTI against four state-of-the-art diffusion-based generative models within a targeted probabilistic evaluation framework. As shown in Table 3, CDTI achieves state-of-the-art or highly competitive CRPS values ​​on the Pems08 dataset, reflecting its ability to better capture the underlying data distribution, rather than just point estimation. Notably, the upper part of the table shows that CDTI exhibits significant stability with increasing missing rates, demonstrating its strong robustness in handling high uncertainty and data sparsity. Furthermore, as shown in the lower part of Table 3, CDTI consistently maintains its performance advantage. This superiority across various missing patterns highlights the probabilistic robustness of the proposed framework.

[0042] Table 3 compares CRPS with diffusion methods on the Pems08 dataset. To intuitively evaluate the imputation capability of CDTI, this embodiment performs qualitative analysis on a portion of the Pems08 dataset with a missing rate of 40%, and compares CDTI with recent cutting-edge baseline methods CSDI and FGTI. The results are as follows: Figure 6 As shown. Figure 6 As shown in (a) and (b), CDTI demonstrates superior accuracy and robustness in reconstructing temporal dynamics, particularly near cyclical transitions. While all methods capture stable cyclical trends, CDTI performs exceptionally well in areas of cyclical fluctuation, such as the downward trend of variable x_9 near timestamps 200 and 800. In these regions, CDTI accurately reproduces the depth of each decline and the rhythm of recovery, closely matching the true values.

[0043] In contrast, FGTI slightly underestimates volatility, while CSDI introduces overly abrupt shifts that distort the true cyclical structure.

[0044] Figure 6(c) and (d) further highlight the advantage of the CDTI in capturing non-periodic, high-volatility events. During the sharp V-shaped drop near the 1220 and 2940 timestamps of x_96, the CDTI faithfully reproduced the abrupt change and subsequent rebound. The CSDI completely oversmoothed the event, producing an inaccurate horizontal line, while the FGTI only partially followed the trend, significantly underestimating the volatility.

[0045] These results demonstrate that CDTI's integration of time-frequency conditions enhances the denoising process, enabling high-fidelity interpolation of periodic dynamics and transient abrupt changes.

[0046] Corresponding to the above method, this embodiment also provides a filling system. The system includes: The Time-Frequency Domain Feature Learning Module (TFFL) is configured, either in hardware or software, to perform the S2 step, which specifically implements preliminary interpolation, STFT transformation, and CSTA attention calculation.

[0047] The denoising diffusion module includes a processor and memory that implement the denoising network and is used to perform forward and backward diffusion calculations in S3.

[0048] The Cross-View Interaction (CVI) module, serving as an interface or middleware connecting the two modules mentioned above, is programmed to perform cross-attention calculations to achieve dynamic fusion of time-frequency features.

[0049] The input / output module receives the original sequence and mask, and outputs the padded sequence.

[0050] The above embodiments are merely preferred examples for clearly illustrating the present invention and are not intended to limit the scope of protection. Various modifications are possible without departing from the spirit of the present invention. For example: Time-frequency transformation can be replaced by wavelet transform to obtain more flexible resolution.

[0051] The execution order of the three attention types in the CSTA module can be adjusted, or a parallel architecture can be used.

[0052] Preliminary interpolation can be performed using spline interpolation or simple mean filling.

[0053] In addition to cross-attention, cross-view interaction can also employ a gating fusion mechanism.

[0054] Therefore, the present invention employs the above-mentioned multivariate time series imputation method and system based on the time-frequency prior enhanced diffusion model, and solves the following technical problems: (1) Solving the problem that existing diffusion models are unable to capture dynamic shifts: In view of the shortcomings of existing models that rely only on a single time domain perspective and cannot effectively perceive dynamic changes and complex shifts in periodic structures, time-frequency domain features are introduced as structured spectral priors to provide explicit global dynamic guidance for the denoising process.

[0055] (2) Solve the problem of inaccurate reconstruction of abrupt changes and instantaneous events during the filling process: In view of the problem that existing frequency domain methods are prone to smoothing or omitting high-frequency, non-periodic residuals (such as pulses or sudden events), discriminative features are extracted through a hierarchical time-frequency feature learning module, thereby preserving these key instantaneous fluctuation details during the filling process.

[0056] (3) Solving the problem of integrating heterogeneous time-frequency information with the time-domain denoising process: It solves how to dynamically inject static time-frequency features into each denoising step of the diffusion model, thereby achieving the synergistic integration of time-domain and spectrum-domain information and improving the overall fidelity and temporal structure consistency of the filled data.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. 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 still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A multivariate time series imputation method based on a time-frequency prior enhanced diffusion model, characterized in that, Includes the following steps: S1. Obtain the multivariate time series to be filled and the binary observation mask used to identify the observation location of the data, and separate the observation data from the time series according to the binary observation mask; S2. Perform preliminary interpolation on the multivariate time series to be filled to form a complete sequence, process the complete sequence, and generate structured spectral prior features; S3. Using the observation data and structured spectrum prior features as joint conditions, iterative conditional denoising is performed on the missing parts through a denoising diffusion model. The iterative conditional denoising is based on the forward diffusion and backward denoising logic of the denoising diffusion model. In each denoising step, the structured spectrum prior features are dynamically fused into the denoising process through a cross-view interaction mechanism. S4. Based on the denoising results, output the complete multivariate time series after imputation.

2. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, Step S2 specifically includes: S21. Perform preliminary interpolation on the multivariate time series to be interpolated to form a complete series; S22. Perform a short-time Fourier transform on the complete sequence to generate a two-dimensional time-spectrum graph; S23. Use hierarchical attention mechanism to process two-dimensional time-spectrum graphs to extract structured spectral prior features.

3. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, The cross-view interaction mechanism is implemented using a cross-attention mechanism, specifically configured as follows: using the temporal features of the current denoising step as the query and the structured spectral prior features as the key and value, information retrieval and fusion are performed.

4. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 3, characterized in that, The cross-view interaction mechanism includes parallel temporal attention branches and variable attention branches, which are used to capture the dependencies in the temporal dimension and the variable dimension, respectively, and the outputs of the two branches are fused. The temporal attention branch computes attention along the time dimension to generate a time-aware representation. The variable attention branch computes attention along the variable dimension, generating a variable-perceptual representation. Time-aware representation is converted through a fusion converter. As a query and variable-aware representation Interacting as keys and values, synthesizing fully integrated output features. .

5. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, The denoising diffusion model is trained through the following steps: Obtain the complete sequence as training data; A mask replacement strategy is applied to the training data to simulate data missing scenarios, thereby obtaining simulated observation data; wherein, the mask replacement strategy is used to simulate at least one missing scenario among completely random missing, random missing, and non-random missing. The denoising diffusion model is trained using simulated observation data and structured spectral prior features extracted from training data as joint conditions.

6. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, During the inference phase, the iterative conditional denoising in step S3 begins by initializing the missing part with pure Gaussian noise.

7. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, The iterative conditional denoising process in step S3 is achieved by predicting noise through a denoising network. The mean of the predicted noise in the denoising step is... Determined by the following formula: ; in, For the first Noisy data of the step, For observation data, This is a time-frequency spectrum. , indicating the first The intensity of the added noise, , , This represents the noise estimate output by the denoising network.

8. The multivariate time series imputation method based on a time-frequency prior enhanced diffusion model according to claim 1, characterized in that, Step S4 specifically outputs the complete multivariate time series using the following formula. : ; in, For the final fully denoised output, For multivariate time series to be filled, This is the original mask. This indicates element-level multiplication.

9. A multivariate time series imputation system based on a time-frequency prior enhanced diffusion model, used to execute the multivariate time series imputation method based on a time-frequency prior enhanced diffusion model as described in any one of claims 1-8, characterized in that, include: The time-frequency domain feature learning module is configured to perform preliminary interpolation on the multivariate time series to be filled to form a complete sequence, perform time-frequency transformation on the complete sequence to generate a time-frequency spectrum, and use a hierarchical attention mechanism to process the time-frequency spectrum to extract structured spectral prior features. The denoising and diffusion module is used to execute the denoising and diffusion model, which is trained by minimizing the mean square error loss between the predicted noise and the actual added noise. The cross-view interaction mechanism module connects the time-frequency domain feature learning module and the denoising diffusion module, and is used to dynamically fuse the structured spectral prior features into the processing of the denoising diffusion module at each step of iterative conditional denoising. The output module, connected to the denoising and diffusion module, is configured to generate and output the imputed complete multivariate time series based on the output of the denoising and diffusion module.

10. The multivariate time series imputation system based on a time-frequency prior enhancement diffusion model according to claim 9, characterized in that, The hierarchical attention mechanism is a channel-space-temporal attention mechanism, which includes three sub-modules connected in sequence: channel attention, spatial attention, and temporal attention.