Intersections are known to cause significant changes in traffic states. However, existing link-level trajectory optimization methods often overlook intersection information, making it challenging to preserve key traffic state features during the optimization process. To address this limitation, a novel approach is proposed that integrates node2vec and K-means algorithms. First, the role of intersections in linking road segments is considered. The node2vec algorithm is employed to capture the deep spatial similarity between links while weakening the adjacency relationship between links before and after intersections. This process generates feature representations for each link. Subsequently, clustering centers are initialized at the intersections, and K-means clustering is applied based on these link feature representations. Through this method, consecutive links within a trajectory that belong to the same cluster are merged, thus optimizing the granularity of the trajectory. Finally, experimental analysis and validation are conducted using link-level travel trajectory data from Shenzhen. The results demonstrate that, under optimal conditions, the mean absolute error (MAE), the mean absolute percentage error (MAPE), and the root mean square error (RMSE) values are reduced by 8.91%, 9.44%, and 8.96%, respectively, while computational efficiency is increased by 30.08%. The proposed trajectory granularity optimization method, which accounts for the existence of intersections, not only effectively retains the key traffic state features from the original trajectory but also significantly reduces training time while improving the model’s prediction accuracy.
Read full abstract