摘要
[目标]针对现有算法精度不足、效率低的问题,提出一种新的出租车绕道行为检测方法,旨在提升出租车行业监管效能.[方法]研究提出一种改进的 K 均值聚类与最长公共子序列(K-means and Longest Common Subsequence,KM-LCSS)算法.采用概率分布优化初始质心选择策略,结合肘部法动态确定最佳聚类数量,并结合最长公共子序列算法进行检测.基于 2019 年一周的北京市出租车车辆卫星定位数据,以两条高频轨迹作为案例,并选取孤立森林等 3 种基线模型,从模型性能、算法时间复杂度、参数敏感性 3 方面进行分析.[结果]在两条案例轨迹中 KM-LCSS 算法的性能在各项指标上整体表现最优,F1 分数分别为 0.875 0 与 0.727 3,较最优的基线模型提升约 6.6%与 29.6%.AUC 值分别为 0.997 4 与 0.991 4,较最优的基线模型提升约 5.2%与 19.7%.同时,该算法平均检测耗时仅 13.76 s,相较于基线算法检测速度提升近 28 倍,且检测耗时随待检测轨迹数量与长度分别呈线性与二次增长趋势.进一步的参数敏感性试验发现,当空间距离阈值为 50 m,相似度阈值为 0.3 时算法检测效果最佳,在此最佳参数条件下,对不同长度轨迹进行性能评估,各指标均保持稳定,表明算法在不同长度轨迹下的适应性.[结论]研究有助于期提升出租车绕道行为检测精度和效率,为非现场监管提供技术支撑.
[Objective]To address the challenges of insufficient accuracy and low efficiency in existing algorithms,this study proposes a novel taxi detour detection method aimed at enhancing regulatory effectiveness in the taxi industry.[Method]This study proposes an improved K-means and longest common subsequence(KM-LCSS)algorithm.This approach employs a probability distribution-based strategy to optimize the initial centroid selection,dynamically determines the optimal number of clusters with Elbow Method,and integrates LCSS algorithm for detour behavior detection.[Result]KM-LCSS algorithm achieves the best overall performance across all evaluation indexes for two case trajectories.Specifically,F1-scores are 0.875 0 and 0.727 3,representing improvements of approximately 6.6%and 29.6%respectively over the best-performing baseline models.The corresponding AUC values are 0.997 4 and 0.991 4,outperforming the best baselines by about 5.2%and 19.7%.Moreover,the average detection time of the proposed method is only 13.76 s,achieving nearly 28-fold speedup compared with baseline algorithms.The detection time exhibits linear growth with respect to the number of trajectories to be analyzed and quadratic growth with respect to trajectory length.Further parameter sensitivity experiments indicate that the algorithm achieves optimal performance with a spatial distance threshold of 50 m and a similarity threshold of 0.3.By setting these optimal parameters,the performance remains stable across trajectories of varying lengths,demonstrating strong adaptability to trajectories with different lengths.[Conclusion]This study is intended to improve the accuracy and efficiency of taxi detour behavior detection,and provide technical support for off-site regulation.