留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于双重时空掩码与双向Mamba状态空间的高速公路交通异常事件检测模型

张鼎开 王一喆 王鹏飞 彭晴 丁露

张鼎开, 王一喆, 王鹏飞, 彭晴, 丁露. 基于双重时空掩码与双向Mamba状态空间的高速公路交通异常事件检测模型[J]. 交通运输工程学报, 2025, 25(4): 311-327. doi: 10.19818/j.cnki.1671-1637.2025.04.022
引用本文: 张鼎开, 王一喆, 王鹏飞, 彭晴, 丁露. 基于双重时空掩码与双向Mamba状态空间的高速公路交通异常事件检测模型[J]. 交通运输工程学报, 2025, 25(4): 311-327. doi: 10.19818/j.cnki.1671-1637.2025.04.022
ZHANG Ding-kai, WANG Yi-zhe, WANG Peng-fei, PENG Qing, DING Lu. Expressway traffic anomaly event detection model based on dual spatio-temporal masks and bidirectional Mamba state space modeling[J]. Journal of Traffic and Transportation Engineering, 2025, 25(4): 311-327. doi: 10.19818/j.cnki.1671-1637.2025.04.022
Citation: ZHANG Ding-kai, WANG Yi-zhe, WANG Peng-fei, PENG Qing, DING Lu. Expressway traffic anomaly event detection model based on dual spatio-temporal masks and bidirectional Mamba state space modeling[J]. Journal of Traffic and Transportation Engineering, 2025, 25(4): 311-327. doi: 10.19818/j.cnki.1671-1637.2025.04.022

基于双重时空掩码与双向Mamba状态空间的高速公路交通异常事件检测模型

doi: 10.19818/j.cnki.1671-1637.2025.04.022
基金项目: 

国家自然科学基金项目 52472350

国家社会科学基金项目 19XMZ018

教育部人文社会科学研究项目 20YJAZH130

浙江省基础公益研究计划 LY23G020007

浙江省基础公益研究计划 LGF20F020004

浙江省教育厅一般科研项目 Y202147441

详细信息
    作者简介:

    张鼎开(1996-),女,辽宁锦州人,同济大学工学博士研究生,从事自监督学习、智能交通等研究

    通讯作者:

    王一喆(1993-),男,山东济南人,同济大学博士后,工学博士

  • 中图分类号: U491.14

Expressway traffic anomaly event detection model based on dual spatio-temporal masks and bidirectional Mamba state space modeling

Funds: 

National Natural Science Fundation of China 52472350

National Social Science Fundation of China 19XMZ018

Humanities and Social Sciences Research Project of Ministry of Education 20YJAZH130

Zhejiang Provincial Basic Public Welfare Research Program LY23G020007

Zhejiang Provincial Basic Public Welfare Research Program LGF20F020004

General Scientific Research Project of Education of Zhejiang Province Y202147441

More Information
Article Text (Baidu Translation)
  • 摘要: 为了有效处理交通异常事件检测中的挑战,提出了一种基于双重时空掩码与双向Mamba状态空间建模(DSTBM)的交通异常事件检测模型;引入了基于异常事件时空范围和影响范围的掩码,学习异常事件对交通流在时间和空间上的动态影响,自适应遮掩事件发生时段和区域及其影响范围,帮助模型关注流量异常特征;设计了双向Mamba状态空间模型,结合多尺度特征提取与双向状态空间建模,进一步扩展状态空间建模的方向性,捕捉异常事件的短时动态特性和多尺度时空依赖关系,同时缩短检测延迟;构建了结合孤立森林算法与K-means聚类的异常评分方法,根据流量时空特征计算异常得分,区分一般与异常流量状态;将所提出的模型在3个真实数据集上进行评估。研究结果表明:DSTBM模型在SCJ和OKA数据集上均超越了对比试验中的基线模型,其中评估模型准确性的指标精确率、召回率和F1分数分别至少提高了15.32%、14.98%和15.61%,衡量模型响应速度的指标延迟率降低了19.79%;国内案例研究表明,DSTBM在复杂城市道路环境中依然具备有效的异常检测能力,在K=10%时召回率达0.607、总延迟为12.2 min,展示出其在国内高密度、复杂路网中的应用潜力和改进空间。所提出的DSTBM模型能够有效捕捉复杂时空依赖性,并缩短对交通异常事件的检测延迟。

     

  • 图  1  DSTBM结构

    Figure  1.  Structure of DSTBM

    图  2  不同K下6种算法的召回率

    Figure  2.  Recall rates of six methods with different K values

    图  3  不同K下6种方法的检测延迟曲线

    Figure  3.  Detection delay curves of 6 methods with different K values

    图  4  空间距离衰减系数对总召回率的影响

    Figure  4.  Effects of spatial distance decay coefficients on total recall rate

    图  5  加权系数对总召回率的影响

    Figure  5.  Effect of weighted coefficients on total recall rate

    表  1  2个真实世界的PeMS数据集

    Table  1.   Two real-world PeMS datasets

    参数 SJC OKA
    道路总长度/km 227.24 75.99
    传感器数量 245 146
    事故数量 3 313 3 618
    事故类型数量 4 4
    事故平均持续时间/min 45.25 47.63
    时间范围 2018年5月1日到2018年10月30日 2018年1月1日到2018年6月30日
    下载: 导出CSV

    表  2  在SJC数据集的精确率和F1分数评估结果

    Table  2.   Precisions and F1 results on SJC dataset

    方法 K的总精确率 K的F1分数
    0.2% 1% 2% 3% 5% 10% 0.2% 1% 2% 3% 5% 10%
    K-means 0.029 0.068 0.099 0.134 0.186 0.243 0.036 0.085 0.124 0.168 0.233 0.304
    OmniAnomaly 0.035 0.091 0.129 0.178 0.241 0.303 0.044 0.114 0.162 0.221 0.301 0.379
    Anomaly Transformer 0.071 0.124 0.174 0.184 0.286 0.351 0.090 0.155 0.218 0.243 0.357 0.439
    STGAN 0.065 0.109 0.172 0.235 0.288 0.362 0.081 0.136 0.215 0.294 0.360 0.452
    CST-GL 0.073 0.123 0.175 0.229 0.295 0.371 0.090 0.154 0.219 0.291 0.369 0.464
    DSTBM 0.090 0.143 0.221 0.285 0.369 0.454 0.113 0.179 0.276 0.357 0.461 0.568
    DSTBM模型相对基线模型中最佳指标提升比例/% 23.29 15.32 26.29 21.28 25.08 22.37 24.72 15.61 26.06 21.33 25.05 22.48
    下载: 导出CSV

    表  3  在OKA数据集的精确率和F1分数评估结果

    Table  3.   Precisions and F1 results on OKA dataset

    方法 K的总精确率 K的F1分数
    0.2% 1% 2% 3% 5% 10% 0.2% 1% 2% 3% 5% 10%
    K-means 0.019 0.059 0.084 0.099 0.125 0.140 0.024 0.074 0.105 0.124 0.156 0.175
    OmniAnomaly 0.032 0.068 0.136 0.174 0.217 0.261 0.040 0.093 0.170 0.222 0.276 0.329
    Anomaly Transformer 0.068 0.127 0.185 0.185 0.232 0.285 0.085 0.159 0.231 0.251 0.313 0.385
    STGAN 0.062 0.134 0.195 0.245 0.290 0.318 0.078 0.168 0.241 0.306 0.374 0.423
    CST-GL 0.059 0.121 0.178 0.230 0.290 0.291 0.074 0.151 0.223 0.287 0.363 0.395
    DSTBM 0.091 0.170 0.249 0.312 0.402 0.462 0.114 0.212 0.311 0.390 0.504 0.578
    DSTBM模型相对基线模型中最佳指标提升比例/% 33.82 26.87 27.69 27.35 38.62 45.28 33.64 26.67 29.21 27.39 34.61 36.49
    下载: 导出CSV

    表  4  在SJC数据集的召回率和检测延迟评估结果

    Table  4.   Recall and detection delay results on SJC dataset

    方法 K的总召回率 K的总延迟/min
    0.2% 1% 2% 3% 5% 10% 0.2% 1% 2% 3% 5% 10%
    K-means 0.048 0.113 0.165 0.224 0.310 0.405 72.3 44.2 34.7 31.8 27.6 23.5
    OmniAnomaly 0.058 0.152 0.216 0.290 0.402 0.506 22.5 30.1 17.2 21.8 19.8 16.2
    Anomaly Transformer 0.122 0.205 0.290 0.358 0.476 0.585 28.8 30.4 25.1 21.3 18.3 14.8
    STGAN 0.109 0.182 0.286 0.392 0.481 0.602 35.7 25.2 22.4 20.9 17.5 13.8
    CST-GL 0.118 0.207 0.292 0.399 0.492 0.618 25.8 15.9 22.6 19.2 17.2 13.7
    DSTBM 0.150 0.238 0.367 0.476 0.615 0.758 28.9 21.6 17.8 15.4 12.8 9.1
    DSTBM模型相对基线模型中最佳指标提升比例/% 22.95 14.98 25.68 19.30 25.00 22.65 -28.44 -35.85 -3.49 19.79 25.58 33.58
    下载: 导出CSV

    表  5  在OKA数据集的召回率和检测延迟评估结果

    Table  5.   Recall and detection delay results on OKA dataset

    方法 K的总召回率 K的总延迟/min
    0.2% 1% 2% 3% 5% 10% 0.2% 1% 2% 3% 5% 10%
    K-means 0.032 0.098 0.140 0.165 0.209 0.234 52.1 38.4 32.2 27.9 24.6 22.3
    OmniAnomaly 0.053 0.145 0.227 0.306 0.379 0.445 28.8 34.1 30.3 25.6 22.8 18.9
    Anomaly Transformer 0.114 0.212 0.308 0.391 0.483 0.595 29.5 25.1 28.3 24.8 20.5 16.8
    STGAN 0.104 0.224 0.315 0.408 0.527 0.632 40.1 28.9 24.7 23.3 21.5 15.1
    CST-GL 0.098 0.202 0.297 0.382 0.485 0.616 29.4 19.2 16.7 21.2 20.1 15.6
    DSTBM 0.152 0.283 0.415 0.520 0.674 0.770 29.3 23.1 19.6 16.8 13.9 10.5
    DSTBM模型相对基线模型中最佳指标提升比例/% 33.33 26.34 31.75 27.45 27.89 21.84 -1.74 -20.31 -17.37 20.75 30.85 30.46
    下载: 导出CSV

    表  6  在SJC数据集的不同事件类型评估结果

    Table  6.   Results on SJC dataset of different event types

    方法 在10%的总召回率 在10%的总延迟/min
    事故 故障 封路 天气 事故 故障 封路 天气
    K-means 0.412 0.398 0.379 0.345 23.4 23.8 24.6 25.3
    OmniAnomaly 0.478 0.463 0.441 0.423 16.3 16.9 17.8 18.4
    Anomaly Transformer 0.603 0.589 0.574 0.561 14.9 15.3 15.7 16.1
    STGAN 0.637 0.621 0.613 0.604 13.7 13.9 14.3 14.8
    CST-GL 0.649 0.634 0.623 0.619 13.5 13.6 13.9 14.1
    DSTBM 0.769 0.762 0.758 0.743 9.3 9.5 9.7 10.1
    下载: 导出CSV

    表  7  不同变体在SJC数据集的召回率结果

    Table  7.   Recall results of different variants on SJC dataset

    K% 0.2 1 2 3 5 10
    w/o MST 0.124 0.197 0.306 0.396 0.514 0.642
    w/o MEX 0.138 0.218 0.331 0.426 0.551 0.679
    w/o DST 0.092 0.149 0.244 0.326 0.442 0.583
    w/o BM 0.135 0.226 0.342 0.454 0.578 0.716
    DSTBM 0.150 0.238 0.367 0.476 0.615 0.758
    下载: 导出CSV

    表  8  有无状态空间建模变体在SJC数据集的效率评估结果

    Table  8.   Efficiency evaluation results of the variants with or without SSM on SJC dataset

    变体 K的总延迟/min 最大内存使用量/GB 训练周期至收敛轮次
    0.2% 1% 2% 3% 5% 10%
    w/o BM 34.5 27.8 23.1 19.5 16.4 12.7 11.2 30
    w/o SSM 41.2 34.6 30.9 27.8 24.5 21.2 17.8 42
    DSTBM 28.9 21.6 17.8 15.4 12.8 9.1 14.5 28
    下载: 导出CSV

    表  9  DSTBM在不同国家数据集的评估结果

    Table  9.   Evaluation results of DSTBM on different country datasets

    数据集 K的总召回率 K的总延迟/min
    0.2% 1% 2% 3% 5% 10% 0.2% 1% 2% 3% 5% 10%
    BjTT 0.116 0.192 0.301 0.385 0.491 0.607 36.4 30.8 25.1 20.9 17.3 12.2
    SJC 0.150 0.238 0.367 0.476 0.615 0.758 28.9 21.6 17.8 15.4 12.8 9.1
    OKA 0.152 0.283 0.415 0.520 0.674 0.770 29.3 23.1 19.6 16.8 13.9 10.5
    下载: 导出CSV
  • [1] PAN D, HAMDAR S. From traffic analysis to real-time management: a hazard-based modeling for incident durations extracted through traffic detector data anomaly detection[J]. Transportation Research Record: Journal of the Transportation Research Board, 2024, 2678(2): 389-400. doi: 10.1177/03611981231174445
    [2] 陈华, 刘伟. 城市道路交通异常事件检测研究综述[C]//中国公路学会. 2022世界交通运输大会(WTC2022)论文集. 北京: 中国公路学会, 2022: 587-593.

    CHEN Hua, LIU Wei. A review of research on abnormal traffic incident detection in urban roads[C]//China Highway and Transportation Society. Proceedings of 2022 World Transport Convention (WTC2022). Beijing: China Highway and Transportation Society, 2022: 587-593.
    [3] 姚磊, 刘渊. 基于ANFIS的交通事件持续时间预测[J]. 计算机工程, 2014, 40(2): 189-192, 198.

    YAO Lei, LIU Yuan. Traffic incident duration prediction based on adaptive neural-fuzzy inference system[J]. Computer Engineering, 2014, 40(2): 189-192, 198.
    [4] OUNOUGHI C, YAHIA S B. Data fusion for ITS: a systematic literature review[J]. Information Fusion, 2023, 89: 267-291. doi: 10.1016/j.inffus.2022.08.016
    [5] SATTAR S, LI S N, CHAPMAN M. Developing a near real-time road surface anomaly detection approach for road surface monitoring[J]. Measurement, 2021, 185: 109990. doi: 10.1016/j.measurement.2021.109990
    [6] KALAIR K, CONNAUGHTON C. Anomaly detection and classification in traffic flow data from fluctuations in the flow-density relationship[J]. Transportation Research Part C: Emerging Technologies, 2021, 127: 103178. doi: 10.1016/j.trc.2021.103178
    [7] 王媛媛, 吴光业, 吴克文, 等. 考虑数据异质性和掩蔽问题的高速公路异常交通状况检测[J]. 交通工程, 2024, 24(6): 94-99, 112.

    WANG Yuan-yuan, WU Guang-ye, WU Ke-wen, et al. Freeway abnormal traffic situation detection considering data heterogeneity and masking[J]. Journal of Transportation Engineering, 2024, 24(6): 94-99, 112.
    [8] YAN Y, ZHANG S, TANG J J, et al. Understanding characteristics in multivariate traffic flow time series from complex network structure[J]. Physica A: Statistical Mechanics and Its Applications, 2017, 477: 149-160. doi: 10.1016/j.physa.2017.02.040
    [9] 姚俊峰, 何瑞, 史童童, 等. 基于机器学习的交通流预测方法综述[J]. 交通运输工程学报, 2023, 23(3): 44-67.

    YAO 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.
    [10] WU J, CUI Z M, SHI Y J, et al. Traffic flow anomaly detection based on wavelet denoising and support vector regression[J]. Journal of Algorithms and Computational Technology, 2013, 7(2): 209-225. doi: 10.1260/1748-3018.7.2.209
    [11] DJENOURI Y, BELHADI A, LIN J C, et al. Adapted K-nearest neighbors for detecting anomalies on spatio-temporal traffic flow[J]. IEEE Access, 2019, 7: 10015-10027. doi: 10.1109/ACCESS.2019.2891933
    [12] KONG X J, SONG X M, XIA F, et al. LoTAD: long-term traffic anomaly detection based on crowdsourced bus trajectory data[J]. World Wide Web, 2018, 21(3): 825-847. doi: 10.1007/s11280-017-0487-4
    [13] FITTERS W, CUZZOCREA A, HASSANI M. Enhancing LSTM prediction of vehicle traffic flow data via outlier correlations[C]//IEEE. 2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC). New York: IEEE, 2021: 210-217.
    [14] 郑大庆, 林陈威, 王昺杰. 基于注意力-长短期记忆模型的偶发性交通流异常检测[J]. 同济大学学报(自然科学版), 2023, 51(6): 923-931.

    ZHENG Da-qing, LIN Chen-wei, WANG Bing-jie. Traffic flow occasional anomaly detection based on attention-LSTM model[J]. Journal of Tongji University (Natural Science), 2023, 51(6): 923-931.
    [15] ZHU G X, ZHAO H B, LIU H Q, et al. A novel LSTM-GAN algorithm for time series anomaly detection[C]//IEEE. 2019 Prognostics and System Health Management Conference (PHM-Qingdao). Qingdao: IEEE, 2019: 1-6.
    [16] WANG S, ZHANG Y, HU Y L, et al. Knowledge fusion enhanced graph neural network for traffic flow prediction[J]. Physica A: Statistical Mechanics and Its Applications, 2023, 623: 128842. doi: 10.1016/j.physa.2023.128842
    [17] LIU T B, ZHANG J D. An adaptive traffic flow prediction model based on spatiotemporal graph neural network[J]. The Journal of Supercomputing, 2023, 79(14): 15245-15269. doi: 10.1007/s11227-023-05261-9
    [18] 崔建勋, 要甲, 赵泊媛. 基于深度学习的短期交通流预测方法综述[J]. 交通运输工程学报, 2024, 24(2): 50-64.

    CUI Jian-xun, YAO Jia, ZHAO Bo-yuan. Review on short- term traffic flow prediction methods based on deep learning[J]. Journal of Traffic and Transportation Engineering, 2024, 24(2): 50-64.
    [19] JIN M, KOH H Y, WEN Q S, et al. A survey on graph neural networks for time series: forecasting, classification, imputation, and anomaly detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024, 46(12): 10466-10485. doi: 10.1109/TPAMI.2024.3443141
    [20] ZHENG Y, KOH H Y, JIN M, et al. Correlation-aware spatial-temporal graph learning for multivariate time-series anomaly detection[J]. IEEE Transactions on Neural Networks and Learning Systems, 2023, 35(9): 11802-11816.
    [21] HU Y, QU A, WORK D. Detecting extreme traffic events via a context augmented graph autoencoder[J]. ACM Transactions on Intelligent Systems and Technology, 2022, 13(6): 1-23.
    [22] ZHANG H Y, ZHAO S Y, LIU R H, et al. Automatic traffic anomaly detection on the road network with spatial-temporal graph neural network representation learning[J]. Wireless Communications and Mobile Computing, 2022, 2022(1): 4222827. doi: 10.1155/2022/4222827
    [23] DENG L Y, LIAN D F, HUANG Z Y, et al. Graph convolutional adversarial networks for spatiotemporal anomaly detection[J]. IEEE Transactions on Neural Networks and Learning Systems, 2022, 33(6): 2416-2428. doi: 10.1109/TNNLS.2021.3136171
    [24] WANG C Z, XING S W, GAO R, et al. Disentangled dynamic deviation transformer networks for multivariate time series anomaly detection[J]. Sensors, 2023, 23(3): 1104.
    [25] QU H H, NING L B, AN R, et al. A survey of Mamba[J]. arXiv, (2025-06-17). https://doi.org/10.48550/arXiv.2408.01129.
    [26] YUAN D, XUE J Z, SU J S, et al. ST-mamba: spatial-temporal mamba for traffic flow estimation recovery using limited data[C]//IEEE. 2024 IEEE/CIC International Conference on Communications in China (ICCC). New York: IEEE, 2024: 1928-1933.
    [27] TAN X, ZHAO M. Self-supervised state space model for real-time traffic accident prediction using eKAN networks[J]. arXiv, (2024-09-09) https://doi.org/10.48550/arXiv.2409.05933.
    [28] ZHANG Y Z, TIWARI P, ZHENG Q, et al. A multimodal coupled graph attention network for joint traffic event detection and sentiment classification[J]. IEEE Transactions on Intelligent Transportation Systems, 2023, 24(8): 8542-8554.
    [29] 苏倩华. 基于多源感知融合数据的交通异常事件检测算法[D]. 大连: 东北财经大学, 2023.

    SU Qian-hua. Traffic abnormal event detection algorithm based on multi-source perception fusion data[D]. Dalian: Dongbei University of Finance and Economics, 2023.
    [30] ZHOU W, YU Y H, ZHAN Y F, et al. A vision-based abnormal trajectory detection framework for online traffic incident alert on freeways[J]. Neural Computing and Applications, 2022, 34(17): 14945-14958.
    [31] SHAO Z Q, BELL M G H, WANG Z, et al. Spatial-temporal selective state space (St-Mamba) model for traffic flow prediction[J]. arXiv, (2024-05-18). https://doi.org/10.48550/arXiv.2404.13257.
    [32] CHOI J, KIM H, AN M, et al. SpoT-Mamba: learning long-range dependency on spatio-temporal graphs with selective state spaces[J]. arXiv, (2024-06-17). https://doi.org/10.48550/arXiv.2406.11244.
    [33] ZHANG H W, ZHU Y, WANG D, et al. A survey on Visual Mamba[J]. arXiv, (2024-04-26). https://doi.org/10.48550/arXiv.2404.15956.
    [34] SUO Y F, DING Z N, ZHANG T. The mamba model: a novel approach for predicting ship trajectories[J]. Journal of Marine Science and Engineering, 2024, 12(8): 1321.
    [35] HE K, CHEN X, XIE S, et al. Masked autoencoders are scalable vision learners[C]//IEEE. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. New York: IEEE, 2022: 16000-16009.
    [36] 宫晓婞, 董培信. 基于改进孤立森林算法的交通流异常数据检测模型[J]. 重庆交通大学学报(自然科学版), 2024, 43(5): 61-69, 90.

    GONG Xiao-xing, DONG Pei-xin. Traffic flow anomaly data detection model based on improved isolation forest algorithm[J]. Journal of Chongqing Jiaotong University (Natural Science), 2024, 43(5): 61-69, 90.
    [37] LIU C, CHEN J M, LIU H Y, et al. Toward efficient traffic incident detection via explicit edge-level incident modeling[J]. IEEE Internet of Things Journal, 2024, 11(11): 20015-20029.
    [38] SU Y, ZHAO Y J, NIU C H, et al. Robust anomaly detection for multivariate time series through stochastic recurrent neural network[C]//ACM. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York: ACM, 2019: 2828-2837.
    [39] XU J, WU H, WANG J, et al. Anomaly transformer: time series anomaly detection with association discrepancy[C]//ICLR. Proceedings of the 10th International Conference on Learning Representations (ICLR). Appleton: ICLR, 2022: 1-20.
    [40] ZHANG C Y, ZHANG Y, SHAO Q T, et al. BjTT: a large- scale multimodal dataset for traffic prediction[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(11): 18992-19003.
  • 加载中
图(5) / 表(9)
计量
  • 文章访问数:  212
  • HTML全文浏览量:  68
  • PDF下载量:  14
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-01-15
  • 录用日期:  2025-04-30
  • 修回日期:  2025-02-27
  • 刊出日期:  2025-08-28

目录

    /

    返回文章
    返回