Skip to main content
Log in

A parallel NAW-DBLSTM algorithm on Spark for traffic flow forecasting

  • Original Article
  • Published:
Neural Computing and Applications Aims and scope Submit manuscript

Abstract

Traffic flow forecasting (TFF) is critical for constructing intelligent transportation systems and offering real-time traffic applications, and especially accurate flow forecasting based on traffic big data can drive reliable strategies for traffic management and control. To consider the weight of the influence of the spatial correlation among the road segments and capture the nonlinear characteristics of traffic flow, this paper presents a parallel Normal Distribution and Attention Mechanism Weighted Deep Bidirectional Long Short-Term Memory (NAW-DBLSTM) algorithm on Spark. Specifically, we employ the resilient distributed data set (RDD) to preprocess large-scale mobile trajectory data (e.g., taxi GPS trajectory data), and then Kalman Filter (KF) is utilized to smooth the taxi trajectory big data. Next, the parallel NAW-DBLSTM algorithm is put forward on a Spark distributed computing platform to enhance the accuracy and scalability of TFF, combined with the attention mechanism and the normal distribution, and then the time window is used for TFF. Finally, the traffic flow is forecasted successfully on Spark by our NAW-DBLSTM algorithm with the real-world GPS trajectories of taxicabs. The experimental results demonstrate that, compared with LSTM, BiLSTM, DBLSTM, DNN, SVR, KNN, SAEs, BP, CNN, GRU, and ANNs, NAW-DBLSTM can produce better performance with the MAPE value that is 85.1%, 80.1%, 85.8%, 73.1%, 78.2%, 77.9%, 78.8%, 84.6%, 96.4%, 86.2%, and 73.2% lower than that of comparable algorithms, respectively. Particularly, the MAPE value of NAW-DBLSTM is 28.3%, 20.1%, 71.1%, and 79.1% lower than that of LSTM weighted with the normal distribution and the attention mechanism (NAW-LSTM), BiLSTM weighted with the normal distribution and the attention mechanism (NAW-BiLSTM), DBLSTM weighted with the normal distribution (NW-DBLSTM), and NAW-DBLSTM weighted without the time window (NT-NAW-DBLSTM), respectively.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16

Similar content being viewed by others

Notes

  1. http://www.datatang.com.

References

  1. Tang J, Chen X, Hu Z, Zong F, Han C, Li L (2019) Traffic flow prediction based on combination of support vector machine and data denoising schemes. Physica A: Stat Mech Appl. 534:120642

  2. Xia D, Zhang M, Yan X, Bai Y, Zheng Y, Li Y, Li H (2021) A distributed WND-LSTM model on MapReduce for short-term traffic flow prediction. Neural Comput Appl 33:2393–2410

    Article  Google Scholar 

  3. Zhao L, Song Y, Zhang C, Liu Y, Wang P, Lin T, Deng M, Li H (2019) T-GCN: a temporal graph convolutional network for traffic prediction. IEEE Trans Intell Transport Syst 21:3848–3858

    Article  Google Scholar 

  4. Xia D, Wang B, Li H, Li Y, Zhang Z (2016) A distributed spatial-temporal weighted model on MapReduce for short-term traffic flow forecasting. Neurocomputing 179:246–263

    Article  Google Scholar 

  5. AlKheder S, Alkhamees W, Almutairi R, Alkhedher M (2021) Bayesian combined neural network for traffic volume short-term forecasting at adjacent intersections. Neural Comput Appl 33:1785–1836

    Article  Google Scholar 

  6. Xu H, Jiang C (2020) Deep belief network-based support vector regression method for traffic flow forecasting. Neural Comput Appl 32:2027–2036

    Article  Google Scholar 

  7. Voort MVD, Dougherty M, Watson S (1996) Combining kohonen maps with ARIMA time series models to forecast traffic flow. Transp Res Part C Emerg Technol 4:307–318

    Article  Google Scholar 

  8. Williams BM, Hoel LA (2003) Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and empirical results. J Transp Eng 129:664–672

    Article  Google Scholar 

  9. Emami A, Sarvi M, Bagloee SA (2020) Short-term traffic flow prediction based on faded memory Kalman Filter fusing data from connected vehicles and Bluetooth sensors. Simul Modell Pract Theory 102:102025

  10. Ryu U, Wang J, Kim T, Kwak S, Juhyok U (2018) Construction of traffic state vector using mutual information for short-term traffic flow prediction. Transp Res Part C Emerg Technol 96:55–71

    Article  Google Scholar 

  11. Moretti F, Pizzuti S, Panzieri S, Annunziato M (2015) Urban traffic flow forecasting through statistical and neural network bagging ensemble hybrid modeling. Neurocomputing 167:3–7

    Article  Google Scholar 

  12. Cai P, Wang Y, Lu G, Chen P, Ding C, Sun J (2016) A spatiotemporal correlative k-nearest neighbor model for short-term traffic multistep forecasting. Transp Res Part C Emerg Technol 62:21–34

    Article  Google Scholar 

  13. Cheng A, Jiang X, Li Y, Zhang C, Zhu H (2017) Multiple sources and multiple measures based traffic flow prediction using the chaos theory and support vector regression method. Physica A: Stat Mech Appl 466:422–434

    Article  Google Scholar 

  14. Yin X, Wu G, Wei J, Shen Y, Qi H, Yin B (2021) Multi-stage attention spatial-temporal graph networks for traffic prediction. Neurocomputing 428:42–53

    Article  Google Scholar 

  15. Lv Y, Duan Y, Kang W, Li Z, Wang F (2014) Traffic flow prediction with big data: A deep learning approach. IEEE Trans Intell Transp Syst 16:865–873

    Google Scholar 

  16. Qu L, Li W, Li W, Ma D, Wang Y (2019) Daily long-term traffic flow forecasting based on a deep neural network. Expert Syst Appl 121:304–312

    Article  Google Scholar 

  17. Xu W, Peng H, Zeng X, Zhou F, Tian X, Peng X (2019) Deep belief network-based AR model for nonlinear time series forecasting. Appl Comput 77:605–621

    Google Scholar 

  18. Zhao Z, Chen W, Wu X, Chen PC, Liu J (2017) LSTM network: a deep learning approach for short-term traffic forecast. IET Intell Transp Syst 11:68–75

    Article  Google Scholar 

  19. Li T, Ni A, Zhang C, Xiao G, Gao L (2021) Short-term traffic congestion prediction with Conv-BiLSTM considering spatio-temporal features. IET Intell Transp Syst 14:1978–1986

    Article  Google Scholar 

  20. Wang J, Hu F, Li L. Deep bi-directional long short-term memory model for short-term traffic flow prediction, in: International Conference on Neural Information Processing, Springer, pp. 306–316

  21. Sreelakshmi K, Rafeeque P, Sreetha S, Gayathri E (2018) Deep bi-directional LSTM network for query intent detection. Procedia Comput Sci 143:939–946

    Article  Google Scholar 

  22. Zhou Y, Huang C, Hu Q, Zhu J, Tang Y (2018) Personalized learning full-path recommendation model based on LSTM neural networks. Inf Sci 444:135–152

    Article  Google Scholar 

  23. Liu G, Guo J (2019) Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 337:325–338

    Article  Google Scholar 

  24. Chen Y, Zou X, Li K, Li K, Yang X, Chen C (2021) Multiple local 3D CNNs for region-based prediction in smart cities. Inf Sci 542:476–491

    Article  Google Scholar 

  25. Cheng S, Lu F, Peng P, Wu S (2019) Multi-task and multi-view learning based on particle swarm optimization for short-term traffic forecasting. Knowl Based Syst 180:116–132

    Article  Google Scholar 

  26. Smith BL, Williams BM, Oswald RK (2002) Comparison of parametric and nonparametric models for traffic flow forecasting. Transp Res Part C Emerg Technol 10:303–321

    Article  Google Scholar 

  27. Guo J, Huang W, Williams BM (2014) Adaptive Kalman filter approach for stochastic short-term traffic flow rate prediction and uncertainty quantification. Transp Res Part C Emerg Technol 43:50–64

    Article  Google Scholar 

  28. Luo C, Huang C, Cao J, Lu J, Huang W, Guo J, Wei Y (2019) Short-term traffic flow prediction based on least square support vector machine with hybrid optimization algorithm. Neural Process Lett 50:2305–2322

    Article  Google Scholar 

  29. Zou W, Xia Y (2019) Back propagation bidirectional extreme learning machine for traffic flow time series prediction. Neural Comput Appl 31:7401–7414

    Article  Google Scholar 

  30. Sun B, Cheng W, Goswami P, Bai G (2018) Short-term traffic forecasting using self-adjusting k-nearest neighbours. IET Intell Transp Syst 12:41–48

    Article  Google Scholar 

  31. Chen W, An J, Li R, Fu L, Xie G, Bhuiyan MZA, Li K (2018) A novel fuzzy deep-learning approach to traffic flow prediction with uncertain spatial-temporal data features. Fut Gen Comput Syst 89:78–88

    Article  Google Scholar 

  32. Li L, Qin L, Qu X, Zhang J, Wang Y, Ran B (2019) Day-ahead traffic flow forecasting based on a deep belief network optimized by the multi-objective particle swarm algorithm. Knowl Based Syst 172:1–14

    Article  Google Scholar 

  33. Zhao L, Zhou Y, Lu H, Fujita H (2019) Parallel computing method of deep belief networks and its application to traffic flow prediction. Knowl Based Syst 163:972–987

    Article  Google Scholar 

  34. Zhou T, Han G, Xu X, Han C, Huang Y, Qin J (2019) A learning-based multimodel integrated framework for dynamic traffic flow forecasting. Neural Proc Lett 49:407–430

    Article  Google Scholar 

  35. Han L, Huang Y (2020) Short-term traffic flow prediction of road network based on deep learning. IET Intell Transp Syst 14:495–503

    Article  Google Scholar 

  36. Doğan E (2021) LSTM training set analysis and clustering model development for short-term traffic flow prediction, Neural Comput Appl. 1–14

  37. Tian Y, Zhang K, Li J, Lin X, Yang B (2018) LSTM-based traffic flow prediction with missing data. Neurocomputing 318:297–305

    Article  Google Scholar 

  38. Yang B, Sun S, Li J, Lin X, Tian Y (2019) Traffic flow prediction using LSTM with feature enhancement. Neurocomputing 332:320–327

    Article  Google Scholar 

  39. Ding H, Chen K, Huo Q (2019) Compressing CNN-DBLSTM models for OCR with teacher-student learning and Tucker decomposition. Pattern Recog. 96:106957

  40. Maalej R, Kherallah M (2020) Improving the DBLSTM for on-line Arabic handwriting recognition. Multim Tools Appl 79:17969–17990

    Article  Google Scholar 

  41. Yadav S, Ekbal A, Saha S, Kumar A, Bhattacharyya P (2019) Feature assisted stacked attentive shortest dependency path based Bi-LSTM model for protein-protein interaction. Knowl Based Syst 166:18–29

    Article  Google Scholar 

  42. Cui Z, Ke R, Pu Z, Wang Y (2020) Stacked bidirectional and unidirectional LSTM recurrent neural network for forecasting network-wide traffic state with missing values. Transp Res Part C Emerg Technol. 118:102674

  43. Wang J, Xu X, Wang F, Chen C, Ren K. A deep prediction architecture for traffic flow with precipitation information, in: International Conference on Swarm Intelligence, Springer, pp. 329–338

  44. Bogaerts T, Masegosa AD, Angarita-Zapata JS, Onieva E, Hellinckx P (2020) A graph CNN-LSTM neural network for short and long-term traffic forecasting based on trajectory data. Transp Res Part C Emerg Technol 112:62–77

    Article  Google Scholar 

  45. Zheng L, Yang J, Chen L, Sun D, Liu W (2020) Dynamic spatial-temporal feature optimization with ERI big data for short-term traffic flow prediction. Neurocomputing 412:339–350

    Article  Google Scholar 

  46. Do LN, Vu HL, Vo BQ, Liu Z, Phung D (2019) An effective spatial-temporal attention based neural network for traffic flow prediction. Transp Res Part C Emerg Technol 108:12–28

    Article  Google Scholar 

  47. de Medrano R, Aznarte JL (2020) A spatio-temporal attention-based spot-forecasting framework for urban traffic prediction. Appl Soft Comput. 96:106615

  48. Wu Y, Tan H, Qin L, Ran B, Jiang Z (2018) A hybrid deep learning based traffic flow prediction method and its understanding. Transp Res Part C Emerg Technol 90:166–180

    Article  Google Scholar 

  49. Lu H, Ge Z, Song Y, Jiang D, Zhou T, Qin J (2020) A temporal-aware LSTM enhanced by loss-switch mechanism for traffic flow forecasting. Neurocomputing 427:169–178

    Article  Google Scholar 

Download references

Acknowledgements

This work described in this paper was supported in part by the National Natural Science Foundation of China (Grant nos. 61762020, 61773321, 62162012, 62173278,  and 62072061), the Science and Technology Talents Fund for Excellent Young of Guizhou, China (Grant no. QKHPTRC20195669), the Science and Technology Support Program of Guizhou, China (Grant no. QKHZC2021YB531). The authors would like to thank Datatang (Beijing) Technology Co., Ltd. for providing the experimental data.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Huaqing Li.

Ethics declarations

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Xia, D., Yang, N., Jiang, S. et al. A parallel NAW-DBLSTM algorithm on Spark for traffic flow forecasting. Neural Comput & Applic 34, 1557–1575 (2022). https://doi.org/10.1007/s00521-021-06409-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00521-021-06409-5

Keywords

Navigation