Abstract:With the advance of urbanization and development of big data, urban traffic forecast has become an essential issue for the Smart City. Many existing traffic prediction models do not fulfill the real-time performance goal in terms of efficiency and accuracy due to the limitation of hardware and software. A highly efficient real-time traffic prediction method using the Spark distributed in-memory computing framework was proposed in this paper. In this method, we estimate the average speed of vehicles on each road segment, and vertical windowed sampling on historical GPS data. Secondly, we use Spark to compute the probability distribution of average speed over each time window. Thirdly, we use Bayesian maximum-a-posteriori estimation to adjust the speed estimate of latest period of time. Experimental results demonstrate that the proposed method can be used for implementing efficient and accurate urban traffic prediction in real time. which reflects the real-time traffic condition. The method works in three steps. Firstly, we perform horizontal