Prediction of the Duration of Freeway Traffic Incidents Based on an ATT-LSTM Model
-
摘要: 为揭示交通事件对高速公路运行状态持续时间的影响规律,研究了高速公路交通事件持续时长预测方法。考虑高速公路交通事件时间序列特性,基于循环神经网络理论,从时间序列数据中提取交通事件时间依赖关系;通过引入长短时记忆网络,结合特征、时序注意力层挖掘历史时刻信息和当前时刻数据间的相关性,构建基于注意力机制-长短时记忆网络的高速公路交通事件持续时长预测模型。以2018年西安绕城高速公路交通监测数据集为例,开展了高速公路交通事件持续时长预测模型验证,对比了所提模型与反向传播神经网络、随机森林、支持向量机、长短时记忆网络模型这4种典型算法的预测精度,并分析了事件类型、天气条件、车辆类型、交通量等不同影响因素对持续时长的影响程度。结果表明:使用同一数据集,注意力机制-长短时记忆网络预测模型的预测结果平均绝对误差为24.43,平均绝对百分比误差为25.24%,均方根误差为21.17,预测精度优于其他4种预测方法。在模型的各影响因素权重中,事件类型所占权重最大为0.375,其次分别为车道数、车辆类型、天气等;采用立交出入口小时交通量作为修正参数,可以进一步提升预测精度,预测结果的绝对误差、平均绝对百分比误差和均方根误差可分别降低21.3%、7.5%和16.9%。研究结果能进一步提高高速公路交通事件持续时长预测的精度,为公路安全高效运行提供技术支持。Abstract: In order to study the impacts of traffic incidents on freeway operation, a method for predicting the duration of freeway traffic incidents is studied. Time-dependent characteristics of traffic incidents on freeways are extracted from time series data based on the recurrent neural network (RNN) theory. The feature and the temporal attention layer of a long short-term memory (LSTM) network are combined to study the correlation between historical and current moment data. Based on attention (ATT) mechanism and the LSTM, a model for predicting the duration of traffic incidentson freeways is developed. Validation of the model is carried out based on traffic monitoring dataset collected in 2018 along the Xi'an Ring Freeway. The prediction accuracy of the proposed model is compared with the following models: back propagation neural network (BP), random forest (RF), support vector machine (SVM), and long short-term memory (LSTM). The impacts of different factors, including the types of events, weather conditions, types of vehicles, and traffic volume, on the duration is also analyzed. Study results indicate that under the condition of the same dataset, the mean absolute error (MAE), the mean absolute percentage error (MAPE), and the root mean square error (RMSE) of the ATT-LSTM model is 24.43, 25.24%, and 21.17, respectively, which is better than that of other models. The "type of events" has the maximum weight of 0.375 among all of factors considered within the model, followed by the "number of lanes" "vehicle type" and "weather". By using the hourly traffic volume at the entrances and exits of interchanges as the correction parameter, the prediction accuracy is improved, and the MAE, MAPE, and RMSE of the model is decreased by 21.3%, 7.5%, and 16.9%, respectively. This study improves the prediction accuracy of the duration of traffic incidents on freeways and provides technical support for their safe and efficient operation.
-
Key words:
- traffic safety /
- freeway /
- traffic incidents /
- duration /
- attention mechanism /
- long short-term memory network
-
表 1 交通事件主要特征及分类
Table 1. Main characteristics and classification of traffic events
特征 数据类型 种类 事件发生时间 连续变量 事件发生地点 连续变量 天气状况 分类变量 4 路面状况 分类变量 3 上下行 分类变量 2 涉及车辆类型 分类变量 3 涉及车辆数量 连续变量 影响范围 分类变量 2 影响车道数量 连续变量 是否位于主线 分类变量 2 事件类型 分类变量 5 表 2 原始数据
Table 2. Raw data
月份 日期 时间 桩号 桩号类型 上下行 天气 路面环境 事件描述 影响范围 影响车道 处理结束时间 1月 1日 08:10 57 A 下行 晴 A 1辆6轴半挂货车撞护栏 A 占用1条行车道 10:00 表 3 格式转换后数据
Table 3. Data after format conversion
发生时间 发生地点 涉及车辆 上下行 天气 事件类型 涉及车辆数 影响范围 影响车道 持续时长/min 小客车 大客车 货车 上行 下行 雨 雪 晴 阴 追尾 侧翻 碰撞 剐蹭 故障 主线 非主线 1514764800 -0.233 -0.972 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 110 表 4 不同模型预测精度评价指标值
Table 4. Prediction accuracy evaluation index value of different models
模型 MAE MAPE/% RMSE ATT-LSTM 24.43 25.24 21.17 GA-BP 26.09 37.98 43.41 RF 36.34 29.60 34.72 SVM 30.29 35.47 36.37 LSTM 27.03 30.15 29.86 表 5 预测模型误差指标对比
Table 5. Comparison of prediction model error indicators
模型 MAE MAPE/% RMSE 未优化模型 24.43 25.24 21.17 优化后模型 19.27 23.35 17.59 -
[1] 姬杨蓓蓓, 张小宁, 孙立军. 交通事件持续时间预测方法综述[J]. 公路工程, 2008, 33(3): 72-79. doi: 10.3969/j.issn.1674-0610.2008.03.017JIYANG B B, ZHANG X N, SUN L J. A review of the traffic incident duration prediction methods[J]. Highway Engineering, 2008, 33(3): 72-79. (in Chinese) doi: 10.3969/j.issn.1674-0610.2008.03.017 [2] 许宏科, 赵威, 杨孟, 等. 基于改进BPNN的高速公路交通事故持续时间预测[J]. 华东交通大学学报, 2020, 37(5): 60-65. https://www.cnki.com.cn/Article/CJFDTOTAL-HDJT202005009.htmXU H K, ZHAO W, YANG M, et al. Prediction of expressway traffic accident duration based on the improved BPNN[J]. Journal of East China Jiaotong University, 2020, 37 (5): 60-65. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-HDJT202005009.htm [3] LI R M, PEREIRA F C, BEN-AKIVA M E. Overview of traffic incident duration analysis and prediction[J]. European Transport Research Review, 2018, 10(2): 22-28. doi: 10.1186/s12544-018-0300-1 [4] 姬杨蓓蓓. 交通事件持续时间预测方法研究[D]. 上海: 同济大学, 2008.JIYANG B B. Research on prediction method of traffic incident duration[D]. Shanghai: Tongji University, 2008. (in Chinese) [5] 王文博, 陈红, 韦凌翔. 交通事故时间序列预测模型研究[J]. 中国安全科学学报, 2016, 26(6): 52-56. https://www.cnki.com.cn/Article/CJFDTOTAL-ZAQK201606010.htmWANG W B, CHEN H, WEI L X. Research on traffic accident time series prediction model[J]. China Safety Science Journal, 2016, 26(6): 52-56. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZAQK201606010.htm [6] 夏正丰. 高速公路交通事故持续时间概率预测模型[J]. 公路与汽运, 2016(3): 52-55. doi: 10.3969/j.issn.1671-2668.2016.03.014XIA Z F. Probability prediction model of highway traffic accident duration[J]. Highways and Automotive Applications, 2016(3): 52-55. (in Chinese) doi: 10.3969/j.issn.1671-2668.2016.03.014 [7] 蓝岚, 路峰, 王军. 城市交通事故现场处理时间及影响因素分析[J]. 安全与环境学报, 2021, 21(3): 1173-1181. https://www.cnki.com.cn/Article/CJFDTOTAL-AQHJ202103037.htmLAN L, LU F, WANG J. Analysis of the on-site processing time and the influential factors of the urban traffic accidents[J]. Journal of Safety and Environment, 2021, 21(3): 1173-1181. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-AQHJ202103037.htm [8] LIN L, WANG Q, SADEK A W. A combined M5P tree and hazard-based duration model for predicting urban freeway traffic accident durations[J]. Accident Analysis & Prevention, 2016, 91(6): 114-126. [9] GHOSB B, ASIF M T, DAUWELS J, et al. Dynamic prediction of the incident duration using adaptive feature set[J]. IEEE Transactions on Intelligent Transportation Systems, 2020, 20(11): 4019-4031. [10] GUO J H, LIU Z, HUANG W, et al. Short-term traffic flow prediction using fuzzy information granulation approach under different time intervals[J]. IET Intelligent Transport Systems, 2018, 12(2): 143-150. doi: 10.1049/iet-its.2017.0144 [11] 熊励, 陆悦, 杨淑芬. 城市道路交通拥堵预测及持续时间研究[J]. 公路, 2017, 62(11): 125-134. https://www.cnki.com.cn/Article/CJFDTOTAL-GLGL201711026.htmXIONG L, LU Y, YANG S F. Study on prediction and duration of urban road traffic congestion[J]. Highway, 2017, 62 (11): 125-134. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-GLGL201711026.htm [12] 翁剑成, 付宇, 林鹏飞, 等. 基于梯度推进决策树的日维度交通指数预测模型[J]. 交通运输系统工程与信息, 2019, 19 (2): 80-85. https://www.cnki.com.cn/Article/CJFDTOTAL-YSXT201902012.htmWENG J C, FU Y, LIN P F, et al. GBDT method based on prediction model of daily dimension traffic index[J]. Journal of Transportation Systems Engineering and Information Technology, 2019, 19(2): 80-85. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-YSXT201902012.htm [13] CONG H Z, CHEN C, LIN P S, et al. Traffic incident duration estimation based on a dual-learning bayesian network model[J]. Transportation Research Record Journal of the Transportation Research Board, 2018, 2672(45): 196-209 [14] 何珂, 杨顺新, 郜勇刚. 基于PCA-RF组合模型的隧道交通事故持续时间预测[J]. 交通信息与安全, 2019, 37(5): 26-32. doi: 10.3963/j.issn.1674-4861.2019.05.004HE K, YANG S X, GAO Y G. Prediction of traffic accident duration based in tunnels based on a pcarf combined model[J]. Journal of Transport Information and Safety, 2019, 37 (5): 26-32. (in Chinese) doi: 10.3963/j.issn.1674-4861.2019.05.004 [15] 李志帅, 吕宜生, 熊刚. 基于图卷积神经网络和注意力机制的短时交通流量预测[J]. 交通工程, 2019, 19(4): 15-19+28. https://www.cnki.com.cn/Article/CJFDTOTAL-DLJA201904003.htmLI Z S, LYU Y S, XIONG G. Short-term traffic flow prediction based on graph convolution neural network and attention mechanism[J]. Journal of Transportation Engineering, 2019, 19(4): 15-19+28. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-DLJA201904003.htm [16] HAMAD K, AL-RUZOUG R, ZEIADAE W, et al. Predicting incident duration using random forests[J]. Transportmetrica A: Transport Science, 2020, 16(3): 1269-1293. [17] LI L C, SHENG X, DU B, et al. A deep fusion model based on restricted boltzmann machines for traffic accident duration prediction[J]. Engineering Applications of Artificial Intelligence, 2020(93): 103686. [18] 纪柯柯, 陈坚, 肖思瑶, 等. 文本数据驱动下的高速公路事故持续时间预测模型[J]. 交通信息与安全, 2020, 38(6): 9-16. doi: 10.3963/j.jssn.1674-4861.2020.06.002JI K K, CHEN J, XIAO S Y, et al. Prediction model of expressway accident duration driven by text data[J]. Journal of Transport Information and Safety, 2020, 38(6): 9-16. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2020.06.002 [19] ZOU Y J, LIN B, YANG X X, et al. Application of the bayesian model averaging in analyzing freeway traffic incident clearance time for emergency management[J]. Journal of Advanced Transportation, 2021, 2021(4): 1-9. [20] 王婧娟, 陈庆奎. 1种时空注意力网络的交通预测模型[J]. 小型微型计算机系统, 2021, 42(2): 303-307. https://www.cnki.com.cn/Article/CJFDTOTAL-XXWX202102017.htmWANG J J, CHEN Q K. A traffic prediction model of spatio-temporal attention network[J]. Journal of Chinese Mini-Micro Computer Systems, 2021, 42(2): 303-307. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-XXWX202102017.htm [21] 龚兰兰, 凌兴宏. 长短时记忆网络公交短时客流预测实验设计[J]. 现代电子技术, 2021, 44(22): 97-100. https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202122020.htmGONG L L, LING X H. Experimental design of short term passenger flow prediction of public transport based on long term and short term memory network[J]. Modern Electronic Technology, 2021, 44(22): 97-100. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-XDDJ202122020.htm [22] 王博文, 王景升, 王统一, 等. 基于长短时记忆网络的Encoder-Decoder多步交通流预测模型[J]. 重庆大学学报, 2021, 44(11): 71-80. https://www.cnki.com.cn/Article/CJFDTOTAL-FIVE202111009.htmWANG B W, WANG J S, WANG T Y, et al. Encoder-Decoder multi step traffic flow prediction model based on long short memory network[J]. Journal of Chongqing University, 2021, 44(11): 71-80. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-FIVE202111009.htm [23] ESSIEN A, PETROUNIAS I, SAMPAIO S, et al. A deep-learning model for urban traffic flow prediction with traffic events mined from twitter[J]. World Wide Web-Internet and Web Information Systems, 2021, 24(4): 1345-1368 [24] 廖挥若, 杨燕. 基于注意力的时空神经网络城市区域交通流量预测[J]. 计算机应用研究, 2021, 38(10): 2935-2940. https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ202110009.htmLIAO H R, YANG Y. Predicting citywide traffic flow using attention-based spatial-temporal neural network[J]. Application Research of Computers, 2021, 38(10): 2935-2940. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ202110009.htm [25] 徐琛辉, 马明辉. 基于拉依达准则的交通数据粗大误差处理优化方法[J]. 上海工程技术大学学报, 2018, 32(1): 64-67. https://www.cnki.com.cn/Article/CJFDTOTAL-SGCJ201801015.htmXU C H, MA M H. Optimization method for gross error processing of traffic data based on pauta criterion[J]. Journal of Shanghai University of Engineering Science, 2018, 32(1): 64-67. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-SGCJ201801015.htm