Multivariate time series diffusion interpolation method based on historical data, terminal equipment and storage medium
By matching and fusion of historical data segments and target observation data through sliding windows, and training the noise estimation model with the diffusion interpolation module, the interpolation accuracy problem of the existing technology in high missing rates and long-term data loss scenarios is solved, and more efficient multivariate time series data interpolation is achieved.
Patent Information
- Application Number
- CN202411663511.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-08
AI Technical Summary
Existing time series data interpolation methods are difficult to learn accurate data characteristics from limited information in high missing rates and long-term data missing scenarios, resulting in limited accuracy of interpolation results.
A multivariate time series diffusion interpolation method based on historical data is adopted, and the historical data segment is matched with the target observation data through a sliding window, and the similarity and time correlation are fused, and the noise estimation model is input into the diffusion interpolation module to train, and gradually denoising is used to generate the interpolation result.
The interpolation accuracy is improved, especially in high missing rates and long-term data missing scenarios. By fully utilizing the information of historical data segments, more sufficient training data is provided and the interpolation performance is improved.
Smart Images

Figure CN119783015A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a multivariate time series data processing technology, in particular to a multivariate time series diffusion interpolation method based on historical data, a terminal device and a storage medium. Background Art
[0002] Multivariate time series data have a wide range of applications in many fields such as transportation, economy, healthcare, and meteorology. However, in the actual collection process, these data often contain missing values due to sensor failure, communication problems, or data loss. Missing data can seriously affect the performance of data analysis and downstream tasks, so it is crucial to accurately interpolate missing data.
[0003] Traditional interpolation methods, such as statistical methods (e.g., mean / median interpolation, linear regression, etc.) and machine learning methods (e.g., K-nearest neighbor interpolation, decision tree interpolation, etc.), often rely on specific data assumptions. When these assumptions do not hold, the interpolation accuracy will be affected. In recent years, deep learning-based methods have performed well in interpolation tasks because they do not need to rely on strict data assumptions. For example, recurrent neural networks (RNNs) and self-attention mechanisms can capture temporal dependencies in data, but these methods encounter the problem of compound error accumulation when dealing with high missing rate data.
[0004] To overcome these problems, some studies have introduced interpolation methods based on generative models, such as generative adversarial networks (GANs) and variational autoencoders (VAEs). Although these methods can generate high-quality interpolation results, GANs have problems with training instability and mode collapse, while VAEs may have concentration in the latent space, affecting the interpolation accuracy.
[0005] Recent research has begun to focus on the diffusion model, a generative model that has been successfully applied in the field of images. It performs data interpolation by training a noise estimation model. The diffusion model can be trained stably and can use contextual information to improve interpolation accuracy. However, the diffusion model still has challenges in dealing with high missing rate data and long-term data missing, especially in data missing scenarios caused by device failure or communication problems. It is difficult for the model to accurately estimate the distribution and characteristics of the missing data. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a multivariate time series diffusion interpolation method, terminal device and storage medium based on historical data in view of the shortcomings of the existing technology, so as to solve the problem that the existing time series data interpolation method has high missing rate data and long-term data missing, which makes it difficult for the interpolation model to learn accurate data features from limited information during the training process, thereby limiting the accuracy of the interpolation results.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: a multivariate time series diffusion interpolation method based on historical data, comprising the following steps:
[0008] S1. Use a sliding window of the same size as the target observation matrix, start matching from the first time node of the historical data stream, calculate the similarity between the target observation data and the historical data segments in the sliding window, and obtain the top K most similar historical data segments corresponding to each sample;
[0009] S2, fusing the first K most similar historical data segments with the current target observation data;
[0010] S3. Input the fused data and part of the observed data into a diffusion interpolation module at the same time, train the diffusion interpolation module, and obtain a noise estimation model.
[0011] The specific implementation process of step S2 includes:
[0012] 1) Calculate the distance similarity and time proximity between the data in the historical data segment, and calculate the weight of data fusion based on the distance similarity and time proximity;
[0013] 2) When there is an observation value at a certain position of the target observation data, the value of the target observation data is directly used as the fusion value of the corresponding position of the fusion data; when there is no observation value at a certain position of the target observation data, the weight calculated in 1) is used to perform weighted fusion on the value of the corresponding position in the historical data segment to calculate the fusion value.
[0014] The weight calculation formula is: Among them, λ k is the weight, μ∈(0,1) is used to adjust the similarity score s k and time distance score d k The learnable hyperparameters of the weights between d k =t k / T,t k is the kth selected historical data segment The starting time slot, T is the latest time slot, Represents the sum of the time distance scores of the top K most similar historical data segments selected, represents the sum of the similarity scores of the top K most similar ones selected; Represents the target observation data X and historical data segment The similarity distance between M inter_t Used to mark which locations are target observation data X and historical data segments There are observed values, that is, if X i,j and There are valid observations at position (i, j), let otherwise, One norm represents X and The number of intersections.
[0015] Fusion data X fu The fused value at position (i,j) The calculation process is expressed as:
[0016] X train(i,j) and X sup(i,j) Represents the training data X train and supervision data X sup The value at position (i, j) in , for the first K most similar historical data segment matrix set Define multiple historical data segments with observations at position (i, j) as a set but For this matrix set The value at position (i,j), {λ n ,...,λ m} indicates the historical data segment respectively. The corresponding weight parameter, and
[0017] Training data X train and supervision data X sup The acquisition process includes: representing the data segment that needs to be filled in the multivariate time series data as the target observation data X, and representing its historical data as the historical data Randomly select a part of the observation data from the target observation data X as the training data X train , and the other part of the observation data is used as the supervision data X sup .
[0018] After step S3, the method further includes:
[0019] S4, in the nth iteration, the target observation data X and the noise data Input a noise estimation model to estimate noise;
[0020] S5, remove the estimated noise from the noise data, and use the noise data after noise removal as the noise data of the n-1th iteration, the value of n is reduced by 1, and step S4 is repeated. When n=1, the denoised data is obtained.
[0021] S6. Finally, based on the target observation data X and the denoised data Calculate the interpolation result Xresult , and its calculation process is expressed as: M is the mask of the target observation data X.
[0022] As an inventive concept, the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the steps of the above method.
[0023] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon; the computer program / instruction implements the steps of the above method when executed by a processor.
[0024] As an inventive concept, the present invention also provides a computer program product, including a computer program / instruction; when the computer program / instruction is executed by a processor, the steps of the above method are implemented.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) Since the historical data matching module in the present invention uses the same sliding window as the target observation data matrix to perform sliding matching and calculate the similarity between the historical data and the target observation data under each sliding window, it is possible to find the information closest to the current target observation data. When performing similarity calculations, only the data that exists in both the target observation data and the historical data segment is calculated, and the similarity calculation results are averaged using the amount of data that exists in the target observation data and the historical data segment to prevent inaccurate matching problems caused by the presence of missing values. Finally, the module selects multiple historical data segments that are most similar to the target observation data from the historical data stream to provide more sufficient training data for subsequent interpolation modules. It can solve the problem of insufficient training data caused by the high missing rate when training models for existing missing data recovery methods for multivariate time series data;
[0027] (2) Since the fusion module in the present invention fuses multiple historical data segments with the current target observation data, considering that multivariate time series data has the characteristics of distance similarity and time proximity between data, that is, when the data distribution in the historical data segment is more similar to the data distribution in the target observation data, the historical data segment has a higher reference value. On the other hand, when the historical occurrence time is closer to the current time, its data distribution is more valuable for inferring the true distribution of the current data. In this module, by reasonably allocating the fusion weights of historical data and observation data, it is ensured that the fused data remains within a reasonable range. Through the fusion process designed by the present invention, the matching historical data segments are effectively fused with the observation data. This module ensures that the training data effectively supplements the historical data and provides sufficient training data for the subsequent interpolation module;
[0028] (3) Since the diffusion interpolation module in the present invention learns data distribution through a diffusion model based on conditional scores and gradually converts noise into a reasonable time series through an inverse process, unlike the traditional diffusion interpolation model, the present invention adds fusion data to the diffusion model, uses observation information to improve interpolation accuracy, and supplements the model's training data by searching for data matching the current target interpolation data in historical data to solve the problem of low sampling rate of target interpolation data. The interpolation performance is superior to other existing time series interpolation methods. The problem that the observation data provided by the actual scene is very limited and data information is missing when the sampling rate is low is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a graphical overview of the model provided by the embodiment of the present invention, showing three main modules: historical data matching module, fusion module and diffusion interpolation module;
[0030] Figure 2 is a schematic diagram of historical data matching based on a sparse historical data matrix provided by an embodiment of the present invention;
[0031] Figure 3 is a visualization process diagram of a diffusion interpolation module provided by an embodiment of the present invention;
[0032] Figure 4 is a schematic diagram of the nth step of the diffusion process provided by an embodiment of the present invention;
[0033] Figure 5 3 is a schematic diagram of the nth step of the denoising process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Example 1
[0036] The basic idea of the embodiment of the present invention is to provide a new method for interpolation of multivariate time series data, which models network traffic data into a three-dimensional tensor of sample-attribute-time node. In view of the common high data missing rate and long-term data missing problems in real scenarios, a historical data matching module is designed. For each sample, a group of historical data segments similar to its current distribution are found from its historical data stream, and the training data is supplemented by selecting multiple historical data segments that best match the current time period to solve the problem of insufficient training data in the self-supervised training process. On this basis, the embodiment of the present invention further designs a historical data fusion scheme, fully considering the similarity and time correlation between the target observation data and the historical data, and using multiple historical data segments to integrate with the target observation data through normalization, ensuring that the fused training data is distributed within the approximate value range of the true value. In addition, the embodiment of the present invention designs an interpolation algorithm based on a diffusion model, and the diffusion model mainly includes two processes: diffusion process and denoising process. The diffusion process is used to train a noise estimation model. The embodiment of the present invention simultaneously inputs the fused training data and part of the observation data into the diffusion process, providing rich feature information for model training. The denoising process gradually removes the noise estimated by the noise estimation model from the random noise data, and finally obtains the interpolated data.
[0037] Combine the following Figures 1 to 5 The present invention provides a method and system for interpolating missing values in multivariate time series data.
[0038] like Figure 1 As shown, an embodiment of the present invention provides a method for interpolating missing values in multivariate time series data, comprising the following steps:
[0039] (1) Historical data matching module: This module uses the same sliding window as the target observation matrix to perform sliding matching in the historical data stream. The sliding window starts from the first time node of the historical data stream and performs sliding matching between the target observation data and the historical data. The sliding window moves only one time node at a time. In this process, the similarity between the target observation data and the historical data segment selected by the sliding window is calculated. After comparing the similarity of the historical data segments under each sample, the top K most similar historical data segments corresponding to each sample are obtained;
[0040] Specifically, the current target observation data is first defined, and multiple historical data segments that best match it are selected from the historical data.
[0041] The advantage of this step is that the sliding window strategy is used to select the historical data segment that best matches the current time period. The selection criteria not only consider similarity, but also the availability of data. Secondly, multiple historical data segments that best match the current time period are selected to solve the problem of insufficient training data during self-supervised training. By selecting historical data that is close in time or randomly selecting historical data, more sufficient support can be provided for the model.
[0042] (2) Fusion module: This module fuses the selected top K most similar historical data segments with the current target observation data to obtain more complete fusion training data X fu The fusion process takes into account the distance similarity and time proximity between the target observation data and the historical data, and assigns different fusion weights to the data of each historical data segment according to the existence and similarity of the observation values, ensuring that the fused data is distributed within a reasonable range while improving the authenticity of its features and making its distribution closer to the true value.
[0043] The advantage of this step is that it fully considers the similarity and time correlation between the target observation data and the historical data, and uses multiple historical data fragments to fuse with the target observation data in a normalized manner to ensure that the fused training data is distributed within the approximate value range of the true value. For locations where there are observation values in the target observation data, the fused data directly uses the observation value; for missing locations, the corresponding values in the weighted fused historical data are interpolated, that is, the true observation data is retained as training data.
[0044] (3) Diffusion interpolation module: This module is mainly divided into diffusion process and denoising process. The diffusion process is used to train a noise estimation model. The noise estimation model uses the DiffWave architecture as the basis, which consists of multiple residual layers with residual channels. The model fuses the training data X fu and supervision data X sup as input.
[0045] The present invention integrates the training data X fu and supervision data X sup At the same time, it is input into the diffusion process, providing rich feature information for model training. The denoising process gradually removes the noise estimated by the noise estimation model from the random noise data, and finally obtains the interpolated data.
[0046] Specifically, in the diffusion process, a noise estimation model is trained using the fused training data. This process involves gradually adding random noise to the data and training the model to estimate this noise. In the denoising process, the noise estimated by the noise estimation model is gradually removed starting from the random noise, and finally the interpolated data is obtained. This process is gradual and helps to improve the interpolation accuracy.
[0047] like Figure 2 As shown, the historical data matching module and fusion module based on the sliding window strategy in the embodiment of the present invention. Figure 2 As shown in (a), given the current target observation data, it is recorded as Slide a matching window in the historical data stream to find the most similar historical data segment. The sliding window starts from the first time slot and slides with a step size of 1. Therefore, for a historical data stream with T time slots, the current target observation data will be matched with data from T-J+1 historical time periods.
[0048] In this process, it is necessary to calculate the target observation data X and each historical data segment selected by the sliding window The similarity between t , where t = {1, 2, ..., T-J+1}.
[0049] However, due to the high missing rate of target observation data and historical data segments, their observation data positions may not be completely aligned, which seriously affects the similarity calculation between datasets. In order to avoid inaccurate matching due to missing values, only the target observation data is calculated. and historical data segments The similarity of the data points in .
[0050] In addition, since the missing patterns in historical data are completely random, the amount of observation data in the matched historical segments will vary, thus affecting the fairness of the similarity comparison. To solve this problem, the embodiment of the present invention calculates the average Frobenius norm distance based on the target observation data and the available data in the historical data segment.
[0051] The advantage of this step is that in order to obtain sufficient supplementary data, it is necessary to identify K historical data segments that best match the target observation data in the entire historical data stream.
[0052] Then, the embodiment of the present invention designs a fusion process to more accurately combine the selected K best matching historical data segments with the training data X train For fusion. Figure 2 (b) as shown.
[0053] In the fusion module, the following two factors need to be considered:
[0054] Distance similarity: The distance similarity between each selected historical data segment and the current target observation data is variable. It has a smaller average Frobenius norm distance f t The historical data segments are more important and apply higher weights in the fusion process.
[0055] Temporal proximity: The closer the starting time slot of a historical data segment is to the current time slot, the more important its data becomes. Therefore, the weight assigned to each historical data segment during the fusion process should consider both distance similarity and temporal proximity.
[0056] Fusion weight: To consider matching historical data segments The similarity and time proximity between the current target observation data X and the current target observation data X define the weight λ k as follows:
[0057]
[0058] Among them, μ∈(0,1) is used to adjust the similarity score s k and time distance score d k λ is a learnable hyperparameter of the weight between k The larger the value, the better the k-th selected historical data segment. The more similar and closer it is to the current target observation data X, the greater the weight should be applied to this historical data segment in the fusion process.
[0059] Fusion process: Based on matching historical data segment H tk The fusion process is designed based on the distance similarity and time proximity between the current target observation data X. Since the goal is to supplement the training data X with historical data segments train , so we tend to trust the train data rather than data from historical data segments. In addition, to avoid confusion with supervised data X sup , you need to ensure that X sup The locations with observed data are set to zero in the fused data. Through a carefully designed fusion process, the matching historical data segments are train Effective fusion. This process ensures that the training data effectively supplements the historical data and provides sufficient training data for the subsequent interpolation module.
[0060] like Figure 3 As shown, the diffusion interpolation module in the embodiment of the present invention is mainly divided into a diffusion process and a denoising process. The diffusion process is used to train a noise estimation model. The present invention simultaneously inputs the fused training data and part of the observation data into the diffusion process, providing rich feature information for model training. The denoising process gradually removes the noise estimated by the noise estimation model from the random noise data, and finally obtains the interpolated data.
[0061] The overall system flow of the present invention is as follows: First, based on the historical data matching process, select the K historical data segments that are most similar to the current target observation data X. Then, using the fusion process, these historical data segments are combined with the training data X. trainFusion in appropriate proportions to obtain fused training data X fu , and supplement historical data.
[0062] Next, supervise the data X sup and the fused training data X fu Input to the diffusion interpolation module to train the noise estimation model. Using this noise estimation model, we can get the noise from pure Gaussian noise. Step by step, noise is removed to generate denoised data The final interpolation result X is obtained by calculation result .
[0063] like Figure 4 As shown, the diffusion process in the embodiment of the present invention first randomly samples n from the total diffusion steps N as the diffusion step of the current iteration. In the process of adding noise in any nth iteration, the noise supervision data is calculated based on equation (8): And combine it with the fused training data X fu Input into the noise estimation model to obtain the estimated noise result Next, the noise estimation model can be trained by minimizing the loss function Equation (9). This process is iterated until the model converges.
[0064] like Figure 5 As shown, the denoising process in the embodiment of the present invention consists of N steps. The nth step of the denoising process includes the following two steps:
[0065] Step 1: Input the target observation data X and the denoised noise data in the nth iteration The noise is estimated based on the noise estimation model, which can be expressed as
[0066] Step 2: The noise estimation model ∈ θ Estimated noise From noisy data Remove from the It represents the noise data of step n-1. The denoising process in the nth iteration can be expressed as:
[0067]
[0068] in The definition is as follows:
[0069]
[0070] Summary of the process of this module: the interpolation process starts from random Gaussian noise The denoising process starts with the number of steps n decreasing from N to 1. In the nth iteration of the stepwise interpolation process, the noise estimation model uses the current noise data and the target observation data n to estimate the noise of the current step length Then, the noise data of the next step Using the two equations in the second step above, the process is repeated until n = 1 to obtain the denoised data
[0071] Finally, we generate the denoised data It is integrated with the original target observation data X through the calculation formula, and the calculation process is expressed as: M is the mask of the target observation data X, and the interpolation result X is calculated result .
[0072] The embodiment of the present invention provides an effective multivariate time series data interpolation method, which can significantly improve the interpolation accuracy, especially in scenarios with high missing rate and long-term data missing. The problem of insufficient training data is solved through the historical data matching module and the fusion module, and accurate interpolation results are achieved through the diffusion interpolation module.
[0073] Experimental Results
[0074] The embodiment of the present invention is deployed on Pytorch, and the Adam optimizer is used to perform small batch gradient descent updates on the model. The specific settings are as follows: the learning rate is 1.0e-3, and the batch size is 16.
[0075] The embodiment of the present invention evaluates the restoration performance on five widely used multivariate interpolation data sets, which are related to power data, air quality, medical health and other fields. The evaluation indicators used are interpolation errors, including mean absolute error (MAE) and root mean square error (RMSE), which are calculated as follows:
[0076]
[0077] The experiment simulated two common missing data scenarios: random missing and long-term missing.
[0078] Missing at random: γ% of the data are randomly selected as missing data, and the remaining data are used as the target observation data X. In order to evaluate the accuracy of the interpolation algorithm under different missing rates, γ is set to 10, 30, 50, 70, and 90 respectively.
[0079] Long-term missingness: Due to the high level of missing data in the PhysioNet medical dataset, the long-term missingness case cannot be approximated. Instead, four other datasets are selected to test the long-term missingness case. From each sample, γ% of the features are randomly selected for corruption. For each corrupted feature, all data points in all time slots are set to missing. Similar to the random missingness scenario, γ is set to 10, 30, 50, 70, and 90, respectively.
[0080] Table 1 is a MAE error table and a RMSE error table of the missing value interpolation method in multivariate time series data provided by an embodiment of the present invention and four other interpolation algorithms for interpolating five data sets at different sampling rates in random missing scenarios;
[0081] Table 2 is a MAE error table and a RMSE error table of the missing value interpolation method in multivariate time series data provided by an embodiment of the present invention and four other interpolation algorithms for interpolating five data sets at different sampling rates in a long-term missing scenario;
[0082] Table 3 is a MAE error table and a RMSE error table of an ablation experiment of a historical data matching module in a missing value interpolation method for multivariate time series data provided by an embodiment of the present invention;
[0083] Table 4 is a MAE error table and a RMSE error table of an ablation experiment of a fusion process in a method for interpolating missing values in network traffic measurement data provided by an embodiment of the present invention;
[0084] Table 1 MAE and RMSE of the interpolation algorithm for five datasets at different sampling rates in random missing scenarios
[0085]
[0086]
[0087]
[0088]
[0089] Table 2 MAE and RMSE of the interpolation algorithm for five datasets at different sampling rates in long-term missing scenarios
[0090]
[0091]
[0092]
[0093] Table 3 MAE and RMSE of the ablation experiment of the historical data matching module in the interpolation algorithm at different sampling rates
[0094]
[0095]
[0096] Table 4 MAE and RMSE of the ablation experiment of the fusion module in the interpolation algorithm at different sampling rates
[0097]
[0098] According to the experimental results of Tables 1 to 4 under five data sets, it can be seen that the interpolation method for missing values in multivariate time series data provided by the embodiment of the present invention is superior to the existing methods in terms of five sampling rates and four indicators of NMAE and NRMSE.
[0099] In order to verify that the embodiment of the present invention can effectively handle high missing rate scenarios, the embodiment of the present invention conducted experiments in random missing scenarios to prove the effectiveness of the interpolation algorithm of the embodiment of the present invention in high missing rate scenarios. As shown in Table 1, by comparing with five state-of-the-art (SOTA) baseline methods, it can be observed that:
[0100] First, as the missing rate increases, the interpolation accuracy of all methods decreases. As the missing rate increases, the training data gradually becomes insufficient, resulting in a decrease in interpolation accuracy.
[0101] Secondly, compared with other SOTA baseline methods, the embodiment of the present invention achieves the highest accuracy at all missing rates in the random missing scenario. As the data missing rate increases, the gap between the method proposed by the embodiment of the present invention and other baselines increases, because the embodiment of the present invention supplements the training data with similar data from historical records, solving the problem of insufficient training data caused by low sampling rate.
[0102] In order to verify whether the interpolation scheme of the embodiment of the present invention is effective in the long-term missing data scenario, and to verify the effectiveness of the interpolation algorithm of the embodiment of the present invention in the long-term missing data scenario, the embodiment of the present invention is compared with five baseline methods. As shown in Table 2, it can be observed that:
[0103] First, as the missing rate increases, the imputation accuracy of all methods decreases. As the missing rate increases, the training data gradually becomes insufficient, resulting in a decrease in imputation accuracy.
[0104] Secondly, compared with other SOTA baseline methods, the embodiments of the present invention achieve the highest accuracy at all missing rates in the long-term missing data scenario. Since the embodiments of the present invention use historical data segments similar to the target observation data to supplement the training data, the long-term missing data segments are supplemented by historical data segments. Therefore, the model can solve the underfitting problem associated with undamaged devices, thereby improving the accuracy of missing data interpolation.
[0105] Based on the comparative experimental results of the above two missing scenarios, it can be verified whether the embodiment of the present invention can achieve better performance than the existing state-of-the-art (SOTA) method: Compared with the existing SOTA method, the interpolation scheme of the embodiment of the present invention achieves higher accuracy and higher reliability. This shows that the method of the embodiment of the present invention effectively identifies the historical data that is most similar to the current target observation data, thereby providing sufficiently reliable training data. This ability enables the model of the embodiment of the present invention to handle various complex time series missing scenarios, including random and long-term missing data. Even in the case of high missing rate data, the embodiment of the present invention still achieves excellent interpolation performance. For example, when the data missing rate reaches 90%, the embodiment of the present invention achieves an average MAE of 0.3758 on five data sets in the random missing scenario, which is 25.15% higher in accuracy than the best baseline method (CSDI). In the case of long-term missing, the average MAE of the embodiment of the present invention is 0.4635, which is 13.64% higher in accuracy than the best baseline method (GP-VAE).
[0106] The embodiment of the present invention also sets up an ablation experiment to more comprehensively verify the method proposed in the embodiment of the present invention.
[0107] In order to prove the effectiveness of the historical data matching process and the fusion process in the embodiment of the present invention, the following ablation experiments were conducted: First, in order to verify the effectiveness of the historical data matching process in the embodiment of the present invention, 10%, 30%, 50%, 70% and 90% of the observations were randomly selected as missing values from two data sets: ETT and air quality. Three groups of experiments were designed for comparison:
[0108] 1) The first group uses the most recent historical data segment as the data source and performs fusion from the historical data stream, which is represented as an embodiment of the present invention (proximity matching).
[0109] 2) The second group randomly selects historical data segments from the historical data stream as data sources for fusion, which is represented as an embodiment of the present invention (random matching).
[0110] 3) The third group does not use data from the historical data stream as a supplement, but directly trains the diffusion process with only the target observation data, which is denoted as the embodiment of the present invention (without history).
[0111] After the historical data matching process, the remaining steps described in the embodiment of the present invention are continued to evaluate the interpolation results. As shown in Table 3, it can be observed that the designed historical data matching scheme achieves better performance than all other three matching methods. Since the historical data matching process is designed, which uses a sliding window-based method to find the historical data most similar to the current target observation data, the supplemented historical data has characteristics that are closer to the current interpolation data. This ensures that they provide more accurate information for the diffusion interpolation module and achieve higher interpolation performance.
[0112] To verify the effectiveness of the fusion process, the same random missing scenario was used on the ETT and air quality datasets, with missing rates of 10%, 30%, 50%, 70%, and 90%, respectively. A comparative experiment was conducted, called the embodiment of the present invention (mean fusion), in which the fusion stage does not consider the similarity and time correlation scores after identifying the historical data segments similar to the current target observation data. Instead, it uses a simple averaging method to fuse the data, using the average of the historical data as supplementary data for training the model. As shown in Table 4, it can be observed that:
[0113] The fusion scheme designed by the embodiment of the present invention is always better than the average fusion scheme at various missing rates. Since the design of the fusion process of the embodiment of the present invention fully considers the similarity in distance and time between the historical data and the current target observation data, the embodiment of the present invention trusts the historical data that is closer to the current moment in both time and distance. Therefore, compared with simply taking the average value, the fusion result of the present invention is more accurate and achieves higher accuracy interpolation.
[0114] These ablation experiments highlight the importance of the historical data matching process and the fusion process in the framework of the embodiments of the present invention, and prove their contribution to achieving accurate and reliable interpolation results.
[0115] Example 2
[0116] Embodiment 2 of the present invention provides a terminal device corresponding to the above-mentioned embodiment 1. The terminal device may be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of the above-mentioned embodiment.
[0117] The terminal device of this embodiment includes a memory, a processor, and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in the above-mentioned embodiment 1.
[0118] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0119] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0120] Example 3
[0121] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to the above embodiment 1, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the above embodiment 1 are implemented.
[0122] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0123] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0126] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0127] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A multivariate time series diffusion interpolation method based on historical data, characterized in that: The following steps are involved: S1. Use a sliding window of the same size as the target observation matrix, start matching from the first time node of the historical data stream, calculate the similarity between the target observation data and the historical data segments in the sliding window, and obtain the top K most similar historical data segments corresponding to each sample; S2, fusing the first K most similar historical data segments with the current target observation data; S3. Input the fused data and part of the observed data into a diffusion interpolation module at the same time, train the diffusion interpolation module, and obtain a noise estimation model.
2. The multivariate time series diffusion interpolation method based on historical data according to claim 1 is characterized in that: The specific implementation process of step S2 includes: 1) Calculate the distance similarity and time proximity between the data in the historical data segment, and calculate the weight of data fusion based on the distance similarity and time proximity; 2) When there is an observation value at a certain position of the target observation data, the value of the target observation data is directly used as the fusion value of the corresponding position of the fusion data; when there is no observation value at a certain position of the target observation data, the weight calculated in 1) is used to perform weighted fusion on the value of the corresponding position in the historical data segment to calculate the fusion value.
3. The multivariate time series diffusion interpolation method based on historical data according to claim 2 is characterized in that: The weight calculation formula is: Among them, λ k is the weight, μ∈(0,1) is used to adjust the similarity score s k and time distance score d k The learnable hyperparameters of the weights between d k =t k / T,t k is the kth selected historical data segment The starting time slot, T is the latest time slot, Represents the sum of the time distance scores of the top K most similar historical data segments selected, represents the sum of the similarity scores of the top K most similar ones selected; Represents the target observation data X and historical data segment The similarity distance between M inter_t Used to mark which locations are target observation data X and historical data segments There are observed values, that is, if X i,j and There are valid observations at position (i, j), let otherwise, One norm represents X and The number of intersections.
4. The multivariate time series diffusion interpolation method based on historical data according to claim 2 is characterized in that: Fusion data X fu The fused value at position (i,j) The calculation process is expressed as: X train(i,j) and X sup(i,j) Represents the training data X train and supervision data X sup The value at position (i, j) in the matrix for the first K most similar historical data segments Define multiple historical data segments with observations at position (i, j) as a set but For this matrix set The value at position (i,j), {λ n ,...,λ m } indicates the historical data segment respectively The corresponding weight parameter, and 5. The multivariate time series diffusion interpolation method based on historical data according to claim 4 is characterized in that: Training data X train and supervision data X sup The acquisition process includes: representing the data segment that needs to be filled in the multivariate time series data as the target observation data X, and representing its historical data as the historical data Randomly select a part of the observation data from the target observation data X as the training data X train , and the other part of the observation data is used as the supervision data X sup .
6. The multivariate time series diffusion interpolation method based on historical data according to claim 1 is characterized in that: After step S3, the method further includes: S4, in the nth iteration, the target observation data X and the noise data Input a noise estimation model to estimate noise; S5, remove the estimated noise from the noise data, and use the noise data after noise removal as the noise data of the n-1th iteration, the value of n is reduced by 1, and step S4 is repeated. When n=1, the denoised data is obtained. S6. Based on target observation data X and denoised data Calculate the interpolation result X result : M is the mask of the target observation data X.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory; characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method of any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Semi-solid state circuit breaker with full electric quantity data intelligent acquisition function
CN120277589A
Method and system for recovering satellite state data through historical enhancement
CN120387033A
A method and system for restoring satellite status data through historical enhancement
CN120387033B