《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (10): 3171-3179.DOI: 10.11772/j.issn.1001-9081.2025091098

• 数据科学与技术 • 上一篇    

融合时空感知与自监督转换器的交通流预测模型

魏金香, 王雷春(), 卢祥凤, 宋芮芮, 何运平, 刘小萌   

  1. 湖北大学 计算机学院,武汉 430062
  • 收稿日期:2025-09-22 修回日期:2025-12-18 接受日期:2025-12-19 发布日期:2026-03-13 出版日期:2026-10-10
  • 通讯作者: 王雷春
  • 作者简介:魏金香(2000—),女,安徽阜阳人,硕士研究生,CCF会员,主要研究方向:智能交通
    卢祥凤(2000—),女,山东临沂人,硕士研究生,主要研究方向:多模态分类检测
    宋芮芮(1999—),女,山东枣庄人,硕士研究生,主要研究方向:时间序列预测、深度学习
    何运平(2000—),男,湖北荆州人,硕士研究生,主要研究方向:多模态情感分析、深度学习
    刘小萌(2001—),女,山东枣庄人,硕士研究生,主要研究方向:多模态。
  • 基金资助:
    国家自然科学基金资助项目(62407013)

Traffic flow prediction model with spatial-temporal awareness and self-supervised Transformer

Jinxiang WEI, Leichun WANG(), Xiangfeng LU, Ruirui SONG, Yunping HE, Xiaomeng LIU   

  1. School of Computer Science,Hubei University,Wuhan Hubei 430062,China
  • Received:2025-09-22 Revised:2025-12-18 Accepted:2025-12-19 Online:2026-03-13 Published:2026-10-10
  • Contact: Leichun WANG
  • About author:WEI Jinxiang, born in 2000, M. S. candidate. Her research interests include intelligent transportation.
    LU Xiangfeng, born in 2000, M. S. candidate. Her research interests include multimodal classification and detection.
    SONG Ruirui, born in 1999, M. S. candidate. Her research interests include time series prediction, deep learning.
    HE Yunping, born in 2000, M. S. candidate. His research interests include multimodal sentiment analysis, deep learning.
    LIU Xiaomeng, born in 2001, M. S. candidate. Her research interests include multimodal.
  • Supported by:
    National Natural Science Foundation of China(62407013)

摘要:

针对现有的交通流预测方法无法学习到路网拓扑的动态性模式和局部细粒度特征的问题,提出融合时空感知与自监督转换器(STA-Autoformer)的交通流预测模型,该模型通过融合自注意力机制与自监督学习策略,提升时空交通流预测的准确性。首先,结合时间自注意力和空间自注意力机制,克服现有模型无法捕获远距离的空间和时间相似性关系的局限性;其次,设计动态拓扑感知模块,以应对突发情况的局部影响;最后,设计多尺度时序感知模块,分别用时序增强和扩散机制从周期性和局域特征提取时序特征。实验结果表明,与表现最佳的基线模型ST-SSL(Spatio-Temporal Self-Supervised Learning)相比:STA-Autoformer在NYCBike1和NYCBike2数据集上流入预测任务中的平均绝对误差(MAE)分别降低了3.0%和1.8%,平均绝对百分比误差(MAPE)分别降低了5.8%和1.4%;在NYCTaxi数据集上,STA-Autoformer的流入和流出预测的MAE分别降低了1.4%和1.3%。可见,STA-Autoformer在多个真实交通数据集上均取得显著性能提升。

关键词: 交通流预测, 智能交通, 时空预测, 扩散机制, 自注意力机制

Abstract:

To address the limitations of the existing traffic flow prediction methods in capturing dynamic patterns of road network topology and local fine-grained features, a traffic flow prediction model with Spatial-Temporal Awareness and self-supervised Transformer (STA-Autoformer) was proposed. In the model, by integrating self-attention mechanisms with self-supervised learning strategies, the accuracy of spatial-temporal traffic flow prediction was improved. First, spatial and temporal self-attention mechanisms were integrated to overcome the limitation of the existing methods in capturing long-range spatial-temporal dependencies. Second, a dynamic topology awareness module was designed to address the local impact of emergencies. Finally, a multi-scale temporal awareness module was constructed, in which temporal enhancement and diffusion mechanisms were used to extract temporal features from periodic and local features, respectively. Experimental results demonstrate that compared to the best-performing baseline model ST-SSL (Spatio-Temporal Self-Supervised Learning), STA-Autoformer reduces the Mean Absolute Error (MAE) in inflow prediction by 3.0% and 1.8%, respectively, while lowering the Mean Absolute Percentage Error (MAPE) by 5.8% and 1.4%, respectively, on the NYCBike1 and NYCBike2 datasets; on the NYCTaxi dataset, STA-Autoformer reduces the MAE in inflow and outflow predictions by 1.4% and 1.3%, respectively. It can be seen that STA-Autoformer achieves significant performance improvements across multiple real-world traffic datasets.

Key words: traffic flow prediction, intelligent transportation, spatial-temporal prediction, diffusion mechanism, self-attention mechanism

中图分类号: