Journal of Computer Applications ›› 2019, Vol. 39 ›› Issue (2): 429-435.DOI: 10.11772/j.issn.1001-9081.2018081800

Previous Articles     Next Articles

Bus arrival time prediction system based on Spark and particle filter algorithm

LIU Jing, XIAO Guanfeng   

  1. College of Computer Science, Inner Mongolia University, Hohhot Nei Mongol 010021, China
  • Received:2018-08-17 Revised:2018-09-03 Online:2019-02-10 Published:2019-02-15
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61662051).

基于Spark与粒子滤波算法的公交到站时间预测系统

刘靖, 肖冠烽   

  1. 内蒙古大学 计算机学院, 内蒙古 呼和浩特 010021
  • 通讯作者: 刘靖
  • 作者简介:刘靖(1981-),男,内蒙古呼和浩特人,副教授,博士,CCF高级会员,主要研究方向:大数据分析、软件容错;肖冠烽(1993-),男,内蒙古集宁人,硕士研究生,主要研究方向:大数据分析。
  • 基金资助:
    国家自然科学基金资助项目(61662051)。

Abstract: To improve the accuracy of bus arrival time prediction, a Particle Filter (PF) algorithm with stream computing characteristic was used to establish a bus arrival time prediction model. In order to solve the problems of prediction error and particle optimization in the process of using PF algorithm, the prediction model was improved by introducing the latest bus speed and constructing observations, making it predict bus arrival time closer to the actual road conditions and simultaneously predict the arrival times of multiple buses. Based on the above model and Spark platform, a real-time bus arrival time prediction software system was implemented. Compared with actual results, for the off-peak period, the maximum absolute error was 207 s, and the mean absolute error was 71.67 s; for the peak period, the maximum absolute error was 270 s, and the mean absolute error was 87.61 s. The mean absolute error of the predicted results was within 2 min which was a recognized ideal result. The experimental results show that the proposed model and implementated system can accurately predict bus arrival time and meet passengers' actual demand.

Key words: bus arrival time prediction, Particle Filter (PF) algorithm, stream computing, Spark

摘要: 针对公交车到站时间预测准确性不高的问题,选用具有流式计算特点的粒子滤波(PF)算法,建立了一个公交到站时间预测模型。为更好地解决使用PF算法过程中存在的预测误差及粒子优化选择问题,通过引入上一趟公交车的行驶速度和构造观测值的方法对预测模型进行改进,使之具有更贴近实际路况的公交到站时间预测精度,并且能同时预测多个公交到达时间。基于该模型和Spark平台实现了一套公交到站时间实时预测软件系统,所有到站时间预测结果与实际相比,平峰的最大绝对误差为207 s,平均绝对误差为71.67 s;高峰的最大绝对误差为270 s,平均绝对误差为87.61 s,而预测结果的平均绝对误差在2 min以内是公认的理想结果。实验结果表明,所提模型及实现系统能准确预测公交到站时间,满足乘客实际需求。

关键词: 公交到站时间预测, 粒子滤波算法, 流计算, Spark

CLC Number: