A Wasserstein generative adversarial traffic data interpolation method based on road network pixelation

By treating traffic data as an image restoration problem, the Wasserstein generative adversarial network and multi-source heterogeneous fusion module are used to solve the problem that the spatiotemporal characteristics and external factors of traffic flow data are not fully utilized, and high-precision data restoration effects are achieved.

CN115510174BActive Publication Date: 2025-09-26CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211197830.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-09-26
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

When processing traffic flow trajectory data, existing technologies fail to effectively explore the spatial characteristics of the road network and do not fully consider the multi-type characteristics and external factors of traffic data, resulting in insufficient data interpolation accuracy.

Method used

Traffic data is regarded as an image restoration problem. A method based on Wasserstein generative adversarial network is adopted. By constructing a generative adversarial network model for road network traffic data, combining multimodal input data, graph attention network and multi-source heterogeneous fusion module, the spatiotemporal characteristics and external factors of traffic data are captured to accurately repair missing data.

Benefits of technology

The accuracy and robustness of traffic data repair are improved, and it can effectively repair traffic flow data under high missing rates and complex missing types, thereby improving the accuracy and adaptability of data interpolation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115510174B_ABST
    Figure CN115510174B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of intelligent transportation and specifically relates to a Wasserstein generative adversarial traffic data interpolation method based on road network pixelation. The method includes: considering that traffic data and image data have certain structural similarities, proposing a traffic data Trajectory2Matrix representation method to pixelate the traffic network and trajectory data; constructing a road network traffic generative adversarial network model, considering the influence of external factors and implicit spatial features, introducing a reconstruction of the road network topology and a multi-source heterogeneous fusion module to optimize the generator of the Wasserstein generative adversarial network, and simultaneously proposing a new loss function to effectively repair missing parts in the generated traffic flow feature map; inputting the repaired data into a discriminator of the road network traffic data generative adversarial network model to determine the authenticity of the repaired data. If the authenticity is greater than a set threshold, the repair is completed; otherwise, the road network traffic data is re-input into the road network traffic data generative adversarial network model for data repair. The present invention can better explore the multi-dimensional compensation features of missing road network traffic data, compensate for missing data from three dimensions: missing data history data, missing road neighbor nodes, and external factors, improve the robustness and adaptability of data repair, and effectively integrate dynamic / static external attributes and temporal multimodal characteristics to further improve the accuracy of data repair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation, and in particular relates to a Wasserstein-generated adversarial traffic data interpolation method based on road network pixelation. Background Art

[0002] Currently, scholars have studied the problem of repairing missing traffic flow data from multiple perspectives.

[0003] To effectively represent traffic flow trajectory data, researchers have proposed various methods. These include methods based on point-of-interest segmentation, trajectory direction, hand-crafted features, trajectory segments, and bag-of-words. While these methods effectively alleviate the sparse distribution of trajectory data, they often neglect the spatiotemporal information contained in trajectory data.

[0004] To address the spatiotemporal correlation of traffic data, the paper ST-LBAGAN: Spatio-temporal learnable bidirectional attention generative adversarial networks for missing traffic data imputation builds on U-Net to construct a spatiotemporal learnable bidirectional attention generative adversarial network to learn the spatiotemporal features of traffic flow. The paper Deep spatial-temporal bi-directional residual optimization based on tensor decomposition for traffic data imputation on urban road networks proposes a model that combines tensor completion and residual optimization to fully capture the spatiotemporal dependencies of traffic data. The paper A Multi-Attention Tensor Completion Network for Spatio-temporal Traffic Data Imputation proposes a spatial signal propagation module and a temporal self-attention module as the basic stacking blocks of a deep network to represent aggregation and extract dynamic dependencies in the spatiotemporal dimensions. These papers all explore the complex spatiotemporal correlations of traffic flow data during data mining. However, further exploration of the hidden spatial features in road networks is needed to improve data interpolation accuracy.

[0005] To address the temporal multimodality and dynamic / static external factors of traffic data, the paper ASTGCN (Attention Based Spatial-Temporal Graph Convolutional Networks for TrafficFlow Forecasting) consists of three independent components that capture the recent, daily, and weekly dependencies of traffic flows and perform a weighted fusion of their outputs. The paper APTN (A Spatial-Temporal Attention Approach for Traffic Prediction) uses an encoder attention mechanism to model the cyclical dependencies of data. While most of these models fully consider the temporal multimodality and external characteristics of traffic data, further research is needed to design modules tailored to the multi-type features of the data. Summary of the Invention

[0006] In order to solve the problem of effective representation of vehicle motion trajectory data and the problem of complex traffic data loss types and uncertain loss rates, the present invention is inspired by the success of generative adversarial networks in the field of image restoration. Considering that traffic data and image data have certain structural similarities, the present invention regards traffic data restoration as an image restoration problem to achieve accurate restoration of missing traffic data. The present invention provides a Wasserstein generative adversarial traffic data interpolation method based on road network pixelation, which includes the following steps:

[0007] To solve the graph representation problem of traffic flow trajectory data, considering the spatiotemporal characteristics of traffic flow trajectory, the trajectory data is converted into a time-space 2D feature graph representation to obtain the traffic flow feature graph;

[0008] A road network traffic data generative adversarial network model was constructed based on the Wasserstein generative adversarial network. The generator of the Wasserstein generative adversarial network was rebuilt and optimized and trained. The traffic flow feature map was input into the optimized and trained generator to repair the missing parts of the traffic flow feature map.

[0009] The repaired data is input into the discriminator of the road network traffic data generation adversarial network model to determine the authenticity of the repaired data. If the authenticity is greater than the set threshold, the repair is completed. Otherwise, the road network traffic data is re-entered into the generation adversarial network model for data repair.

[0010] Furthermore, the method of using the representation of traffic data Trajectory2Matrix includes the following steps:

[0011] Densify the acquired trajectory data, project the coordinates of the densified trajectory points and the coordinates of the road network data to a unified coordinate system through Gaussian projection, and use a geometry-based matching algorithm to match the trajectory coordinates with the road network data.

[0012] The traffic time series of adjacent road sections are stacked together to obtain the N×T-dimensional road section historical traffic data measured by the detector at the t-th moment, where N is the number of road sections and T is the time dimension;

[0013] Create a first mask matrix representing the data missing situation, that is, when the value in the first mask matrix is ​​1, it means that there is no data missing, and when the value is 0, it means that there is data missing;

[0014] The traffic flow feature map is obtained by multiplying the first mask matrix with the T-dimensional road section historical traffic data measured by the detector at the t-th time.

[0015] Furthermore, the process of performing Gaussian projection on the coordinates to generate the projected coordinates (x, y) includes:

[0016]

[0017]

[0018] Where N is the meridian curvature radius; lon, lat are the longitude and latitude of the coordinates before projection, lon"=lon-lon0; lon0 is the longitude of the central meridian; t=tanlat; η 2 =e' 2 cos 2 lat, e' is the second eccentricity of the ellipsoid; X is the arc length of the meridian.

[0019] Furthermore, when using a geometry-based matching algorithm to match the trajectory coordinates with the road network data, the trajectory point is matched with the road segment with the smallest vertical projection distance among the road segments in the road network data. The vertical projection distance is expressed as:

[0020]

[0021] Where D is the vertical projection distance; (x, y) represents the coordinates of the trajectory point; (x0, y0) and (x1, y1) are the coordinates of two points in a road segment.

[0022] Furthermore, the T-dimensional road section historical traffic data measured by the detector at time t is expressed as:

[0023]

[0024] Among them, Y trepresents the historical traffic data of the road section with T dimensions measured by the detector at time t; i(t-jΔt) For road e i Traffic flow data at time (t-jΔt), j = 0, 1, ..., T-1; Δt is the traffic flow data sampling interval; T is the length of the historical time series of the road section.

[0025] Furthermore, the process of repairing missing road network traffic data using the road network traffic data generation adversarial network model includes:

[0026] Constructing multimodal input data effectively captures the periodicity and long-term dependencies of traffic data. In the spatiotemporal data generation component, the traffic flow data to be repaired, its adjacent traffic flow data, its daily traffic flow data, and its weekly traffic flow are concatenated together and then extracted through a convolution operation to obtain multimodal input data. The correlation coefficient of the multimodal input data is calculated through an attention mechanism, and the output of the attention mechanism is used as a historical compensation feature for missing road network flow data.

[0027] Reconstructing the urban road network topology captures both explicit and implicit spatial correlations in traffic data. The Pearson correlation coefficient of historical time data for road nodes is used to reconstruct the road network topology. Using a graph attention network, attention coefficients for neighboring nodes are calculated based on the inherent adjacency of missing nodes and the reconstructed road network topology. This captures information about how neighboring nodes repair missing data in different dimensions, serving as neighbor compensation features for missing data.

[0028] Aiming at the irregularity and uncertainty of traffic data, a multi-source heterogeneous fusion module is proposed, which effectively integrates the external features such as weather and time of missing data and multiple compensation features, thereby improving the robustness of the repair; constructs sequences of time series factors, time characteristic factors and weather factors, and through convolution operations, makes the dimensions of these three sequences the same as the dimensions of the historical data compensation features and neighbor node compensation features of the missing road network flow data; splices the historical data compensation features and neighbor node compensation features of the missing road network flow data with the sequences of time series factors, time characteristic factors and weather factors, and propagates them along the channel dimension to extract the channel features as the value of the real data after repair.

[0029] Furthermore, historical compensation features for obtaining missing traffic data include:

[0030] First, construct multimodal input data. Splice the traffic flow data X that needs to be repaired t , adjacent traffic flow data X t r , daily traffic flow X t d and weekly traffic flow X t w The input data matrix is Represents the traffic flow data of 4T' moments of N nodes, where N is the total number of road sections and T' represents the length of the historical time series of the road section. The convolutional neural network is used to fuse the splicing matrix to obtain multimodal input data.

[0031]

[0032] Secondly, the multimodal input data is used to calculate the vector correlation between the missing road network flow data and the historical data, and used as the historical data compensation feature for the missing data:

[0033]

[0034] Among them, F t is the historical data compensation feature for missing road network flow data; MultiHead(·) is multi-head self-attention; is the multimodal input data, N is the total number of road segments, C is the number of channels, and T is the length of the historical time series of the road segment; are the weight matrices of query subspace, key subspace and value subspace respectively, d q d k d v are the dimensions of the query subspace, key subspace, and value subspace respectively; i = 1, 2, ..., h, where h is the number of heads of multi-head self-attention.

[0035] Furthermore, the adjacent node compensation features for obtaining missing traffic data include:

[0036] First, the Pearson correlation coefficient of the historical time data of road nodes is used to reconstruct the urban road network topology. Specifically, the Pearson coefficient of the historical data of one week between each two road nodes is calculated to establish the Pearson correlation matrix A. p ∈R N×N , where N is the number of road segment nodes.

[0037] Then, the missing road network flow data, adjacency matrix, and Pearson correlation matrix to be repaired are input into the graph attention, and the output is used as the missing data neighbor node compensation feature:

[0038]

[0039] Where σ(·) is the sigmoid function; k is the number of graph attention heads; N i is the set of adjacent nodes of the missing node i according to the original adjacency matrix of the road node; W k The dimension expansion parameter corresponding to the number of attention heads k; α k ijis the attention coefficient of the corresponding graph attention head number k normalized according to the original road network structure; Represents the traffic flow data to be repaired after time parallel processing, T is the time dimension, N is the total number of road sections, and C is the number of channels; N i ′ is the set of adjacent nodes of the missing node i according to the reconstructed road network topology; W′ k The dimension expansion parameter corresponding to the number of attention heads k; α i ' j k is the attention coefficient of the corresponding graph attention head number k after normalization according to the reconstructed road network topology structure.

[0040] Furthermore, the repaired traffic flow data obtained in the multi-source heterogeneous fusion module includes:

[0041] First, external factors such as time series factors, time characteristic factors and weather factors are selected, and the three types of external factors are convolved and converted into the same dimension as the feature matrix extracted by the two sub-modules, that is, ξ i ∈R C×N×T′ , i is the category of external factors.

[0042] Then, the three types of external factors are combined with the time characteristics and spatial characteristics of traffic flow in the 0th dimension to obtain the input F of the multi-source heterogeneous fusion module. 0 ∈R 5C×N×T′ , F 0 =concat(F temporal ,F spatial ,ξ1,ξ2,ξ3),

[0043] Then, the attention mechanism is used to propagate the extracted channel features along the channel dimension to obtain the output result Y′ of the module, so as to better focus on important features and suppress unnecessary features.

[0044] Finally, the output of the module is recombined with the observed real data to repair the partially missing data and obtain the repaired traffic flow.

[0045]

[0046] Where Y represents the repaired traffic flow data; M represents the mask matrix; and Y′ represents how the multi-source heterogeneous fusion module generates complete traffic data using time series factors, time feature factors, weather factors, historical data compensation features, and neighbor node compensation features.

[0047] Furthermore, the pixelated generative adversarial network model includes a discriminator and a traffic flow generator. The discriminator is used to determine the authenticity of the repaired data generated by the traffic flow generator. During the training process, the RMSProp optimization algorithm is used to optimize the discriminator and the traffic flow generator respectively. The loss function used to optimize the discriminator is:

[0048]

[0049] A new target optimization method is proposed to optimize the traffic flow generator, namely, the reconstruction loss function Loss is introduced. re Combined with the adversarial loss, the similarity between the generator data and the real data is improved, and the loss function for optimizing training is expressed as:

[0050]

[0051]

[0052] Where M represents the mask matrix; represents the restored traffic flow data; D(·) is the discriminator; α is the coefficient of the mask reconstruction loss function; n is the number of missing locations; for The elements in M ​​represent the value of the jth time dimension of the i-th road segment; ij It is an element in M, indicating the missing status of traffic flow data in the jth time dimension of the i-th road section. When its value is 1, it means that the data is not missing, and when it is 0, it means that the data is missing.

[0053] The present invention compensates for missing data from two dimensions: historical data and neighboring nodes, thereby improving the robustness and adaptability of data repair. Aiming at the external attributes and temporal multimodality of traffic flow data, a multi-channel attention mechanism is introduced to weight the key attributes that affect data repair performance, and a heterogeneous multi-source fusion module is constructed. This module can effectively integrate dynamic / static external attributes and temporal multimodality, further improving the accuracy of data repair. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is an overall flow chart of the Wasserstein generation adversarial traffic data interpolation method based on road network pixelation of the present invention;

[0055] Figure 2 This is a comparison chart of the true value and the repaired value of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0057] The present invention provides a Wasserstein generative adversarial traffic data interpolation method based on road network pixelation, comprising the following steps:

[0058] To address the graph representation problem of traffic flow trajectory data, considering the spatiotemporal characteristics of traffic flow trajectories, the trajectory data is converted into a time-space 2D feature graph representation. A traffic data representation method called Trajectory2Matrix is ​​proposed. This method converts spatiotemporal traffic dynamic data into a traffic flow spatiotemporal relationship matrix, which increases the scale of traffic data repair and the network scope.

[0059] A generative adversarial network model for road network traffic data was constructed. A generator for the Wasserstein generative adversarial network was proposed to reconstruct the spatiotemporal data generation component and a new objective optimization function was proposed to accurately repair missing components in the generated traffic flow feature map. This model addressed the unstable repair performance in situations with high traffic data loss rates and complex loss types.

[0060] The repaired data is input into the discriminator of the road network traffic data generation adversarial network model to determine the authenticity of the repaired data. If the authenticity is greater than the set threshold, the repair is completed. Otherwise, the road network traffic data is re-entered into the generation adversarial network model for data repair.

[0061] In this embodiment, when the original trajectory data is densified, the sampling frequency of the original trajectory is inconsistent, so the frequency after densification is uniformly set to 15s. The urban road network data is downloaded from OpenStreetMap (OSM), and the coordinates of the original road network data and the coordinates of the trajectory points are projected to a unified coordinate system through Gaussian projection. The map road network matching problem is then converted into a pattern matching problem of a sequence of plane line segments. Gaussian projection includes forward and inverse calculation formulas. The forward calculation formula is as follows:

[0062]

[0063]

[0064] Where x and y represent the projected coordinates; lon" = lon - lon0, lon is the longitude of the point, lon0 is the longitude of the central meridian; N is the radius of curvature of the meridian, a is the major semi-axis of the ellipsoid, e is the first eccentricity of the ellipsoid; t = tanlat; η 2 =e' 2 cos 2 lat, e' is the second eccentricity of the ellipsoid; X is the meridian arc length.

[0065] A geometry-based matching algorithm is used to integrate the geometric information of GPS points and roads to achieve the purpose of normalizing trajectory data into road segments. The principle of this algorithm is to search for the road segment with the smallest vertical projection distance from the matching point to each candidate road segment as the matching road segment. The formula for the vertical projection distance is as follows:

[0066]

[0067] Among them, (x, y) is the projection coordinate of the point to be matched, (x0, y0) and (x1, y1) are the coordinates of two points on the candidate road segment.

[0068] Since the amount of road network information data is too large, the shortest distance between the road network data set and the trajectory data points must be calculated. This embodiment introduces the KDTree nearest neighbor matching algorithm to effectively improve the matching speed. After the algorithm matches, the output is the trajectory data segment vector sequence RV. i .

[0069] In order to utilize the spatiotemporal information of traffic data, the traffic time series of each road section are stacked together according to adjacent links to obtain the “time-space” two-dimensional traffic data traffic characteristic map Y t ∈R N×T , specifically including the following steps:

[0070] The acquired trajectory data is densified, and the coordinates of the densified trajectory points and the coordinates of the road network data are Gaussian projected to a unified coordinate system. The trajectory coordinates are then matched with the road network data using a geometry-based matching algorithm. The process of Gaussian projection of coordinates to generate the projected coordinates (x, y) includes:

[0071]

[0072]

[0073] Where, N is the radius of curvature of the meridian; lon, lat are the longitude and latitude of the coordinates before projection, lon"=lon-lon0; lon0 is the longitude of the central meridian; t=tanlat; η 2 =e' 2 cos 2 lat, e' is the second eccentricity of the ellipsoid; X is the arc length of the meridian;

[0074] When using the geometry-based matching algorithm to match the trajectory coordinates with the road network data, the trajectory point is matched with the road segment with the smallest vertical projection distance among the road segments in the road network data. The vertical projection distance is expressed as:

[0075]

[0076] Where D is the vertical projection distance; (x, y) represents the coordinates of the trajectory point; (x0, y0) and (x1, y1) are the coordinates of two points in a road segment.

[0077] The traffic time series of adjacent road sections are stacked together to obtain the N×T-dimensional road section historical traffic data measured by the detector at the t-th moment, where N is the number of road sections and T is the time dimension;

[0078] Create a first mask matrix representing the data missing situation, that is, when the value in the first mask matrix is ​​1, it means that there is no data missing, and when the value is 0, it means that there is data missing;

[0079] The traffic flow feature map is obtained by multiplying the first mask matrix with the T-dimensional road section historical traffic data measured by the detector at the t-th time;

[0080] At the tth moment, the detector measures the T-dimensional road section historical traffic data Y t , expressed as:

[0081]

[0082] Where N is the total number of road sections, T is the selected data time dimension; y i(t-jΔt) For road e i The flow data at time (t-jΔt), j = 0, 1, ..., T-1; Δt is the flow data sampling interval.

[0083] In order to characterize the missing traffic data of the road network, a mask matrix is ​​created. where m i(t-jΔt) For road e i The missing state of the flow data value at the time (t-jΔt) is expressed as:

[0084]

[0085] Therefore, the road network data actually collected is the Hadamard product of the road section historical traffic data Y and the mask matrix M:

[0086] X=Y·M

[0087] In order to integrate multiple input data and quantify the correlation of time series, the input data needs to be spliced ​​with the current traffic flow data X that needs to be repaired. t , adjacent traffic flow data X tr , daily traffic flow X t d and weekly traffic flow X t w The input data matrix is Represents the traffic flow data of 4T' moments of N nodes, where N is the total number of road sections and T' represents the length of the historical time series of the road section. The convolutional neural network is used to fuse the splicing matrix to obtain multimodal input data.

[0088]

[0089] Calculate the vector correlation of multiple input data, assign weights between missing data and data before the missing moment, and output better repair results. Calculate the correlation between each input data through the attention mechanism, learn the potential dependency of all road traffic data in the time dimension, and it is not affected by long distances. In the self-attention mechanism, the multi-module input data is embedded in a high-dimensional space to obtain C is the number of channels mapped to the high-dimensional space, N is the total number of road segments, and T′ represents the length of the historical time series of the road segment. Each input vector has three subspaces, namely the “query” subspace "Key" subspace and the "value" subspace In the single-head attention mechanism, the “query” subspace Q, “key” subspace K, and “value” subspace V are expressed as:

[0090]

[0091]

[0092]

[0093] Among them, they are are the weight matrices of Q, K, and V respectively; d q d k d v are the dimensions of the “query” subspace, “key” subspace, and “value” subspace, respectively.

[0094] In order to parallelize the input road nodes, the embedded high-dimensional data After dimension transformation, we get

[0095] The dot product of Q and K gives the attention score score = Q·K. The size of the attention score represents the dynamic dependency between road nodes in different time periods. In order to ensure the smoothness of the back-propagation gradient, the score is divided by Scaling is performed, and then the scores are softmax processed and weighted, and the final result is output, which is expressed as:

[0096]

[0097] Due to the high dimensionality of the input data, a single self-attention model is unable to capture the information diversity of road node time series. Therefore, multiple self-attention models are used to extract historical data compensation features for missing road network flow data in parallel. The extracted features are spliced ​​and further linearly transformed to obtain the final output, achieving the goal of capturing time dependencies from multiple angles and in a diversified manner. The multimodal input data input to the multi-head self-attention network can be described as a linear mapping. The historical data compensation features for missing road network flow data are expressed as:

[0098]

[0099] The historical data compensation feature of missing road network flow data can also be expressed as:

[0100]

[0101] Among them, Q i represents the “query” subspace of the i-th head in the multi-head attention mechanism, K i represents the “key” subspace of the i-th head in the multi-head attention mechanism, V i Represents the "value" subspace of the i-th head in the multi-head attention mechanism; Q i , K i 、V i The corresponding weight matrix.

[0102] The linear correlation between different nodes is obtained by calculating the Pearson correlation coefficient of the one-week historical data between different nodes. The Pearson coefficient between road nodes i and j is calculated as follows:

[0103]

[0104] Where T is the length of the historical time series of the selected road node; x it represents the traffic data of road node i at time t; x jt represents the traffic data of road node j at time t;

[0105] After calculating the Pearson correlation coefficients between all road nodes, the Pearson correlation matrix is ​​established And serve as the reconstruction of road network topology.

[0106] Input the missing road network flow data, adjacency matrix, and Pearson correlation matrix to be repaired in the graph attention, and the output is used as the missing data neighbor node compensation feature:

[0107]

[0108] Where σ(·) is the sigmoid function; k is the number of graph attention heads; N i is the set of adjacent nodes of the missing node i according to the original adjacency matrix of the road node; W k The dimension expansion parameter corresponding to the number of attention heads k; α k ij is the attention coefficient of the corresponding graph attention head number k normalized according to the original road network structure; Represents the traffic flow data to be repaired after time parallel processing, T is the time dimension, N is the total number of road sections, and C is the number of channels; N i ′ is the set of adjacent nodes of the missing node i according to the reconstructed road network topology; W′ k The dimension expansion parameter corresponding to the number of attention heads k; α′ ij k is the attention coefficient of the corresponding graph attention head number k after normalization according to the reconstructed road network topology structure.

[0109] Select external factors such as time series factors, time characteristic factors and weather factors. Time series factors are divided into time series factors and sub-series factors. Time series factors refer to the number of hours in a day, and sub-series factors refer to the number of time periods in an hour. In this embodiment, 1 hour is divided into 12 time periods at intervals of 5 minutes as sub-series factors. Those skilled in the art can divide the granularity of an hour according to actual needs. Similarly, in this embodiment, the granularity of the time series factors is 24, so each hour of 24 hours is used as a time series. Therefore, those skilled in the art can divide a day into a time series of N granularities according to actual needs. Therefore, the size of each granularity is greater than 1 hour and less than 24 hours. Those skilled in the art can divide the time in a time series granularity into sub-series factors, and the size of each granularity of the sub-series factor is greater than 1 minute and less than 60 minutes. The time characteristic factor refers to whether it is a rest day or holiday. The weather factor can be selected according to seasonal changes, or it can be selected according to dividing the temperature into multiple intervals. In this embodiment, rainfall is selected as the weather factor to represent the weather conditions, and the rainfall is divided into 6 levels according to the rainfall level: no rain, light rain, moderate rain, heavy rain, rainstorm, heavy rainstorm, and extremely heavy rainstorm.

[0110] The three types of external factors are convolved separately and transformed into the same dimension as the compensation feature matrix extracted by the spatiotemporal data generation component, that is, ξ i ∈RC×N×T′ , i is the category of external factors, and the three types of external factors are spliced ​​with historical data compensation features and neighbor node compensation features in the 0th dimension to obtain the input F of the multi-source heterogeneous fusion module 0 ∈R 5C ×N×T′ , F 0 =concat(F t ,F s ,ξ1,ξ2,ξ3), ξ1,ξ2,ξ3 are time series factors, time feature factors and weather factors respectively. The attention mechanism is used to propagate along the channel dimension to extract channel features, thereby obtaining the module output result Y′, so as to better focus on important features and suppress unnecessary features. The module output result is recombined with the observed real data to achieve local missing data repair and obtain the repaired traffic flow

[0111]

[0112] Where * represents the Hadamard product and M is the mask matrix.

[0113] The discriminator is introduced into the pixel-based generative adversarial network, and is trained alternately with the generator to continuously compete with it, so that the generator can generate data better. In order to make the model focus on the data generation of the missing position, the discriminator distinguishes the authenticity of each specific data in the matrix, so as to achieve the purpose of local accurate repair. The input of the discriminator is the complete data after repair. First, two convolutional layers are used to embed the spatial position encoding between roads and map them into high-dimensional space. Then, the attention mechanism is used to extract the spatiotemporal information of the input data to evaluate the generated data. Finally, two fully connected layers and sigmoid activation functions are used to obtain the restored complete data. The true probability of data. The discriminator can be regarded as a function D:χ→[0,1], Indicates that the complete data After inputting the discriminator D, the (i, j)th component corresponds to the true probability of the (i, j)th data of the traffic flow repair result.

[0114] The proposed traffic flow data repair algorithm is as follows:

[0115]

[0116]

[0117] Figure 2Comparisons of true and restored values ​​at a 50% loss rate are presented. As can be seen, the model's restored results are close to the true traffic flow values. Table 1 compares the performance of the ST-DIGAN model with the state-of-the-art BGCP, BATF, and GAIN models in terms of MAE (mean absolute error), MAPE (mean absolute error), and RMSE (mean mean square error) at different loss rates. Table 1 shows that the model's MAE is relatively small at both low and high loss rates.

[0118] Table 1

[0119]

[0120] The present invention addresses multiple challenges such as the effective representation of vehicle motion trajectory data and the complex types of traffic data loss and uncertain missing rates, and proposes a generative adversarial network traffic data repair method based on road network pixelation. In this embodiment, first, considering the irregularity of trajectory data, a traffic road network and trajectory data pixelation representation algorithm is designed, and the trajectory data is represented as a time-space two-dimensional graph. Then, considering the complex types of traffic data loss and the uncertain missing rate, a spatiotemporal data generation component is used to optimize the generator of the generative adversarial network to better repair the missing road network traffic data from three dimensions: historical data, neighbor nodes, and external weather. Finally, the model is evaluated and tested on the Chengdu taxi trajectory dataset. Experiments show that under high data missing rates, the model has a good repair effect on missing traffic flow data compared with other baseline methods, which demonstrates the robustness and high accuracy of the model.

[0121] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A Wasserstein generative adversarial traffic data interpolation method based on road network pixelation, characterized in that: The following steps are involved: To address the graph representation problem of traffic flow trajectory data, considering the spatiotemporal characteristics of traffic flow trajectories, the trajectory data is converted into a time-space 2D feature graph representation to obtain a traffic flow feature graph, including: Densify the acquired trajectory data, project the coordinates of the densified trajectory points and the coordinates of the road network data to a unified coordinate system through Gaussian projection, and use a geometry-based matching algorithm to match the trajectory coordinates with the road network data. The traffic time series of adjacent road sections are stacked together to obtain the N×T-dimensional road section historical traffic data measured by the detector at the t-th moment, where N is the number of road sections and T is the time dimension; Create a first mask matrix representing the data missing situation, that is, when the value in the first mask matrix is ​​1, it means that there is no data missing, and when the value is 0, it means that there is data missing; The traffic flow feature map is obtained by multiplying the first mask matrix with the T-dimensional road section historical traffic data measured by the detector at the t-th time; A road network traffic data generative adversarial network model is constructed based on the Wasserstein generative adversarial network. The generator of the Wasserstein generative adversarial network is rebuilt and optimized and trained. The traffic flow feature map is input into the optimized and trained generator to repair the missing parts of the traffic flow feature map, including: The traffic flow data to be repaired, its adjacent traffic flow data, its daily traffic flow data, and its weekly traffic flow are concatenated together and extracted through a convolution operation to obtain multimodal input data. The multi-head attention mechanism is then used to calculate the vector correlation of the multimodal input data, and the output of the multi-head attention mechanism is used as the historical data compensation feature of the traffic flow data. The road network topology is reconstructed using the Pearson correlation coefficient of the historical time data of road nodes. The attention coefficient of neighboring nodes is calculated based on the inherent road node adjacency relationship of the missing nodes and the reconstructed road network topology through a graph attention network. This captures the information of neighboring nodes on different dimensions that can be used to repair missing data, which serves as the neighbor compensation feature for missing data. Construct sequences of time series factors, time feature factors, and weather factors. Through convolution operations, the dimensions of these three sequences are made the same as the dimensions of the historical data compensation features and neighbor node compensation features of the missing road network flow data. The historical data compensation features of the missing road network flow data, the neighbor node compensation features, and the sequences of time series factors, time characteristic factors, and weather factors are spliced ​​together, and the channel features are propagated along the channel dimension to extract the values ​​of the real data after repair; The repaired data is input into the discriminator of the road network traffic data generation adversarial network model to determine the authenticity of the repaired data. If the authenticity is greater than the set threshold, the repair is completed. Otherwise, the road network traffic data is re-entered into the generation adversarial network model for data repair.

2. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: The process of generating the projected coordinates (x, y) by Gaussian projection of the coordinates includes: Where N is the meridian curvature radius; lon, lat are the longitude and latitude of the coordinates before projection, lon"=lon-lon0; lon0 is the longitude of the central meridian; t=tanlat; η 2 =e '2 cos 2 lat, e' is the second eccentricity of the ellipsoid; X is the arc length of the meridian.

3. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: When using the geometry-based matching algorithm to match the trajectory coordinates with the road network data, the trajectory point is matched with the road segment with the smallest vertical projection distance among the road segments in the road network data. The vertical projection distance is expressed as: Where D is the vertical projection distance; (x, y) represents the coordinates of the trajectory point; (x0, y0) and (x1, y1) are the coordinates of two points in a road segment.

4. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: The historical traffic data of the T-dimensional road section measured by the detector at time t is expressed as: Among them, Y t represents the historical traffic data of the road section with T dimensions measured by the detector at time t; i(t-jΔt) For road e i Traffic flow data at time (t-jΔt), j = 0, 1, ..., T-1; Δt is the traffic flow data sampling interval; T is the length of the historical time series of the road section.

5. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: The historical data compensation feature of missing road network flow data is expressed as: Among them, F t is the historical data compensation feature of the missing road network flow data in traffic flow data; MultiHead(·) is the multi-head self-attention; is the multimodal input data, N is the total number of road segments, C is the number of channels, and T is the length of the historical time series of the road segment; are the weight matrices of query subspace, key subspace and value subspace respectively, d q d k d v are the dimensions of the query subspace, key subspace, and value subspace respectively; i = 1, 2, ..., h, where h is the number of heads of multi-head self-attention.

6. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: The neighbor node compensation feature of missing road network flow data is expressed as: Where σ(·) is the sigmoid function; k is the number of graph attention heads; N i is the set of adjacent nodes of the missing node i according to the original adjacency matrix of the road node; W k The dimension expansion parameter corresponding to the number of attention heads k; α k ij is the attention coefficient of the corresponding graph attention head number k normalized according to the original road network structure; Represents the traffic flow data to be repaired after time parallel processing, T is the time dimension, N is the total number of road sections, and C is the number of channels; N i ′ is the set of adjacent nodes of the missing node i according to the reconstructed road network topology; W′ k The corresponding figure pays attention to the dimension expansion parameter of the number of heads k; is the attention coefficient of the corresponding graph attention head number k after normalization according to the reconstructed road network topology structure.

7. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: Time series factors include time series factors and subsequence factors. Time series factors refer to the number of hours of the day that the data to be repaired is in, and subsequence factors refer to the time period of a certain hour that the data to be repaired is in. Time feature sequence factors indicate whether the time series to be repaired is a working day. Weather factors refer to the weather conditions of the data to be repaired.

8. The Wasserstein generative adversarial traffic data interpolation method based on road network pixelation according to claim 1 is characterized in that: The pixelated generative adversarial network model includes a discriminator and a traffic flow generator. The discriminator is used to determine the authenticity of the repaired data generated by the generator. During the training process, the RMSProp optimization algorithm is used to optimize the discriminator and the traffic flow generator respectively. The loss function used to optimize the discriminator is: When optimizing the traffic flow generator, the reconstruction loss function Loss is introduced re Combined with the adversarial loss, the loss function for optimizing training is expressed as: Where M represents the mask matrix; represents the restored traffic flow data; D(·) is the discriminator; α is the coefficient of the mask reconstruction loss function; n is the number of missing locations; for The elements in M ​​represent the value of the jth time dimension of the i-th road segment; ij It is an element in M, indicating the missing status of traffic flow data in the jth time dimension of the i-th road section. When its value is 1, it means that the data is not missing, and when it is 0, it means that the data is missing.

Citation Information

Patent Citations

  • Traffic data restoration method based on generative adversarial network

    CN110018927A

  • Traffic data restoration method based on graph convolution time sequence generative adversarial network

    CN111540193A