A traffic industry agent engineering construction method and system based on thought chain reasoning and standardized tool calling framework
By adopting an engineering construction method for intelligent agents based on the thinking chain reasoning and standardized tool calling framework, the problems of low development efficiency and poor reusability of intelligent agents are solved, realizing rapid construction and reliability of intelligent agents, and supporting rapid expansion and maintainability of multiple business lines.
Patent Information
- Application Number
- CN202611301800.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-27
AI Technical Summary
Large enterprises in various industries face problems such as low efficiency, inconsistent quality, and poor reusability in the intelligent upgrading of multiple business lines. This is especially true in the transportation industry, where the development cycle of intelligent agents is long and cannot meet the needs of rapid expansion. Furthermore, existing technologies lack the ability to automatically decompose and orchestrate tasks across multiple business systems.
An intelligent agent engineering construction method based on the thinking chain reasoning and standardized tool calling framework is adopted. The user interaction layer obtains instructions, the thinking chain reasoning orchestration layer performs intent parsing and task decomposition to generate a reasoning step chain, and the fully automatic path execution layer automatically orchestrates the tool calling sequence to realize the calling of the standardized tool interface layer and the assembly of results.
It enables traceability and auditability of intelligent agents, significantly reduces debugging costs, shortens development cycles, ensures consistent reliability and maintainability of intelligent agent behavior across different business domains and developers, and supports the rapid expansion of intelligent agent construction into new business domains.
Smart Images

Figure CN123180338A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an engineering construction method and system for intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework. Background Technology
[0002] In related technologies, large industry enterprises face engineering challenges such as low efficiency, inconsistent quality, and poor reusability in the development of intelligent agents during the intelligent upgrade of multiple business lines. Taking the transportation industry as an example, enterprises need to deploy intelligent agents in multiple business areas such as road network monitoring, safety supervision, maintenance management, emergency response, and toll collection operations. The intelligent agents in each area need to call different external system interfaces (such as video surveillance API, toll collection system API, information publishing API, etc.), and the business logic they execute varies greatly, but the underlying inference framework and tool calling patterns have a high degree of commonality.
[0003] In practical applications of agent development using large models, while executable code or API call sequences can be directly generated based on actual needs, the intermediate states of the inference process are invisible and unauditable, making it difficult to pinpoint the problem when the agent malfunctions. Furthermore, agents implemented by different business scenarios and developers often lack consistency in tool definition formats, exception handling strategies, and timeout mechanisms, resulting in a lack of unified interface registration and discovery mechanisms and compromising the reusability and maintainability of agents. Complex user commands require coordinated execution across multiple business systems, but existing solutions lack the ability to automatically decompose and orchestrate tasks across these systems. Moreover, developing agents for new business domains requires developing inference logic and adaptation tools from scratch, leading to long development cycles and failing to meet the needs of large enterprises rapidly expanding agent applications across multiple business lines.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This invention provides a method and system for engineering construction of intelligent agents in the transportation industry based on a thinking chain reasoning and standardized tool calling framework, which can effectively overcome the defects existing in the prior art.
[0006] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0007] According to a first aspect of the present invention, a method for engineering the construction of intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework is provided, the method comprising: The user interaction layer is used to obtain the user's current input command and push it to the thought chain reasoning and orchestration layer; In the thought chain reasoning orchestration layer, the user's instructions are parsed to generate the corresponding reasoning step chain; The fully automated path execution layer responds to the current inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, calls the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assembles each intermediate result to obtain structured output.
[0008] In some exemplary embodiments, the user command is parsed at the thought chain reasoning orchestration layer to generate a corresponding reasoning step chain, including: Identify the target business area and operation type corresponding to the user command; User instructions are broken down into several independently executable atomic tasks, and the dependencies between these atomic tasks are determined. Search for the corresponding matching tool based on the task content and / or task requirements of the atomic task; Based on a preset step chain template, the inference step chain is assembled by combining information from atomic tasks, dependencies, and matching tools.
[0009] In some exemplary embodiments, the corresponding matching tool is retrieved based on the task content and / or task requirements of the atomic task, including: Create a tool retrieval task based on the task content and / or task requirements; the tool retrieval task includes: function description text; Based on the tool retrieval task, the standardized tool interface layer retrieves tools from the tool center whose function description text matches the function tag; and when a matching tool is found, the retrieval results of the matching tool are displayed in the graphical user interface; wherein, the retrieval results of the matching tool include at least one business tool.
[0010] In some exemplary embodiments, the method further includes: Pre-obtain executable business functions from each business system; define corresponding business tools for each executable business function and configure the corresponding business tool interfaces; Configure tool indexes and function tags for business tool interfaces, as well as configure corresponding tool invocation rules; among which, tool invocation rules include: input parameter schema definition, output format schema definition, exception code enumeration, and timeout retry strategy.
[0011] In some exemplary embodiments, the fully automated path execution layer, in response to the inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines an execution strategy, including: The fully automated path execution layer responds to the reasoning step chain pushed by the thought chain reasoning orchestration layer, calls the tool call orchestrator to generate a directed acyclic graph of tool calls based on the step order and dependencies of the reasoning step chain, and determines the execution strategy; In this context, directed acyclic graphs are used to represent tool call sequences.
[0012] In some exemplary implementations, based on the directed acyclic graph of tool calls and the corresponding execution strategy, the standardized tool interface layer calls the corresponding tools to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on a preset business template, the intermediate results are assembled to obtain structured output, including: Based on the directed acyclic graph of tool calls and the corresponding execution strategy, the corresponding tools are called to the standardized tool interface layer so that each called tool can execute the corresponding atomic task. Use the intermediate results manager to obtain the intermediate results returned by the tool after the execution of the atomic task, and pass them to the next step as input parameters; The synthesizer is invoked to collect intermediate results from various tools, and the intermediate results are assembled based on a preset business template to obtain a structured intelligent agent.
[0013] In some exemplary embodiments, the method further includes: Pre-build a system framework based on a user interaction layer, a thought chain reasoning and orchestration layer, a fully automated path execution layer, and a standardized tool interface layer; Configure a data contract based on JSON format for the associated business layer; wherein the data contract is used to describe the technical parameters required for data interaction between business layers.
[0014] According to a second aspect of the present invention, a transportation industry intelligent agent engineering construction system based on a thought chain reasoning and standardized tool invocation framework is provided, comprising: The user interaction layer is used to obtain the user's current input command and push it to the thought chain reasoning and orchestration layer; The thought chain reasoning orchestration layer is used to parse the intent of user commands and generate corresponding reasoning step chains. The fully automated path execution layer is used to respond to the current inference step chain, trigger the automatic orchestration of the tool call sequence and generate a directed acyclic graph of tool calls, and determine the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, call the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assemble each intermediate result to obtain structured output.
[0015] In some exemplary embodiments, the thought chain reasoning orchestration layer includes: The instruction intent analysis module is used to identify the target business domain and operation type corresponding to the user instruction; The task decomposition and planning module is used to decompose user commands into several independently executable atomic tasks and determine the dependencies between the atomic tasks. The tool selection and matching module is used to retrieve the corresponding matching tools based on the task content and / or task requirements of the atomic task. The inference chain generation module is used to assemble an inference chain based on a preset step chain template, combined with information from atomic tasks, dependencies, and matching tools.
[0016] In some exemplary embodiments, the fully automated path execution layer includes: The tool call orchestrator generates a directed acyclic graph of tool calls based on the step order and dependencies of the inference step chain, and determines the execution strategy. The intermediate results manager is used to retrieve the intermediate results returned by the tool after the execution of the atomic task and pass them to the next step as input parameters; The exception handling and retry module is used to cover automatic recovery strategies for exception scenarios such as tool call timeout, error return, and partial completion. The synthesizer is used to collect intermediate results from various tools and assemble them based on a preset business template to obtain a structured intelligent agent.
[0017] According to a third aspect of the present invention, a computer program product is provided, on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described intelligent agent engineering construction system for the transportation industry based on the thought chain reasoning and standardized tool calling framework.
[0018] According to a fourth aspect of the present invention, an electronic device is provided, comprising: Processor; and Memory for storing the executable instructions of the processor; The processor is configured to implement the above-described intelligent agent engineering construction system for the transportation industry based on the thought chain reasoning and standardized tool invocation framework when executing the executable instructions.
[0019] According to a fifth aspect of the present invention, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described intelligent agent engineering construction system for the transportation industry based on a thought chain reasoning and standardized tool invocation framework.
[0020] The engineering construction system for intelligent agents in the transportation industry, based on a thought chain reasoning and standardized tool invocation framework, provided by embodiments of the present invention, utilizes a framework design based on a user interaction layer, a thought chain reasoning orchestration layer, a fully automated path execution layer, and a standardized tool interface layer. This framework enables runtime dynamic task decomposition and tool selection via the thought chain reasoning orchestration layer without manual intervention. By recording the intent, selected tools, input parameters, actual output, and subsequent decisions at each step of the reasoning step chain, a complete execution log is formed. When anomalies occur during automatic execution, maintenance personnel can accurately locate the problematic step and cause by tracing back the reasoning chain, significantly reducing troubleshooting costs; thus achieving full-process traceability and auditability. By setting up a standardized tool interface layer, the encapsulation of business capabilities is completely decoupled from the intelligent agent's reasoning logic, allowing the construction of intelligent agents in new business domains to be completed without starting from scratch, simply by registering standardized tools and configuring reasoning chain templates, thereby significantly shortening the development cycle. Simultaneously, the unified tool interface specification, standardized reasoning step chain format, and predefined exception handling strategies ensure that intelligent agents built by different business domains and developers maintain a consistent level of behavioral reliability and maintainability. When the interface of the underlying business system changes, only the adaptation code of the corresponding tool needs to be updated, without affecting the inference and orchestration logic of the upper layer. This significantly enhances the maintainability and quality consistency of the intelligent agent.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 This illustration shows a schematic diagram of an exemplary embodiment of the present invention: an engineering construction method for intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework. Figure 2 This diagram schematically illustrates the overall architecture of an intelligent agent engineering construction system according to an exemplary embodiment of the present invention; Figure 3 This diagram illustrates an exemplary embodiment of the present invention of an intelligent agent automatically executing a main process; Figure 4 This schematic diagram illustrates the composition of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation
[0024] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the invention will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0025] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0026] In related technologies, several key technical issues urgently need to be addressed, including: how to standardize and decouple the reasoning capabilities of large models from external tool calls to enable independent evolution and flexible combination of inference links and tool implementations; how to establish unified tool interface specifications so that tools from different business domains can be plugged and played into the agent framework, eliminating redundant development; how to achieve automatic decomposition of complex user commands and intelligent orchestration of tool call sequences, upgrading the development of agents for new business scenarios from "manual coding" to "configuration-based assembly"; and how to maintain the visualization and traceability of intermediate states throughout the automated execution process to ensure the reliability and auditability of inference and execution.
[0027] To address the shortcomings and deficiencies of existing technologies, this example implementation provides an engineering method for constructing intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework. (Reference) Figure 1 As shown, the method specifically includes: Step S11: Obtain the user's current input command using the user interaction layer and push it to the thought chain reasoning orchestration layer; Step S12: In the thought chain reasoning arrangement layer, the user's instruction intent is parsed to generate the corresponding reasoning step chain. In step S13, the fully automated path execution layer responds to the current inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, calls the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assembles each intermediate result to obtain structured output.
[0028] The following will describe in more detail each step of the engineering construction method for intelligent agents in the transportation industry based on the thinking chain reasoning and standardized tool invocation framework in this example embodiment, with reference to the accompanying drawings and embodiments.
[0029] For example, the above-described method for engineering and constructing intelligent agents may include: Step S101: Pre-build a system framework based on a user interaction layer, a thought chain reasoning and orchestration layer, a fully automated path execution layer, and a standardized tool interface layer; Step S101: Configure a data contract based on JSON format for the associated business layer; wherein the data contract is used to describe the technical parameters required for data interaction between business layers.
[0030] Specifically, this can involve building an intelligent agent engineering system locally on the server side or on the user's smart terminal device. (Reference) Figure 2 As shown, the system framework includes a user interaction layer, a thought chain reasoning orchestration layer, a fully automated path execution layer, and a standardized tool interface layer. The user interaction layer acquires the user's current input command and pushes it to the thought chain reasoning orchestration layer. The thought chain reasoning orchestration layer parses the user command intent and generates a corresponding reasoning step chain. The fully automated path execution layer, in response to the current reasoning step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, determining the execution strategy; based on the directed acyclic graph of tool calls and the corresponding execution strategy, it calls the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and based on a preset business template, it assembles the intermediate results to obtain structured output.
[0031] For example, the method further includes: Pre-obtain executable business functions from each business system; define corresponding business tools for each executable business function and configure the corresponding business tool interfaces; Configure tool indexes and function tags for business tool interfaces, as well as configure corresponding tool invocation rules; among which, tool invocation rules include: input parameter schema definition, output format schema definition, exception code enumeration, and timeout retry strategy.
[0032] Specifically, the server can pre-collect data from various business systems within the transportation industry to identify executable business processes that can be invoked and executed within each system. Each executable business process is defined as a business tool, which can be invoked to perform specific traffic data processing tasks. For each business tool, a corresponding business tool interface can be configured, allowing users to invoke the tool. For each business tool, corresponding function tags can be configured based on the specific functions of its original executable business. For example, function tags could be image recognition, face recognition, license plate recognition, abnormal traffic condition information retrieval, information dissemination, intersection indicator light control, etc. A corresponding tool index can be created for all business tools to facilitate tool retrieval. Simultaneously, tool invocation rules can be configured for each business tool, enabling the fully automated path execution layer to invoke business tools according to these rules. A tool registry is formed at the standardized tool interface layer, and the tool index and tool invocation rules are written into the tool registry. In the tool registry, each tool declares not only its input and output schemas, but also its capability tags; for example, the function tags can be "traffic condition query", "toll collection", "information dissemination", and the applicable business scenarios.
[0033] Specifically, the three-layer decoupled intelligent agent engineering architecture provided by this invention decomposes the construction of intelligent agents into three independent layers: a standardized tool interface layer, a thought chain reasoning and orchestration layer, and a fully automatic path execution layer. Each business layer can be connected through a standardized JSON data contract.
[0034] A standardized tool interface specification system is achieved by defining a standardized tool interface layer that includes input parameter schema, output format schema, exception code enumeration and timeout retry strategy, as well as a tool registration and dynamic discovery mechanism based on capability tags.
[0035] In step S11, the user's current input instruction is obtained through the user interaction layer and pushed to the thought chain reasoning orchestration layer.
[0036] In this example implementation, the user can input current user commands on a smart terminal device. The user interaction layer collects the user's input data in real time and pushes the command information to the thought chain reasoning and orchestration layer. For example, the user-input command information can be a text command or a voice command. When the input command information is a voice command, the user interaction layer can recognize the voice data and convert it into a corresponding text command. The text data of the command is then passed to the thought chain reasoning and orchestration layer. For example, the user interaction layer can include the input devices of the smart terminal device, such as the terminal device's keyboard, mouse, microphone, and display.
[0037] In step S12, the user's instruction intent is parsed in the thought chain reasoning orchestration layer to generate the corresponding reasoning step chain.
[0038] For example, step S12 described above may specifically include: Step S121: Identify the target business area and operation type corresponding to the user command; Step S122: Perform instruction splitting on the user instruction to obtain several independently executable atomic tasks, and determine the dependencies between the atomic tasks. Step S123: Retrieve the corresponding matching tool based on the task content and / or task requirements of the atomic task; Step S124: Based on the preset step chain template, the information of atomic tasks, dependencies, and matching tools is combined to assemble a reasoning step chain.
[0039] Specifically, after receiving the text data of a user instruction, the thought chain reasoning orchestration layer can trigger the creation of an instruction parsing task. Executing this task first involves calling a trained natural language recognition model to segment, recognize, and structurally parse the instruction text, extracting keywords and generating recognition results. The instruction intent analysis module then determines the corresponding business domain and operation type based on the recognition results. Simultaneously, the task decomposition and planning module calls a trained instruction decomposition model, using the recognition results as model input, to break down the user instruction recognition results into multiple independently executable atomic tasks and analyze the dependencies between these tasks. A task dependency analysis module can identify the order and parallelism possibilities between the atomic tasks. For example, the dependencies between atomic tasks could be that the output data of task A serves as the input data of task B; or, the output data of tasks C and D serves as the input data of task E, with the input data of task E feeding back to task C and adjusting the input data of task C.
[0040] In addition, task content and / or task requirement data for atomic tasks can be generated. Based on the identified atomic tasks, the tool selection and matching module retrieves the most suitable tool from the tool registry according to the requirements of each atomic task. The inference chain generation module assembles all the information output by the above modules into a standardized chain-of-thought trace. The generated inference chain can be sent to the fully automated path execution layer. Specifically, the inference chain contains a complete template of "analysis → tool selection → invocation strategy → expected result → next decision condition".
[0041] For example, retrieving corresponding matching tools based on the task content and / or task requirements of the atomic task includes: Create a tool retrieval task based on the task content and / or task requirements; the tool retrieval task includes: function description text; Based on the tool retrieval task, the standardized tool interface layer retrieves tools from the tool center whose function description text matches the function tag; and when a matching tool is found, the retrieval results of the matching tool are displayed in the graphical user interface; wherein, the retrieval results of the matching tool include at least one business tool.
[0042] Specifically, after obtaining the task content and / or task requirements of the atomic task, the corresponding functional description text can be configured, and a corresponding tool retrieval task can be created. The tool selection and matching module executes the tool retrieval task, initiates a search to the tool registry center based on the keywords in the functional description text, determines the corresponding matching tool, and outputs the matching tool retrieval results.
[0043] Exemplary, in some embodiments, reference is made to Figure 3 As shown, after the instruction intent analysis module determines the corresponding business domain and operation type based on the recognition results, it can use preset rules to judge the current business domain and operation type to identify whether the current user instruction is a complex instruction. If it is identified as a complex instruction, an instruction decomposition task is triggered to break down the user instruction into multiple atomic tasks. Alternatively, if it is determined to be a simple instruction, a direct matching tool is triggered. For example, if the business domain and operation type determine that it involves at least two business domains and / or requires at least two data processing operations, it is judged as a complex instruction; otherwise, it is judged as a simple instruction.
[0044] For example, when the user's current input is a complex command, the large model in the inference orchestration layer first performs semantic parsing to extract the operation intent and business domain tags; then it retrieves a set of tools that match the tags from the tool registry; next, it generates a structured sequence of steps through Chain-of-Thought inference, with each step including: a description of the step intent, the selected tool ID and parameters, the expected intermediate result, and the subsequent decision logic for success or failure; finally, it assembles all the steps into a complete inference chain JSON output.
[0045] Specifically, by leveraging the multi-step reasoning capabilities of a large model at the thought chain reasoning orchestration layer, a structured reasoning step chain containing intent, tool selection, parameters, expected results, and decision logic is dynamically generated at runtime based on user instructions, thereby achieving automatic task decomposition and tool selection driven by the thought chain.
[0046] In step S13, the fully automated path execution layer responds to the current inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, calls the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assembles each intermediate result to obtain structured output.
[0047] For example, the fully automated path execution layer, in response to the inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines the execution strategy, including: The fully automated path execution layer responds to the reasoning step chain pushed by the thought chain reasoning orchestration layer, calls the tool call orchestrator to generate a directed acyclic graph of tool calls based on the step order and dependencies of the reasoning step chain, and determines the execution strategy; In this context, directed acyclic graphs are used to represent tool call sequences.
[0048] For example, based on the directed acyclic graph of tool calls and the corresponding execution strategy, the standardized tool interface layer calls the corresponding tools to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on a preset business template, the intermediate results are assembled to obtain structured output, including: Based on the directed acyclic graph of tool calls and the corresponding execution strategy, the corresponding tools are called to the standardized tool interface layer so that each called tool can execute the corresponding atomic task. Use the intermediate results manager to obtain the intermediate results returned by the tool after the execution of the atomic task, and pass them to the next step as input parameters; The synthesizer is invoked to collect intermediate results from various tools, and the intermediate results are assembled based on a preset business template to obtain a structured intelligent agent.
[0049] Specifically, the fully automated path execution layer is primarily used to automatically orchestrate and execute tool call sequences driven by inference step chains. Upon receiving the inference step chain, the fully automated path execution layer triggers the tool call orchestrator to generate a Directed Acyclic Graph (DAG) of tool calls according to the step order and dependencies of the inference step chain, and determines the execution strategy. The execution measurement can be the serial / parallel execution relationship between tools. Each tool, based on the determined DAG and execution measurement, executes its corresponding task sequentially and outputs the result.
[0050] The intermediate results manager actively collects the tool return results from each tool at the corresponding step and passes them to the next step as input parameters based on dependencies and execution steps. This process continues sequentially until all atomic tasks have been completed.
[0051] When tools execute atomic tasks, the exception handling and retry module monitors the abnormal status of each tool in real time during the execution process, covering automatic recovery strategies for abnormal scenarios such as tool call timeout, return error, and partial completion.
[0052] After all steps are completed, the synthesizer is triggered to collect the intermediate results of each step and synthesize them into a user-oriented structured output according to a predetermined template.
[0053] Specifically, by implementing a fully automated path execution engine in the fully automated path execution layer, a collaborative working mechanism can be achieved, including four sub-modules: tool call DAG orchestration, intermediate result management, automatic retry of exceptions, and final output synthesis.
[0054] For example, the standardized tool interface schema field may include: input parameter schema (JSON Schema format, including parameter name, type, whether it is required, default value, and value range), output format schema (JSON Schema format), exception code enumeration (success / parameter error / timeout / insufficient permissions / system error), timeout period (default 30 seconds, which can be configured according to the tool type), and maximum number of retries (default 3 times).
[0055] The inference step chain JSON structure may include: each step contains step_id (step number), intent (step intent description), tool_id (selected tool identifier), params (parameter key-value pairs), expected_output_schema (expected output format), on_success (next step or complete decision after success), and on_failure (handling strategy after failure, retry / skip / abort).
[0056] The rules for determining task dependencies may include: if atomic task B requires the output of task A as an input parameter, then B depends on A and must be executed serially; if the input parameters of two atomic tasks have no overlap, they can be executed in parallel to shorten the total execution time.
[0057] Intermediate result delivery methods include: after each step is completed, the tool returns results stored by the intermediate result manager indexed by step ID. The output values of previous steps can be referenced in the params field of subsequent steps using the syntax "${step_N.field}", with the execution engine automatically performing variable substitution before the call.
[0058] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.
[0059] Further reference Figure 2 As shown, this example implementation also provides an engineering construction system for intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework, including: The user interaction layer is used to obtain the user's current input command and push it to the thought chain reasoning and orchestration layer; The thought chain reasoning orchestration layer is used to parse the intent of user commands and generate corresponding reasoning step chains. The fully automated path execution layer is used to respond to the current inference step chain, trigger the automatic orchestration of the tool call sequence and generate a directed acyclic graph of tool calls, and determine the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, call the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assemble each intermediate result to obtain structured output.
[0060] For example, the thought chain reasoning orchestration layer includes: The instruction intent analysis module is used to identify the target business domain and operation type corresponding to the user instruction; The task decomposition and planning module is used to decompose user commands into several independently executable atomic tasks and determine the dependencies between the atomic tasks. The tool selection and matching module is used to retrieve the corresponding matching tools based on the task content and / or task requirements of the atomic task. The inference chain generation module is used to assemble an inference chain based on a preset step chain template, combined with information from atomic tasks, dependencies, and matching tools.
[0061] An example, a fully automated path execution layer includes: The tool call orchestrator generates a directed acyclic graph of tool calls based on the step order and dependencies of the inference step chain, and determines the execution strategy. The intermediate results manager is used to retrieve the intermediate results returned by the tool after the execution of the atomic task and pass them to the next step as input parameters; The exception handling and retry module is used to cover automatic recovery strategies for exception scenarios such as tool call timeout, error return, and partial completion. The synthesizer is used to collect intermediate results from various tools and assemble them based on a preset business template to obtain a structured intelligent agent.
[0062] For example, after receiving natural language input from the user, the instruction intent analysis module identifies the operation target and the relevant business area. For instance, the operation target could be: "close the entrance," "publish information," or "query status." If the instruction involves a single operation, such as "query the current traffic conditions of a certain road segment," it directly enters the tool matching stage. Alternatively, if the instruction involves cross-system collaborative operations, such as "close the entrance and publish a detour notice," it enters the task decomposition stage.
[0063] During the task decomposition and inference chain generation phase, after complex instructions are decomposed into multiple atomic tasks, the task dependency analysis module identifies the order and parallel possibilities between these atomic tasks. Each atomic task matches the most suitable tool instance from the tool registry center, ultimately generating a standardized step chain containing complete inference logic.
[0064] In the automated execution loop phase of the atomic task, the tool call orchestrator transforms the inference step chain into a DAG graph and automatically determines whether to execute sequentially (with dependencies) or in parallel (without dependencies) based on dependencies. The execution engine drives the tool calls step by step sequentially, checking the return status after each step: if successful, the result is stored in the intermediate result manager and the next step is continued; if it fails, it is automatically retried if the number of retries has not exceeded the limit, and if the limit is exceeded, a predefined exception handling strategy is triggered.
[0065] During the result synthesis and presentation phase, once the entire process is completed, the final output synthesizer assembles the intermediate results of each step into a unified structured output according to the business template. For example, the structured output could be "The following operations have been completed: 1. Close XX entry (confirmed); 2. Update information board information (published); 3. Push detour route to navigation APP (pushed)" and presented to the user for confirmation in the graphical user interface.
[0066] The method and system provided in this invention, after user instructions are parsed and decomposed by the inference orchestration layer, generate an inference chain that simultaneously drives tool selection in the standardized tool layer and invocation orchestration in the execution layer. The three layers are connected by a clearly defined JSON-formatted data contract—the inference chain outputs a standardized sequence of steps, the tool layer provides standardized tool capability descriptions, and the execution layer schedules tools one by one according to the step sequence. Modifications within any layer do not affect the operation of other layers. This invention enables the development of intelligent agents for new business scenarios to no longer require writing code from scratch. Instead, by configuring tool registration (encapsulating the API of the new business system into a tool conforming to standard specifications), the inference orchestration layer can automatically discover and invoke new tools. The development mode changes from "manual coding" to "tool registration + inference chain template configuration."
[0067] Compared with the prior art, the present invention has the following significant advantages: (1) The level of engineering has been greatly improved. By completely decoupling the business capabilities from the intelligent agent reasoning logic through the standardized tool interface layer, the construction of intelligent agents in new business domains no longer needs to be developed from scratch, but can be completed by registering standardized tools and configuring reasoning link templates, shortening the development cycle from several months to several weeks.
[0068] (2) Maintainability and quality consistency are significantly enhanced. Unified tool interface specifications, standardized inference step chain formats, and predefined exception handling strategies ensure that agents built by different business domains and developers maintain a consistent level of behavioral reliability and maintainability. When the interface of the underlying business system changes, only the adaptation code of the corresponding tool needs to be updated, without affecting the inference and orchestration logic of the upper layer.
[0069] (3) The automated processing capability of complex instructions is outstanding. Unlike existing technologies that require manual pre-arrangement of tool call sequences, this invention realizes dynamic task decomposition and tool selection at runtime through the thinking chain reasoning arrangement layer. A high-level natural language instruction (such as "close the entrance of a certain road segment in the up direction and issue a detour notice") can be automatically decomposed into a sub-task sequence across multiple business systems without manual intervention.
[0070] (4) Full-process traceability and auditability. Each step in the reasoning chain records its intent, selected tools, input parameters, actual output, and subsequent decisions, forming a complete execution log. When an abnormality occurs during automatic execution, maintenance personnel can accurately locate the problematic step and cause by tracing back the reasoning chain, significantly reducing troubleshooting costs.
[0071] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0072] Figure 4 A schematic diagram of an electronic device suitable for implementing embodiments of the present invention is shown.
[0073] It should be noted that, Figure 4 The electronic device 1000 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0074] like Figure 4 As shown, the electronic device 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1002 or programs loaded from storage section 1008 into Random Access Memory (RAM) 1003. The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004. Furthermore, the electronic device 1000 also includes an FPGA device and a System-on-a-Chip (SoC) device.
[0075] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.
[0076] In particular, according to embodiments of the present invention, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs various functions defined in the system of this application.
[0077] Specifically, the aforementioned electronic devices can be user-side smart terminal devices, such as portable computers.
[0078] It should be noted that the storage medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0080] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0081] It should be noted that, as another aspect, this application also provides a storage medium, which may be included in an electronic device or may exist independently without being assembled into the electronic device. The aforementioned storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to perform the methods described in the following embodiments. For example, the electronic device may perform... Figure 1 The steps of the method shown.
[0082] In one embodiment, this application provides a computer program product including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0083] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0084] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
[0085] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for engineering the construction of intelligent agents in the transportation industry based on a thought chain reasoning and standardized tool invocation framework, characterized in that, The method includes: The user interaction layer is used to obtain the user's current input command and push it to the thought chain reasoning and orchestration layer; In the thought chain reasoning orchestration layer, the user's instructions are parsed to generate the corresponding reasoning step chain; The fully automated path execution layer responds to the current inference step chain, triggers the automatic orchestration of the tool call sequence and generates a directed acyclic graph of tool calls, and determines the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, calls the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assembles each intermediate result to obtain structured output.
2. The method according to claim 1, characterized in that, The thought chain reasoning orchestration layer parses user commands to understand their intent and generates corresponding reasoning step chains, including: Identify the target business area and operation type corresponding to the user command; User instructions are broken down into several independently executable atomic tasks, and the dependencies between these atomic tasks are determined. Search for the corresponding matching tool based on the task content and / or task requirements of the atomic task; Based on a preset step chain template, the inference step chain is assembled by combining information from atomic tasks, dependencies, and matching tools.
3. The method according to claim 2, characterized in that, Search for corresponding matching tools based on the task content and / or task requirements of the atomic task, including: Create a tool retrieval task based on the task content and / or task requirements; the tool retrieval task includes: function description text; Based on the tool retrieval task, the standardized tool interface layer retrieves tools from the tool center whose function description text matches the function tag; and when a matching tool is found, the retrieval results of the matching tool are displayed in the graphical user interface; wherein, the retrieval results of the matching tool include at least one business tool.
4. The method according to claim 1 or 3, characterized in that, The method further includes: Pre-obtain executable business functions from each business system; define corresponding business tools for each executable business function and configure the corresponding business tool interfaces; Configure tool indexes and function tags for business tool interfaces, as well as configure corresponding tool invocation rules; among which, tool invocation rules include: input parameter schema definition, output format schema definition, exception code enumeration, and timeout retry strategy.
5. The method according to claim 1, characterized in that, The fully automated path execution layer responds to the inference step chain, triggering the automatic orchestration of tool call sequences and generating a directed acyclic graph of tool calls, and determining the execution strategy, including: The fully automated path execution layer responds to the reasoning step chain pushed by the thought chain reasoning orchestration layer, calls the tool call orchestrator to generate a directed acyclic graph of tool calls based on the step order and dependencies of the reasoning step chain, and determines the execution strategy; In this context, directed acyclic graphs are used to represent tool call sequences.
6. The method according to claim 1 or 5, characterized in that, Based on the directed acyclic graph of tool calls and the corresponding execution strategies, the standardized tool interface layer calls the corresponding tools to execute the corresponding atomic tasks and obtain the intermediate results output by each tool. Furthermore, based on preset business templates, intermediate results are assembled to obtain structured output, including: Based on the directed acyclic graph of tool calls and the corresponding execution strategy, the corresponding tools are called to the standardized tool interface layer so that each called tool can execute the corresponding atomic task. Use the intermediate results manager to obtain the intermediate results returned by the tool after the execution of the atomic task, and pass them to the next step as input parameters; The synthesizer is invoked to collect intermediate results from various tools, and the intermediate results are assembled based on a preset business template to obtain a structured intelligent agent.
7. The method according to claim 1, characterized in that, The method further includes: Pre-build a system framework based on a user interaction layer, a thought chain reasoning and orchestration layer, a fully automated path execution layer, and a standardized tool interface layer; Configure a data contract based on JSON format for the associated business layer; wherein the data contract is used to describe the technical parameters required for data interaction between business layers.
8. A transportation industry intelligent agent engineering construction system based on a thought chain reasoning and standardized tool invocation framework, characterized in that, The system includes: The user interaction layer is used to obtain the user's current input command and push it to the thought chain reasoning and orchestration layer; The thought chain reasoning orchestration layer is used to parse the intent of user commands and generate corresponding reasoning step chains. The fully automated path execution layer is used to respond to the current inference step chain, trigger the automatic orchestration of the tool call sequence and generate a directed acyclic graph of tool calls, and determine the execution strategy; and, based on the directed acyclic graph of tool calls and the corresponding execution strategy, call the corresponding tools to the standardized tool interface layer to execute the corresponding atomic tasks and obtain the intermediate results output by each tool; and, based on the preset business template, assemble each intermediate result to obtain structured output.
9. The system according to claim 8, characterized in that, The thought chain reasoning arrangement layer includes: The instruction intent analysis module is used to identify the target business domain and operation type corresponding to the user instruction; The task decomposition and planning module is used to decompose user commands into several independently executable atomic tasks and determine the dependencies between the atomic tasks. The tool selection and matching module is used to retrieve the corresponding matching tools based on the task content and / or task requirements of the atomic task. The inference chain generation module is used to assemble an inference chain based on a preset step chain template, combined with information from atomic tasks, dependencies, and matching tools.
10. The system according to claim 8, characterized in that, The fully automated path execution layer includes: The tool call orchestrator generates a directed acyclic graph of tool calls based on the step order and dependencies of the inference step chain, and determines the execution strategy. The intermediate results manager is used to retrieve the intermediate results returned by the tool after the execution of the atomic task and pass them to the next step as input parameters; The exception handling and retry module is used to cover automatic recovery strategies for exception scenarios such as tool call timeout, error return, and partial completion. The synthesizer is used to collect intermediate results from various tools and assemble them based on a preset business template to obtain a structured intelligent agent.
