A method for intelligent disassembly and completion of complex tasks of traffic data analysis based on a large language model

CN117194624BActive Publication Date: 2026-08-07BEIHANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2023-08-17
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]本发明的目的在于:为了解决传统方法的局限性大,交通数据分析的效率低下,交通数据复杂任务分析的入门门槛高的问题,而提出的一种基于大语言模型的交通数据分析复杂任务智能拆解与完成方法

Benefits of technology

1、本发明利用大语言模型的强大语义理解和生成能力,能够有效拆解和处理复杂任务,减轻人工参与的工作量,减少代码程序的重复开发。本发明能够通过自动化的方式智能选择工具并完成子任务,可以提高交通数据分析工作的效率并降低工作门槛。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194624B_ABST
    Figure CN117194624B_ABST
Patent Text Reader

Abstract

The application discloses a traffic data analysis complex task intelligent disassembly and completion method based on a large language model, belongs to the technical field of traffic data analysis, and comprises the following steps: S1, data transmission and database development of a multi-modal data source; S101, preprocessing of the multi-modal data; S102, construction of a standardized database for digital storage of the multi-modal data; S2, development of a traffic data analysis toolbox for the large language model; and S201, refinement and classification of tool functions, development of a database access tool, a basic operation tool, a traffic flow counting tool, a trajectory extraction tool, a traffic evaluation tool, an optimization scheme generation tool, a traffic resilience quantification tool, a drawing tool and the like. The application has the powerful semantic understanding and generation capacity of the large language model, can effectively disassemble and process complex tasks, can intelligently select tools and complete subtasks in an automatic manner, and can improve the efficiency of traffic data analysis work and reduce the work threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic data analysis technology, and in particular relates to a method for intelligently decomposing and completing complex traffic data analysis tasks based on a large language model. Background Technology

[0002] In modern society, traffic data analysis plays a crucial role in urban planning, traffic management, and travel decision-making. However, due to the complexity and diversity of traffic data, traditional traffic data analysis methods face several challenges and limitations. Traditional methods require manual intervention and the development of specific rules and algorithms, which is not only time-consuming and labor-intensive but also easily influenced by subjective human factors. Furthermore, they have limited capacity to handle complex tasks and have a high barrier to entry.

[0003] In recent years, with the rapid development of artificial intelligence and natural language processing, large language models have gradually become powerful tools for solving complex tasks. Large language models possess strong text understanding and generation capabilities, automatically learning and mastering vast amounts of semantic knowledge, and intelligently decomposing and completing tasks based on input instructions. However, the responses of large language models to instructions still exhibit significant uncertainty, especially in traffic data analysis scenarios where data accuracy is critical. Effective solutions remain to how to utilize large language models for intelligent decomposition of traffic data analysis tasks and the generation of high-precision, theoretically sound analysis results. Summary of the Invention

[0004] The purpose of this invention is to address the limitations of traditional methods, the low efficiency of traffic data analysis, and the high entry barrier for complex traffic data analysis tasks. The invention proposes a method for intelligent decomposition and completion of complex traffic data analysis tasks based on a large language model.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: A method for intelligently decomposing and completing complex traffic data analysis tasks based on a large language model, specifically including the following steps: S1. Data transmission and database development for multimodal data sources; S101. Preprocess the multimodal data; S102. Construct a standardized database for digital storage of multimodal data; S2, Development of a traffic data analysis toolkit for large language models; S201. The functions of the tools need to be further categorized, and small toolkits such as database access tools, basic operation tools, traffic flow counting tools, trajectory extraction tools, traffic evaluation tools, optimization scheme generation tools, traffic resilience quantification tools, and drawing tools need to be developed. S202. In the development of the above tools, while providing API interfaces for the large language model, it is also necessary to provide specific and detailed usage instructions for each tool so that the large language model can select and call a large number of tool APIs. S3, Design large language model tool selection interface; S4. Intelligent decomposition and completion of complex tasks based on large language models; S401. The user inputs task requirements in natural language through the front end of the large language model, and the text will be input into the intelligent agent as a prompt. S402: The intelligent agent performs natural language understanding of the task based on a large language model, and combines the task requirements and all available tools to determine the next action to be taken, thus forming a thought process. S403. The intelligent agent finds the corresponding tool API based on thinking, and generates parameters that conform to the input parameter type and format of the API according to the API interface description. S404, Traffic data analysis tools receive input parameters generated by intelligent agents through large language models via API; S405, the traffic data analysis tool runs based on input parameters, performs fixed functions such as reading and analyzing the database, and outputs results; S406. The intelligent agent receives the tool's output through the tool API interface and forms a phased output in natural language. For scenarios that require formatted phased output, it is also necessary to construct an output interpreter through prompts. The prompts should tell the large language model the information to be extracted, the corresponding expression form, and the data format in natural language in the target data format. S407. The intelligent agent compares the user input task with the currently acquired stage output based on the large language model to determine whether the task is completed. If the task is still not completed, steps S402-S406 are executed again. S408. If the task is deemed complete in step seven, the final answer is generated based on the large language model and all acquired tool output data, and then fed back to the user through the front end. S5 uses a large language model to store dialogue memories.

[0006] As a further description of the above technical solution: In step S101, for traffic detection video and image data, it is necessary to use image recognition algorithms to calibrate and extract target information such as vehicle position, and digitize the video image data. For digital data sources such as traffic simulation systems and road vehicle detectors, target data such as traffic flow distribution and road segment traffic flow are extracted.

[0007] As a further description of the above technical solution: In step S102, the preprocessed multimodal traffic data is stored digitally in multiple database tables. Each video detection data table should contain attribute information including, but not limited to: detector ID, vehicle ID, vehicle longitude coordinates, vehicle latitude coordinates, and timestamp. Data from traffic simulation systems or road detection systems will have its stored attribute information selected based on business requirements, and should include, but not limited to: road segment ID, road segment operating status, and timestamp.

[0008] As a further description of the above technical solution: In S201, an SQL database access tool is developed in conjunction with the database storage format to access data tables; a basic operation tool is developed to extract traditional traffic operation status parameters such as the road network topology or the average vehicle speed of a certain road segment during a certain period; a vehicle trajectory extraction tool is developed to identify, extract trajectories, and calculate operation status parameters of vehicles at an intersection during a certain period; a traffic evaluation tool is developed to rate the operation status of intersections based on traditional traffic operation status parameters such as average vehicle speed; other tools need to be developed according to specific business needs, but during development, the input and output of the tools should take into account the form and content of the input and output of other tools to reduce the coupling between different tools and enable the large language model to achieve freely combinable chained calls; As a further description of the above technical solution: Specifically, S202 should include: a brief description of the tool's functions, its applicable scope, input parameters, input parameter types, and precautions.

[0009] As a further description of the above technical solution: In S3, it is necessary to design multiple intelligent agents to complete a specified type of task, and provide basic prompts for the design of the intelligent agents.

[0010] As a further description of the above technical solution: The prompt should include basic identity definition, requirements for calling tools, a list of callable tools, a definition of the chain action mode of "think-act-observe", and precautions. Each agent has the ability to call a series of tool APIs and can select APIs, generate input parameters, and extract output content through a large language model.

[0011] As a further description of the above technical solution: In S5, the user input and the output of the large language model in the previous step are recorded as a complete record and a summary record. The results are then passed to the large language model through prompts when the user inputs in the next step, so that the large language model has the function of remembering continuous question-and-answer dialogues.

[0012] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention leverages the powerful semantic understanding and generation capabilities of large language models to effectively break down and process complex tasks, reducing the workload of manual intervention and minimizing repetitive code development. This invention can intelligently select tools and complete sub-tasks through automation, improving the efficiency of traffic data analysis and lowering the barrier to entry.

[0013] 2. This invention combines large language models with traditional traffic data analysis models, integrating traditional high-precision analytical models into a traffic data analysis toolkit. This effectively solves the grayscale problem when using large language models alone for data analysis, improving the accuracy and reliability of data analysis results. The method proposed in this invention is flexible and adaptable, and can be adjusted and optimized according to different traffic data analysis tasks and models, and new traffic data analysis toolkits can be added, thus possessing a certain degree of versatility and scalability. Attached Figure Description

[0014] Figure 1 The flowchart illustrates the intelligent decomposition and completion method for complex traffic data analysis based on a large language model, as provided in this invention.

[0015] Figure 2 The framework diagram of the intelligent decomposition and completion method for complex traffic data analysis based on a large language model provided by this invention is shown.

[0016] Figure 3 This is a schematic diagram illustrating the intelligent decomposition and completion of complex tasks based on a large language model, as provided by the present invention. Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1-3 This invention provides a technical solution: a method for intelligently decomposing and completing complex tasks of traffic data analysis based on a large language model, characterized by the following steps: S1. Data transmission and database development for multimodal data sources; S101. Preprocess the multimodal data. In S101, for traffic detection video and image data, target information such as vehicle position needs to be calibrated and extracted based on image recognition algorithms, and the video and image data is digitized. For digital data sources such as traffic simulation systems and road vehicle detectors, target data such as traffic flow distribution and road segment traffic flow are extracted. S102. Construct a standardized database for digital storage of multimodal data. In S102, the preprocessed multimodal traffic data is stored digitally in multiple database tables. Each video detection data table should contain attribute information including, but not limited to: detector ID, vehicle ID, vehicle longitude coordinates, vehicle latitude coordinates, and timestamp. Data from traffic simulation systems or road detection systems will have its stored attribute information selected based on business requirements, and should include, but not limited to: road segment ID, road segment operating status, and timestamp. S2, Development of a traffic data analysis toolkit for large language models; S201. The tool functions need to be further refined and categorized, developing a toolkit including database access tools, basic operation tools, traffic flow counting tools, trajectory extraction tools, traffic evaluation tools, optimization scheme generation tools, traffic resilience quantification tools, and drawing tools. In S201, an SQL database access tool is developed to access data tables, taking into account the database storage format; a basic operation tool is developed to extract traditional traffic operation status parameters such as the road network topology or the average vehicle speed of a road segment at a specific time; a vehicle trajectory extraction tool is developed to identify, extract trajectories, and calculate operation status parameters for vehicles at an intersection at a specific time; a traffic evaluation tool is developed to rate the operation status of intersections based on traditional traffic operation status parameters such as average vehicle speed; the remaining tools need to be developed according to specific business needs, but during development, the input and output of each tool should consider the form and content of the input and output of other tools to reduce the coupling between different tools and enable the large language model to achieve freely combinable chained calls. S202. In the development of the above tools, while providing API interfaces for the large language model, it is also necessary to provide specific and detailed usage instructions for each tool so that the large language model can select and call a large number of tool APIs. Specifically, S202 should include: a brief description of the tool's function, applicable scope, input parameters, input parameter types, precautions, etc. S3. Design a tool selection interface for the large language model. In S3, multiple agents need to be designed to complete a specified type of task, and basic prompts need to be designed for the agents. The prompts should include basic identity definition, requirements for calling tools, a list of callable tools, a chain action mode definition of "think-act-observe", precautions, etc. Each agent has the ability to call a series of tool APIs, and the large language model can be used to select APIs, generate input parameters, and extract output content. S4. Intelligent decomposition and completion of complex tasks based on large language models; S401. The user inputs the task requirements in natural language through the front end of the large language model. This text will be input into the intelligent agent as a prompt. In this example, the user input is: "Evaluate the operational status of intersection 1 from 8:00 AM to 9:00 AM on June 1, 2023." The specific method and flow for intelligent decomposition and completion of complex tasks based on the large language model are shown in Figure 2. S402: The intelligent agent performs natural language understanding of the task based on a large language model, and combines the task requirements and all available tools to determine the next action to be taken, thus forming a thought process. S403. The intelligent agent finds the corresponding tool API based on thinking, and generates parameters that conform to the input parameter type and format of the API according to the API interface description. S404, Traffic data analysis tools receive input parameters generated by intelligent agents through large language models via API; S405, the traffic data analysis tool runs based on input parameters, performs fixed functions such as reading and analyzing the database, and outputs results; S406. The intelligent agent receives the tool's output through the tool API interface and forms a phased output in natural language. For scenarios that require formatted phased output, it is also necessary to construct an output interpreter through prompts. The prompts should tell the large language model the information to be extracted, the corresponding expression form, and the data format in natural language in the target data format. S407. The intelligent agent compares the user input task with the currently acquired stage output based on the large language model to determine whether the task is completed. If the task is still not completed, steps S402-S406 are executed again. S408. If step seven determines that the task is complete, a final answer is generated based on the large language model and all acquired tool output data, and this answer is provided to the user via the front end. In this implementation example, the large language model breaks down the complex task into: database access, calling basic operation tools to obtain the video detector IDs of several road segments corresponding to the topology of intersection 1, calling trajectory extraction tools to obtain the vehicle trajectories and average speeds of the corresponding detectors from 8:00 AM to 9:00 AM on June 1, 2023, and calling traffic evaluation tools to rate the intersection's operational status using the average speed as input. After the task is completed in four steps, the final answer is generated based on the large language model and all acquired tool output data: "According to the intersection video detection data, the average speed at intersection 1 from 8:00 AM to 9:00 AM on June 1, 2023 was 18.68 km / h, and the intersection's operational status is rated as good," and this answer is provided to the user via the front end. S5. The large language model stores dialogue memory. In S5, the user input and output of the previous step are recorded and summarized in a complete record. The results are then passed to the large language model through a prompt when the user inputs in the next step, so that the large language model has the function of remembering continuous question-and-answer dialogues.

[0019] In this embodiment of the invention, the main application scenario for the intelligent decomposition and completion of complex traffic data analysis tasks is the evaluation of the operational status of intersections based on traffic video data. Because video data is difficult to analyze in a complex manner, this invention requires the video data to be digitized and stored first. However, to further achieve complex and diverse traffic data analysis and evaluation goals, it is usually necessary to decompose the data analysis process and write corresponding code based on different task objectives and traditional traffic models to produce analysis results. This requires a significant amount of manpower, and different task objectives can lead to redundant development of core functional modules. Therefore, this invention chooses to use a large language model to bridge the gap between data analysis objectives, tool selection, and application, thereby replacing the manual work of connecting multiple models and writing data analysis code.

[0020] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for intelligently decomposing and completing complex tasks of traffic data analysis based on a large language model, characterized in that, Specifically, the following steps are included: S1. Data transmission and database development for multimodal data sources; S101. Preprocess the multimodal data. In S101, for traffic detection video and image data, it is necessary to calibrate and extract vehicle position target information based on image recognition algorithm and digitize the video image data. For digital data sources such as traffic simulation system and road vehicle detector, traffic flow distribution and road segment traffic flow target data are extracted. S102. Construct a standardized database to digitally store multimodal data. In S102, the preprocessed multimodal traffic data is stored digitally in multiple database tables. The attribute information contained in each video detection data table should include, but is not limited to: detector ID, vehicle ID, vehicle longitude coordinates, vehicle latitude coordinates, and timestamp. For data from traffic simulation systems or road detection, the attribute information to be stored is selected based on business needs and should include, but is not limited to: road segment ID, road segment operating status, and timestamp. S2, Development of a traffic data analysis toolkit for large language models; S201. The functions of the tools need to be further categorized, and database access tools, basic operation tools, traffic flow counting tools, trajectory extraction tools, traffic evaluation tools, optimization scheme generation tools, traffic resilience quantification tools, and drawing toolkits need to be developed. S202. In the development of the above tools, while providing API interfaces for the large language model, it is also necessary to provide specific and detailed usage instructions for each tool so that the large language model can select and call a large number of tool APIs. S3, Design large language model tool selection interface; S4. Intelligent decomposition and completion of complex tasks based on large language models; S401. The user inputs task requirements in natural language through the front end of the large language model, and the text will be input into the intelligent agent as a prompt. S402: The intelligent agent performs natural language understanding of the task based on a large language model, and combines the task requirements and all available tools to determine the next action to be taken, thus forming a thought process. S403. The intelligent agent finds the corresponding tool API based on thinking, and generates parameters that conform to the input parameter type and format of the API according to the API interface description. S404, Traffic data analysis tools receive input parameters generated by intelligent agents through large language models via API; S405, the traffic data analysis tool operates based on input parameters, realizes fixed functions of reading and analyzing the database, and outputs results; S406. The intelligent agent receives the tool's output through the tool API interface and forms a phased output in natural language. For scenarios that require formatted phased output, it is also necessary to construct an output interpreter through prompts. The prompts should tell the large language model the information to be extracted, the corresponding expression form, and the data format in natural language in the target data format. S407. The intelligent agent compares the user input task with the currently acquired stage output based on the large language model to determine whether the task is completed. If the task is still not completed, steps S402-S406 are executed again. S408. If the task is deemed complete in step seven, the final answer is generated based on the large language model and all acquired tool output data, and then fed back to the user through the front end. S5 uses a large language model to store dialogue memories.

2. The method for intelligent decomposition and completion of complex tasks in traffic data analysis based on a large language model, as described in claim 1, is characterized in that... In step S201, an SQL database access tool is developed in conjunction with the database storage format to access data tables; a basic operation tool is developed to extract traditional traffic operation status parameters such as the average vehicle speed of a road segment during a certain period; a vehicle trajectory extraction tool is developed to identify, extract trajectories, and calculate operation status parameters of vehicles at an intersection during a certain period; a traffic evaluation tool is developed to rate the operation status of intersections based on traditional traffic operation status parameters such as the average vehicle speed; other tools need to be developed according to specific business needs, but during development, the input and output of the tools should take into account the form and content of the input and output of other tools to reduce the coupling between different tools and enable the large language model to achieve freely combinable chained calls.

3. The method for intelligent decomposition and completion of complex tasks in traffic data analysis based on a large language model according to claim 1, characterized in that, Specifically, S202 should include: a brief description of the tool's functions, its applicable scope, input parameters, input parameter types, and precautions.

4. The method for intelligent decomposition and completion of complex tasks in traffic data analysis based on a large language model according to claim 1, characterized in that, In S3, it is necessary to design multiple intelligent agents to complete a specified type of task, and provide basic prompts for the design of the intelligent agents.

5. The method for intelligent decomposition and completion of complex tasks in traffic data analysis based on a large language model according to claim 4, characterized in that, The prompt should include basic identity definition, requirements for calling tools, a list of callable tools, a definition of the "think-act-observe" chain action mode, and precautions. Each agent should have the ability to call a series of tool APIs and should be able to select APIs, generate input parameters, and extract output content through a large language model.

6. The method for intelligent decomposition and completion of complex tasks in traffic data analysis based on a large language model according to claim 1, characterized in that, In S5, the user input and the output of the large language model in the previous step are recorded as a complete record and a summary record. The results are then passed to the large language model through prompts when the user inputs in the next step, so that the large language model has the function of remembering continuous question-and-answer dialogues.

Citation Information

Patent Citations

  • Large-model-oriented universal tool collaboration and refined learning system and method

    CN116594768A