Short-term traffic flow velocity prediction model based on multi-channel data fusion of meteorological and traffic
-
摘要: 为提升气象-交通多因素影响下短时交通流预测精度,综合考虑气温、湿度和交通拥堵指数等气象-交通特征数据的融合集成,提出了一种基于格拉姆角场-卷积神经网络-长短期记忆(GAF-CNN-LSTM)的短时交通流速度预测模型;利用格拉姆角场将气温、湿度、历史交通流速度的时间序列数据转换为图像数据,利用RGB多通道颜色编码形成气象-交通特征图像,通过RGB多通道中颜色叠加变化反映气象-交通多因素特征数据融合;将转换形成的特征图像输入卷积神经网络提取气象-交通因素融合特征;通过长短期记忆神经网络提取气象-交通各因素的时序信息,构建短时交通流速度预测模型;选取西安市未央区的气温、湿度等气象数据和历史交通流速度数据,根据气温、湿度的变化趋势,设置湿度极小值与气温极小值、湿度极大值2个极值情景和气温、湿度非极值2个常规情景进行模型验证。分析结果表明:GAF-CNN-LSTM模型能够考虑气象-交通多因素特征数据融合,与移动平均模型、自回归移动平均模型、先知模型、随机森林模型、长短期记忆神经网络模型相比,均方误差、均方根误差和平均绝对百分比误差分别平均降低0.044 6、0.142 4和12.1%,决定系数平均提升了31.05%,预测精度最高,研究结果可为城市交通治理提供更加精准的决策依据。Abstract: In order to improve the prediction accuracy of short-term traffic flow under the influence of meteorological and traffic factors, a short-time traffic flow velocity prediction model based on Gramian angular field-convolutional neural network-long short-term memory (GAF-CNN-LSTM) was proposed by considering the fusion of meteorological and traffic feature data such as temperature, humidity, and traffic congestion index. By utilizing the Gramian angular field, time series data of temperature, humidity, and historical traffic flow velocity were transformed into image data. RGB multi-channel color coding was employed to generate meteorological and traffic feature images, and the color superposition changes in the RGB muti-channel reflected the meteorological and traffic multi-factor feature data fusion. The transformed feature images were input into a convolutional neural network to extract fusion features of meteorological and traffic factors. An long short-term memory neural network was employed to capture the time series information of meteorological and traffic factors, thereby a short-term traffic flow velocity prediction model was constructed. Meteorological data, including temperature, humidity, and historical traffic flow velocity data from the Weiyang District in Xi'an were selected. According to the changing trend of temperature and humidity, two extreme scenarios of minimum humidity and minimum temperature with maximum humidity, and two conventional scenarios of non-extreme temperature and humidity were set to verify the model. Analysis results indicate that the GAF-CNN-LSTM model can consider the fusion of meteorological and traffic multi-factor feature data. Compared with moving average model, autoregressive integrated moving average model, prophet model, random forest model, and LSTM neural network model, the mean square error, root mean square error, and mean absolute percentage error of GAF-CNN-LSTM model reduce by 0.044 6, 0.142 4, and 12.1%, respectively, while the determination coefficient shows an average improvement of 31.05%. The GAF-CNN-LSTM model exhibits the highest prediction accuracy, and the results can provide a more accurate decision-making basis for urban transportation governance.
-
表 1 气象-交通数据
Table 1. Weather and traffic data
气象数据 交通数据 观测站点 观测时间 气压/kPa 气温/℃ 风向/(°) 风速/(m·s-1) 降水量/mm 相对湿度/% 道路编号 交通流速度/(km·h-1) 拥堵指数 名称 经度/(°) 纬度(°) V8858 2022年9月6日9:00 969.8 24.2 13 21 0 52 12040 35.4 2.8 元鼎路 108.955 573 34.368 201 V8867 2022年9月6日9:00 967.5 22.8 334 12 0 47 13128 30.3 4.0 灞河东路 109.015 322 34.360 245 V8870 2022年9月6日9:00 968.8 22.9 303 18 0 53 7232 30.6 3.2 沈家桥二路 108.892 123 34.178 467 V8872 2022年9月6日9:00 970.1 22.7 247 7 0 56 915 30.7 3.2 芙蓉西路 108.975 293 34.190 896 V8858 2022年9月6日10:00 970.3 25.7 9 24 0 48 1002559 27.7 2.8 龙首北路西 108.947 060 34.292 772 V8867 2022年9月6日10:00 968.0 24.4 7 8 0 44 12569 36.9 2.8 长安北路 108.946 862 34.233 398 V8870 2022年9月6日10:00 969.3 24.8 30 18 0 48 14638 39.3 2.8 灞河东路 109.029 651 34.430 734 V8872 2022年9月6日10:00 970.6 23.2 242 11 3 58 2559 27.7 2.8 龙首北路 108.922 319 34.292 681 V8858 2022年9月6日11:00 970.2 27.7 346 28 0 40 598 27.5 2.8 丰禾路 108.891 581 34.280 793 V8867 2022年9月6日11:00 968.0 28.4 243 13 0 27 13298 40.2 2.8 韩森东路 109.016 218 34.258 938 V8870 2022年9月6日11:00 969.2 27.7 74 9 0 39 10388 30.5 2.8 永庆路 108.976 221 34.322 078 V8872 2022年9月6日11:00 970.6 26.1 234 8 0 45 12179 23.0 3.2 凤城一路 108.923 108 34.313 757 表 2 气象、交通变量的Pearson相关性分析结果
Table 2. Pearson correlation analysis results of meteorological and traffic variables
变量 相关系数 1%水平上是否显著 变量 相关系数 1%水平上是否显著 气压 -0.061 否 风向 0.047 否 气温 0.415 是 风速 0.282 是 湿度 -0.354 是 交通流速度 -0.956 是 降水量 0.068 否 拥堵指数 1.000 表 3 卷积神经网络及长短期记忆神经网络结构及模型参数
Table 3. Structures and model parameters of CNN and LSTM neural network
神经网络 结构 参数 CNN 二维卷积 16(3×3) 二维最大池化 2×2 二维卷积 32(3×3) 展平 无 稠密模块 64 概率分布转换层 4 训练批次大小 32 损失 交叉熵 训练循环次数 30 优化器 均方根传递 LSTM LSTM结构 输入形状(4, 1) 稠密模块 1 神经元数量 400 损失 均方误差 训练循环次数 40 训练批次大小 90 优化器 矩估计梯度下降 表 4 模型验证所用情景设置
Table 4. Scenario configurations for model validation
情景 气温、湿度类型 平均气温/℃ 平均相对湿度/% 交通流平均速度/(km·h-1) S1 湿度极小值 25.40 55.71 23.37 S2 非极值 23.71 70.40 20.51 S3 非极值 24.63 61.24 21.04 S4 气温极小值、湿度极大值 18.09 93.45 18.84 表 5 不同短时交通流速度预测模型性能对比
Table 5. Comparison of performances of different short-term prediction models of traffic flow velocity
情景 模型 MSE RMSE MAPE/% R2 训练时间/s 预测时间/s S1 MA 0.062 0.249 19.5 0.38 0.000 ARIMA 0.012 0.111 9.6 0.90 0.759 0.003 Prophet 0.016 0.125 8.6 0.87 0.189 0.048 RF 0.051 0.226 15.3 0.49 0.355 0.003 LSTM 0.016 0.126 11.0 0.87 17.090 0.046 GAF-CNN-LSTM 0.001 0.036 2.7 0.98 27.542 0.118 S2 MA 0.127 0.357 24.4 0.21 0.000 ARIMA 0.029 0.169 14.9 0.82 0.694 0.002 Prophet 0.017 0.132 8.7 0.89 0.172 0.044 RF 0.009 0.098 4.7 0.94 0.351 0.002 LSTM 0.010 0.098 7.6 0.94 16.068 0.047 GAF-CNN-LSTM 0.005 0.073 3.7 0.97 30.894 0.115 S3 MA 0.099 0.314 24.0 0.27 0.000 ARIMA 0.046 0.213 17.7 0.66 0.613 0.003 Prophet 0.019 0.137 11.2 0.86 0.176 0.002 RF 0.001 0.039 22.7 0.99 0.360 0.042 LSTM 0.017 0.131 11.6 0.87 15.812 0.045 GAF-CNN-LSTM 0.001 0.026 1.9 0.99 28.394 0.102 S4 MA 0.191 0.437 33.5 0.00 0.000 ARIMA 0.086 0.292 20.4 0.39 0.509 0.003 Prophet 0.051 0.225 18.9 0.64 0.171 0.002 RF 0.027 0.163 9.7 0.81 0.358 0.046 LSTM 0.071 0.266 14.1 0.49 16.850 0.049 GAF-CNN-LSTM 0.006 0.077 4.8 0.96 28.409 0.111 表 6 不同数据规模下模型运行时间对比
Table 6. Comparison of running time of prediction models at different data scales
数据规模 模型 训练时间/s 预测时间/s 时间序列长度 特征维度 180 3 LSTM 9.157 0.044 GAF-CNN-LSTM 25.143 0.108 360 3 LSTM 11.981 0.046 GAF-CNN-LSTM 26.364 0.974 540 3 LSTM 12.823 0.049 GAF-CNN-LSTM 30.957 0.125 720 3 LSTM 15.266 0.049 GAF-CNN-LSTM 32.894 0.104 -
[1] STEPHANEDES Y J, MICHALOPOULOS P G, PLUM R A. Improved estimation of traffic flow for real time control[C]//TRB. 60th Annual Meeting of the Transportation Research Board. Washington DC: TRB, 1980: 28-39. [2] 姚俊峰, 何瑞, 史童童, 等. 基于机器学习的交通流预测方法综述[J]. 交通运输工程学报, 2023, 23(3): 44-67. doi: 10.19818/j.cnki.1671-1637.2023.03.003YAO Jun-feng, HE Rui, SHI Tong-tong, et al. Review on machine learning-based traffic flow prediction methods[J]. Journal of Traffic and Transportation Engineering, 2023, 23(3): 44-67. (in Chinese) doi: 10.19818/j.cnki.1671-1637.2023.03.003 [3] 张文佳, 王梅梅. 交通拥堵治理的空间与基础设施政策综述[J]. 人文地理, 2021, 36(2): 20-26.ZHANG Wen-jia, WANG Mei-mei. A survey of place-based and infrastructure-based policies for mitigating urban traffic congestion[J]. Human Geography, 2021, 36(2): 20-26. (in Chinese) [4] 张文娟, 杨皓哲, 张彬, 等. 考虑多时间尺度特征的城市轨道交通短时客流量预测模型[J]. 交通运输系统工程与信息, 2022, 22(6): 212-223.ZHANG Wen-juan, YANG Hao-zhe, ZHANG Bin, et al. Short-time passenger flow prediction model of urban rail transit considering multi-timescale features[J]. Journal of Transportation Systems Engineering and Information Technology, 2022, 22(6): 212-223. (in Chinese) [5] WU Yuan-kai, TAN Hua-chun, QIN Ling-qiao, et al. A hybrid deep learning based traffic flow prediction method and its understanding[J]. Transportation Research Part C: Emerging Technologies, 2018, 90: 166-180. doi: 10.1016/j.trc.2018.03.001 [6] 胡浩, 闫伟, 李泓明. 基于组合预测方法的城市道路短时交通流预测[J]. 工业工程与管理, 2019, 24(3): 107-115.HU Hao, YAN Wei, LI Hong-ming. Short-term traffic flow prediction of urban road based on combination forecasting method[J]. Industrial Engineering and Management, 2019, 24(3): 107-115. (in Chinese) [7] XIE Yuan-chang, ZHAO Kai-guang, SUN Ying, et al. Gaussian processes for short-term traffic volume forecasting[J]. Journal of the Transportation Research Board, 2010, 2165(1): 69-78. doi: 10.3141/2165-08 [8] LYU Yi-sheng, DUAN Yan-jie, KANG Wen-wen, et al. Traffic flow prediction with big data: a deep learning approach[J]. IEEE Transactions on Intelligent Transportation Systems, 2015, 16(2): 865-873. http://www.cs.uoregon.edu/classes/17S/cis607bddl/papers/LvEtal2015.pdf [9] SHAHRIARI S, GHASRI M, SISSON S A, et al. Ensemble of ARIMA: combining parametric and bootstrapping technique for traffic flow prediction[J]. Transportmetrica A: Transport Science, 2020, 16(3): 1552-1573. doi: 10.1080/23249935.2020.1764662 [10] 申雷霄, 陆宇航, 郭建华. 卡尔曼滤波短时交通流预测普通国省道适应性研究[J]. 交通信息与安全, 2021, 39(5): 117-127. doi: 10.3963/j.jssn.1674-4861.2021.05.015SHEN Lei-xiao, LU Yu-hang, GUO Jian-hua. Adaptability of Kalman filter for short-time traffic flow forecasting on national and provincial highways[J]. Journal of Transport Information and Safety, 2021, 39(5): 117-127. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2021.05.015 [11] MA Xiao-lei, DAI Zhuang, HE Zheng-bing, et al. Learning traffic as images: a deep convolutional neural network for large-scale transportation network speed prediction[J]. Sensors, 2017, 17(4): 818. doi: 10.3390/s17040818 [12] 孔繁辉, 李健. 深度信念网络优化BP神经网络的交通流预测模型[J]. 管理评论, 2020, 32(3): 300-306.KONG Fan-hui, LI Jian. Traffic flow prediction model based on deep belief network optimized BP neural network[J]. Management Review, 2020, 32(3): 300-306. (in Chinese) [13] 祁朵, 毛政元. 基于自适应时序剖分与KNN的短时交通流量预测[J]. 地球信息科学学报, 2022, 24(2): 339-351.QI Duo, MAO Zheng-yuan. Short-term traffic flow prediction based on adaptive time slice and KNN[J]. Journal of Geo-information Science, 2022, 24(2): 339-351. (in Chinese) [14] 王殿海, 黄莉莎, 曾佳棋, 等. 降雨对城市路网交通状态的影响机理[J]. 交通运输系统工程与信息, 2023, 23(3): 48-55, 65.WANG Dian-hai, HUANG Li-sha, ZENG Jia-qi, et al. Influence mechanism of rainfall on traffic state of urban road network[J]. Journal of Transportation Systems Engineering and Information Technology, 2023, 23(3): 48-55, 65. (in Chinese) [15] ESSIEN A, PETROUNIAS I, SAMPAIO P, et al. The impact of rainfall and temperature on peak and off-peak urban traffic[C]//Springer. 29th International Conference on Database and Expert Systems Applications. Springer International Publishing. Berlin: Springer, 2018: 399-407. [16] XIONG M M, HAN Z Y, LU B, et al. Effects of rainfall on the weekday traffic flow in major cities of the Beijing-Tianjin-Hebei region, China, in 2021[J]. Advances in Climate Change Research, 2022, 13(6): 858-867. doi: 10.1016/j.accre.2022.11.009 [17] 戴厚兴, 吴兆麟. 能见度不良天气下海上交通安全风险预警系统[J]. 交通运输工程学报, 2018, 18(5): 195-206. doi: 10.3969/j.issn.1671-1637.2018.05.019DAI Hou-xing, WU Zhao-lin. Pre-warning system of maritime traffic safety risk in restricted visibility weather[J]. Journal of Traffic and Transportation Engineering, 2018, 18(5): 195-206. (in Chinese) doi: 10.3969/j.issn.1671-1637.2018.05.019 [18] ROMANO L, JOHANNESSON P, BRUZELIUS F, et al. An enhanced stochastic operating cycle description including weather and traffic models[J]. Transportation Research Part D: Transport and Environment, 2021, 97: 102878. doi: 10.1016/j.trd.2021.102878 [19] HOU Y, DENG Z Y, CUI H K. Short-term traffic flow prediction with weather conditions: based on deep learning algorithms and data fusion[J]. Complexity, 2021, 2021(1): 6662959. doi: 10.1155/2021/6662959 [20] LI Xin, YANG Yu, HU Niao-qing, et al. Maximum margin Riemannian manifold-based hyperdisk for fault diagnosis of roller bearing with multi-channel fusion covariance matrix[J]. Advanced Engineering Informatics, 2022, 51: 101513. doi: 10.1016/j.aei.2021.101513 [21] BOGAERTS T, MASEGOSA A D, ANGARITA-ZAPATA J S, et al. A graph CNN-LSTM neural network for short and long-term traffic forecasting based on trajectory data[J]. Transportation Research Part C: Emerging Technologies, 2020, 112: 62-77. doi: 10.1016/j.trc.2020.01.010 [22] LI L Z, OTA K, DONG M X. Everything is image: CNN-based short-term electrical load forecasting for smart grid[C]//IEEE. 14th International Symposium on Pervasive Systems, Algorithms and Networks. New York: IEEE, 2017: 344-351. [23] 张淑清, 杜灵韵, 王册浩, 等. 基于格拉姆角场与改进CNN-ResNet的风电功率预测方法[J]. 电网技术, 2023, 47(4): 1540-1548.ZHANG Shu-qing, DU Ling-yun, WANG Ce-hao, et al. Wind power forecasting method based on GAF and improved CNN-ResNet[J]. Power System Technology, 2023, 47(4): 1540-1548. (in Chinese) [24] ZHANG Li-feng, ZHANG Si-jia. Gas/liquid two-phase flow pattern identification method using gramian angular field and densely connected network[J]. IEEE Sensors Journal, 2023, 23(4): 4022-4032. doi: 10.1109/JSEN.2023.3235954 [25] 孙晓宇, 蔡祥. 基于多通道数据融合的无人机遥感影像地物目标提取方法[J]. 地理与地理信息科学, 2021, 37(6): 41-45.SUN Xiao-yu, CAI Xiang. Targets extraction method for UAV remote sensing images based on multi-channel data fusion[J]. Geography and Geo-information Science, 2021, 37(6): 41-45. (in Chinese) [26] LEE H, YANG K, KIM N, et al. Detecting excessive load-carrying tasks using a deep learning network with a Gramian Angular Field[J]. Automation in Construction, 2020, 120: 103390. http://www.sciencedirect.com/science/article/pii/S0926580520309705 [27] HE Xiang-yang, TAO Yu-bo, WANG Qi-rui, et al. Multivariate spatial data visualization: a survey[J]. Journal of Visualization, 2019, 22(5): 897-912. http://www.xueshufan.com/publication/2968954061 [28] ZAHEER S, ANJUM N, HUSSAIN S, et al. A multi parameter forecasting for stock time series data using LSTM and deep learning model[J]. Mathematics, 2023, 11 (3): 590. [29] MA Xiao-lei, TAO Zhi-min, WANG Yin-hai, et al. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data[J]. Transportation Research Part C: Emerging Technologies, 2015, 54: 187-197. http://www.onacademic.com/detail/journal_1000037610545510_6039.html [30] CUI Zhi-yong, KE Rui-min, PU Zi-yuan, et al. Stacked bidirectional and unidirectional LSTM recurrent neural network for forecasting network-wide traffic state with missing values[J]. Transportation Research Part C: Emerging Technologies, 2020, 118: 102674. -