Time sequence prediction method and device in data missing scene, medium and equipment
By constructing a traffic graph structure and reconstructing the missing values using a graph convolution network, combined with a time series prediction model, the problem of low time series prediction accuracy in data missing scenarios is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510473533.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-16
AI Technical Summary
In the prior art, when processing time series prediction in data missing scenarios, interpolation of missing values may cause the model to capture incorrect timing dependencies, resulting in low prediction accuracy.
By constructing a traffic graph structure, reconstructing missing values using graph convolution networks, and combining a timing prediction model to improve the accuracy of prediction.
It effectively reduces the model prediction error caused by data loss, improves the accuracy of time series prediction, and avoids the construction of wrong spatial and temporal dependencies in the case of incomplete data.
Smart Images

Figure CN119988948A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, medium and equipment for time series prediction in a data missing scenario. Background Technology
[0002] Currently, multivariate time series prediction tasks are widely used in traffic scenarios. Time series prediction is based on a set of historical observation data in the past to predict their future values, and guide subsequent operations based on the predicted values. However, in real life, due to some accidents, such as equipment failure, collection errors or data collection difficulties, the data is always incomplete, that is, there is data missing, and these incomplete data will cause large errors in subsequent time series prediction work.
[0003] In the existing technology, the method of dealing with missing data is usually to use the existing interpolation method to interpolate the missing values, and then use the interpolated data to perform downstream prediction tasks. However, when this approach is applied to time series prediction models, the interpolated values corresponding to the missing values may cause the model to capture incorrect time series dependencies, and may also cause error accumulation under multi-step predictions, resulting in low accuracy of time series predictions.
[0004] Therefore, how to improve the accuracy of time series prediction in data missing scenarios has become an urgent problem to be solved. SUMMARY OF THE INVENTION
[0005] In response to the above technical problems, the technical solution adopted by the present invention is a time series prediction method in a data missing scenario, and the time series prediction method in the data missing scenario includes: S101, according to the missing conditions of each collected data in the target traffic data, determine the missing mask information corresponding to the target traffic data, wherein the target traffic data includes the collected data of N target traffic parameters at T collection time points, each collected data includes the collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one.
[0006] S102, extracting features from the target traffic data and the missing mask information respectively, to obtain a first fused feature vector corresponding to the target traffic data and a second fused feature vector corresponding to the missing mask information.
[0007] S103, taking each target traffic parameter as a graph node, taking the collected data at T collection time points corresponding to each target traffic parameter as the information of the corresponding graph node, and constructing a traffic graph structure corresponding to the target traffic data.
[0008] S104, according to the traffic graph structure, obtain a predefined adjacency matrix and a reference adjacency matrix corresponding to the traffic graph structure.
[0009] S105, determining the correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix.
[0010] S106, obtaining missing reconstructed traffic data according to the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network.
[0011] S107, input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
[0012] The present invention also provides a time series prediction device in a data missing scenario, the time series prediction device comprising: The mask generation module is used to determine the missing mask information corresponding to the target traffic data according to the missing conditions of each collected data in the target traffic data, wherein the target traffic data includes the collected data of N target traffic parameters at T collection time points, each collected data contains the collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one.
[0013] The feature extraction module is used to extract features from the target traffic data and the missing mask information respectively, and obtain the first fused feature vector corresponding to the target traffic data and the second fused feature vector corresponding to the missing mask information.
[0014] The graph construction module is used to take each target traffic parameter as a graph node, take the collected data at T collection time points corresponding to each target traffic parameter as the information of the corresponding graph node, and construct the traffic graph structure corresponding to the target traffic data.
[0015] The first matrix acquisition module is used to obtain the predefined adjacency matrix and the reference adjacency matrix corresponding to the traffic map structure according to the traffic map structure.
[0016] The second matrix acquisition module is used to determine the correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix.
[0017] Data reconstruction module, used to obtain missing reconstructed traffic data based on the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network.
[0018] The time series prediction module is used to input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
[0019] The present invention also provides a non-transient computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned time series prediction method in the data missing scenario.
[0020] The present invention also provides an electronic device, comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0021] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the time series prediction method in a data missing scenario provided by the present invention can achieve considerable technical progress and practicality, and has wide industrial utilization value, and has at least the following beneficial effects: The missing mask information is used to characterize the degree of missing value completion. The missing mask information is introduced into the target traffic data through the time series prediction model, which effectively reduces the model prediction error caused by missing data. The multi-scale convolution model learns the combination of features of different scales and time series features to improve the accuracy of prediction. The missing values are reconstructed through the spatiotemporal graph convolution network to establish the spatiotemporal dependency relationship under complete data, avoiding the construction of erroneous spatiotemporal dependency relationships in the case of incomplete data. The missing reconstructed traffic data is then applied to the time series prediction task, thereby improving the accuracy of time series prediction in data missing scenarios. Brief Description of the Figures
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic diagram of a flow chart of a time series prediction method in a data missing scenario provided by Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the structure of a time series prediction device in a data missing scenario provided by Embodiment 2 of the present invention. Specific implementation method
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] Example 1 Embodiment 1 provides a time series prediction method in a data missing scenario. Refer to Figure 1 , which is a schematic flowchart of a time series prediction method in a data missing scenario provided by an embodiment of the present invention, including: S101. According to the missing situation of each acquisition data in the target traffic data, determine the missing mask information corresponding to the target traffic data, where the target traffic data includes the acquisition data of N target traffic parameters at T acquisition time points respectively, and each acquisition data includes acquisition sub-data corresponding to D acquisition dimensions respectively, and N, T, and D are all integers greater than one.
[0026] S102. Respectively perform feature extraction on the target traffic data and the missing mask information to obtain a first fusion feature vector corresponding to the target traffic data and a second fusion feature vector corresponding to the missing mask information.
[0027] S103. Use each target traffic parameter as a graph node, and use the acquisition data of each target traffic parameter at T acquisition time points as the information of the corresponding graph node to construct a traffic graph structure corresponding to the target traffic data.
[0028] S104. According to the traffic graph structure, obtain a predefined adjacency matrix and a reference adjacency matrix corresponding to the traffic graph structure.
[0029] S105. According to the second fusion feature vector and the reference adjacency matrix, determine a correlation matrix corresponding to the traffic graph structure.
[0030] S106. According to the correlation matrix, the first fusion feature vector, the predefined adjacency matrix, and the trained graph convolutional network, obtain the missing reconstructed traffic data.
[0031] S107. Input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
[0032] Among them, the target traffic parameters may include road section flow parameters, traffic density parameters, road network parameters, etc. Each target traffic parameter corresponds to D acquisition dimensions. For target traffic parameters with less than D acquisition dimensions, they can be extended to D acquisition dimensions by filling in preset values. For example, when the target traffic parameter is the road section flow parameter, the acquisition dimensions may include the number of vehicles passing through the road section in D acquisition time periods, etc.
[0033] The acquisition time points can be set customarily. In this embodiment, the acquisition time points can be determined according to a fixed period, that is, the time interval between adjacent acquisition time points is a fixed period.
[0034] Specifically, the target traffic parameter can be represented by a tensor of size N×T×D, and the missing mask information can be represented by a matrix of size N×T. If a target traffic parameter does not collect data at a certain time point, that is, data is missing, the element value corresponding to the target traffic parameter and the time point in the missing mask information is the first mask value, otherwise, it is the second mask value. The first mask value can be 0 and the second mask value can be 1, thereby clearly and intuitively presenting the completeness of the target traffic data, providing clear instructions for subsequent processing of missing data, and facilitating targeted data filling or analysis.
[0035] For the target traffic data, key features are extracted through a specific algorithm or model, and combined to form the first fusion feature vector to fuse the key feature information of different parameters, time points and dimensions in the target traffic data, which is used to characterize the important information such as the operation status and change trend of the traffic system reflected by the target traffic data.
[0036] Use the same algorithm or model to extract features from missing mask information and obtain a second fused feature vector to fuse key feature information of data missing pattern and distribution to characterize the situation of data missing.
[0037] The first fused feature vector and the second fused feature vector convert high-dimensional data into low-dimensional feature vectors, so that subsequent models can process data more efficiently, avoid problems such as excessive computational burden and overfitting caused by high data dimensions, and highlight the core features of the data, which helps improve the performance of the model and prediction accuracy.
[0038] By constructing a traffic graph structure, the relationship between different target traffic parameters and at different time points can be intuitively displayed, providing a structured representation for subsequent analysis and processing, which helps to more effectively mine and analyze complex patterns and associations in traffic data by utilizing the structural properties of the graph.
[0039] The predefined adjacency matrix is a matrix generated by pre-set rules, which is used to describe the fixed relationship between nodes (i.e., target traffic parameters) in the traffic graph structure. The reference adjacency matrix is obtained by a deeper analysis of the traffic graph structure, which can more accurately capture the complex relationship between nodes in the traffic graph structure, taking into account factors such as similarity and correlation between node information (i.e., time series data of traffic parameters), and providing a more realistic relationship description for subsequent calculations and analysis.
[0040] The correlation matrix is calculated by combining the second fused eigenvector and the reference adjacency matrix. The elements in the matrix represent the correlation between different target traffic parameters in the case of missing data. By comprehensively considering missing data and node relationships, the correlation between different traffic parameters can be measured more accurately, providing key information for understanding the mutual influence between various parameters in the traffic system and the stability of the relationship in the case of missing data.
[0041] Graph convolutional networks are used to process graph structure data. By performing convolution operations on the nodes of the traffic graph structure, information transmission and feature extraction between nodes are realized, and the correlation matrix, the first fused feature vector and the predefined adjacency matrix are used to infer and reconstruct the missing traffic data, giving full play to the advantages of graph structure data and improving the accuracy and rationality of data filling.
[0042] Time series prediction models are used to predict time series data. They can learn the time dependencies and patterns in time series data, and predict the traffic parameter values at different time points in the future based on the missing and reconstructed traffic data, helping traffic management departments to make plans and decisions in advance. Time series prediction models include recurrent neural networks and their variants.
[0043] It should be noted that in order to enhance the spatial receptive field and temporal receptive field of the model, the iteration round can be initialized to 0. After obtaining the missing reconstructed traffic data and the second fused feature vector, the missing reconstructed traffic data can be used as the target traffic data, and the second fused feature vector can be used as the missing mask information. The iteration round is increased by 1, and the execution of steps S101 to S107 is returned until the iteration round meets the preset round. In this embodiment, the preset round can be set to 3. In addition, jump connections can be introduced between multiple iteration rounds to capture deeper hidden information.
[0044] In a specific implementation, S102 includes the following steps: S1021, input the target traffic data and the missing mask information into the trained time series feature extraction model respectively, and obtain the first time series feature vector corresponding to the target traffic data and the second time series feature vector corresponding to the missing mask information.
[0045] S1022, input the target traffic data and the missing mask information into the trained multi-scale convolution model respectively, and obtain a first multi-scale feature vector corresponding to the target traffic data and a second multi-scale feature vector corresponding to the missing mask information.
[0046] S1023, obtaining a first fusion feature vector corresponding to the target traffic data according to the first time series feature vector and the first multi-scale feature vector corresponding to the target traffic data.
[0047] S1024, obtaining a second fused feature vector corresponding to the missing mask information according to the second temporal feature vector and the second multi-scale feature vector corresponding to the missing mask information.
[0048] Among them, the trained temporal feature extraction model and the trained multi-scale convolution model can process the target traffic data and missing mask information in parallel.
[0049] Specifically, the multi-scale convolution model can use several convolution kernels of different sizes to perform convolution operations on the input data to obtain the output results corresponding to each convolution kernel. In this embodiment, the number of convolution kernels is set to K, and the target traffic data is input into the trained multi-scale convolution model to obtain K first convolution results corresponding to the target traffic data. The K first convolution results are spliced in the channel dimension to obtain the splicing vector corresponding to the target traffic data. The missing mask information is input into the trained multi-scale convolution model to obtain K second convolution results corresponding to the missing mask information. The K second convolution results are subjected to maximum pooling processing to obtain the second multi-scale feature vector corresponding to the missing mask information. In this embodiment, K can be set to 3, and the sizes of the three convolution kernels can be 1×3, 1×5, and 1×7.
[0050] By multiplying the concatenated vector and the second multi-scale feature vector point by point, we can get the first multi-scale feature vector corresponding to the target traffic data. The multi-scale convolution model can explicitly obtain the time correlation at different time scales, so that the model can observe the input data sequence at different time scales. The small-scale subsequence extracted by the smaller convolution kernel can retain more fine-grained details, while the large-scale subsequence extracted by the larger convolution kernel can capture the trend of slow changes.
[0051] The multi-scale convolution model only focuses on the data collected at the time point of the non-missing part to calculate new features, thereby avoiding the interference of the missing part on the prediction model. At the same time, the missing mask information learns enough information during the convolution process of the multi-scale convolution model, so that the missing mask information can be updated, that is, the second multi-scale feature vector can be obtained.
[0052] The time series prediction model can be implemented using a multi-layer perceptron based on direct multi-step prediction.
[0053] In a specific implementation, the trained temporal feature extraction model is a trained bidirectional long short-term memory model.
[0054] S1021 includes the following steps: The target traffic data is input into the trained bidirectional long short-term memory model to obtain the first forward time series vector and the first reverse time series vector.
[0055] Add the first forward timing vector and the first reverse timing vector point by point to obtain the first reference timing vector.
[0056] Input the missing mask information into the trained bidirectional long short-term memory model to obtain the second forward time series vector and the second reverse time series vector.
[0057] Add the second forward timing vector and the second reverse timing vector point by point to obtain the second reference timing vector.
[0058] Multiply the first reference timing vector and the second reference timing vector point by point to obtain the first timing feature vector, and use the second reference timing vector as the second timing feature vector.
[0059] Among them, the bidirectional long short-term memory model contains two independent long short-term memory models, one for processing the forward information of the sequence, that is, the information from the past to the present, and the other for processing the reverse information of the sequence, that is, the information from the future to the present. This bidirectional propagation mechanism enables the model to extract the context information at each acquisition time point. When processing time series with missing values, using this feature extraction method helps to capture the global dependencies of the data, which is conducive to the model's more comprehensive understanding of the long-term temporal dependencies of the time series.
[0060] Specifically, the target traffic data is input into the trained bidirectional long short-term memory model to obtain the first forward time series vector and the first reverse time series vector, that is, the forward hidden state and the reverse hidden state corresponding to the target traffic data. The forward hidden state and the reverse hidden state are combined by point-by-point addition to obtain the final hidden state corresponding to the target traffic data, that is, the first reference time series vector. The first reference time series vector not only captures the historical slope information, but also considers the important information of future time points, providing rich context for subsequent predictions.
[0061] Similarly, the second reference time series vector corresponding to the missing mask information can be obtained. The second reference time series vector can be regarded as an update to the missing mask information. In order to reduce the impact of missing values on feature extraction, the target traffic data is adjusted by multiplying the first reference time series vector and the second reference time series vector point by point, thereby obtaining the first time series feature vector. This process reconstructs the features of the data and fuses the information, aiming to optimize the accuracy of feature extraction.
[0062] In a specific implementation, S1023 includes the following steps: Process the first time series feature vector through a first preset activation function to obtain a first processing result.
[0063] Process the first multi-scale feature vector through a second preset activation function to obtain a second processing result.
[0064] Multiply the first processing result and the second processing result point by point to obtain the first fused feature vector.
[0065] Wherein, the first preset activation function may be a sigmoid activation function, and the second preset activation function may be a tanh activation function.
[0066] Specifically, in order to better fuse the first time series feature vector and the first multi-scale feature vector, that is, to fuse the information flow of the global dependency and the local dependency of the time series corresponding to the target traffic data, this embodiment uses a gating mechanism for fusion processing, which is composed of two parallel activation functions. The tanh activation function is used as a filter, and the sigmoid activation function is used to control the amount of information transmitted to the subsequent modules.
[0067] In a specific implementation, S1024 includes the following steps: Process the second time series feature vector through the first preset activation function to obtain a third processing result.
[0068] Process the second multi-scale feature vector through the second preset activation function to obtain a fourth processing result.
[0069] Add the third processing result and the fourth processing result point by point to obtain the second fused feature vector.
[0070] Wherein, the third processing result and the fourth processing result are fused by adding point by point.
[0071] In a specific implementation, S104 includes the following steps: According to the traffic graph structure, the predefined adjacency matrix is determined by the Pearson correlation coefficient.
[0072] Among them, the Pearson correlation coefficient can refer to a statistical indicator that measures the degree of linear correlation between two variables. The degree of association between nodes is determined based on the Pearson correlation coefficient between nodes, and the initial adjacency matrix is constructed accordingly.
[0073] In one embodiment, if the target traffic data has corresponding road network information, the initial adjacency matrix can be directly constructed based on the road network information.
[0074] Specifically, after obtaining the initial adjacency matrix A, it is necessary to calculate the degree matrix B of the initial adjacency matrix, then the predefined adjacency matrix P=I+B -1 / 2 AB -1 / 2 , where I is a diagonal matrix of size N×N and value 1.
[0075] In a specific implementation, S104 includes the following steps: According to the traffic graph structure, the reference adjacency matrix is determined through the trained graph learning layer.
[0076] Among them, the graph learning layer can learn the relationship between nodes in the traffic graph structure. By training the graph learning layer on the traffic graph structure data, the potential associations between nodes can be automatically captured, thereby outputting a matrix reflecting the node relationship, namely the reference adjacency matrix.
[0077] The trained graph learning layer can adaptively generate the adjacency matrix through two learnable embedding matrices. It should be noted that in order to reduce the computational cost of the graph convolution model and reduce the impact of noise, the implementer can introduce a node sparsification strategy, that is, for any node, only retain a maximum of Y neighbor nodes of the node, and Y can be set by the implementer.
[0078] In a specific implementation, S105 includes the following steps: S1051, determining a deviation matrix corresponding to the reference adjacency matrix according to the second fused feature vector and the reference adjacency matrix.
[0079] S1052, determining the correlation matrix corresponding to the traffic graph structure according to the reference adjacency matrix and the deviation matrix.
[0080] The deviation matrix is used to measure the degree of deviation of the reference adjacency matrix after considering the missing data represented by the second fused eigenvector. It can be understood that if the deviation value of a certain position is large, it means that the missing data has a greater impact on the relationship between the node pair. On the contrary, if the deviation value is small, it means that the missing data has a smaller impact on the relationship between the node pair.
[0081] The correlation matrix comprehensively considers the actual relationship between nodes represented by the reference adjacency matrix and the impact of data missing on these relationships represented by the deviation matrix, and more accurately reflects the degree of correlation between various target traffic parameters in the traffic graph structure when data is missing. In the subsequent reconstruction of missing data and time series prediction, the correlation matrix can provide more reliable information to help the model better capture the relationship between parameters, thereby improving the accuracy of the prediction.
[0082] In a specific implementation, S1051 includes the following steps: Multiply the second fused feature vector and the transpose of the second fused feature vector to obtain the deviation matrix corresponding to the reference adjacency matrix.
[0083] Among them, the second fused feature vector in the current graph diffusion process, that is, the updated missing mask information, is used to correct the transmission strength of the global message, thereby serving as the offset matrix of the adjacency matrix.
[0084] In a specific implementation, S1052 includes the following steps: Multiply the deviation matrix and the preset global parameters to obtain the multiplication result.
[0085] Add the multiplication result to the reference adjacency matrix to obtain the correlation matrix.
[0086] Among them, the global parameters are learnable by the model and can be used to control the strength of correctness. In order to better integrate the global spatial correlation and local spatial deviation, the deviation matrix is multiplied with the preset global parameters to obtain the multiplication result, and then the multiplication result is added to the reference adjacency matrix to obtain the correlation matrix.
[0087] In a specific implementation, the trained graph convolution network includes a first graph convolution branch and a second graph convolution branch, the first graph convolution branch corresponds to a first model parameter and a first bias parameter, and the second graph convolution branch corresponds to a second model parameter and a second bias parameter.
[0088] S106 includes the following steps: Calculate the in-degree matrix and out-degree matrix corresponding to the correlation matrix.
[0089] Determine the first reconstructed data according to the correlation matrix and the in-degree matrix and out-degree matrix corresponding to the correlation matrix, the first model parameter, the first bias parameter and the first fusion feature vector.
[0090] Determine the second reconstructed data according to the predefined adjacency matrix, the second model parameter, the second bias parameter and the first fused feature vector.
[0091] Add the first reconstructed data and the second reconstructed data to obtain the missing reconstructed traffic data.
[0092] Wherein, the first reconstructed data X 1 can be expressed as (R -1 G+S -1 G T )ZW 1 +B 1 , where R -1 is the out-degree matrix, S -1 is the in-degree matrix, G is the correlation matrix, Z is the first fused eigenvector, W 1 is the first model parameter, B 1 is the first bias parameter.
[0093] Second reconstruction data X 2 Can be expressed as PZW 2 +B 2 , where P is a predefined adjacency matrix, W 2 is the second model parameter, B 2 is the second bias parameter.
[0094] As mentioned above, this embodiment uses missing mask information to characterize the degree of missing value completion, and introduces the features of missing mask information when the time series prediction model is used for target traffic data, which effectively reduces the model prediction error caused by missing data. The multi-scale convolution model learns the combination of features of different scales and time series features to improve the accuracy of prediction. The spatiotemporal graph convolution network reconstructs the missing values and establishes the spatiotemporal dependency relationship under complete data, avoiding the construction of erroneous spatiotemporal dependency relationships in the case of incomplete data. The missing reconstructed traffic data is then applied to the time series prediction task, thereby improving the accuracy of time series prediction in data missing scenarios.
[0095] Example 2 This embodiment 2 provides a time series prediction device in a data missing scenario, see Figure 2 , the time series prediction device in the data missing scenario includes: The mask generation module 201 is used to determine the missing mask information corresponding to the target traffic data according to the missing conditions of each collected data in the target traffic data, wherein the target traffic data includes the collected data of N target traffic parameters at T collection time points, each collected data includes the collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one.
[0096] The feature extraction module 202 is used to extract features from the target traffic data and the missing mask information respectively, and obtain a first fused feature vector corresponding to the target traffic data and a second fused feature vector corresponding to the missing mask information.
[0097] Graph construction module 203, used to take each target traffic parameter as a graph node, take the collected data at T collection time points corresponding to each target traffic parameter as the information of the corresponding graph node, and construct the traffic graph structure corresponding to the target traffic data.
[0098] The first matrix acquisition module 204 is used to obtain the predefined adjacency matrix and the reference adjacency matrix corresponding to the traffic graph structure according to the traffic graph structure.
[0099] The second matrix acquisition module 205 is used to determine the correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix.
[0100] Data reconstruction module 206, used to obtain missing reconstructed traffic data according to the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network.
[0101] The time series prediction module 207 is used to input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
[0102] In a specific implementation, the feature extraction module 202 includes: The time series feature extraction submodule is used to input the target traffic data and the missing mask information into the trained time series feature extraction model respectively, and obtain the first time series feature vector corresponding to the target traffic data and the second time series feature vector corresponding to the missing mask information.
[0103] The multi-scale feature extraction submodule is used to input the target traffic data and the missing mask information into the trained multi-scale convolution model respectively, and obtain the first multi-scale feature vector corresponding to the target traffic data and the second multi-scale feature vector corresponding to the missing mask information.
[0104] The first feature fusion submodule is used to obtain the first fusion feature vector corresponding to the target traffic data according to the first time series feature vector and the first multi-scale feature vector corresponding to the target traffic data.
[0105] The second feature fusion submodule is used to obtain the second fused feature vector corresponding to the missing mask information according to the second temporal feature vector and the second multi-scale feature vector corresponding to the missing mask information.
[0106] In a specific implementation, the trained temporal feature extraction model is a trained bidirectional long short-term memory model.
[0107] The temporal feature extraction submodule includes: The first feature extraction unit is used to input the target traffic data into the trained bidirectional long short-term memory model to obtain the first forward time series vector and the first reverse time series vector.
[0108] The first aggregation subunit is used to add the first forward timing vector and the first reverse timing vector point by point to obtain a first reference timing vector.
[0109] The second feature extraction unit is used to input the missing mask information into the trained bidirectional long short-term memory model to obtain the second forward time series vector and the second reverse time series vector.
[0110] The second aggregation unit is used to add the second forward timing vector and the second reverse timing vector point by point to obtain a second reference timing vector.
[0111] The timing vector determination unit is used to multiply the first reference timing vector and the second reference timing vector point by point to obtain the first timing feature vector, and use the second reference timing vector as the second timing feature vector.
[0112] In a specific implementation, the first feature fusion submodule includes: The first activation unit is used to process the first time series feature vector through a first preset activation function to obtain a first processing result.
[0113] The second activation unit is used to process the first multi-scale feature vector through a second preset activation function to obtain a second processing result.
[0114] The first fusion unit is used to multiply the first processing result and the second processing result point by point to obtain a first fusion feature vector.
[0115] In a specific implementation, the second feature fusion submodule includes: The third activation unit is used to process the second time series feature vector through the first preset activation function to obtain a third processing result.
[0116] The fourth activation unit is used to process the second multi-scale feature vector through a second preset activation function to obtain a fourth processing result.
[0117] The second fusion unit is used to add the third processing result and the fourth processing result point by point to obtain a second fusion feature vector.
[0118] In a specific implementation, the first matrix acquisition module 204 includes: The matrix predefined submodule is used to determine the predefined adjacency matrix based on the traffic map structure through the Pearson correlation coefficient.
[0119] In a specific implementation, the second matrix acquisition module 205 includes: The deviation matrix acquisition submodule is used to determine the deviation matrix corresponding to the reference adjacency matrix according to the second fused feature vector and the reference adjacency matrix.
[0120] The correlation matrix acquisition submodule is used to determine the correlation matrix corresponding to the traffic map structure based on the reference adjacency matrix and deviation matrix.
[0121] In a specific implementation, the deviation matrix acquisition submodule includes: The deviation matrix calculation unit is used to multiply the second fused feature vector and the transpose of the second fused feature vector to obtain the deviation matrix corresponding to the reference adjacency matrix.
[0122] In a specific implementation, the correlation matrix acquisition submodule includes: The global parameter adjustment unit is used to multiply the deviation matrix and the preset global parameter to obtain the multiplication result.
[0123] The correlation matrix calculation unit is used to add the multiplication result and the reference adjacency matrix to obtain the correlation matrix.
[0124] In a specific implementation, the trained graph convolution network includes a first graph convolution branch and a second graph convolution branch, the first graph convolution branch corresponds to a first model parameter and a first bias parameter, and the second graph convolution branch corresponds to a second model parameter and a second bias parameter.
[0125] Data reconstruction module 206 includes: The degree matrix calculation submodule is used to calculate the in-degree matrix and out-degree matrix corresponding to the correlation matrix.
[0126] The first reconstruction submodule is used to determine the first reconstructed data according to the correlation matrix and the in-degree matrix and out-degree matrix corresponding to the correlation matrix, the first model parameter, the first bias parameter and the first fusion feature vector.
[0127] The second reconstruction submodule is used to determine the second reconstructed data according to the predefined adjacency matrix, the second model parameter, the second bias parameter and the first fused feature vector.
[0128] The missing reconstruction submodule is used to add the first reconstructed data and the second reconstructed data to obtain the missing reconstructed traffic data.
[0129] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiment of the present invention. For their specific functions and technical effects, please refer to the method embodiment part, and they will not be described here.
[0130] Example 3 Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps: S101, according to the missing conditions of each collected data in the target traffic data, determine the missing mask information corresponding to the target traffic data, wherein the target traffic data includes the collected data of N target traffic parameters at T collection time points, each collected data includes the collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one.
[0131] S102, extracting features from the target traffic data and the missing mask information respectively, to obtain a first fused feature vector corresponding to the target traffic data and a second fused feature vector corresponding to the missing mask information.
[0132] S103, taking each target traffic parameter as a graph node, taking the collected data at T collection time points corresponding to each target traffic parameter as the information of the corresponding graph node, and constructing a traffic graph structure corresponding to the target traffic data.
[0133] S104, according to the traffic graph structure, obtain a predefined adjacency matrix and a reference adjacency matrix corresponding to the traffic graph structure.
[0134] S105, determining the correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix.
[0135] S106, obtaining missing reconstructed traffic data according to the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network.
[0136] S107, input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
[0137] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and volatile memory.
[0138] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0139] Example 4 Embodiment 4 of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium in Embodiment 3 of the present invention.
[0140] The above are only preferred embodiments of the present invention, and are not intended to limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A time series prediction method in a data missing scenario, characterized in that: The time series prediction method comprises: S101, determining missing mask information corresponding to the target traffic data according to missing conditions of each collected data in the target traffic data, wherein the target traffic data includes collected data of N target traffic parameters at T collection time points, each collected data includes collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one; S102, performing feature extraction on the target traffic data and the missing mask information respectively to obtain a first fused feature vector corresponding to the target traffic data and a second fused feature vector corresponding to the missing mask information; S103, taking each target traffic parameter as a graph node, taking the collected data at T collection time points corresponding to each target traffic parameter as information of the corresponding graph node, and constructing a traffic graph structure corresponding to the target traffic data; S104, obtaining a predefined adjacency matrix and a reference adjacency matrix corresponding to the traffic graph structure according to the traffic graph structure; S105, determining a correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix; S106, obtaining missing reconstructed traffic data according to the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network; S107, inputting the missing reconstructed traffic data into a trained time series prediction model to obtain predicted traffic data corresponding to the target traffic data.
2. The time series prediction method in a data missing scenario according to claim 1, characterized in that: S102 includes the following steps: S1021, inputting the target traffic data and the missing mask information into a trained time series feature extraction model respectively, to obtain a first time series feature vector corresponding to the target traffic data and a second time series feature vector corresponding to the missing mask information; S1022, inputting the target traffic data and the missing mask information into the trained multi-scale convolutional model respectively, to obtain a first multi-scale feature vector corresponding to the target traffic data and a second multi-scale feature vector corresponding to the missing mask information; S1023, obtaining a first fusion feature vector corresponding to the target traffic data according to the first time series feature vector and the first multi-scale feature vector corresponding to the target traffic data; S1024: Obtain a second fused feature vector corresponding to the missing mask information according to the second temporal feature vector and the second multi-scale feature vector corresponding to the missing mask information.
3. The time series prediction method in a data missing scenario according to claim 2, characterized in that: The trained temporal feature extraction model is a trained bidirectional long short-term memory model; S1021 includes the following steps: Inputting the target traffic data into the trained bidirectional long short-term memory model to obtain a first forward time series vector and a first reverse time series vector; Adding the first forward timing vector and the first reverse timing vector point by point to obtain a first reference timing vector; Inputting the missing mask information into the trained bidirectional long short-term memory model to obtain a second forward time series vector and a second reverse time series vector; Adding the second forward timing vector and the second reverse timing vector point by point to obtain a second reference timing vector; The first reference timing vector and the second reference timing vector are multiplied point by point to obtain the first timing feature vector, and the second reference timing vector is used as the second timing feature vector.
4. The time series prediction method in a data missing scenario according to claim 2, characterized in that: S1023 includes the following steps: Processing the first time series feature vector through a first preset activation function to obtain a first processing result; Processing the first multi-scale feature vector through a second preset activation function to obtain a second processing result; The first processing result and the second processing result are multiplied point by point to obtain the first fused feature vector.
5. The time series prediction method in a data missing scenario according to claim 4, characterized in that: S1024 includes the following steps: Processing the second time series feature vector through a first preset activation function to obtain a third processing result; Processing the second multi-scale feature vector through a second preset activation function to obtain a fourth processing result; The third processing result and the fourth processing result are added point by point to obtain the second fused feature vector.
6. The time series prediction method in a data missing scenario according to claim 1, characterized in that: S105 includes the following steps: S1051, determining a deviation matrix corresponding to the reference adjacency matrix according to the second fused feature vector and the reference adjacency matrix; S1052: Determine a correlation matrix corresponding to the traffic graph structure according to the reference adjacency matrix and the deviation matrix.
7. The time series prediction method in a data missing scenario according to claim 1, characterized in that: The trained graph convolution network includes a first graph convolution branch and a second graph convolution branch, the first graph convolution branch corresponds to a first model parameter and a first bias parameter, and the second graph convolution branch corresponds to a second model parameter and a second bias parameter; S106 includes the following steps: Calculate the in-degree matrix and out-degree matrix corresponding to the correlation matrix; Determine first reconstructed data according to the correlation matrix, the in-degree matrix and the out-degree matrix corresponding to the correlation matrix, the first model parameter, the first bias parameter and the first fused feature vector; Determining second reconstructed data according to the predefined adjacency matrix, the second model parameter, the second bias parameter and the first fused feature vector; The first reconstructed data and the second reconstructed data are added to obtain the missing reconstructed traffic data.
8. A time series prediction device in a data missing scenario, characterized in that: The time series prediction device comprises: A mask generation module, used to determine missing mask information corresponding to the target traffic data according to the missing conditions of each collected data in the target traffic data, wherein the target traffic data includes collected data of N target traffic parameters at T collection time points, each collected data includes collected sub-data corresponding to D collection dimensions, and N, T and D are all integers greater than one; A feature extraction module, used to perform feature extraction on the target traffic data and the missing mask information respectively, to obtain a first fused feature vector corresponding to the target traffic data and a second fused feature vector corresponding to the missing mask information; A graph construction module is used to take each target traffic parameter as a graph node, take the collected data at T collection time points corresponding to each target traffic parameter as the information of the corresponding graph node, and construct a traffic graph structure corresponding to the target traffic data; A first matrix acquisition module, used to obtain a predefined adjacency matrix and a reference adjacency matrix corresponding to the traffic map structure according to the traffic map structure; A second matrix acquisition module, used to determine a correlation matrix corresponding to the traffic graph structure according to the second fused feature vector and the reference adjacency matrix; A data reconstruction module, used to obtain missing reconstructed traffic data according to the correlation matrix, the first fused feature vector, the predefined adjacency matrix and the trained graph convolutional network; The time series prediction module is used to input the missing reconstructed traffic data into the trained time series prediction model to obtain the predicted traffic data corresponding to the target traffic data.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the time series prediction method in the data missing scenario as described in any one of claims 1-7.
10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Traffic network coding representation learning method based on mask pattern attention mechanism
CN117690289A
Spatial-temporal data missing value filling method based on graph structure learning
CN118964862A
Missing traffic flow data interpolation method of GAN network based on transmission periodicity
CN119007433A
Cited By
Traffic flow prediction method under high data missing rate condition and related equipment
CN121963490A