用大模型自动把模糊的信号灯计划描述转为精确控制方案
Chat2SPaT: A Large Language Model Based Tool for Automating Traffic Signal Control Plan Management
- 通过提示词工程让大模型理解用户描述,输出结构化信号相位与配时数据
- 在300多个测试案例中,中英文计划生成准确率超94%
- 适合交通工程师和智能交通研究者快速构建信号控制方案
固定时序信号控制广泛用于交叉口和干线协调控制,但需大量人工创建和更新信号方案。当按时段或星期制定计划时,单个路口常需管理多个方案,导致重复输入参数。为实现友好的信号控制方案管理,本文提出Chat2SPaT,利用大语言模型(LLMs)将用户提供的半结构化、模糊的方案描述转化为精确的信号相位与配时(SPaT)结果,并可进一步转换为基于阶段或环形的结构化方案,以对接智能交通系统(ITS)软件和信号控制器。通过精心设计的提示词,Chat2SPaT首先利用LLM理解用户意图,重构为相位序列与属性的JSON格式输出。随后通过Python脚本定位周期内各相位,处理信号控制细节,最终生成完整控制方案。整个流程支持在对话中迭代编辑。实验表明,在包含300多个方案描述的测试集上,该方法对中英文场景的生成准确率均超过94%。作为首个评估大模型理解信号控制方案描述能力的基准,Chat2SPaT为交通从业者和研究者提供了易用的方案管理管道,有望成为智能交通领域大模型应用的新基础模块。代码、提示词与测试数据集已公开于https://github.com/yuewangits/Chat2SPaT。
原文摘要 · Abstract (English)
Pre-timed traffic signal control, commonly used for operating signalized intersections and coordinated arterials, requires tedious manual work for signaling plan creating and updating. When the time-of-day or day-of-week plans are utilized, one intersection is often associated with multiple plans, leading to further repetitive manual plan parameter inputting. To enable a user-friendly traffic signal control plan management process, this study proposes Chat2SPaT, a method to convert users' semi-structured and ambiguous descriptions on the signal control plan to exact signal phase and timing (SPaT) results, which could further be transformed into structured stage-based or ring-based plans to interact with intelligent transportation system (ITS) software and traffic signal controllers. With curated prompts, Chat2SPaT first leverages large language models' (LLMs) capability of understanding users' plan descriptions and reformulate the plan as a combination of phase sequence and phase attribute results in the json format. Based on LLM outputs, python scripts are designed to locate phases in a cycle, address nuances of traffic signal control, and finally assemble the complete traffic signal control plan. Within a chat, the pipeline can be utilized iteratively to conduct further plan editing. Experiments show that Chat2SPaT can generate plans with an accuracy of over 94% for both English and Chinese cases, using a test dataset with over 300 plan descriptions. As the first benchmark for evaluating LLMs' capability of understanding traffic signal control plan descriptions, Chat2SPaT provides an easy-to-use plan management pipeline for traffic practitioners and researchers, serving as a potential new building block for a more accurate and versatile application of LLMs in the field of ITS. The source codes, prompts and test dataset are openly accessible at https://github.com/yuewangits/Chat2SPaT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。