作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

基于多尺度时空特征和软注意力机制的交通流预测方法

  • 出版日期:2024-04-11 发布日期:2024-04-11

Traffic Flow Prediction Based on Multi-scale Spatiotemporal Features and Soft Attentions Mechanism

  • Online:2024-04-11 Published:2024-04-11

摘要: 通流预测在规划交通系统、优化道路资源和缓解交通拥堵等方面具有重要意义。本文针对交通流预测中时间周期性特征提取不充分导致预测精度提升受限的问题,提出了一种基于多尺度时空特征和软注意力机制的交通流预测方法(MSTFSA)。该方法首先利用图交谈注意力网络(GTHAT)提取空间数据的非欧几里得结构特征,通过分配动态权重表征不同时间相邻道路交通流的影响程度;其次利用双向增强注意力门控循环单元结构(Bi-EAGRU)提取时间数据的连续性关联特征,增强每个时刻的时间特征与上下时刻的联系;然后基于软注意力机制融合周周期、日周期和近邻时间三个尺度下的相似交通流趋势,实现对时间周期性特征的充分提取,最后结合高速公路数据集PeMS04和PeMS08验证MSTFSA的预测精度。实验结果表明,MSTFSA的交通流预测精度表现出良好效果,与基线模型STSGCN和ASTGCN相比,其预测均方根误差(RMSE)分别降低7.15%和3.8%,平均绝对误差(MAE)分别降低7.79%和3.99%。由此可见,MSTFSA能较好的提取并融合交通数据的多时间尺度时空特征,在交通流预测精度提升方面表现出一定的优势。

Abstract: Traffic flow prediction has considerable worth in designing transportation systems, optimizing road resources, and mitigating traffic congestion, among other aspects. Aiming at the issue of limited prediction accuracy due to insufficient extraction of temporal periodic features in traffic flow forecast, this paper proposes a traffic flow forecast method based on Multi-scale Spatial and Temporal Features and Soft Attention mechanism (MSTFSA). Firstly, the Graph Talking Head Attention Network (GTHAT) is used to extract the non-Euclidean structural features of spatial data, and the dynamic weights are calculated to represent the influence of traffic flow on adjacent roads at different times. Secondly, the Bidirectional Enhance Attention Gated Recurrent Unit (Bi-EAGRU) is utilized to capture the continuity correlation features of temporal data, enhancing the temporal features of each moment and the continuity between adjacent moments. Then, the similar traffic flow trends at three scales of weekly periodicity, daily periodicity and nearest-neighbor time are fused based on soft attention to implement the comprehensive extraction of temporal periodic features. Finally, the prediction accuracy of MSTFSA is verified by the highway datasets of both PeMS04 and PeMS08. Experimental results demonstrate that MSTFSA has exhibited the distinct advantage in the prediction accuracy of traffic flow. Compared with the baseline methods of STSGCN (Spatial-temporal Synchronous Graph Convolutional Networks) and ASTGCN (Attention-based Spatial-temporal Graph Convolutional Networks), MSTFSA not only can reduce the Root Mean Square Error (RMSE) by 7.15% and 3.8%, but also can decrease the Mean Absolute Error (MAE) by 7.79% and 3.99%, respectively. In summary, MSTFSA can efficiently extract and merge the multi-temporal and spatial attributes of traffic data, and perform the considerable advantage in improving the prediction accuracy of traffic flow.