Data space multivariate time series data interpolation method and device
By using bidirectional dynamic GRU and graph structure learning methods in multivariate timing data processing, time and dimension correlation characteristics are extracted, and the problem of failure to fully consider timing and dimension correlation in the prior art is solved, and a more accurate and effective multivariate timing data interpolation effect is achieved.
Patent Information
- Application Number
- CN202510241851.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-27
AI Technical Summary
When processing missing values in multiple timing data, the prior art fails to fully consider all information and influence in the timing data, including timing information before and after the missing values, and the negative impact of missing values in the data on the interpolation results. At the same time, information flow and dependencies between directly related dimensions were not fully considered and integrated.
Bidirectional dynamic GRU is used to extract the time correlation in multivariate time series data, and dimensional correlation features are extracted through graph structure learning and attention mechanism. Combining bidirectional time features and dimensional correlation features, the MLP layer is used for aggregation and output, and finally the interpolation of multivariate timing data in the data space is completed.
The correlation of time dimensions is accurately captured by bidirectional dynamic GRU, and the correlation between dimensions is captured using graph structure and attention mechanism, effectively avoiding the negative impact of missing values on the interpolation results, fully considering the correlation between timing information and dimensions, and improving the interpolation effect of multivariate timing data.
Smart Images

Figure CN120216891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of bidirectional dynamic GRU (Gate Recurrent Unit) and graph neural network, and particularly relates to the interpolation of multivariate time series data in the data space. Background Art
[0002] The data space is a new infrastructure in the digital economy era and plays an "accelerator" role in the development of the digital economy; and the analysis ability of multivariate time series data in the data space is crucial. For example, analyzing network logs can help judge network faults and malicious attacks, analyzing medical records can assist in the research and treatment of diseases, analyzing meteorological data can conduct meteorological predictions, and analyzing traffic flow data can conduct traffic flow predictions, etc.
[0003] In actual scenarios, due to reasons such as equipment failures, transmission errors, communication anomalies, and intentional tampering, data integrity problems occur from time to time, resulting in inaccurate statistics between data elements. In addition, the time intervals in time series data are not always fixed, which can also be regarded as missing data. The existence of missing values hinders the data analysis and mining process. In short, it is crucial to handle missing values in time series data.
[0004] The methods for handling missing values are mainly divided into three categories: leaving as it is, deleting, and data imputation.
[0005] Regarding the method of leaving as it is: Some data can tolerate null values. For example, the occupation information in personal statistics. In statistical analysis, some individuals may be classified as unemployed, so it is acceptable to mark the occupation field as null. During the data utilization process, null values can be uniformly converted to "unemployed". However, in time series data, the unified processing of missing values is not feasible.
[0006] Regarding the method of deleting: It involves removing the data corresponding to the missing values in the dimension or time interval. However, this method of deletion reduces the available data, thus complicating the subsequent data processing and analysis.
[0007] Currently, data imputation methods based on different technologies can be divided into three categories: imputation methods based on statistical analysis, imputation methods based on machine learning, and imputation methods based on neural networks (deep learning methods).
[0008] Regarding the imputation methods based on statistical analysis: Statistical methods such as mean, median, or mode imputation, these methods measure the central tendency of the attributes. However, these methods are only applicable to cases with small data volume and simple data trends.
[0009] Regarding machine learning-based imputation methods: such as tree-based imputation and clustering-based imputation. Specifically, for example, the k-nearest neighbor method. For the observed values to be imputed, first, the Euclidean distance is used to identify K nearest observed values, and then the weighted average of these K nearest values is used to impute the missing values. Another example is the random forest imputation method, which is an ensemble learning model based on decision trees. Generally, for high-dimensional data, a smaller K value can be selected to achieve faster imputation.
[0010] However, whether it is a statistical analysis-based imputation method or a machine learning-based imputation method, these imputation methods in the data space cannot effectively capture the complex implicit correlations between data elements, including temporal correlations and dimensional correlations in the data space.
[0011] Deep learning methods can extract the implicit feature relationships between data, which is very beneficial for data types with strong correlations, such as time series data.
[0012] Deep generative models such as GP-VAE use a deep variational auto-encoder to map time series data with missing values to a latent space without missing values, and then use a Gaussian Process in the latent space to model the low-dimensional dynamics. However, for this method, the encoder needs to utilize sufficient valid information to obtain the distribution state of the data so as to effectively map to the latent space. For data with a high missing rate and very complex dependencies, the performance of the model is not good.
[0013] E2GAN is an end-to-end generative model that can estimate incomplete time series by generating the closest complete time series in a single stage. However, this method belongs to a black box model and the correlations between data cannot be explained. Especially when facing large-scale unbalanced data sets, the imputation effect of the model is not stable.
[0014] BRITS uses bidirectional recurrent dynamics to estimate missing values, treating the missing values as variables in a bidirectional RNN graph. The missing values receive gradients in both the forward and backward directions and have a consistency constraint, thus improving the accuracy of missing value estimation. However, during the recursive process, no corresponding processing is done on the missing values, which will cause the errors existing after missing value estimation to shift backward, resulting in an increasing error.
[0015] For data with prior spatial relationships, such as traffic data, many methods use graph neural networks (GNNs) to establish spatial correlations. DSTGCN utilizes the graph convolutional network (GCN) and the GateTCN network structure to simultaneously explore the node and edge features of traffic graphs for traffic data prediction. MDGCN combines the memory neural network with GNN to solve the data imputation problem, introducing an external memory network to store and share the global spatio-temporal information of different sensors at different time steps. To address the dimensional correlation problem, graph neural networks (GNNs) play a key role. For example, in traffic data processing, GNN can easily utilize the spatial relationships between roads. However, the spatio-temporal data targeted by these methods has clear spatial information, and the information transfer between different dimensions has a lag, resulting in insufficient capture of the information between dimensions at different time scales. Moreover, for data without prior spatial relationships, the effectiveness of GNN may be limited, making it challenging to capture the temporal correlations in time series data.
[0016] SPIN uses sparse attention to obtain the data correlations near the missing values and then performs aggregation imputation. Although this method can extract the nearby data information, the temporal features have complex long-term complex periodicities, and this method does not make full use of extracting such temporal features.
[0017] GRIN uses a graph structure to handle the correlations between dimensions. However, the graph structure it constructs is at each moment, and there is a lag in the information transfer between dimensions, and there is also the problem of insufficient capture of the information between dimensions at different time scales.
[0018] In summary, the existing technical methods have the following problems:
[0019] (1) The existing methods do not fully consider all the information and impacts in the time series data, including the temporal information before and after the missing values, and the negative impact of the existence of missing values in the data on the imputation results.
[0020] (2) The existing methods fail to fully consider and integrate the information flow and dependencies between directly related dimensions, including the information of adjacent dimensions at different time scales. Summary of the Invention
[0021] The object of the present invention is to address the deficiencies of existing multivariate time series data imputation methods without prior dimension correlation information, namely: not comprehensively considering the correlations between multiple dimensions, including the correlations between adjacent dimensions at the same time scale and different time scales; and not accurately considering the correlations between the front and back sequences and the missing values, as well as the negative impact of the front and back missing values on the imputation at the missing value positions, and proposes a data space multivariate time series data imputation method and device.
[0022] The data space multivariate time series data imputation method described in the present invention, the method includes the following steps:
[0023] Step S1: Obtain the collected original data set, perform preprocessing on the original data set to obtain a multivariate time series data set; the multivariate time series data set is a data set composed of multi-dimensional data of different sensors collected at different sampling time points arranged in chronological order.
[0024] Step S2: Obtain the mask matrix of the multivariate time series data set, and obtain the two-way missing distances of each data sample in the multivariate time series data set; the two-way missing distances include the forward missing distance and the backward missing distance.
[0025] Step S3: Obtain the trained multivariate time series data imputation model; the trained multivariate time series data imputation model includes a time correlation extraction module, a dimension correlation extraction module, an aggregation output module, and an output layer.
[0026] Step S4: The time correlation extraction module is a bidirectional dynamic GRU; use the multivariate time series data set, the mask matrix M, and the two-way missing distances as the input of the bidirectional dynamic GRU; use the bidirectional dynamic GRU to learn the time correlations in the multivariate time series data set, extract the bidirectional time features from the multivariate time series data set, and obtain the completed feature matrix.
[0027] Step S5: The dimension correlation extraction module is based on the completed feature matrix, uses graph structure learning and attention mechanism to learn the dimension correlations in the multivariate time series data set, and extracts the dimension correlation features from the multivariate time series data set.
[0028] Step S6: The aggregation output module aggregates the dimension correlation features to obtain the aggregated features.
[0029] Step S7: The output layer is an MLP layer, input the aggregated features into the MLP layer to obtain the final imputation value, and complete the imputation of the data space multivariate time series data.
[0030] Further, a preferred implementation manner is provided, and the preprocessing in step S1 includes normalization and standardization processing.
[0031] Further, a preferred implementation manner is provided, and the step S2 includes the following steps:
[0032] Step S2.1: Obtain the mask matrix M of the multivariate time series dataset:
[0033] Let the multivariate time series dataset be expressed as The data sample of the k-th sensor collected at the t-th sampling time point in the multivariate time series dataset is The data sample is divided into observed values and missing values;
[0034]
[0035] t ∈ {t1, t2, …, t T};
[0036] S = {s1, s2, …, s K};
[0037] where K represents the total number of sensors; t T represents the T-th sampling time point; S represents the dimension set of data samples collected by different sensors, and s K is the dimension of the data sample collected by the k-th sensor;
[0038] Then the value in the corresponding mask matrix M is
[0039]
[0040] Step S2.2: Obtain the two-way missing distance of each data sample in the multivariate time series dataset;
[0041] The forward missing distance is the distance between each data sample and the previous observed value; Let the corresponding forward missing distance be
[0042]
[0043] The backward missing distance is the distance between each data sample and the next observed value; Let the corresponding backward missing distance be
[0044]
[0045] Further, a preferred implementation manner is provided, and the step S4 includes the following steps:
[0046] Step S4.1: Obtain the substitution values for the previous sampling time point and the next sampling time point based on the two-way missing distance:
[0047] Calculate the substitution value for the previous sampling time point based on the forward missing distance:
[0048]
[0049] where m t indicates whether the current input is a missing value or an observed value. If it is an observed value, input the current input. If it is a missing value, substitute the current input with the weighted sum of the previous sequence and the sequence average; γ is the weight of the previous sequence calculated based on the forward missing distance; x t represents the input data at time step t; h t represents the hidden state at time step t - 1; W t-1 h x h t-1 +b x represents the candidate value obtained by linearly mapping the hidden state at time step t - 1 to the input, where W x represents the weight and b x represents the offset;
[0050]
[0051] where W γ represents the weight and b γ represents the offset;
[0052] Calculate the substitution value for the next sampling time point based on the backward missing distance:
[0053]
[0054] where m t ′ indicates whether the current input is a missing value or an observed value. If it is an observed value, input the current input; if it is a missing value, substitute the current input with the weighted sum of the subsequent sequence and the sequence average ; γ t ′ is the weight of the subsequent sequence calculated based on the backward missing distance; h t+1 represents the hidden state at time step t + 1; W x ′h t+1 +b x ′ represents the candidate value obtained by linearly mapping the hidden state at time step t + 1 to the input;
[0055]
[0056] where W γ ′ represents the weight and b γ ′ represents the offset;
[0057] Step S4.2: Use the gate functions of the bidirectional dynamic GRU to control the weight allocation of the current input and historical information: The gate functions include a reset gate and an update gate:
[0058] For the forward feature:
[0059]
[0060] where r t is the reset gate when calculating the forward feature; z t is the update gate when calculating the forward feature; σ represents the activation function sigmoid, which maps the input to between 0 and 1; W r represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to r t ; U r represents the weight matrix from the hidden state at the previous time step to r t ; b r represents the bias term; W z represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to z t ; U z represents the weight matrix from the hidden state at the previous time step to z t ; b z represents the bias term;
[0061] The r t : is used to control the degree of combination of the current input value and the hidden state at the previous time step, indicating a given degree of discarding of historical information;
[0062] The z t : is used to determine the proportion of the current input and historical information in the hidden state, and dynamically update the hidden state at the current time step;
[0063] For the reverse feature:
[0064]
[0065] where r t ′ is the reset gate when calculating the reverse feature; z t ′ is the update gate when calculating the reverse feature; σ represents the activation function sigmoid, which maps the input to between 0 and 1; W r ′ represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to r t ′; U r ′ represents the weight matrix from the hidden state at the next time step to r t ′; b r ′ represents the bias term; W z' represents the weight matrix of the input of the GRU cell of the bidirectional dynamic GRU to z t ', U z ' represents the weight matrix of the hidden state of the next time step to z t ', b z ' represents the bias term;
[0066] The r t ': Used to control the degree of combination of the current input value and the hidden state of the next time step, indicating the discarding of historical information to a given degree;
[0067] The z t ': Used to determine the ratio of the current input and historical information in the hidden state, and dynamically update the hidden state of the current time step;
[0068] Step S4.3: Calculate the forward candidate hidden state and the backward candidate hidden state:
[0069] Calculate the forward candidate hidden state:
[0070]
[0071] Among them, W h represents the weight matrix that maps the current input to the hidden layer space; U h represents the weight matrix that maps the product of the hidden state h t-1 of the previous time step and the reset gate r t of the current time step back to the hidden layer space; b h represents the offset in the linear transformation;
[0072] Calculate the backward candidate hidden state:
[0073]
[0074] Among them, W h ' represents the weight matrix that maps the current input to the hidden layer space; U h represents the weight matrix that maps the product of the hidden state h t+1 of the next time step and the reset gate r t ' of the current time step back to the hidden layer space; b h ' represents the offset in the linear transformation;
[0075] Step S4.4: Update the final hidden state, including the forward hidden state and the backward hidden state, to obtain the forward feature and the backward feature:
[0076]
[0077] Among them:
[0078] Represents the forward feature, which is the feature generated by combining the current time step and the previous sequence;
[0079] Represents the reverse feature, which is the feature generated by combining the current time step and the subsequent sequence;
[0080] Step 3.5: Concatenate the forward feature and the reverse feature to obtain the bidirectional time feature for each dimension:
[0081]
[0082] Utilize the bidirectional time feature for each dimension, and extract the hidden state for completion to obtain a completed feature matrix of K×T, where each element is
[0083] Furthermore, a preferred implementation manner is provided. The above-mentioned step S5 includes the following steps:
[0084] Step S5.1: Perform feature extraction and temporal average pooling on the completed feature matrix, calculate the proximity between each dimension, and construct a graph structure to determine the adjacent dimensions of each dimension;
[0085] The said graph structure is represented by an adjacency matrix A. The nodes in the graph structure represent each dimension, and A ij being 1 represents a directed edge from dimension i to dimension j;
[0086] Step S5.2: Use the attention mechanism to calculate the attention weights between adjacent dimensions for the constructed graph structure;
[0087] Utilize the attention mechanism to calculate the relationship between the nodes in the graph structure and generate a weighting coefficient:
[0088]
[0089] Where: α ij is the attention weight between dimension i and dimension j, used to measure the importance between dimension i and dimension j; represents the time window pooling feature vector of dimension i; W represents a learnable weight matrix for linearly transforming the features; represents a learnable attention parameter vector; LeakyRelu is a non-linear activation function; k(A ik =1) represents the summation of all k that have an edge with dimension i in the adjacency matrix;
[0090] Normalize the attention weights through the softmax function to ensure that the sum of the weights is 1.
[0091] Further, a preferred implementation is provided, where step S6 is as follows:
[0092] Based on the attention weights, use a graph convolutional neural network to aggregate the features of adjacent dimensions for any dimension i:
[0093]
[0094] Where: represents the aggregated feature of any dimension i; α ii and represent the weights of the contribution of any dimension i itself to the feature; α ij represents the weight of the contribution of the neighbor dimension j to the feature; represents the feature of dimension i at the current moment; represents the feature of the neighbor dimension j within the current time window; the adjacency matrix A is used to determine the connection relationship between dimensions; ReLU is used to introduce non-linearity.
[0095] The present invention also proposes a data space multi-temporal data imputation device, which includes the following modules:
[0096] Module S1: Obtain the collected original data set, preprocess the original data set to obtain a multi-temporal data set; the multi-temporal data set is a data set composed of multi-dimensional data of different sensors collected at different sampling time points arranged in chronological order;
[0097] Module S2: Obtain the mask matrix of the multi-temporal data set, and obtain the bidirectional missing distances of each data sample in the multi-temporal data set; the bidirectional missing distances include the forward missing distance and the backward missing distance;
[0098] Module S3: Obtain the trained multi-temporal data imputation model; the trained multi-temporal data imputation model includes a time correlation extraction module, a dimension correlation extraction module, an aggregation output module, and an output layer;
[0099] Module S4: The time correlation extraction module is a bidirectional dynamic GRU; use the multi-temporal data set, the mask matrix M, and the bidirectional missing distances as the inputs of the bidirectional dynamic GRU; use the bidirectional dynamic GRU to learn the time correlation in the multi-temporal data set, extract the bidirectional time features from the multi-temporal data set, and obtain the completed feature matrix;
[0100] Module S5: The dimension correlation extraction module is based on the completed feature matrix, uses graph structure learning and attention mechanism to learn the dimension correlation in the multi-temporal data set, and extracts the dimension correlation features from the multi-temporal data set;
[0101] Module S6: The aggregation output module aggregates the dimension correlation features to obtain the aggregated features.
[0102] Module S7: The output layer is an MLP layer. The aggregated features are input into the MLP layer to obtain the final imputation value, completing the imputation of multivariate time series data in the data space.
[0103] The present invention also provides a computer device, including: a processor and a memory. The memory is used to store the executable instructions of the processor, and the processor is configured to execute the above-mentioned data space multivariate time series data imputation method via executing the executable instructions.
[0104] The present invention also provides a computer storage medium, in which a computer program is stored. When the computer program runs, it executes the above-mentioned data space multivariate time series data imputation method.
[0105] The present invention also provides a computer program product, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above-mentioned data space multivariate time series data imputation method are implemented.
[0106] The present invention has the following beneficial effects:
[0107] 1. For the data space multivariate time series data imputation method of the present invention, by using a bidirectional dynamic GRU, the time series information before and after the missing value is fully extracted, and the input of the GRU is dynamically changed to avoid the error expansion of the missing value in the recurrent network.
[0108] 2. For the data space multivariate time series data imputation method of the present invention, the dimension correlation information is constructed into a graph representation, which has better interpretability; and the feature information of adjacent dimensions at different time scales is fully aggregated to make full use of all the information related to the missing value as much as possible.
[0109] 3. For the data space multivariate time series data imputation method of the present invention, by using a bidirectional dynamic GRU, the influence of the missing value on the missing value is weakened and the forward and backward time series information is fully utilized. The dimension correlation information is constructed into a graph representation, and the attention mechanism is adopted to accurately capture the correlation of different adjacent dimensions, and the feature information of adjacent dimensions at different time scales is fully aggregated, having a better completion effect, and solving the problem that the existing multivariate time series data completion methods do not fully consider the influence of the missing value during the extraction of time series information and the correlation of adjacent dimensions at different time scales.
[0110] The data space multivariate time series data imputation method and device of the present invention are applicable to the completion of multivariate time series data in the data space. Description of the Drawings
[0111] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0112] Figure 1 It is a flowchart of the multi-temporal data interpolation method in the data space for an embodiment of the present invention;
[0113] Figure 2 It is a schematic structural diagram of the trained multi-temporal data interpolation model for an embodiment of the present invention;
[0114] Figure 3 It is a schematic structural diagram of the bidirectional dynamic GRU for an embodiment of the present invention. Specific Embodiments
[0115] To make the technical solutions and advantages of the present invention more clearly expressed, the following will further describe in detail and completely the specific embodiments of the present invention in conjunction with the drawings. The following described embodiments are only some preferred embodiments of the present invention, rather than all the implementation embodiments; the following described embodiments are intended to explain the present invention and should not be construed as a limitation of the present invention; the reasonable combination of the technical features defined in each embodiment of the present invention, and all other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention, fall within the scope of protection of the present invention.
[0116] Embodiment 1. Refer to Figure 1 To illustrate this embodiment, this embodiment provides a multi-temporal data interpolation method in the data space, which is used to solve the deficiencies of the existing multi-temporal data interpolation methods, that is, the problems of not fully considering the temporal information before and after the missing values, the negative impact of the missing values on the missing values, and the correlation between adjacent dimensions at different time scales.
[0117] The multi-temporal data interpolation method in the data space, the method includes the following steps:
[0118] Step S1: Obtain the collected original data set, and preprocess the original data set to obtain a multi-temporal data set; the multi-temporal data set is a data set composed of multi-dimensional data of different sensors collected at different sampling time points arranged in time sequence;
[0119] Step S2: Obtain the mask matrix of the multi-temporal data set, and obtain the bidirectional missing distances of each data sample in the multi-temporal data set; the bidirectional missing distances include the forward missing distance and the backward missing distance;
[0120] Step S3: Obtain the trained multi - variable time - series data imputation model; the trained multi - variable time - series data imputation model includes a time - correlation extraction module, a dimension - correlation extraction module, an aggregation output module, and an output layer;
[0121] Step S4: The time - correlation extraction module is a bidirectional dynamic GRU; the multi - variable time - series data set, the mask matrix M, and the bidirectional missing distance are used as the inputs of the bidirectional dynamic GRU; the bidirectional dynamic GRU is used to learn the time - correlation in the multi - variable time - series data set, extract the bidirectional time features from the multi - variable time - series data set, and obtain the completed feature matrix;
[0122] Step S5: Based on the completed feature matrix, the dimension - correlation extraction module uses graph - structure learning and attention mechanism to learn the dimension - correlation in the multi - variable time - series data set, and extracts the dimension - correlation features from the multi - variable time - series data set;
[0123] Step S6: The aggregation output module aggregates the dimension - correlation features to obtain the aggregated features;
[0124] Step S7: The output layer is an MLP layer; the aggregated features are input into the MLP layer to obtain the final imputation value, and the imputation of the multi - variable time - series data in the data space is completed.
[0125] In this embodiment, the dimension - correlation extraction module and the aggregation output module are implemented by using a graph convolutional neural network.
[0126] In this embodiment, the trained multi - variable time - series data imputation model is trained using the root - mean - square error RMSE as the loss function for 30 training rounds. The data - processing flow in the training process of the multi - variable time - series data imputation model is the same as that of the data - space multi - variable time - series data imputation method, and will not be elaborated here.
[0127] In this embodiment, the data - space multi - variable time - series data imputation method accurately captures the correlation in the time dimension by using a bidirectional dynamic GRU, uses graph - structure learning and attention mechanism to capture the correlation between dimensions, effectively avoids the negative impact of missing values on each other, and fully considers the information that affects the missing values, solving the problem that the existing multi - variable time - series data completion methods do not fully consider the influence of missing values during the extraction of time - series information and the correlation between adjacent dimensions at different time scales.
[0128] Embodiment 2. Refer to Figure 2 This embodiment is an explanation of step S1 in the data - space multi - variable time - series data imputation method described in Embodiment 1:
[0129] The preprocessing in step S1 includes normalization and standardization processing.
[0130] Embodiment 3. Refer to Figure 2 This embodiment is an explanation of step S2 in the multi-temporal data imputation method for the data space described in Embodiment 1:
[0131] Step S2 includes the following steps:
[0132] Step S2.1: Obtain the mask matrix M of the multi-temporal data set:
[0133] Let the multi-temporal data set be expressed as The data sample of the k-th sensor collected at the t-th sampling time point in the multi-temporal data set is The data sample is divided into observed values and missing values;
[0134]
[0135] t ∈ {t1, t2, …, t T};
[0136] S = {s1, s2, …, s K};
[0137] where K represents the total number of sensors; t T represents the T-th sampling time point; S represents the dimension set of data samples collected by different sensors, and s K is the dimension of the data sample collected by the k-th sensor;
[0138] Then the value in the corresponding mask matrix M is
[0139]
[0140] Step S2.2: Obtain the two-way missing distances of each data sample in the multi-temporal data set;
[0141] The forward missing distance is the distance between each data sample and the previous observed value; Let the corresponding forward missing distance be
[0142]
[0143] The backward missing distance is the distance between each data sample and the next observed value; Let the corresponding backward missing distance be
[0144]
[0145] In this embodiment, the missing value is a data sample of missing data.
[0146] In this embodiment, the observed value is a data sample of non-missing data.
[0147] Embodiment 4. Refer to Figure 2 This embodiment is an explanation of step S4 in the multi-temporal data interpolation method for the data space described in Embodiment 1:
[0148] The step S4 includes the following steps:
[0149] Step S4.1: Obtain substitution values for the previous sampling time point and the next sampling time point based on the two-way missing distance:
[0150] Calculate the substitution value for the previous sampling time point based on the forward missing distance:
[0151]
[0152] where m t indicates whether the current input is a missing value or an observed value. If it is an observed value, input the current input. If it is a missing value, substitute the current input with the weighted sum of the previous sequence and the sequence average; γ is the weight of the previous sequence calculated based on the forward missing distance; x t represents the input data at time step t; h t represents the hidden state at time step t - 1; W t-1 h x + b t-1 + b x represents mapping the hidden state at time step t - 1 linearly to a candidate value for the input, where W x represents the weight and b x represents the offset;
[0153]
[0154] where W γ represents the weight and b γ represents the offset;
[0155] Calculate the substitution value for the next sampling time point based on the backward missing distance:
[0156]
[0157] where m t' indicates whether the current input is a missing value or an observed value. If it is an observed value, the current input is used; if it is a missing value, the current input is replaced with the weighted sum of the subsequent sequence and the sequence average; ; γ t ' is the weight of the subsequent sequence calculated based on the backward missing distance; h t+1 represents the hidden state at time step t+1; W x 'h t+1 +b x ' represents the candidate value obtained by linearly mapping the hidden state at time step t+1 to the input;
[0158]
[0159] Among them, W γ ' represents the weight, b γ ' represents the offset;
[0160] Step S4.2: Use the gate functions of the bidirectional dynamic GRU to control the weight allocation of the current input and historical information: The gate functions include a reset gate and an update gate:
[0161] For the forward feature:
[0162]
[0163] Among them, r t is the reset gate when calculating the forward feature; z t is the update gate when calculating the forward feature; σ represents the activation function sigmoid, which maps the input to between 0 and 1; W r represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to r t ; U r represents the weight matrix from the hidden state of the previous time step to r t ; b r represents the bias term; W z represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to z t ; U z represents the weight matrix from the hidden state of the previous time step to z t ; b z represents the bias term;
[0164] The r t : Used to control the degree of combination of the current input value and the hidden state of the previous time step, indicating a given degree of discarding of historical information;
[0165] The z t : Used to determine the proportion of the current input and historical information in the hidden state, and dynamically update the hidden state of the current time step;
[0166] For the reverse feature:
[0167]
[0168] where r t ′ is the reset gate when calculating the reverse feature; z t ′ is the update gate when calculating the reverse feature; σ represents the activation function sigmoid, mapping the input to between 0 and 1; W r ′ represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to r t ′, U r ′ represents the weight matrix from the hidden state at the next time step to r t ′, b r ′ represents the bias term; W z ′ represents the weight matrix from the GRU cell of the bidirectional dynamic GRU to z t ′, U z ′ represents the weight matrix from the hidden state at the next time step to z t ′, b z ′ represents the bias term;
[0169] The r t ′: is used to control the degree of combination of the current input value and the hidden state at the next time step, indicating discarding historical information to a given degree;
[0170] The z t ′: is used to determine the proportion of the current input and historical information in the hidden state, dynamically updating the hidden state at the current time step;
[0171] Step S4.3: Calculate the forward candidate hidden state and the reverse candidate hidden state:
[0172] Calculate the forward candidate hidden state:
[0173]
[0174] where W h represents the weight matrix that maps the current input to the hidden layer space; U h represents the weight matrix that maps the product of the hidden state h t-1 at the previous time step and the reset gate r t back to the hidden layer space; b h represents the offset in the linear transformation;
[0175] Calculate the reverse candidate hidden state:
[0176]
[0177] Among them, W h ′ represents the weight matrix that maps the current input to the hidden layer space; U h represents the weight matrix that maps the hidden state h t+1 of the next time step multiplied by the reset gate r t ′ of the current time step back to the hidden layer space; b h ′ represents the offset in the linear transformation;
[0178] Step S4.4: Update the final hidden state, including the forward hidden state and the backward hidden state, to obtain the forward feature and the backward feature:
[0179]
[0180] Among them:
[0181] represents the forward feature, the feature generated by combining the current time step and the previous sequence;
[0182] represents the backward feature, the feature generated by combining the current time step and the subsequent sequence;
[0183] Step 3.5: Concatenate the forward feature and the backward feature to obtain the bidirectional time feature of each dimension:
[0184]
[0185] Utilize the bidirectional time feature of each dimension, and extract and complete the hidden state to obtain a completed feature matrix of K×T, where each element is
[0186] In this embodiment, the bidirectional dynamic GRU improves the existing GRU. The improvement lies in: for missing values, the input of the existing GRU is modified to the weighted sum of the previous (or subsequent) sequence and the sequence average value, which preserves the dynamic features of the time series to a certain extent and can retain more temporal information than simple zero filling or mean filling; and by combining different information sources (sequence and mean), the prediction error caused by a single method is reduced.
[0187] In this embodiment, obtaining and concatenating and retaining the bidirectional time feature of the data can better capture the forward and backward dynamics of the time series, and make the model more robust to anomalies, and can smooth and correct the data from two directions.
[0188] In this embodiment, γ t is the weight for calculating the candidate value of the previous time step based on the forward missing distance (i.e., the weight of the previous sequence), and is weighted and summed with the sequence average value as the current input value, aiming to avoid error expansion.
[0189] In this embodiment, γ t ′ is the weight for calculating the candidate value at the next time step based on the backward missing distance (i.e., the subsequent sequence weight), and is used for weighted sum with the sequence mean as the current input value, aiming to avoid error expansion.
[0190] In this embodiment, by concatenating the forward features and the backward features, the bidirectional information in the time series is fully utilized.
[0191] In this embodiment, during the process of calculating the substitution value, according to whether the current value input to the GRU cell of the bidirectional dynamic GRU is a missing value, the current input value is dynamically selected to reduce the negative impact of the missing value on subsequent interpolation.
[0192] In this embodiment, the process of learning the time correlation is the process of constructing a time correlation extraction module (bidirectional dynamic GRU).
[0193] Embodiment 5. Refer to Figure 2 To describe this embodiment, this embodiment is an explanation of step S5 in the method for interpolating multi-temporal data in the data space described in Embodiment 1:
[0194] The said step S5 includes the following steps:
[0195] Step S5.1: Characterize the completed feature matrix and perform average pooling in time series, calculate the proximity between each dimension, and construct a graph structure to determine the adjacent dimensions of each dimension;
[0196] The said graph structure is represented by an adjacency matrix A. The nodes in the graph structure represent each dimension. Using A ij being 1 represents a directed edge from dimension i to dimension j;
[0197] Step S5.2: Use the attention mechanism to calculate the attention weights between adjacent dimensions for the constructed graph structure;
[0198] Use the attention mechanism to calculate the relationship between the nodes in the graph structure and generate a weighting coefficient:
[0199]
[0200] Where: α ij is the attention weight between dimension i and dimension j, used to measure the importance between dimension i and dimension j; represents the time window pooling feature vector of dimension i; W represents a learnable weight matrix for linearly transforming the features; represents a learnable attention parameter vector; LeakyRelu is a non-linear activation function; k(A ik= 1) represents the summation over all k for which there is an edge in the adjacency matrix with dimension i;
[0201] The attention weights are normalized by the softmax function to ensure that the sum of the weights is 1.
[0202] In this embodiment, the process of learning dimension correlation is the process of constructing a dimension correlation extraction module.
[0203] In this embodiment, a graph structure is constructed to determine the adjacent dimensions of each dimension, thereby representing the dependence relationship between dimensions.
[0204] In addition, in one embodiment, in step S5.1, the completed feature matrix is subjected to feature extraction and temporal average pooling, and the proximity between each dimension is calculated, and a graph structure is constructed to determine the adjacent dimensions of each dimension, including:
[0205] Average pooling is performed on the bidirectional time features of each dimension according to the time window tw to generate a pooled feature vector containing front and back time information;
[0206] For any time window tw1, calculate the time window pooled feature vector of any dimension i and the time window pooled feature vector of any other dimension j for similarity:
[0207]
[0208] where, e ji represents the normalized dot product and represents the similarity between dimension i and dimension j;
[0209] According to requirements, select multiple other dimensions with similarity within a given range as the adjacent dimensions of any dimension i to complete the construction of the graph structure.
[0210] In this embodiment, the dimension correlation features are represented by a graph structure and attention weights. For example, for any dimension i, the adjacent dimension information it contains and the attention weight information of the adjacent dimensions are the dimension correlation features.
[0211] In this embodiment, the process of pooling according to the time window enables each node in the graph structure to carry the features of the data within the entire time window, and the information of adjacent dimensions at different time scales can be captured during the subsequent aggregation process to fully utilize the dimension correlation for imputation.
[0212] Embodiment Six. Refer to Figure 2 To illustrate this embodiment, this embodiment is an illustration of step S6 in the method for interpolating multi-temporal data in a data space described in Embodiment One;
[0213] In step S6, the aggregation output module aggregates the dimension correlation features to obtain the aggregated features as follows:
[0214] Based on the attention weights, use the graph convolutional neural network to aggregate the features of adjacent dimensions of any dimension i:
[0215]
[0216] Where: represents the aggregated feature of any dimension i; α ii and represent the weights of the contribution of any dimension i itself to the feature; α ij represents the weight of the contribution of the neighbor dimension j to the feature; represents the feature of dimension i at the current moment; represents the feature of the neighbor dimension j within the current time window; the adjacency matrix A is used to determine the connection relationship between dimensions; ReLU is used to introduce non-linearity.
[0217] Embodiment Seven. Refer to Figure 2 To illustrate this embodiment, this embodiment is an illustration of step S7 in the data space multi-temporal data imputation method described in Embodiment One;
[0218] In step S7, the output layer is an MLP layer. Input the aggregated features into the MLP layer to obtain the final imputation value, and complete the imputation of the data space multi-temporal data, as follows:
[0219] Input the aggregated feature of any dimension i into the MLP layer to obtain the final imputation value, and complete the imputation of the data space multi-temporal data.
[0220] Embodiment Eight. To verify the effect of the above data space multi-temporal data imputation method, this embodiment provides a comparative experiment to compare the above data space multi-temporal data imputation method with the existing imputation methods:
[0221] The network model parameters for executing the above data space multi-temporal data imputation method are set as follows:
[0222] The dimension of the overall model feature vector is set to 64, the training period is set to 30, the learning rate is 0.001, the batch size is set to 64, and the number of recurrent neural units is set to 128.
[0223] The datasets for the comparative experiment include the Air Quality dataset, the Health Care dataset, and the Spam dataset:
[0224] The air quality dataset consists of public meteorological data from urban meteorological monitoring stations in China, including air pollutant measurement data. The comparative experiment used air monitoring data from Beijing, which covered the whole year of 2020, collected at a fixed frequency, and contained a total of 52,704 records. There are 21 variables in the air monitoring data, including the concentrations of various substances in the air and some basic attributes.
[0225] The healthcare dataset is from the PhysioNet / CinC Challenge in 2012. The comparative experiment used the health data records of 4000 patients within 48 hours. This dataset was collected at a fixed frequency and contained a total of 191,806 records. The monitoring indicators include body temperature, blood pressure, blood sugar, etc., a total of 37 indicators.
[0226] The spam dataset is from the UCI Machine Learning Repository. This dataset includes 4601 records and 57 detection indicators.
[0227] For these three datasets, some values were randomly deleted using a completely random method to simulate missing values. Subsequently, zero filling was performed on the datasets to fill in the missing values. To evaluate the imputation performance, the datasets were divided into a training set and a test set at a ratio of 80% and 20%.
[0228] The existing imputation methods participating in the comparative experiment are implemented based on the following statistical methods or network models: mean, KNN, GRU-D, BRITS, E2GAN, GAIN, GRIN, SPIN, and MGAIN. Specifically:
[0229] Mean: Interpolation based on the dimension mean.
[0230] KNN: K-nearest neighbor interpolation, averaging the values of the top k = 10 neighboring nodes with the highest weights in the adjacency matrix.
[0231] GRU-D: A trainable decay model based on GRU.
[0232] BRITS: An interpolation method based on a bidirectional recurrent neural network.
[0233] E2GAN: An interpolation model based on an end-to-end generative adversarial network.
[0234] GAIN: A method that uses a generative adversarial network to complete interpolation in an incomplete dataset.
[0235] GRIN: Using a graph neural network to learn spatio-temporal representations through message passing and reconstruct missing data in different channels of multivariate time series.
[0236] SPIN: Use the sparse attention mechanism to learn the representations of temporal and spatial points through a spatio-temporal propagation architecture aligned with the temporal interpolation task.
[0237] MGAIN: A GAN-based model that combines the least squares loss function with a dual matrix to address the problems of vanishing gradients and mode collapse.
[0238] The results of the comparative experiments are shown in Table 1:
[0239] Table 1: Performance comparison of time series imputation methods under different missing rates (root mean square error)
[0240]
[0241] As can be seen from Table 1, based on the three datasets, in most cases of missing rates, the data space multivariate time series data imputation method described in the present invention has achieved the best completion effect.
[0242] Meanwhile, the comparative experiments also conducted parameter experiments on the data space multivariate time series data imputation method described in the present invention regarding the size of the constructed graph (K) and the size of the time window (tw).
[0243] The results of the parameter experiments are shown in Table 2 and Table 3:
[0244] Table 2: Influence of the size of the constructed graph on the data interpolation results (root mean square error RMSE)
[0245]
[0246] Regarding the influence of the size of the constructed graph on the model performance:
[0247] Table 2 shows the influence of the number of selected neighbors on the imputation results during the graph construction process, where the size of the time window (tw) is set to 10.
[0248] As shown in Table 2, the higher the value of K, the more adjacent dimensions are included in the calculation, resulting in more accurate imputation results. However, as the value of K approaches the total number of dimensions, the improvement in imputation performance gradually slows down, mainly due to the weak or non-existent indirect correlation between some dimensions in the dataset.
[0249] Table 3: Influence of the time window (tw) on the model performance (root mean square error RMSE)
[0250]
[0251] Regarding the influence of the size of the time window (tw) on the model performance:
[0252] As shown in Table 3, under the condition that the number of neighbor nodes (K) is set to 15, the influence of different event window sizes on the imputation effectiveness of three datasets was studied.
[0253] The experimental results show that a larger time window helps capture information from more distant time neighbors. However, as the time window increases, although it allows capturing more long-term relevant information, it also introduces more irrelevant data. Therefore, the choice of time window size needs to balance breadth and precision.
[0254] Embodiment Nine: The multi-source time-series data imputation method described in the present invention can be fully implemented by computer software. Accordingly, the present invention also provides a multi-source time-series data imputation device, and the device includes the following modules:
[0255] Module S1: Obtain the collected original dataset, preprocess the original dataset to obtain a multi-source time-series dataset; the multi-source time-series dataset is a dataset composed of multi-dimensional data of different sensors collected at different sampling time points arranged in chronological order;
[0256] Module S2: Obtain the mask matrix of the multi-source time-series dataset, and obtain the bidirectional missing distances of each data sample in the multi-source time-series dataset; the bidirectional missing distances include the forward missing distance and the backward missing distance;
[0257] Module S3: Obtain the trained multi-source time-series data imputation model; the trained multi-source time-series data imputation model includes a time correlation extraction module, a dimension correlation extraction module, an aggregation output module, and an output layer;
[0258] Module S4: The time correlation extraction module is a bidirectional dynamic GRU; use the multi-source time-series dataset, the mask matrix M, and the bidirectional missing distances as the inputs of the bidirectional dynamic GRU; use the bidirectional dynamic GRU to learn the time correlation in the multi-source time-series dataset, extract the bidirectional time features from the multi-source time-series dataset, and obtain the completed feature matrix;
[0259] Module S5: The dimension correlation extraction module is based on the completed feature matrix, uses graph structure learning and attention mechanism to learn the dimension correlation in the multi-source time-series dataset, and extracts the dimension correlation features from the multi-source time-series dataset;
[0260] Module S6: The aggregation output module aggregates the dimension correlation features to obtain the aggregated features;
[0261] Module S7: The output layer is an MLP layer, input the aggregated features into the MLP layer to obtain the final imputation value, and complete the imputation of the multi-source time-series data in the data space.
[0262] Embodiment Ten. This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs, it executes the multi-source time-series data interpolation method described in any one of the above.
[0263] Embodiment Eleven. This embodiment provides a computer device, which includes a memory and a processor. The memory is used to store executable instructions of the processor, and the processor is configured to execute the multi-source time-series data interpolation method described in any one of the above by executing the executable instructions.
[0264] For the computer device or system provided in this embodiment, the hardware device in this part is of a general model and is not shown in the form of a diagram. The system includes a processor and a memory. The processor and the memory can be connected through a bus or other means. The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, as well as corresponding program instructions / modules. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, so as to implement the multi-source time-series data interpolation method of coupling bidirectional dynamic GRU and graph neural network in the above method embodiments.
[0265] The memory may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, enterprise internal network, mobile communication network, and their combinations.
[0266] One or more modules are stored in the memory. When the processor executes, it executes the method steps in the embodiment. In this way, through the method, device, and process of the present invention, the object of the present invention can be achieved. The specific details of the above computer device can be understood by referring to the corresponding related descriptions and effects in the embodiments, and will not be elaborated here.
[0267] Those skilled in the art can understand that to implement all or part of the processes in the above method embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0268] The above further describes the technical solutions provided by the present invention in several specific implementation manners to highlight the advantages and beneficial effects of the technical solutions provided by the present invention. However, the above several specific implementation manners are not used as a limitation to the present invention. Any reasonable changes and improvements to the present invention, reasonable combinations of implementation manners, equivalent replacements, etc. within the spirit and principle of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for interpolating multivariate time series data in data space, characterized in that: The method comprises the following steps: Step S1: obtaining a collected original data set, preprocessing the original data set, and obtaining a multivariate time series data set; the multivariate time series data set is a data set composed of multidimensional data of different sensors collected at different sampling time points arranged in time order; Step S2: Obtain a mask matrix of the multivariate time series data set, and obtain a bidirectional missing distance of each data sample in the multivariate time series data set; the bidirectional missing distance includes a forward missing distance and a backward missing distance; Step S3: obtaining a trained multivariate time series data interpolation model; the trained multivariate time series data interpolation model includes a time correlation extraction module, a dimension correlation extraction module, an aggregation output module and an output layer; Step S4: the time correlation extraction module is a bidirectional dynamic GRU; the multivariate time series data set, the mask matrix M and the bidirectional missing distance are used as inputs of the bidirectional dynamic GRU; the bidirectional dynamic GRU is used to learn the time correlation in the multivariate time series data set, extract bidirectional time features from the multivariate time series data set, and obtain a completed feature matrix; Step S5: The dimension correlation extraction module learns the dimension correlation in the multivariate time series data set based on the completed feature matrix by using graph structure learning and attention mechanism, and extracts dimension correlation features from the multivariate time series data set; Step S6: the aggregation output module aggregates the dimension correlation features to obtain aggregated features; Step S7: The output layer is an MLP layer, and the aggregated features are input into the MLP layer to obtain the final interpolation value, thereby completing the interpolation of the multivariate time series data in the data space.
2. The data space multivariate time series data interpolation method according to claim 1, characterized in that: The preprocessing in step S1 includes normalization and standardization.
3. The data space multivariate time series data interpolation method according to claim 1, characterized in that: The step S2 comprises the following steps: Step S2.1: Get the mask matrix M of the multivariate time series dataset: Assume that the multivariate time series data set is represented as The data sample of the kth sensor collected at the tth sampling time point in the multivariate time series data set is The data sample Divided into observed values and missing values; t∈{t1,t2,…,t T }; S={s1,s2,…,s K }; Where K represents the total number of sensors; t T represents the Tth sampling time point; S represents the dimension set of data samples collected by different sensors, s K The dimension of the data sample collected by the Kth sensor; but The corresponding values in the mask matrix M are Step S2.2: Obtain the bidirectional missing distance of each data sample in the multivariate time series data set; The forward missing distance is the distance between each data sample and the previous observation; let The corresponding forward missing distance is The backward missing distance is the distance between each data sample and the next observation; let The corresponding backward missing distance is 4. The data space multivariate time series data interpolation method according to claim 1, characterized in that: The step S4 comprises the following steps: Step S4.1: Based on the missing distance in both directions, obtain the replacement values of the previous sampling time point and the next sampling time point: Calculate the replacement value for the previous sampling time point based on the forward missing distance: Among them, m t Indicates whether the current input is a missing value or an observed value. If it is an observed value, the current input is input. If it is a missing value, the current input is replaced by the previous sequence and the sequence average. The weighted sum of t is the weight of the preceding sequence calculated based on the forward missing distance; x t represents the input data at time step t; h t-1 represents the hidden state at time step t-1; W x h t-1 +b x Represents the candidate value of the linear mapping of the hidden state at time step t-1 to the input, where W x represents the weight, b x Indicates offset; Among them, W γ represents the weight, b γ Indicates offset; Calculate the replacement value for the next sampling time point based on the backward missing distance: Among them, m t ′ Indicates whether the current input is a missing value or an observed value. If it is an observed value, the current input is input; if it is a missing value, the current input is replaced by the subsequent sequence and the sequence average. The weighted sum of t ′ is the weight of the subsequent sequence calculated based on the backward missing distance; h t+1 represents the hidden state at time step t+1; W x ′ h t+1 +b x ′ Represents the candidate value of the linear mapping of the hidden state at time step t+1 to the input; Among them, W γ ′ represents the weight, b γ ′ Indicates offset; Step S4.2: Use the gate function of the bidirectional dynamic GRU to control the weight distribution of the current input and historical information: the gate function includes a reset gate and an update gate: For the positive features: Among them, r t is the reset gate when calculating the forward feature; z t is the update gate for calculating the forward feature; σ represents the activation function sigmoid, which maps the input to between 0 and 1; W r The GRU unit representing the bidirectional dynamic GRU is input to r t The weight matrix, U r Represents the hidden state of the previous time step to r t The weight matrix, b r represents the deviation term; W z The GRU unit representing the bidirectional dynamic GRU is input to z t The weight matrix, U z Represents the hidden state of the previous time step to z t The weight matrix, b z represents the deviation term; The r t : It is used to control the degree of integration of the current input value and the hidden state of the previous time step, indicating that a given degree of historical information is discarded; The z t : It is used to determine the ratio of current input and historical information in the hidden state, and dynamically update the hidden state of the current time step; For reverse features: Among them, r t ′ is the reset gate when calculating the reverse feature; z t ′ is the update gate for calculating the reverse feature; σ represents the activation function sigmoid, which maps the input to between 0 and 1; W r ′ The GRU unit representing the bidirectional dynamic GRU is input to r t ′ The weight matrix, U r ′ Represents the hidden state of the next time step to r t ′ The weight matrix, b r ′ represents the deviation term; W z ′ The GRU unit representing the bidirectional dynamic GRU is input to z t ′ The weight matrix, U z ′ Represents the hidden state of the next time step to z t ′ The weight matrix, b z ′ represents the deviation term; The r t ′ : It is used to control the degree of integration between the current input value and the hidden state of the next time step, indicating that a given degree of historical information is discarded; The z t ′ : It is used to determine the ratio of current input and historical information in the hidden state, and dynamically update the hidden state of the current time step; Step S4.3: Calculate the forward candidate hidden state and the reverse candidate hidden state: Compute the forward candidate hidden state: Among them, W h Indicates that the current input The weight matrix mapped to the hidden layer space; U h Indicates that the hidden state h of the previous time step is t-1 The reset gate r of the current time step t The weight matrix that maps back to the hidden layer space after multiplication; b h Represents the offset in the linear transformation; Compute the reverse candidate hidden state: Among them, W h ′ Indicates that the current input The weight matrix mapped to the hidden layer space; U h Indicates that the hidden state h of the next time step t+1 The reset gate r of the current time step t ′ The weight matrix that maps back to the hidden layer space after multiplication; b h ′ Represents the offset in the linear transformation; Step S4.4: Update the final hidden state, including the forward hidden state and the reverse hidden state, to obtain the forward feature and the reverse feature: in: Represents the positive feature, which is the feature generated by combining the current time step and the previous sequence; Represents reverse features, combining the features generated by the current time step and the subsequent sequence; Step 3.5: Concatenate the forward features and the reverse features to obtain the bidirectional temporal features of each dimension: Using the bidirectional time features of each dimension and extracting the hidden state for completion, we obtain a K×T completed feature matrix, where each element is 5. The data space multivariate time series data interpolation method according to claim 4, characterized in that: The step S5 comprises the following steps: Step S5.1: perform featureization and time-series average pooling on the completed feature matrix, calculate the proximity between each dimension, and construct a graph structure to determine the adjacent dimensions of each dimension; The graph structure is represented by an adjacency matrix A. The nodes in the graph structure represent each dimension. ij 1 indicates a directed edge from dimension i to dimension j; Step S5.2: Use the attention mechanism to calculate the attention weights between adjacent dimensions for the constructed graph structure; The attention mechanism is used to calculate the relationship between nodes in the graph structure and generate weighted coefficients: Where: α ij is the attention weight between dimension i and dimension j, which is used to measure the importance between dimension i and dimension j; represents the time window pooling feature vector of dimension i; W represents the learnable weight matrix used to perform linear transformation on the features; represents the learnable attention parameter vector; LeakyRelu is a nonlinear activation function; k(A ik =1) means summing all k in the adjacency matrix that have edges in dimension i; The attention weights are normalized by the softmax function to ensure that the sum of the weights is 1.
6. The data space multivariate time series data interpolation method according to claim 5, characterized in that: The step S6 is: Based on the attention weights, a graph convolutional neural network is used to aggregate the features of adjacent dimensions of any dimension i: Where: h ′ t i Represents the aggregated features of any dimension i; α ii and represents the weight of any dimension i’s contribution to the feature; α ij Represents the weight of neighbor dimension j's contribution to the feature; Represents the characteristics of dimension i at the current moment; Represents the characteristics of neighbor dimension j in the current time window; the adjacency matrix A is used to determine the connection relationship between dimensions; ReLU is used to introduce nonlinear characteristics.
7. A data space multivariate time series data interpolation device, characterized in that: The device comprises the following modules: Module S1: obtaining the collected original data set, preprocessing the original data set, and obtaining a multivariate time series data set; the multivariate time series data set is a data set composed of multidimensional data of different sensors collected at different sampling time points arranged in time order; Module S2: Obtain a mask matrix of a multivariate time series data set, and obtain a bidirectional missing distance of each data sample in the multivariate time series data set; the bidirectional missing distance includes a forward missing distance and a backward missing distance; Module S3: obtaining a trained multivariate time series data interpolation model; the trained multivariate time series data interpolation model includes a time correlation extraction module, a dimension correlation extraction module, an aggregation output module and an output layer; Module S4: The temporal correlation extraction module is a bidirectional dynamic GRU; the multivariate time series data set, the mask matrix M and the bidirectional missing distance are used as inputs of the bidirectional dynamic GRU; the bidirectional dynamic GRU is used to learn the temporal correlation in the multivariate time series data set, extract bidirectional temporal features from the multivariate time series data set, and obtain a completed feature matrix; Module S5: The dimension correlation extraction module uses graph structure learning and attention mechanism to learn the dimension correlation in the multivariate time series data set based on the completed feature matrix, and extracts dimension correlation features from the multivariate time series data set; Module S6: The aggregation output module aggregates the dimension correlation features to obtain aggregated features; Module S7: The output layer is an MLP layer, and the aggregated features are input into the MLP layer to obtain the final interpolation value, thereby completing the interpolation of multivariate time series data in the data space.
8. A computer device comprising: A processor and a memory, characterized in that the memory is used to store executable instructions of the processor, and the processor is configured to execute the data space multivariate time series data interpolation method described in any one of claims 1-6 by executing the executable instructions.
9. A computer storage medium, characterized in that The storage medium stores a computer program, and when the computer program is run, the data space multivariate time series data interpolation method described in any one of claims 1 to 6 is executed.
10. 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 data space multivariate time series data interpolation method described in any one of claims 1 to 6 are implemented.