A traffic flow data imputation method and system based on tensor completion and graph attention network
Patent Information
- Application Number
- CN202410261877.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2044-03-07
AI Technical Summary
[0008]本发明针对上述问题,提出一种基于张量补全和图注意力网络的交通流量数据插补方法及系统,旨在利用张量补全的高维数据处理能力和图注意力网络的复杂关系捕捉能力,来更准确地插补交通流数据中的缺失部分
[0049]1.提高数据插补准确性:通过结合张量补全和图注意力网络,本发明能够更准确地处理和补全交通流数据中的缺失值。张量补全允许充分利用数据的多维性质,而图注意力网络则提供了对路网中复杂节点间关系的深入理解,从而提高插补数据的准确性。
Smart Images

Figure CN118193507B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation systems, and in particular to a traffic flow data interpolation method and system based on tensor completion and graph attention networks. Background Technology
[0002] Accurate and complete traffic flow data is crucial in modern urban traffic management and planning. This data typically includes vehicle volume, speed, and density, and has significant application value in traffic congestion analysis, traffic signal control, accident prevention, and road network optimization. However, due to various reasons such as sensor malfunction, communication interruptions, or data processing errors, traffic flow data is frequently incomplete, which seriously affects data quality and subsequent analysis.
[0003] Traditional traffic data interpolation methods, such as linear interpolation and averaging, while simple to operate, have limited accuracy when processing complex traffic data. Furthermore, although time series analyses such as ARIMA have made progress in handling time dependencies, they have limitations in dealing with nonlinear and non-stationary data. Regression analysis methods, while capable of establishing relationship models between data, typically rely on large amounts of historical data and domain knowledge, limiting their application scope.
[0004] In recent years, machine learning techniques, such as decision trees, random forests, neural networks, and support vector machines, have been applied to traffic data imputation, providing the ability to automatically capture complex relationships between data. Deep learning techniques, including recurrent neural networks (RNNs) and long short-term memory networks (LSTMs), have shown excellent performance, especially in time-series data processing. However, these methods often fail to fully utilize the structural characteristics of traffic networks and do not effectively address the unstructured nature of the data [Y.Duan, Y.Lv, Y.-L.Liu, and F.-Y.Wang, “An efficient realization of deep learning for traffic data imputation,” Transp.Res.Part C Emerg.Technol.,pp.168–181, Nov.2016, doi:10.1016 / j.trc.2016.09.015.].
[0005] Despite significant progress in traffic data interpolation research, two key issues remain:
[0006] Underutilization of low-rank characteristics and spatiotemporal correlation: Traffic data typically exhibits low-rank characteristics and significant temporal and spatial correlations. However, most existing methods, whether traditional interpolation techniques or some machine learning methods, tend to ignore these characteristics. This leads to insufficient interpolation accuracy when processing highly dynamic traffic data or data with significant spatiotemporal variations.
[0007] Insufficient handling of non-random missing data: Most existing methods are designed primarily for cases where data is completely randomly missing. However, in real-world applications, data missing data is often non-random, influenced by external factors such as sensor malfunction, maintenance, or weather conditions. Existing methods often fall short in handling these special cases of missing data. Summary of the Invention
[0008] To address the aforementioned problems, this invention proposes a traffic flow data interpolation method and system based on tensor completion and graph attention networks. The aim is to leverage the high-dimensional data processing capabilities of tensor completion and the complex relationship capture capabilities of graph attention networks to more accurately interpolate missing parts of traffic flow data. This approach not only improves the accuracy of data interpolation but also provides more reliable support for data analysis and decision-making in intelligent transportation systems. This invention fully utilizes the low-rank characteristics and spatiotemporal correlations of traffic flow data using tensor completion technology and graph neural networks. Experiments were conducted on three data missing patterns: Completely Random Missing (MCAR), Temporally Random Missing (MCART), and Spatially Random Missing (MCARS). The experiments demonstrate that this invention has excellent generalization ability and can significantly improve the accuracy of interpolated data.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] This invention proposes a traffic flow data interpolation method based on tensor completion and graph attention networks, comprising:
[0011] Step 1: Acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix;
[0012] Step 2: Perform preliminary data completion using the low-rank tensor completion algorithm;
[0013] Step 3: Based on the acquired traffic flow data, construct a spatially correlated road network using the Pearson correlation coefficient;
[0014] Step 4: Using the initially completed traffic flow data as input data, and combining it with the trained Graph SAGE and GAT, as well as the set of neighboring nodes of nodes in the spatially correlated road network, to extract road network features;
[0015] Step 5: Input the extracted road network features into the trained generative adversarial network, and use the generative adversarial network to generate traffic flow data after data interpolation.
[0016] Further, step 2 includes:
[0017] Update traffic flow data tensor X
[0018]
[0019] Where X (k) X is the traffic flow data tensor of the current iteration. (k+1) It is the traffic flow data tensor updated in the next iteration, ||X (k) || r,* It is the TNN norm, ρ k It is a non-negative parameter. Represents the traffic flow data tensor X (k) With matrix M (k+1) The square of the Frobenius norm, <X (k) T (k) > Represents the traffic flow data tensor X (k) With auxiliary variable T (k) The inner product;
[0020] Update matrix M
[0021]
[0022] Update auxiliary variable T
[0023] T (k+1) =T (k) +ρ k (X (k) -M (k+1) ).
[0024] Further, step 3 includes:
[0025] The spatial correlation between nodes is calculated using the following formula:
[0026]
[0027] Where ρ ij X represents the Pearson correlation coefficient between the i-th and j-th detector nodes, where K is the dimension of the traffic flow data corresponding to the selected detector when calculating the Pearson correlation coefficient, k = 1...K. ik Let X be the historical traffic flow data corresponding to the i-th detector node. i The k-th dimension of the data.
[0028] Furthermore, in step 4, when extracting road network features, random neighbor sampling of the target node is first performed, then the neighbor node features are aggregated using the mean aggregation function, and different weights are assigned to the aggregated neighbor node features through an attention mechanism. Finally, nonlinear transformation is applied to calculate the embedding features of the node.
[0029] Another aspect of this invention proposes a traffic flow data interpolation system based on tensor completion and graph attention networks, comprising:
[0030] The data acquisition and processing module is used to acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix.
[0031] The preliminary data completion module is used to perform preliminary data completion using the low-rank tensor completion algorithm.
[0032] The road network reconstruction module is used to construct a spatially correlated road network based on the acquired traffic flow data and the Pearson correlation coefficient.
[0033] The road network feature extraction module is used to extract road network features by taking the initially completed traffic flow data as input data, combining the trained Graph SAGE and GAT, and the set of neighbor nodes of nodes in the spatially correlated road network.
[0034] The interpolated data generation module is used to input the extracted road network features into the trained generative adversarial network (GAN) and use the GAN to generate interpolated traffic flow data.
[0035] Furthermore, the preliminary data completion module is specifically used for:
[0036] Update traffic flow data tensor X
[0037]
[0038] Where X (k) X is the traffic flow data tensor of the current iteration. (k+1) It is the traffic flow data tensor updated in the next iteration, ||X (k) || r,* It is the TNN norm, ρ k It is a non-negative parameter. Represents the traffic flow data tensor X (k) With matrix M (k+1) The square of the Frobenius norm, <X (k) T (k) > Represents the traffic flow data tensor X (k) With auxiliary variable T (k) The inner product;
[0039] Update matrix M
[0040]
[0041] Update auxiliary variable T
[0042] T (k+1) =T (k) +ρ k (X (k) -M (k+1) ).
[0043] Furthermore, the neighbor node set generation module is specifically used for:
[0044] The spatial correlation between nodes is calculated using the following formula:
[0045]
[0046] Where ρ ij X represents the Pearson correlation coefficient between the i-th and j-th detector nodes, where K is the dimension of the traffic flow data corresponding to the selected detector when calculating the Pearson correlation coefficient, k = 1...K. ik Let X be the historical traffic flow data corresponding to the i-th detector node. i The k-th dimension of the data.
[0047] Furthermore, in the road network feature extraction module, when extracting road network features, the random neighbors of the target node are first sampled, then the neighbor node features are aggregated using the mean aggregation function, and different weights are assigned to the aggregated neighbor node features through an attention mechanism. Finally, nonlinear transformation is applied to calculate the embedding features of the node.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. Improved Data Imputation Accuracy: By combining tensor completion and graph attention networks, this invention can more accurately process and complete missing values in traffic flow data. Tensor completion allows full utilization of the multidimensional nature of the data, while graph attention networks provide a deeper understanding of the complex relationships between nodes in the road network, thereby improving the accuracy of imputed data.
[0050] 2. Enhancing the reliability of traffic flow forecasting: Complete and accurate traffic flow data is crucial for effective traffic flow forecasting. The high-quality data interpolation provided by this invention can significantly improve the reliability of traffic flow forecasting, thereby contributing to more effective traffic management and planning.
[0051] 3. Adaptability to Complex Road Network Structures: The method of this invention is not only applicable to simple road networks, but can also effectively handle complex road network structures. The introduction of GAT enables this method to adapt to the specific characteristics of different road networks, including large-scale and highly dynamic traffic systems.
[0052] 4. Improving the efficiency of intelligent transportation systems: In intelligent transportation systems, the completeness and accuracy of data are crucial to the overall efficiency of the system. This invention helps improve the operational efficiency and decision-making quality of intelligent transportation systems by providing more accurate and comprehensive traffic data.
[0053] 5. Supports multiple traffic management applications: Accurate and complete traffic data can support a variety of traffic management applications, including traffic congestion prediction, road network optimization, and accident prevention strategy formulation, thereby having a positive impact on the overall operation of the urban transportation system.
[0054] 6. Support for research and policy making: Providing more comprehensive and accurate traffic flow data helps in-depth traffic research and more effective traffic policy making, providing solid data support for urban traffic planning and management.
[0055] In summary, this invention, through its advanced technical methods, not only improves the accuracy and efficiency of traffic flow data interpolation, but also provides important support for the development of intelligent transportation systems and research and applications in related fields. Attached Figure Description
[0056] Figure 1 This is a flowchart illustrating a traffic flow data interpolation method based on tensor completion and graph attention networks, according to an embodiment of the present invention.
[0057] Figure 2 This is a schematic diagram of the architecture of a traffic flow data interpolation system based on tensor completion and graph attention network according to an embodiment of the present invention. Detailed Implementation
[0058] For ease of understanding, the following explanations are provided for some of the terms used in the specific embodiments of this invention:
[0059] Tensor completion is an advanced data imputation method used to process and recover missing values in multidimensional data (i.e., tensors). In many practical applications, such as image processing, video restoration, signal processing, medical imaging, and traffic flow prediction, data often appears as multidimensional arrays (i.e., tensors). The goal of tensor completion is to recover a complete tensor from partially observed data.
[0060] Graph Attention Networks (GAT): Graph Attention Networks (GAT) enhance their performance by introducing an attention mechanism into graph neural networks. This approach allows the network to focus on important nodes and allocate more attention accordingly.
[0061] Graph SAGE: Graph SAGE (Graph Sample and Aggregation) is a graph neural network designed to generate node embeddings. It updates the representation of the central node by sampling and aggregating information from neighboring nodes.
[0062] Generative Adversarial Networks (GANs): GANs are a type of deep learning model proposed in 2014 by Ian Goodfellow and his colleagues. GANs have shown great potential in many fields, including computer vision, image generation, and natural language processing. Their core idea is to generate new, realistic data through an adversarial process between two neural networks—a generator and a discriminator.
[0063] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0064] like Figure 1 As shown, a traffic flow data interpolation method based on tensor completion and graph attention network (referred to as TCGAT-GAN) includes:
[0065] Step 1: Acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix;
[0066] Step 2: Perform preliminary data completion using the low-rank tensor completion algorithm;
[0067] Step 3: Based on the acquired traffic flow data, construct a spatially correlated road network using the Pearson correlation coefficient;
[0068] Step 4: Using the initially completed traffic flow data as input data, and combining it with the trained Graph SAGE and GAT, as well as the set of neighboring nodes of nodes in the spatially correlated road network, to extract road network features;
[0069] Step 5: Input the extracted road network features into the trained generative adversarial network, and use the generative adversarial network to generate traffic flow data after data interpolation.
[0070] As one possible implementation, in step 1, the PEMS-BAY dataset and the Seattle area highway traffic dataset are downloaded as traffic flow data. The data is preprocessed to ensure that it meets the structural requirements of the network input. Specifically, the detectors in the road network are treated as graph nodes, and a data matrix is constructed. The preprocessed dataset is then divided into training and test sets in a 5:1 ratio.
[0071] Furthermore, step 2 specifically includes:
[0072] A low-rank tensor completion algorithm is used for initial data completion, and truncated kernel norm regularization (TNN) is introduced to enhance robustness. The low-rank tensor completion algorithm consists of three sub-problems:
[0073] Sub-problem 1: Update the traffic flow data tensor X
[0074]
[0075] Among them, X (k) X is the traffic flow data tensor of the current iteration. (k+1) It is the traffic flow data tensor updated in the next iteration, ||X (k) || r,* It is the TNN norm, used to measure the rank of a data tensor. ρ k It is a non-negative parameter used to balance the TNN norm term and the fitting term of the data tensor. Represents the data tensor X (k) With another matrix M (k+1) The squared Frobenius norm is used to fit the data. <X (k) T (k) > Represents the data tensor X (k) With auxiliary variable T (k) The inner product of.
[0076] Subproblem 2: Updating matrix M
[0077]
[0078] Subproblem 3: Update auxiliary variable T
[0079] T (k+1) =T (k) +ρ k (X (k) -M (k+1) )
[0080] These three sub-problems together form the core optimization framework for low-rank tensor completion. By alternately solving these sub-problems, the model gradually converges to an approximately complete tensor X, where missing values have been filled in. This step ensures that we can use complete data for subsequent road network node feature extraction.
[0081] Furthermore, step 3 specifically includes:
[0082] The road network is reconstructed using the Pearson correlation coefficient to calculate the spatial correlation between nodes, and then the set of neighboring nodes of each node is obtained.
[0083] For each detector node ν i According to historical traffic flow data X i The formula for calculating the Pearson correlation coefficient is:
[0084]
[0085] Where, ρ ij Let represent the Pearson correlation coefficient between the i-th and j-th detector nodes, and K be the dimension of the traffic flow data corresponding to the selected detector when calculating the Pearson correlation coefficient, k = 1...K. Based on the calculated Pearson correlation coefficients, construct the Pearson correlation matrix R.
[0086] Furthermore, step 4 specifically includes:
[0087] Graph SAGE+GAT was used for road network feature extraction, including random neighbor sampling and feature aggregation.
[0088] Random neighbor sampling:
[0089] To reduce computational complexity in large networks, random neighbor sampling of the target node is performed first. This means that not all neighbor nodes are considered, but a subset is randomly selected, thereby reducing the amount of computation.
[0090] Mean aggregation:
[0091] For the aggregation function, mean aggregation was chosen. The core of mean aggregation is to obtain the average value of each dimension of the embedded information of neighboring nodes, which can be mathematically expressed as:
[0092]
[0093] in, Let N(v) represent the characteristics of node v at level l+1, and let N(v) represent the set of neighboring nodes of node v.
[0094] Attention mechanism (GAT):
[0095] After aggregating the features of neighboring nodes, the code further enhances the model's performance through an attention mechanism. This attention mechanism allows the model to assign different importance weights to each neighboring node. This can be expressed by the following formula:
[0096] α vu =softmax u (Leaky Relu(a T [Wh v ||Wh u ]))
[0097] Where, α vu is the attention coefficient between node v and its neighbor node u, W is the weight matrix, a is the parameter vector used to calculate the attention coefficient, and || represents the join operation.
[0098] Nonlinear transformation:
[0099] Finally, a nonlinear transformation is applied to calculate the embedding features of the nodes, and the formula can be expressed as:
[0100]
[0101] Where σ represents a nonlinear activation function, such as ReLU.
[0102] Through these steps, the final embedded features of each node not only include the mean aggregation information of its neighboring nodes, but also take into account the importance of neighboring nodes, which is achieved through the attention mechanism of GAT. This combination enables the model to more effectively capture and express the complexity and dynamic characteristics of road network data.
[0103] Furthermore, step 5 specifically includes:
[0104] This invention utilizes Generative Adversarial Networks (GANs), consisting of a generator and a discriminator, to generate accurate traffic state data. The present invention employs Wasserstein GAN (WGAN) to address stability issues during training. The training process involves alternating training of the generator and discriminator, with the discriminator parameters updated multiple times before each generator parameter update to improve model convergence. The parameters of both the generator and discriminator are optimized using the Adam optimization algorithm. Through this method, we have successfully implemented data imputation based on Generative Adversarial Networks.
[0105] As one possible implementation, the Graph SAGE, GAT, and Generative Adversarial Network (GAN) are trained using the TensorFlow deep learning framework in the PyCharm programming environment to obtain a trained TCGAT-GAN network model.
[0106] Furthermore, the method also includes: inputting the test set into the trained TCGAT-GAN network model to evaluate and obtain the interpolation results.
[0107] To verify the effectiveness of the present invention, the following experiment was conducted:
[0108] This invention employs three metrics for performance evaluation: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). The calculation formulas are as follows:
[0109]
[0110]
[0111]
[0112] Where y i , These represent the actual value and the predicted value, respectively, and n represents the total number of data samples.
[0113] The present invention is compared with the following representative benchmark models.
[0114] (1) GAIN: is a data completion method based on generative adversarial networks, used to process data with missing values.
[0115] (2) BGCP: Bayesian Gaussian CP decomposition, which is a fully Bayesian tensor decomposition model that uses Markov chain Monte Carlo (MCMC) to learn the latent factor matrix (i.e., low-rank structure).
[0116] (3)LRTC-TNN: is a method for tensor completion, which is to estimate missing or unobserved values in tensors.
[0117] (4) GA-GAN: is a generative adversarial network (GAN) method that combines graph aggregation algorithm to generate models with missing data.
[0118] Experimental results
[0119] Comparative experiments were conducted on the PEMS-BAY and Seattle datasets with different missing rates and missing patterns. The experimental data are shown in Tables 1-6.
[0120] Table 1. Method error of PEMS-BAY data in MCAR mode
[0121]
[0122] Table 2 Method Errors for Seattle Data under MCAR Mode
[0123]
[0124]
[0125] Table 3. Method error of PEMS-BAY data under MCARS mode.
[0126]
[0127] Table 4. Method Errors for Seattle Data in MCARS Mode
[0128]
[0129] Table 5. Method error of PEMS-BAY data in MCART mode
[0130]
[0131] Table 6. Method Errors for Seattle Data in MCART Mode
[0132]
[0133] The overall conclusions are as follows:
[0134] The TCGAT-GAN model performed best: In MCAR mode, this model performed the best among all the comparison models.
[0135] The LRTC-TNN model followed closely behind: especially on the PEMS-BAY dataset, its performance was very close to that of the TCGAT-GAN model in certain missing patterns.
[0136] The GAIN model performs poorly: across all test modes, the GAIN model performs relatively poorly.
[0137] The performance of the GA-GAN model varies with the missing data pattern: While the GA-GAN model performs well in the MCAR pattern, it performs poorly in the MCARS pattern. This indicates that different models have significantly different adaptability to different missing data scenarios.
[0138] The BGCP model is stable but performs slightly worse: The BGCP model shows strong stability under different datasets and missing patterns, but its supplementation effect is not as good as the model proposed in this invention.
[0139] In summary, this invention demonstrates the best generalization ability and the most stable performance among all comparison models, and can effectively cope with a variety of different data missing patterns.
[0140] Based on the above embodiments, such as Figure 2As shown, this invention also proposes a traffic flow data interpolation system based on tensor completion and graph attention networks, comprising:
[0141] The data acquisition and processing module is used to acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix.
[0142] The preliminary data completion module is used to perform preliminary data completion using the low-rank tensor completion algorithm.
[0143] The road network reconstruction module is used to construct a spatially correlated road network based on the acquired traffic flow data and the Pearson correlation coefficient.
[0144] The road network feature extraction module is used to extract road network features by taking the initially completed traffic flow data as input data, combining the trained Graph SAGE and GAT, and the set of neighbor nodes of nodes in the spatially correlated road network.
[0145] The interpolated data generation module is used to input the extracted road network features into the trained generative adversarial network (GAN) and use the GAN to generate interpolated traffic flow data.
[0146] Furthermore, the preliminary data completion module is specifically used for:
[0147] Update traffic flow data tensor X
[0148]
[0149] Where X (k) X is the traffic flow data tensor of the current iteration. (k+1) It is the traffic flow data tensor updated in the next iteration, ||X (k) || r,* It is the TNN norm, ρ k It is a non-negative parameter. Represents the traffic flow data tensor X (k) With matrix M (k+1) The square of the Frobenius norm, <X (k) T (k) > Represents the traffic flow data tensor X (k) With auxiliary variable T (k) The inner product;
[0150] Update matrix M
[0151]
[0152] Update auxiliary variable T
[0153] T (k+1) =T(k) +ρ k (X (k) -M (k+1) ).
[0154] Furthermore, the neighbor node set generation module is specifically used for:
[0155] The spatial correlation between nodes is calculated using the following formula:
[0156]
[0157] Where ρ ij X represents the Pearson correlation coefficient between the i-th and j-th detector nodes, where K is the dimension of the traffic flow data corresponding to the selected detector when calculating the Pearson correlation coefficient, k = 1...K. ik Let X be the historical traffic flow data corresponding to the i-th detector node. i The k-th dimension of the data.
[0158] Furthermore, in the road network feature extraction module, when extracting road network features, the random neighbors of the target node are first sampled, then the neighbor node features are aggregated using the mean aggregation function, and different weights are assigned to the aggregated neighbor node features through an attention mechanism. Finally, nonlinear transformation is applied to calculate the embedding features of the node.
[0159] In summary, the main innovation of this invention lies in combining Graph Attention Network (GAT) and Graph SAGE algorithms for efficient feature extraction from road networks, and introducing an improved low-rank tensor algorithm to complete missing traffic flow data. These key improvements are described below:
[0160] 1. Use the low-rank tensor algorithm to perform preliminary completion of traffic flow data:
[0161] Innovation: This invention employs an improved low-rank tensor algorithm to handle missing traffic flow data. Compared to traditional completion methods, this approach better utilizes the multidimensional nature of traffic data, capturing the temporal and spatial correlations within the data.
[0162] Advantages: This algorithm can more accurately recover missing data, especially when the data loss pattern is complex or the data volume is large. By considering the temporal continuity and spatial correlation of traffic flow data, this method improves the reliability and accuracy of data completion.
[0163] 2. GAT+Graph SAGE for road network feature extraction:
[0164] Innovation: This invention is the first to combine the GAT and Graph SAGE algorithms for feature extraction from road network data. GAT effectively captures the dynamic relationships between nodes in the road network through its attention mechanism, while Graph SAGE effectively processes large-scale road network data through its neighbor sampling and aggregation mechanisms.
[0165] Advantages: This combination improves the accuracy and efficiency of feature extraction, especially when dealing with large-scale and complex road network structures. By more accurately understanding and representing the characteristics of the road network, traffic flow data can be predicted and supplemented more effectively.
[0166] 3. Conclusion
[0167] These key improvements work together to significantly enhance the accuracy and efficiency of traffic flow data processing, providing strong technical support for the development of intelligent transportation systems. This innovative approach allows for more effective processing and analysis of large-scale, complex traffic networks, profoundly impacting urban traffic management and planning.
[0168] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A traffic flow data interpolation method based on tensor completion and graph attention networks, characterized in that, include: Step 1: Acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix; Step 2: Perform preliminary data completion using the low-rank tensor completion algorithm; Step 3: Based on the acquired traffic flow data, construct a spatially correlated road network using the Pearson correlation coefficient; Step 4: Using the initially completed traffic flow data as input data, and combining it with the trained Graph SAGE and GAT, as well as the set of neighboring nodes of nodes in the spatially correlated road network, to extract road network features; Step 5: Input the extracted road network features into the trained generative adversarial network, and use the generative adversarial network to generate traffic flow data after data interpolation; Step 2 includes: Update traffic flow data tensor X in It is the traffic flow data tensor of the current iteration. It is the traffic flow data tensor updated in the next iteration. It is the TNN norm. It is a non-negative parameter. Represents traffic flow data tensor With matrix The square of the Frobenius norm, Represents traffic flow data tensor with auxiliary variables The inner product; Update matrix M Update auxiliary variable T ; Step 3 includes: The spatial correlation between nodes is calculated using the following formula: in This represents the Pearson correlation coefficient between the i-th and j-th detector nodes, where K is the dimension of the traffic flow data corresponding to the selected detector in calculating the Pearson correlation coefficient, k=1……K. Historical traffic flow data corresponding to the i-th detector node The k-th dimension of the data.
2. The traffic flow data interpolation method based on tensor completion and graph attention network according to claim 1, characterized in that, In step 4, when extracting road network features, random neighbor sampling is first performed on the target node. Then, the neighbor node features are aggregated using the mean aggregation function. Different weights are assigned to the aggregated neighbor node features through an attention mechanism. Finally, nonlinear transformation is applied to calculate the embedding features of the node.
3. A traffic flow data interpolation system based on tensor completion and graph attention networks, characterized in that, include: The data acquisition and processing module is used to acquire traffic flow data and treat traffic information detectors in the road network as graph nodes to construct a data matrix. The preliminary data completion module is used to perform preliminary data completion using the low-rank tensor completion algorithm. The road network reconstruction module is used to construct a spatially correlated road network based on the acquired traffic flow data and the Pearson correlation coefficient. The road network feature extraction module is used to extract road network features by taking the initially completed traffic flow data as input data, combining the trained Graph SAGE and GAT, and the set of neighbor nodes of nodes in the spatially correlated road network. The interpolated data generation module is used to input the extracted road network features into the trained generative adversarial network and use the generative adversarial network to generate traffic flow data after data interpolation. The preliminary data completion module is specifically used for: Update traffic flow data tensor X in It is the traffic flow data tensor of the current iteration. It is the traffic flow data tensor updated in the next iteration. It is the TNN norm. It is a non-negative parameter. Represents traffic flow data tensor With matrix The square of the Frobenius norm, Represents traffic flow data tensor with auxiliary variables The inner product; Update matrix M Update auxiliary variable T ; The module for deriving the neighbor node set is specifically used for: The spatial correlation between nodes is calculated using the following formula: in This represents the Pearson correlation coefficient between the i-th and j-th detector nodes, where K is the dimension of the traffic flow data corresponding to the selected detector in calculating the Pearson correlation coefficient, k=1……K. Historical traffic flow data corresponding to the i-th detector node The k-th dimension of the data.
4. A traffic flow data interpolation system based on tensor completion and graph attention network according to claim 3, characterized in that, In the road network feature extraction module, when extracting road network features, random neighbor sampling of the target node is first performed. Then, the neighbor node features are aggregated using the mean aggregation function. Different weights are assigned to the aggregated neighbor node features through an attention mechanism. Finally, nonlinear transformation is applied to calculate the embedding features of the node.