Research Article

Urban Traffic Flow Prediction Algorithm Based on Attention Mechanism and LSTM

Penghao Zeng*
Central South University, Changsha, China

* Corresponding author: [email protected]

Abstract

Traffic flow prediction is one of the important techniques for urban intelligent transport construction. Due to the instability and complexity of the actual traffic flow changes in urban road networks, existing prediction models are difficult to extract the flow characteristics of traffic sections that are geographically on different grids at different times with limited training. Regarding this kind of problem, this paper proposes a prediction method based on transformer attention mechanism and multilayer LSTM model, firstly, the temporal characteristics of data are processed by four-layer LSTM network, then the attention mechanism of multiple heads is used to make predictions on spatial location characteristics, finally, the prediction results analysed by both of them are subjected to full-connectivity processing and constant adjustment of weights, and the extracted traffic flow characteristics with temporal and spatial characteristics are finally processed and outputted. spatial characteristics of the city is finally processed and the prediction results are output. After the related prediction experiments on the grid flow data and the related evaluation indexes of the comparative model experiments, the prediction effect of this model is better than the traditional prediction method, and it can make effective long- and short-term flow prediction of the traffic flow of the urban roads.

Keywords: urban traffic flow prediction; attentional mechanism; multilayer LSTM model; temporal and spatial properties
Published: January 15, 2025
DOI: 10.54254/2753-8818/2025.19939
Volume: TNS Vol.83
pp. 97-109
Download PDF

References

  1. Shen Leixiao, Lu Yuhang, Guo Jianhua, Kalman filter short-time traffic flow prediction on common national and provincial highways Adaptability study 10. 3963/j. jssn. 1674-4861. 2021. 05. 015
  2. Wang J. Deng W. Zhao J. B. Short-time traffic flow prediction based on improved Bayesian combinatorial model 1001 - 0505( 2012) 01-0162-06
  3. P. Xu P. Jiang F. R. Short-duration traffic flow prediction based on ant colony optimisation support vector machine 10.3969 /j.issn.1000-386x.2013.03.066
  4. Li Xiaobin Traffic flow prediction based on genetic algorithm optimised support vector machine 000-7180 (2010) 10-0186-03
  5. Liu Qidong Research on traffic flow prediction based on spatio-temporal multi-scale convolutional network 2021
  6. WANG Yusen, JING Zhiyong, WEI Lin, GAO Yufei, SHI Lei, WANG Qingxian, TAO Yongcai, WANG Xiangjie. A method to solve the traffic flow prediction problem using ConvGRU[J/OL]. Small Microcomputer Systems. https://link.cnki.net/urlid/21.1106.TP.20230915.1043.004
  7. Kai Li, Shaowei Huang Short-term traffic flow prediction based on stacked LSTM neural network 1009-8445(2022)05-0079-06
  8. Duan ZX, Du WX. Research on Tunnel Traffic Flow Prediction and Lighting Regulation Based on GWO-LSTM Model[J]. Modern Tunnelling Technology, 2024, 61(3): 157-165. DUAN Zhongxin, DU Wanxin. Study on Tunnel Traffic Flow Prediction and Lighting Regulation Based on GWO-LSTM Model[J]. Modern Tunnelling Technology, 2024, 61(3): 157-165
  9. G. Li, W. Song, Z. Chen Ship traffic flow prediction algorithm based on attention mechanism and ConvLSTM 10.118967/jsjksx.230800067 2023