Time series completion method and device based on diffusion sampling correction and frequency domain optimization, and medium

By introducing noise perturbation during the training phase of the diffusion model and frequency domain decomposition correction during the inference phase, the problems of high computational overhead and error accumulation in the diffusion model are solved, achieving efficient and stable time series completion.

CN122286112APending Publication Date: 2026-06-26SOUTH CHINA UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTH CHINA UNIV OF TECH
Filing Date
2026-03-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing diffusion probability models have high computational costs and accumulate prediction errors during time series completion, affecting the stability and accuracy of the completion results.

Method used

By introducing a noise perturbation mechanism during the training phase of the diffusion model and combining frequency domain decomposition and frequency correction strategies during the inference phase, the diffusion sampling process is corrected, including constructing an observation mask, training a diffusion noise predictor, and performing frequency domain decomposition and correction.

Benefits of technology

It improves the model's robustness to noise bias during the inference phase, enhances the stability and accuracy of the completion results, reduces computational overhead, and improves the efficiency of time series completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286112A_ABST
    Figure CN122286112A_ABST
Patent Text Reader

Abstract

This invention discloses a time series completion method, device, and medium based on diffusion sampling correction and frequency domain optimization. The method includes: constructing an observation mask; inputting the complete time series and the corresponding simulated missing mask into a diffusion model, generating an original noise sequence through forward diffusion, and generating a perturbation noise sequence based on step-dependent Gaussian perturbation, using the perturbation noise sequence as model input, and using the original noise sequence as a supervisory signal to train a diffusion noise predictor; in the inference phase, inputting the time series containing partial observations and the corresponding real missing mask into the trained diffusion noise predictor, iteratively generating intermediate samples according to a preset diffusion step size, performing frequency domain decomposition and correction on the intermediate samples during the iteration process, and continuing subsequent iterations based on the corrected signal until all preset diffusion steps are completed; and outputting the completed time series data. This invention achieves the completion of missing data in multivariate time series.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a time series completion method, device, and medium based on diffusion sampling correction and frequency domain optimization. Background Technology

[0002] Time series data is widely used in applications such as sensor monitoring, medical data analysis, weather forecasting, and power system operation. During actual data acquisition, missing values ​​frequently appear in time series data due to equipment failure, communication interruptions, or data corruption. Therefore, time series completion techniques are needed to estimate missing data and obtain a complete data sequence.

[0003] In recent years, diffusion probabilistic models have been applied to time series completion tasks. These methods model the data distribution by constructing a forward diffusion process and a backward denoising process, and then progressively generate missing data under conditional information constraints to achieve time series completion. However, in the time series completion process of diffusion models, the model typically needs to gradually recover data through multiple iterative sampling steps, resulting in significant computational overhead. Furthermore, prediction errors may gradually accumulate between diffusion steps during the iteration process, affecting the stability and accuracy of the completion results. Therefore, a new time series completion method is urgently needed to achieve stable and efficient completion of multivariate time series data. Summary of the Invention

[0004] The main objective of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a time series completion method, device and medium based on diffusion sampling correction and frequency domain optimization. By introducing a noise disturbance mechanism during the diffusion model training stage and combining frequency domain decomposition and frequency correction strategies during the inference stage, the diffusion sampling process is corrected, thereby achieving the completion of missing data in multivariate time series.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] Time series completion methods based on diffusion sampling correction and frequency domain optimization include:

[0007] Construct observation masks to identify observed and missing data in multivariate time series data; the observation masks in the training phase are used to simulate missing values, and the observation masks in the inference phase are used to identify actual missing data.

[0008] During the training phase, the complete time series and the corresponding simulated missing mask are input into the diffusion model. The original noise sequence is generated through forward diffusion, and the perturbation noise sequence is generated based on the step-dependent Gaussian perturbation. The perturbation noise sequence is used as input, and the original noise sequence is used as the supervision signal to train the diffusion noise predictor.

[0009] During the inference phase, the time series containing some observations and corresponding real missing masks is input into the trained diffusion noise predictor. Intermediate samples are generated iteratively according to the preset diffusion step size. During the iteration process, the intermediate samples are decomposed and corrected in the frequency domain to obtain the corrected signal. Subsequent iterations are continued based on the corrected signal until all preset diffusion steps are completed.

[0010] Output the completed time series data.

[0011] The present invention also includes an electronic device, the electronic device comprising:

[0012] At least one processor; and,

[0013] A memory that is communicatively connected to at least one processor; wherein,

[0014] The memory stores computer program instructions that can be executed by at least one processor, which enables the at least one processor to perform the time series completion method based on diffusion sampling correction and frequency domain optimization provided by the present invention.

[0015] The present invention also includes a computer-readable storage medium storing a program that, when executed by a processor, implements the time series completion method based on diffusion sampling correction and frequency domain optimization provided by the present invention.

[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0017] 1. The method of the present invention applies a step-dependent Gaussian perturbation to the original noise during the training phase of the diffusion model, enabling the model to access an intermediate state that is closer to the distribution during the inference phase. This effectively alleviates the problem of inconsistent distribution between the training and inference phases of the diffusion model and improves the robustness of the model to noise shift during the inference phase.

[0018] 2. The method of the present invention introduces a correction mechanism based on frequency domain analysis during the diffusion sampling process, performs frequency domain decomposition on intermediate samples, and applies step-dependent adjustment coefficients to low-frequency components and high-frequency components respectively. The low-frequency components are used to enhance the overall trend structure of the time series, and the high-frequency components are used to suppress unstable noise, thereby improving the frequency domain bias problem in the diffusion sampling process and improving the stability and accuracy of the completion results.

[0019] 3. The method of the present invention can still achieve good time series completion results with fewer diffusion sampling steps, reduce the impact of error accumulation during diffusion sampling, reduce computational overhead while ensuring completion accuracy, thereby improving the overall efficiency and practicality of the time series completion method. Attached Figure Description

[0020] Figure 1 This is an overall flowchart of the method of the present invention.

[0021] Figure 2 This is a flowchart illustrating the training phase of the method of the present invention.

[0022] Figure 3 This is a flowchart illustrating the reasoning stage of the method of this invention.

[0023] Figure 4 This is a schematic diagram of the structure of the diffuse noise predictor in the method of the present invention.

[0024] Figure 5 This is a schematic diagram of the electronic device in the embodiment. Detailed Implementation

[0025] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0026] Examples; such as Figure 1 As shown, the present invention provides a time series completion method based on diffusion sampling correction and frequency domain optimization, comprising:

[0027] S1. Construct observation masks to identify observed and missing data in multivariate time series data; the observation masks in the training phase are used to simulate missing values, and the observation masks in the inference phase are used to identify the actual missing data.

[0028] Specifically, constructing the observation mask involves:

[0029] Obtain complete multivariate time series data and construct a time series matrix. ,in Indicates the number of variables. Indicates the length of the time series.

[0030] In this embodiment, the preprocessing of the acquired multivariate time series data is also included to improve the stability of the model training and inference process. First, time step alignment and missing data marking are performed on the time series to construct a unified time series input format. Then, the length of the time series is determined. When the length of the time series is greater than a preset length, the time series is segmented or divided into segments using a sliding window to ensure that the length of each time series does not exceed the preset length. When the length of the time series is less than the preset length, the time series is padded with missing data until the sequence length reaches the preset length, where the preset length is set to 96.

[0031] Constructing the observation mask matrix The mask elements satisfy:

[0032] ;

[0033] During the training phase, from the observation mask matrix Construct a target mask by randomly selecting some observed locations. ,in And satisfy:

[0034] ;

[0035] Construct a simulated missing mask for the training phase based on the target mask. :

[0036] ;

[0037] During the training phase, a simulated missing mask is used to mask the complete time series and perform preliminary interpolation to generate the conditional input matrix. The conditional input matrix satisfies:

[0038] ;

[0039] in, This represents element-wise multiplication. The result after applying interpolation to the missing data;

[0040] During the training phase, observation masks corresponding to simulated missing data are used. The input sequence is constructed, and the complete time series is subjected to masking and preliminary interpolation. Specifically, for the observed positions in the original time series, the original observation values ​​are retained, and the missing positions are filled with the time series forward diffused to step t, resulting in the initial input sequence for training the diffusion model.

[0041] ;

[0042] in, The noisy time series obtained by forward diffusion at step t;

[0043] During the inference phase, a simulated missing mask is used to mask the complete time series and perform preliminary interpolation to generate the conditional input matrix. The conditional input matrix satisfies:

[0044] ;

[0045] in, This represents element-wise multiplication. The result after applying interpolation to the missing data;

[0046] During the inference phase, the observation mask corresponding to the actual missing data is used. The input sequence is constructed by retaining the original observations for the observed positions in the original time series and filling the missing positions with random noise to form the initial input sequence for diffusion sampling.

[0047] ;

[0048] in, This represents the original time series containing missing values. Indicates the standard Gaussian distribution Random noise obtained from sampling.

[0049] In this embodiment, the initial interpolation uses a linear interpolation method to estimate the missing value based on the observed time points adjacent to the missing position, so as to obtain a continuous time series input. Alternatively, spline interpolation, nearest neighbor interpolation, or polynomial interpolation can also be used to estimate the missing data.

[0050] S2. During the training phase, the complete time series and corresponding simulated missing mask are input into the diffusion model. The original noise sequence is generated through forward diffusion, and a perturbed noise sequence is generated based on a step-dependent Gaussian perturbation. The perturbed noise sequence is used as input, and the original noise sequence is used as the supervision signal to train the diffusion noise predictor; for example... Figure 2 The diagram shown is a flowchart of the training phase.

[0051] Forward diffusion includes the following steps:

[0052] Generate the original noise sequence :

[0053] ;

[0054] Based on the current diffusion step For the original noise Apply a step-dependent Gaussian perturbation to generate perturbation noise. :

[0055] ;

[0056] in, To be compatible with diffusion steps The relevant perturbation coefficients.

[0057] In this embodiment, the disturbance coefficient The perturbation coefficient exhibits a functional relationship with the number of diffusion steps, simulating potential noise shifts during sampling. Specifically, the perturbation coefficient gradually increases with the number of diffusion steps, reaching a preset maximum value in the later stages of diffusion. When the time series has a missing proportion of less than approximately 25%, the maximum value of the perturbation coefficient can be set to approximately 0.06–0.08; when the missing proportion is greater than approximately 25%, the maximum value of the perturbation coefficient can be set to approximately 0.16–0.18.

[0058] With the noise after disturbance Forward diffusion is performed to obtain the intermediate time series corresponding to the perturbation noise sequence. :

[0059] ;

[0060] in, ;

[0061] In this embodiment, the total number of diffusion steps in the diffusion process is 10, and the diffusion noise scheduling parameters are... The value gradually decreases linearly from 0.9999 to 0.8 according to a preset function.

[0062] With perturbation noise sequence As input, with the original noise As a supervisory signal training diffuse noise predictor The loss function is:

[0063] ;

[0064] in, These are the trainable parameters for the diffuse noise predictor. Input matrix as condition, This represents the number of diffusion steps.

[0065] like Figure 4 The diagram shown is a schematic of a diffusion noise predictor, which specifically includes:

[0066] The multi-layer feature extraction structure divides the output of each layer into residual connections and skip connections through gated activation units; the output of the multi-layer skip connections is aggregated into a cumulative representation and mapped to the final noise prediction result through two consecutive channel mapping modules.

[0067] The multi-layer feature extraction structure includes a conditional feature extraction module and a noise estimation module. The conditional feature extraction module is used to extract global conditional features, and the noise estimation module is used to calculate the multi-layer skip connection output based on the global conditional features and noisy samples.

[0068] The conditional feature extraction module includes the following processing steps:

[0069] Interpolate the observed time series values ​​to generate coarse condition information. The interpolation fills in the missing locations based on the nearest observations along the time dimension.

[0070] For the conditional input matrix Perform a one-dimensional convolutional mapping to obtain the mapping conditional representation:

[0071] ;

[0072] Spatial and temporal attention are calculated separately for the mapped conditional representations and combined through normalization and residual connections. Then, the spatial and temporal attention results are fused through a multilayer perceptron to obtain global conditional features.

[0073] ;

[0074] in,

[0075] ;

[0076] .

[0077] The noise estimation module includes the following processing steps:

[0078] Interpolate the initial input sequence With noisy samples The concatenation is then performed, and a one-dimensional convolutional channel mapping is used to obtain the noise estimator input representation:

[0079] ;

[0080] Input representation based on noise estimator Extracting time-related features using time-dependent learning units The time-dependent learning unit uses a cross-attention mechanism to calculate the time dimension dependency:

[0081] ;

[0082] ;

[0083] ;

[0084] ;

[0085] ;

[0086] Based on time-related features Globally relevant features are extracted using a feature dependency learning unit. The feature-dependent learning unit calculates the variable correlations across variable dimensions through a cross-attention mechanism:

[0087] ;

[0088] ;

[0089] ;

[0090] ;

[0091] ;

[0092] in, The feature dimension is the input of the noise estimator. The initial value is .

[0093] In this embodiment, the diffusion model employs a residual-structured neural network to implement the noise predictor. The model includes multiple residual noise prediction layers, each comprising a time-dependent learning module and a variable-dependent learning module, resulting in four residual noise prediction layers with 64 hidden channels and a diffusion step embedding dimension of 128. The cross-attention mechanism utilizes a multi-head attention structure, preferably with eight attention heads. Model training employs a gradient descent-based optimization algorithm to update network parameters, such as using the AdamW optimizer. During model training, the learning rate is set to approximately 1 × 10⁻⁶. -3 The batch size is set to approximately 32. During training, the model parameters are updated through multiple iterations to allow the noise predictor to gradually converge.

[0094] S3. In the inference phase, the time series containing partial observations and corresponding true missing masks is input into the trained diffusion noise predictor. Intermediate samples are generated iteratively according to the preset diffusion step size. During the iteration, the intermediate samples are decomposed and corrected in the frequency domain to obtain the corrected signal. Subsequent iterations are continued based on the corrected signal until all preset diffusion steps are completed. Figure 3 The diagram shown is a flowchart of the reasoning stage.

[0095] Specifically, generating intermediate samples iteratively according to a preset diffusion step size includes:

[0096] Step 1, for the current intermediate sample Using the trained spread noise predictor Predicted noise ;

[0097] Step 2, based on the predicted noise Compared with the current intermediate samples Calculate the uncorrected next intermediate sample :

[0098] ;

[0099] in, For the corresponding diffusion step The noise dispatch coefficient;

[0100] Step 3, intermediate samples Mapping to a noise-free data space to obtain noise-free data for prediction. :

[0101] ;

[0102] in, ;

[0103] Step 4, based on the observation mask and The observed data in the data are spliced ​​together to form a mixed signal. :

[0104] ;

[0105] Where ⊙ represents element-wise multiplication;

[0106] Step 5, for Frequency domain decomposition and correction are performed to obtain Specifically:

[0107] right Frequency domain decomposition is performed to obtain the low-frequency component. and high frequency components :

[0108] ;

[0109] in, Represents the discrete wavelet transform;

[0110] In this embodiment, the discrete wavelet transform adopts a multi-scale decomposition structure to perform three-level wavelet decomposition on the time series, thereby obtaining a low-frequency approximate component and multiple high-frequency detail components. The discrete wavelet transform can be implemented using Haar wavelets to improve the computational efficiency of frequency domain decomposition. Alternatively, other types of wavelet basis functions such as Daubechies wavelets, Symlet wavelets, or Coiflet wavelets can also be used.

[0111] Based on magnification factor Apply step-dependent amplification correction to the low-frequency components, based on the attenuation coefficient. Apply step-dependent attenuation correction to high-frequency components:

[0112] ;

[0113] ;

[0114] The intermediate samples are reconstructed by performing inverse wavelet transform on the corrected low-frequency and high-frequency components. :

[0115] ;

[0116] Among them, the magnification factor and attenuation coefficient All settings are dynamically configured based on the current diffusion step size, specifically:

[0117] Let the total diffusion step size be The current diffusion step is ,in Magnification factor The coefficient decays gradually to a unit value according to the diffusion step size, and its calculation method is as follows:

[0118] ;

[0119] in, This represents the low-frequency compensation coefficient in the initial stage of diffusion, used to compensate for the systematic underestimation of low-frequency amplitude in the early stages of diffusion; as the number of diffusion steps increases... The increase in magnification factor It gradually approaches 1, thus maintaining the stability of the original low-frequency structure in the later stage of diffusion;

[0120] Attenuation coefficient The calculation method is as follows: The diffusion step size is gradually increased.

[0121] ;

[0122] in, This represents the high-frequency suppression coefficient in the initial stage of diffusion, used to suppress unstable high-frequency fluctuations generated in the early stages of diffusion sampling; as the number of diffusion steps increases... The increase in attenuation coefficient It gradually approaches 1, thus gradually recovering the high-frequency detailed structure in the time series in the later stage of diffusion.

[0123] In this embodiment, It can be set to approximately 1.05. It can be set to approximately 0.9.

[0124] Step 6, Project back into the noise space to obtain the corrected noise for the next iteration:

[0125] ;

[0126] Step 7, based on Calculate the intermediate samples for the next iteration :

[0127] ;

[0128] Steps 1 to 7 are performed at a preset diffusion step size. Repeat the iteration until the time series is completed.

[0129] S4. Output the completed time series data.

[0130] The method of this invention, within the framework of a diffusion probability model, enhances the robustness of the model to intermediate state bias by introducing a noise perturbation mechanism during the training phase, and gradually corrects the diffusion sampling process by combining frequency domain analysis during the inference phase, thereby improving the stability and accuracy of time series missing data completion.

[0131] like Figure 5 As shown, in another embodiment, an electronic device is provided for implementing a time series completion method based on diffusion sampling correction and frequency domain optimization. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a time series completion program 203 based on diffusion sampling correction and frequency domain optimization.

[0132] The first memory 202 includes at least one type of readable storage medium, such as 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 first memory 202 can be an internal storage unit of the electronic device 200, such as the portable hard drive of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 200. Furthermore, the first memory 202 can include both internal storage units and external storage devices of the electronic device 200. The first memory 202 can be used not only to store application software and various types of data installed on the electronic device 200, such as the code of the time series completion program 203 based on diffusion sampling correction and frequency domain optimization, but also to temporarily store data that has been output or will be output.

[0133] In some embodiments, the first processor 201 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged 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 first processor 201 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 first memory 202 and calls data stored in the first memory 202 to perform various functions of the electronic device 200 and process data.

[0134] Figure 5 Only electronic devices with components are shown; those skilled in the art will understand that... Figure 5 The structure shown does not constitute a limitation on the electronic device 200, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0135] The time-series completion program 203 based on diffusion sampling correction and frequency domain optimization stored in the first memory 202 of the electronic device 200 is a combination of multiple instructions. When run in the first processor 201, it can achieve the following:

[0136] Construct observation masks to identify observed and missing data in multivariate time series data; the observation masks in the training phase are used to simulate missing values, and the observation masks in the inference phase are used to identify actual missing data.

[0137] During the training phase, the complete time series and the corresponding simulated missing mask are input into the diffusion model. The original noise sequence is generated through forward diffusion, and the perturbation noise sequence is generated based on the step-dependent Gaussian perturbation. The perturbation noise sequence is used as input, and the original noise sequence is used as the supervision signal to train the diffusion noise predictor.

[0138] During the inference phase, the time series containing some observations and corresponding real missing masks is input into the trained diffusion noise predictor. Intermediate samples are generated iteratively according to the preset diffusion step size. During the iteration process, the intermediate samples are decomposed and corrected in the frequency domain to obtain the corrected signal. Subsequent iterations are continued based on the corrected signal until all preset diffusion steps are completed.

[0139] Output the completed time series data.

[0140] Furthermore, if the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. 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).

[0141] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0142] In another embodiment, a computer-readable storage medium is provided, storing a program that, when executed by a processor, implements the time-series completion method based on diffusion sampling correction and frequency domain optimization of the present invention, specifically as follows:

[0143] Construct observation masks to identify observed and missing data in multivariate time series data; the observation masks in the training phase are used to simulate missing values, and the observation masks in the inference phase are used to identify actual missing data.

[0144] During the training phase, the complete time series and the corresponding simulated missing mask are input into the diffusion model. The original noise sequence is generated through forward diffusion, and the perturbation noise sequence is generated based on the step-dependent Gaussian perturbation. The perturbation noise sequence is used as input, and the original noise sequence is used as the supervision signal to train the diffusion noise predictor.

[0145] During the inference phase, the time series containing some observations and corresponding real missing masks is input into the trained diffusion noise predictor. Intermediate samples are generated iteratively according to the preset diffusion step size. During the iteration process, the intermediate samples are decomposed and corrected in the frequency domain to obtain the corrected signal. Subsequent iterations are continued based on the corrected signal until all preset diffusion steps are completed.

[0146] Output the completed time series data.

[0147] The computer-readable storage medium may be transient or non-transient. Exemplary examples include, but are not limited to, various media capable of storing computer program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0148] For example, the processor may be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0149] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0150] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A time-series completion method based on diffusion sampling correction and frequency domain optimization, characterized in that, include: Construct an observation mask to identify observed and missing data in a multivariate time series; The observation mask during the training phase is used to simulate missing values, while the observation mask during the inference phase is used to identify the actual missing data. During the training phase, the complete time series and the corresponding simulated missing mask are input into the diffusion model. The original noise sequence is generated through forward diffusion, and the perturbation noise sequence is generated based on the step-dependent Gaussian perturbation. The perturbation noise sequence is used as input, and the original noise sequence is used as the supervision signal to train the diffusion noise predictor. During the inference phase, the time series containing some observations and corresponding real missing masks is input into the trained diffusion noise predictor. Intermediate samples are generated iteratively according to the preset diffusion step size. During the iteration process, the intermediate samples are decomposed and corrected in the frequency domain to obtain the corrected signal. Subsequent iterations are continued based on the corrected signal until all preset diffusion steps are completed. Output the completed time series data.

2. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 1, characterized in that, The specific steps for constructing the observation mask are as follows: Obtain complete multivariate time series data and construct a time series matrix. ,in Indicates the number of variables. Indicates the length of the time series; Constructing the observation mask matrix The mask elements satisfy: ; During the training phase, from the observation mask matrix Construct a target mask by randomly selecting some of the observed locations. ,in And satisfy: ; Construct a simulated missing mask for the training phase based on the target mask. : ; During the training phase, a simulated missing mask is used to mask the complete time series and perform preliminary interpolation to generate the conditional input matrix. The conditional input matrix satisfies: ; in, This represents element-wise multiplication. The result after applying interpolation to the missing data; During the training phase, observation masks corresponding to simulated missing data are used. Construct the input sequence, perform masking and preliminary interpolation on the complete time series. Specifically, for the observed positions in the original time series, retain their original observation values, and fill in the missing positions with the time series forward diffused to step t, obtaining the initial input sequence for training the diffusion model: ; in, The noisy time series obtained by forward diffusion at step t; During the inference phase, a simulated missing mask is used to mask the complete time series and perform preliminary interpolation to generate the conditional input matrix. The conditional input matrix satisfies: ; in, This represents element-wise multiplication. The result after applying interpolation to the missing data; During the inference phase, the observation mask corresponding to the actual missing data is used. The input sequence is constructed by retaining the original observations for the observed positions in the original time series and filling the missing positions with random noise to form the initial input sequence for diffusion sampling. ; in, This represents the original time series containing missing values. Indicates the standard Gaussian distribution Random noise obtained from sampling.

3. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 2, characterized in that, During the training phase, forward diffusion includes the following steps: Generate the original noise sequence : ; Based on the current diffusion step For the original noise Apply a step-dependent Gaussian perturbation to generate perturbation noise. : ; in, To be compatible with diffusion steps The relevant disturbance coefficients; With the noise after disturbance Forward diffusion is performed to obtain the intermediate time series corresponding to the perturbation noise sequence. : ; in, ; With perturbation noise sequence As input, with the original noise As a supervisory signal training diffuse noise predictor The loss function is: ; in, These are the trainable parameters for the diffuse noise predictor. Input matrix as condition, This represents the number of diffusion steps.

4. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 2, characterized in that, The diffuse noise predictor specifically includes: The multi-layer feature extraction structure divides the output of each layer into residual connections and skip connections through gated activation units; the output of the multi-layer skip connections is aggregated into a cumulative representation and mapped to the final noise prediction result through two consecutive channel mapping modules. The multi-layer feature extraction structure includes a conditional feature extraction module and a noise estimation module. The conditional feature extraction module is used to extract global conditional features, and the noise estimation module is used to calculate the multi-layer skip connection output based on the global conditional features and noisy samples.

5. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 4, characterized in that, The conditional feature extraction module includes the following processing steps: Interpolate the observed time series values ​​to generate coarse condition information. The interpolation fills in the missing locations based on the nearest observations along the time dimension. For the conditional input matrix Perform a one-dimensional convolutional mapping to obtain the mapping conditional representation: ; Spatial and temporal attention are calculated separately for the mapped conditional representations and combined through normalization and residual connections. Then, the spatial and temporal attention results are fused through a multilayer perceptron to obtain global conditional features. ; in, ; 。 6. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 4, characterized in that, The noise estimation module includes the following processing steps: Interpolate the initial input sequence With noisy samples The concatenation is then performed, and a one-dimensional convolutional channel mapping is used to obtain the noise estimator input representation: ; Input representation based on noise estimator Extracting time-related features using time-dependent learning units. The time-dependent learning unit uses a cross-attention mechanism to calculate the time dimension dependency: ; ; ; ; ; Based on time-related features Globally relevant features are extracted using a feature dependency learning unit. The feature-dependent learning unit calculates the variable correlations across variable dimensions through a cross-attention mechanism: ; ; ; ; ; in, The feature dimension is the input of the noise estimator. The initial value is .

7. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 1, characterized in that, The process of iteratively generating intermediate samples according to a preset diffusion step size specifically includes: Step 1, for the current intermediate sample Using the trained spread noise predictor Predicted noise ; Step 2, based on the predicted noise Compared with the current intermediate samples Calculate the uncorrected next intermediate sample : ; in, For the corresponding diffusion step The noise dispatch coefficient; Step 3, intermediate samples Mapping to a noise-free data space to obtain noise-free data for prediction. : ; in, ; Step 4, based on the observation mask and The observed data in the data are spliced ​​together to form a mixed signal. : ; Where ⊙ represents element-wise multiplication; Step 5, for Frequency domain decomposition and correction are performed to obtain ; Step 6, Project back into the noise space to obtain the corrected noise for the next iteration: ; Step 7, based on Calculate the intermediate samples for the next iteration : ; Steps 1 to 7 are performed at a preset diffusion step size. Repeat the iteration until the time series is completed.

8. The time series completion method based on diffusion sampling correction and frequency domain optimization according to claim 7, characterized in that, Step 5, frequency domain decomposition and correction, includes: right Frequency domain decomposition is performed to obtain the low-frequency component. and high frequency components : ; in, Represents the discrete wavelet transform; Based on magnification factor Apply step-dependent amplification correction to the low-frequency components, based on the attenuation coefficient. Apply step-dependent attenuation correction to high-frequency components: ; ; The intermediate samples are reconstructed by performing inverse wavelet transform on the corrected low-frequency and high-frequency components. : ; Among them, the magnification factor and attenuation coefficient All settings are dynamically configured based on the current diffusion step size, specifically: Let the total diffusion step size be The current diffusion step is ,in Magnification factor The coefficient decays gradually to a unit value according to the diffusion step size, and its calculation method is as follows: ; in, This represents the low-frequency compensation coefficient in the initial stage of diffusion, used to compensate for the systematic underestimation of low-frequency amplitude in the early stages of diffusion; as the number of diffusion steps increases... The increase in magnification factor It gradually approaches 1, thus maintaining the stability of the original low-frequency structure in the later stage of diffusion; Attenuation coefficient The calculation method is as follows: The diffusion step size is gradually increased. ; in, This represents the high-frequency suppression coefficient in the initial stage of diffusion, used to suppress unstable high-frequency fluctuations generated in the early stages of diffusion sampling; as the number of diffusion steps increases... The increase in attenuation coefficient It gradually approaches 1, thus gradually recovering the high-frequency detailed structure in the time series in the later stage of diffusion.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to at least one processor; wherein, The memory stores computer program instructions that can be executed by at least one processor, such that the at least one processor can perform the time series completion method based on diffusion sampling correction and frequency domain optimization as described in any one of claims 1-8.

10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the time series completion method based on diffusion sampling correction and frequency domain optimization as described in any one of claims 1-8.