Instruction processing method, device, equipment, storage medium and intelligent terminal
Patent Information
- Application Number
- CN202610553166.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-10-23
AI Technical Summary
[0002]通过任务指令的路由,可以将任务指令路由至能够执行相应任务的智能体,但是难以实现高准确性且快速的路由
[0008]本公开实施例提供的技术方案与现有技术相比具有如下优点:本公开实施例的一种指令处理方法、装置、设备及存储介质,其中方法包括:获得任务指令;根据第一路由模型和/或第二路由模型确定任务指令对应的路由信息;其中,第一路由模型的参数量小于第二路由模型的参数量;根据路由信息,执行任务指令对应的任务。采用上述技术方案,获得任务指令,通过参数量较小、处理速度较快的第一路由模型,和/或参数量较大、准确性较高的第二路由模型,对该任务指令进行处理,确定路由信息,根据该路由信息和任务指令进行相应任务的执行,实现了通过适合对该任务指令进行路由处理的模型,对该任务指令进行处理,实现了准确性和响应速度之间的平衡。
Smart Images

Figure CN122963615A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to an instruction processing method, apparatus, device, storage medium, and smart terminal. Background Technology
[0002] Task instructions can be routed to agents capable of performing the corresponding tasks, but it is difficult to achieve highly accurate and fast routing. Summary of the Invention
[0003] To address the aforementioned technical problems, this disclosure provides an instruction processing method, apparatus, device, storage medium, and smart terminal.
[0004] In a first aspect, this disclosure provides an instruction processing method, the method comprising: Receive mission instructions; The routing information corresponding to the task instruction is determined according to the first routing model and / or the second routing model; wherein the number of parameters of the first routing model is less than the number of parameters of the second routing model; Based on the routing information, execute the task corresponding to the task instruction.
[0005] Secondly, this disclosure provides an instruction processing apparatus, the apparatus comprising: The first acquisition module is used to acquire task instructions; The second obtaining module is used to determine the routing information corresponding to the task instruction based on the first routing model and / or the second routing model; wherein the number of parameters of the first routing model is less than the number of parameters of the second routing model; The routing module is used to execute the task corresponding to the task instruction based on the routing information.
[0006] Thirdly, embodiments of this disclosure also provide an electronic device, including: processor; Memory, used to store executable instructions; The processor is used to read executable instructions from memory and execute the executable instructions to implement the instruction processing method of the first aspect described above.
[0007] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the instruction processing method described in the first aspect.
[0008] The technical solution provided in this disclosure has the following advantages compared with the prior art: An instruction processing method, apparatus, device, and storage medium according to an embodiment of this disclosure includes: obtaining a task instruction; determining routing information corresponding to the task instruction based on a first routing model and / or a second routing model; wherein the number of parameters in the first routing model is less than the number of parameters in the second routing model; and executing the task corresponding to the task instruction based on the routing information. By adopting the above technical solution, the task instruction is obtained, and the task instruction is processed using a first routing model with a smaller number of parameters and faster processing speed, and / or a second routing model with a larger number of parameters and higher accuracy, to determine the routing information. The corresponding task is then executed based on the routing information and the task instruction. This achieves a balance between accuracy and response speed by processing the task instruction using a model suitable for routing it. Attached Figure Description
[0009] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0010] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating an instruction processing method provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of the structure of an instruction processing device provided in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the hardware circuit structure of an instruction processing device provided in an embodiment of the present disclosure. Detailed Implementation
[0012] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0013] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0014] To address the problems in related technologies, embodiments of this disclosure provide an instruction processing method, apparatus, device, storage medium, and smart terminal.
[0015] Figure 1 This is a flowchart illustrating an instruction processing method provided in an embodiment of the present disclosure. The method can be executed by an instruction processing device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. This instruction processing device and / or electronic device can be configured in an intelligent robot or a vehicle's intelligent cockpit. An intelligent cockpit, also known as a smart cabin, can be a car cockpit equipped with an in-vehicle voice interaction system, supporting function control of the vehicle's infotainment system via natural language commands. Figure 1 As shown, the method includes: Step 101: Obtain the task instructions.
[0016] The task instruction can be the text that drives the task execution object to complete the corresponding task. The task execution object can be the object that completes the task, and this task execution object can be an intelligent agent. The intelligent agent can be an intelligent agent with autonomous perception, planning, and execution capabilities. In a smart cockpit, it can be the processing unit for in-vehicle voice tasks, or it can be the processing unit for the voice tasks of an embodied intelligent robot. The intelligent agent can include active intelligent agents and intelligent agents that need to be newly activated.
[0017] In this embodiment, the user can perform a command input operation. This embodiment does not limit the command input operation; for example, the command input operation can be a voice input operation, a text input operation, etc. The command processing device can obtain the task command input by the user in response to the command input operation.
[0018] Step 102: Determine the routing information corresponding to the task instruction based on the first routing model and / or the second routing model; wherein the number of parameters in the first routing model is less than the number of parameters in the second routing model.
[0019] The first routing model can be a neural network model used for routing task instructions. The second routing model can be another neural network model used for routing task instructions. The parameter size of the first routing model is smaller than that of the second routing model. The first routing model can be understood as a lightweight model; for example, it could be a lightweight model for implementing Natural Language Understanding (NLU). The second routing model can be a large model; for example, it could be a Large Language Model (LLM). Furthermore, the response speed of the first routing model is faster than that of the second routing model. For example, the response speed of the first routing model is in the millisecond range, while the response speed of the second routing model is in the hundreds of milliseconds to seconds range.
[0020] In this embodiment, the routing model implemented through the first routing model can be ultra-fast planning, which can be performed for simple and explicit single-task instructions. This ultra-fast planning can be a path planning that responds quickly through a lightweight natural language understanding model without large model inference. The routing model implemented through the second routing model can be deep planning, which can be implemented based on the deep inference planning capabilities of large language models (LLM), and this deep planning is used to handle complex, multi-step, or ambiguous task instructions.
[0021] For example, the task instructions processed by this first routing model can be semantically clear, directly executable by a single tool, and require no contextual reasoning. A single step can be a call to a tool interface (function), which is an execution function provided by the agent and can be invoked. This tool interface can be called through a tool interface carrying parameters, thereby driving the execution of vehicle-mounted functions. The tool interface can be understood as an interface-based function in the agent domain.
[0022] The second routing model can process task instructions that meet one or more of the following conditions: semantic complexity, ambiguity, multiple steps, and reliance on dialogue history. Furthermore, in each round of interaction, this second routing model can combine the current task instruction with historical dialogue information to determine the task execution object to which each intent instruction within the task instruction should be routed. The routing information can then be used to route task instructions to the corresponding task execution object.
[0023] In this embodiment of the disclosure, the instruction processing device can select a suitable model from the first routing model and the second routing model to process the task instruction, and determine the routing information corresponding to the task instruction through the model. For example, the instruction processing device can determine the text complexity of the task instruction. If the text complexity is greater than a complexity threshold, the routing information corresponding to the task instruction is determined according to the first routing model; if the text complexity is not greater than the complexity threshold, the routing information corresponding to the task instruction is determined according to the second routing model.
[0024] In some embodiments of this disclosure, determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: obtaining the first routing information generated by the second routing model based on the task instruction if the first routing model fails to process the task instruction.
[0025] In this context, instruction processing failure indicates that the first routing model cannot generate routing information based on the task instruction. The first routing information can be routing information generated by the second routing model. In some embodiments of this disclosure, the task instruction corresponding to the first routing information includes multiple intent instructions and multiple tool interface information, with a one-to-one correspondence between intent instructions and tool interface information. Intent instructions can be sub-instructions obtained by dividing the task instruction based on user intent. A user intent can be implemented through a tool interface. Tool interface information can be used to record the called tool interface and the parameters used to call that tool interface.
[0026] In this embodiment, when a task instruction includes multiple intent instructions, the second routing model can generate corresponding tool interface information for each intent instruction, so as to call the task execution object that executes the intent instruction through the tool interface information. Through this second routing model, the composite task instruction is identified and decomposed into tool interface information that can be independently distributed to the corresponding task execution object, thereby realizing the intent decomposition of the task instruction and the deconstruction of the task execution scenario.
[0027] In this embodiment of the disclosure, the routing information generated by the first routing model for routing task instructions is preferentially used. If the task instructions cannot be processed by the first routing model, the instruction processing device can obtain the first routing information generated by the second routing model for the task instructions through reasoning.
[0028] In the above scheme, when a task instruction is obtained, if the first routing model, which has a smaller number of parameters and a faster processing speed, fails to process the task instruction, the second routing model, which has a larger number of parameters and higher accuracy, processes the task instruction to determine the first routing information. Based on the first routing information and the task instruction, the corresponding task is executed. Through the hybrid routing of the first and second routing models, the first routing model can process simple task instructions, avoiding the occupation of the inference resources of the second routing model. Furthermore, when the first routing model fails, the second routing model can process complex task instructions, providing sufficient inference support for complex task instructions and enabling the complex task instructions to have high processing accuracy, thus achieving a balance between accuracy and response speed.
[0029] In some embodiments of this disclosure, when the first routing model fails to process the task instruction, obtaining the first routing information generated by the second routing model based on the task instruction includes: inputting the task instruction into the first routing model and the second routing model respectively; if the first routing model fails to process the task instruction, then obtaining the first routing information generated by the second routing model based on the task instruction.
[0030] In this embodiment, the instruction processing model can simultaneously input task instructions into both the first routing model and the second routing model, which then process the task instructions concurrently. If the first routing model fails to process the task instruction, the instruction processing device can obtain the processing result from the second routing model to acquire the first routing information.
[0031] In the above scheme, two models are used to respond simultaneously. While the first routing model is processing the task instruction, the second routing model is also processing the task instruction at the same time. Even if it is determined that the first routing model has failed to process the task instruction, the second routing model is already processing the task instruction, thereby improving the efficiency of generating the first routing information.
[0032] In some embodiments of this disclosure, when the first routing model fails to process the task instruction, obtaining the first routing information generated by the second routing model based on the task instruction includes: inputting the task instruction into the first routing model; if the first routing model fails to process the task instruction, then inputting the task instruction into the second routing model to obtain the first routing information generated by the second routing model based on the task instruction.
[0033] In this embodiment, the instruction processing model can first input the task instruction into the first routing model, and then perform routing processing on the task instruction through the first routing model. If the first routing model fails to process the task instruction, the task instruction is input into the second routing model, and then the task instruction is processed by the second routing model to obtain the first routing information.
[0034] In the above scheme, a lightweight first routing model is first used to route the task instructions. If the first routing model fails, a second routing model is then used to route the task instructions, thus saving computing resources.
[0035] The above-mentioned response method, which uses double-answering and the first routing model, realizes a reasoning strategy that dynamically selects between rapid planning and deep planning based on the complexity of the task instructions.
[0036] In some embodiments of this disclosure, the failure of the first routing model to process a task instruction includes: the first routing model determining output information based on the task instruction as routing failure information. The output information can be information output by the model. The routing failure information can characterize that the model's routing processing of the task instruction has failed, that is, the model's capability is insufficient to route the task instruction.
[0037] In this embodiment, the first routing model processes the task instruction and obtains output information. The task instruction can determine whether the output information is a routing failure message; if so, it is determined that the first routing model has failed to process the task instruction.
[0038] In the above scheme, when the first routing model determines that it cannot process the task instruction, it outputs a routing failure message, thereby enabling the first routing model to determine whether the task instruction can be processed in the high-speed mode.
[0039] In some embodiments of this disclosure, obtaining first routing information generated by the second routing model based on task instructions includes: obtaining first routing information determined by the second routing model according to auxiliary information and task instructions; wherein, the auxiliary information includes historical dialogue information and card display status of the agent; wherein, the historical dialogue information includes multiple historical dialogues corresponding to multiple agents, and the card display status is used to characterize the display status of the front-end card corresponding to the agent in the foreground.
[0040] The auxiliary information can be information used by the auxiliary model to route task instructions. This auxiliary information is obtained with the user's authorization. Historical dialogue information can be used to record the historical dialogue between the user and the task execution object. This historical dialogue information can include at least one of long-term memory and short-term memory. Long-term memory can be structured knowledge extracted from one or more of historical interaction information, external knowledge, and task execution record information. Short-term memory can include contextual information from the current round of dialogue, i.e., the scene dialogue context.
[0041] When there are multiple task execution objects, each task execution object can have corresponding historical dialogue information. Specifically, the instruction processing device can maintain an independent scene dialogue context for each active task execution object, recording the multi-turn dialogue history between that task execution object and the user. An active task execution object can be understood as a task execution object that has already started. During each round of requests, the system transmits the names and scene dialogue contexts of all currently active task execution objects to the second routing model as the basis for multi-turn routing decisions. For example, if the user has previously triggered a navigation query, the navigation agent is waiting for the user to add a destination; and if the user has triggered a food delivery query, the food delivery agent is waiting for the user to confirm the goods. The instruction processing device can maintain the scene dialogue contexts of both scenarios simultaneously and use them as input data for the second routing model during the next round of user input.
[0042] Front-end cards enable user interaction with the agent. Card display states include foreground display, background suspension, etc. Foreground display indicates the card is shown on the screen. Background suspension indicates the card is not displayed on the screen, and the agent is running in the background.
[0043] In this embodiment, the instruction processing device can obtain historical dialogue information between the user and each intelligent agent, and acquire the card display status of the front-end card corresponding to each intelligent agent. This historical dialogue information and card display status are then input into the second routing model, enabling the second routing model to refer to the historical dialogue status to help determine the task execution object related to the task instruction, and to refer to the card display status to help determine the interface type and interface parameters related to the task instruction, thereby determining the first routing information.
[0044] For example, if the task instruction is "navigate home", the long-term memory in the historical dialogue information includes the home address. The second routing model can then use this address to navigate the "navigate home" task, thus determining the interface parameters. If the task instruction is "send this to him / her for me", the short-term memory in the historical dialogue information includes the context related to the current caller or contact. The second routing model can then use this short-term memory to determine the recipient for "send this to him / her for me", thus completing the recipient selection.
[0045] In the above scheme, the second routing model has a higher reasoning ability. Based on the task instructions, it adds auxiliary messages such as historical dialogue information and card display status, so that the second routing model can refer to more messages when processing the task instructions, thereby improving the accuracy of the first routing information.
[0046] In some embodiments of this disclosure, the auxiliary information further includes at least one of a user image and an environmental signal; wherein the environmental signal is used to characterize the physical environment in which the user is located.
[0047] The user image can be an image captured of the user. The environmental signal can be a description of the user's environment; this embodiment does not limit the environmental signal, but for example, the environmental information can include the vehicle interior temperature, the vehicle exterior temperature, etc.
[0048] In this embodiment, the instruction processing device can obtain a user image and environmental signals of the user's environment. This user image and / or environmental signals are then used as auxiliary information, along with the task instruction, historical dialogue information, and card display status, and input into the second routing model. This allows the second routing model to refer to the user image and / or environmental signals to help determine the interface type and interface parameters related to the task instruction, thereby determining the first routing information.
[0049] For example, if the task instruction is "open it briefly," the user image records the user pointing to the driver's side window, and the second routing model can then determine from this user image that "open it briefly" means opening the driver's side window. If the task instruction is "it's too hot," the environmental signal records the current interior and exterior temperatures, and the second routing model can then determine whether to turn on the air conditioning or open the window based on the temperature signal.
[0050] The above scheme adds multimodal information such as signals and images, providing the second routing model with information in other modalities besides text, and providing more dimensions of information for the second routing model to determine the first routing information, thereby improving the accuracy of the first routing information.
[0051] Step 103: Execute the task corresponding to the task instruction based on the routing information.
[0052] In this embodiment of the disclosure, the instruction processing device can route task instructions to the corresponding task execution object according to routing information, and execute the corresponding task through the task execution object.
[0053] In some embodiments of this disclosure, the routing information is first routing information determined according to the second routing model. Accordingly, according to the routing information, the task corresponding to the task instruction is executed, including: for each intent instruction, transmitting the interface parameters corresponding to the intent instruction to the intelligent agent associated with the tool interface type.
[0054] In this context, an intelligent agent can refer to a proxy that is able to perceive the environment and take actions to achieve a specific goal.
[0055] In this embodiment, the intelligent agent can provide capability calls through a tool interface. Based on the tool interface type, corresponding instructions can be transmitted to the corresponding intelligent agent. The task instructions processed by the second routing model can include multiple intent instructions. The first routing information determined based on these task instructions records the tool interface information corresponding to each intent instruction. For each intent instruction, the instruction processing device can transmit interface parameters to the corresponding tool interface according to the tool interface type, thereby calling the corresponding capabilities of the intelligent agent to execute the corresponding task based on the tool parameters.
[0056] The instruction processing method provided in this disclosure involves obtaining a task instruction; determining routing information corresponding to the task instruction based on a first routing model and / or a second routing model; wherein the number of parameters in the first routing model is less than the number of parameters in the second routing model; and executing the task corresponding to the task instruction based on the routing information. This disclosure, by obtaining a task instruction and processing it using a first routing model with a smaller number of parameters and faster processing speed, and / or a second routing model with a larger number of parameters and higher accuracy, determines routing information and executes the corresponding task based on the routing information and the task instruction. This achieves a balance between accuracy and response speed by processing the task instruction using a suitable model for routing.
[0057] In this embodiment, simple and clear single-task instructions such as "open the car window" and "turn off the air conditioner" are rapidly planned using the first routing model, achieving fast response and reducing queuing in concurrent request scenarios. For colloquial expressions, ambiguous intentions, context-inherited instructions, and multi-step mixed tasks that the first routing model cannot handle, a second routing model is used. Based on the semantic understanding and contextual reasoning capabilities of the second routing model, it dynamically adapts to user expressions in the open domain. For example, ambiguous intentions can be used to determine whether "I want to eat fast food" corresponds to a navigation agent or a food delivery agent; context-inherited instructions can be used to determine the specific song corresponding to "play the third song". By distinguishing between simple and complex instructions, computing resources are effectively utilized.
[0058] Optionally, the second routing model can be trained using supervised fine-tuning (SFT) combined with group relative policy optimization (GRPO). The training data for the second routing model can cover various scenarios, such as task instruction routing in single-turn dialogues, scenario continuation in multi-turn dialogues, multi-turn dialogues with context inheritance, ambiguous intent correction, and parallel multi-agent hybrid routing. The reward signal in group relative policy optimization can include routing target accuracy and parameter extraction correctness. This optimization can continuously improve the model's multi-turn inference capabilities. The routing target accuracy can be determined based on the tool interface type determined by the second routing model's inference during training and the ground truth value of that type. The parameter extraction correctness can be determined based on the interface parameters determined by the second routing model's inference during training and the ground truth value of those parameters.
[0059] Optionally, the training data for the first routing model may include negative example training data, which includes input data and output data. The input data may be task instructions other than those that the first routing model is designed to process, i.e., task instructions that exceed the processing capabilities of the first routing model. The output data may be routing failure information.
[0060] In some embodiments of this disclosure, determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: if the first routing model successfully processes the task instruction, obtaining the second routing information generated by the first routing model based on the task instruction.
[0061] Successful instruction processing enables the first routing model to generate routing information based on the task instruction. The second routing information can be the routing information generated by the first routing model. In some embodiments of this disclosure, the task instruction corresponding to the second routing information includes an intent instruction, and the second routing information includes tool interface information, which includes a tool interface type and interface parameters. In this embodiment, the task instruction that the first routing model can directly process includes an intent instruction. For this intent instruction, the first routing model can generate corresponding tool interface information to call the task execution object that executes the intent instruction through the tool interface information.
[0062] In this embodiment of the disclosure, a first routing model is preferentially used to route the task instruction through intent recognition. If the first routing model successfully processes the task instruction, the instruction processing device can obtain the second routing information generated by the first routing model in the routing process of the task instruction.
[0063] In some embodiments of this disclosure, the routing information is second routing information determined by a first routing model. Accordingly, based on the routing information, the task corresponding to the task instruction is executed, including: transmitting the interface parameters corresponding to the task instruction to the intelligent agent associated with the tool interface type; wherein the intelligent agent is used to process the task according to the interface parameters.
[0064] In this embodiment, a task instruction including a single intent instruction can be routed through a first routing model, which serves as a lightweight model, to obtain second routing information. The second routing information determined based on the task instruction records a tool interface information corresponding to the intent instruction included in the task instruction. Further, the instruction processing device can transmit interface parameters to the corresponding tool interface according to the tool interface type, thereby invoking the agent's corresponding capabilities to execute the corresponding task based on the tool parameters.
[0065] In some embodiments of this disclosure, each tool interface may have corresponding description information. The instruction processing device can match the description information with the task instruction to determine multiple candidate tool interfaces that successfully match the task instruction. A tool interface list is constructed based on the candidate tool interfaces and their description information, and this tool interface list is used as auxiliary information. The number of tool interfaces recorded in this tool interface list is less than a preset number. Therefore, through retrieval enhancement, a list of tool interfaces closely associated with the task instruction is determined, enabling the second routing model to route the task instruction based on this relatively small tool interface list.
[0066] Compared to statically injecting all tool interfaces into the model input, this approach avoids the increased inference latency and decreased accuracy caused by the increased model input length when the number of tools reaches hundreds or even thousands. Furthermore, the enhanced dynamic tool injection mechanism allows the model to route based on the description information of the candidate tool interface, avoiding complete reliance on the model's context learning capabilities for tool selection. This enables dynamic tool expansion, and adding new tool interfaces does not require full retraining of the second routing model.
[0067] The instruction processing method provided in this disclosure implements hybrid routing based on instruction complexity. Simple single-task instructions are sent to a first routing model for rapid planning, while instructions satisfying at least one of the following criteria are sent to a second routing model for deep planning. The second routing model, with scene decomposition as its core, integrates the currently input task instructions, multi-turn historical dialogue information, and the agent's card display status to achieve accurate agent distribution and task decomposition across dialogue turns.
[0068] After receiving the user's task instruction in each round, the second routing model can make the following decisions: First, it determines the continuity of the scenario. Specifically, for each segment of the user's current task instruction, it first determines whether it is a continuation of an active scenario. This active scenario can be the scenario corresponding to the currently active agent, and continuation can be understood as a supplement to the previous round of dialogue in the active scenario. If the task instruction is a response to the previous round of dialogue of an active agent, the response can include affirmation, negation, supplementation, etc., then this part of the task instruction is routed to the corresponding active agent, carrying the complete historical dialogue information of the scenario to continue reasoning. When the second routing model makes judgments, it supports scenarios where the user does not explicitly mention the scenario name, which can be the agent name. It also supports colloquial expressions such as omitting the subject, using pronouns, and implicit reference.
[0069] Furthermore, new intentions are identified and decomposed. Specifically, for task instructions that do not belong to the continuation of an active scenario, the second routing model identifies them as task instructions corresponding to a new scenario. If the task instruction corresponds to a single atomic task, it is distributed to the agent with the corresponding function. If the task instruction can be decomposed into multiple independent atomic intention instructions, they are decomposed according to the principle of independent decomposition and then distributed separately.
[0070] Furthermore, a unified processing approach is implemented for mixed rounds. Specifically, within the same round of user input, intent commands for new scenarios and intent commands for active scenarios can coexist. The second routing model can simultaneously output continuation routes for each active scenario and decomposed routes for new scenarios in a single inference iteration, with subtasks being distributed and executed in parallel after decomposition. Understandably, the above decisions can be made internally within the second routing model, and the results of these decisions are fed back through the final determined first routing information.
[0071] In the above scheme, in scenarios such as intelligent cockpits and embodied intelligent robots, dynamic hierarchical routing with two paths can be implemented based on the complexity of task instructions. Simple single-task instructions are processed through the first routing model, while complex, ambiguous, and multi-step task instructions are processed through the second routing model. By organically combining the first and second routing models, a balance is achieved between response speed and processing capacity. This realizes a dynamic hybrid reasoning routing mechanism based on the complexity of task instructions.
[0072] Furthermore, a multi-turn dialogue-aware agent routing method is provided. The instruction processing device can independently maintain the historical dialogue for each active agent, which can be understood as the agent's dialogue context. During each round of routing, the historical dialogues of all active agents are fed into the second routing model. The second routing model completes the following simultaneously in a single inference: determining the continuity of each active agent, identifying and decomposing the new task intent, and distributing the two types of results in parallel. This enables the system to correctly handle mixed scenarios of continuing multiple ongoing dialogues and initiating new tasks within the same round of input. Compared to related technologies that typically only maintain a global dialogue history when handling multi-turn dialogues, this method significantly improves routing accuracy in multi-turn, multi-agent scenarios by using independent dialogue contexts for each agent and unified perception and decision-making at the routing layer.
[0073] Furthermore, the second routing model supports omitting subjects, pronoun references, implicit scene continuation, and conversational multi-turn expressions, without requiring users to explicitly declare their intent. By semantically matching task instructions with the dialogue context of each active agent, it can correctly identify implicit references and accurately route to the corresponding agent. These implicit references can include determining the specific song referred to as "the third song" based on the previous round of recommendations, correcting slot errors based on the previous round of vehicle control commands, confirming restaurant recommendations based on the previous round, and so on. This results in a multi-turn interactive experience that more closely resembles natural conversational habits.
[0074] Furthermore, during scene distribution and tool invocation generation, in addition to text input, multimodal perception signals from the vehicle's infotainment system are integrated. These signals can include one or more of the following: gesture signals, in-vehicle sensor signals, external sensor signals, currently active applications, currently active application pages, and user personalized information. This enables accurate intent understanding based on the vehicle's environment. Therefore, by leveraging the rich environmental perception information from the vehicle's infotainment system for disambiguation and integrating multimodal signals into routing decisions, the accuracy of handling ambiguous commands is significantly improved. Ambiguous commands can include phrases like "It's too hot" or "Send this to him / her." For "It's too hot," the system can determine whether to turn on the air conditioning or open the windows by combining the in-vehicle temperature signal; for "Send this to him / her," the system can identify the contact by combining the current caller ID.
[0075] The instruction processing method provided in this disclosure, through hybrid inference routing, allows simple single-task instructions to be routed extremely quickly through a first routing model, without needing to enter the inference queue of a second routing model. The end-to-end response latency is reduced from hundreds of milliseconds during inference in the second routing model to milliseconds in the first routing model, effectively alleviating the concurrency pressure on the second routing model and improving overall system throughput. While maintaining the ability to process complex instructions, it significantly reduces the response latency of simple instructions. A unified and scalable multi-agent routing architecture is constructed, enabling the system to accurately understand user intent, which can include ambiguous intents, colloquial intent expressions, context-inherited intents, multi-task parallel intents, etc., and correctly distribute them to the corresponding agents or execution tools, expanding the coverage of task instruction routing capabilities. Based on a vector retrieval-based dynamic tool injection mechanism, the system can support efficient routing of hundreds or even thousands of tools, and adding new tools does not require full retraining of the second routing model, significantly reducing the engineering and time costs of tool expansion.
[0076] Figure 2 A schematic diagram of the structure of an instruction processing apparatus provided in an embodiment of the present disclosure is shown.
[0077] In some embodiments of this disclosure, Figure 2 The instruction processing device shown can be executed by an electronic device or a server. The electronic device can be, but is not limited to, mobile terminals such as vehicle-mounted terminals, and fixed terminals such as vehicle domain controllers. The server can be a server cluster or a cloud server.
[0078] like Figure 2 As shown, the instruction processing device 200 may include: a first acquisition module 201, a second acquisition module 202, and a routing module 203.
[0079] The first acquisition module 201 is used to acquire task instructions; The second obtaining module 202 is used to determine the routing information corresponding to the task instruction based on the first routing model and / or the second routing model; wherein the number of parameters of the first routing model is less than the number of parameters of the second routing model; The routing module 203 is used to execute the task corresponding to the task instruction based on the routing information.
[0080] Optionally, determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: If the first routing model fails to process the task instruction, the second routing model obtains the first routing information generated by the second routing model based on the task instruction.
[0081] Optionally, obtaining the first routing information generated by the second routing model based on the task instruction when the first routing model fails to process the task instruction includes: The task instructions are input into the first routing model and the second routing model respectively; If the first routing model fails to process the task instruction, then the second routing model obtains the first routing information generated based on the task instruction.
[0082] Optionally, obtaining the first routing information generated by the second routing model based on the task instruction when the first routing model fails to process the task instruction includes: The task instruction is input into the first routing model. If the first routing model fails to process the task instruction, the task instruction is input into the second routing model to obtain the first routing information generated by the second routing model based on the task instruction.
[0083] Optionally, if the first routing model fails to process the task instruction, it includes: The first routing model outputs routing failure information based on the task instruction.
[0084] Optionally, obtaining the first routing information generated by the second routing model based on the task instruction includes: Obtain the first routing information determined by the second routing model based on auxiliary information and the task instruction; wherein, the auxiliary information includes historical dialogue information and the card display status of the agent; wherein, the historical dialogue information includes multiple historical dialogues corresponding to multiple agents, and the card display status is used to characterize the display status of the front-end card corresponding to the agent in the foreground.
[0085] Optionally, the auxiliary information may further include at least one of a user image and an environmental signal; wherein the environmental signal is used to characterize the physical environment in which the user is located.
[0086] Optionally, the task instruction corresponding to the first routing information includes multiple intent instructions, and the first routing information includes multiple tool interface information, wherein the intent instructions and the tool interface information correspond one-to-one. The step of executing the task corresponding to the task instruction based on the routing information includes: For each intent instruction, the interface parameters corresponding to the intent instruction are transmitted to the agent associated with the tool interface type; wherein, the agent is used to perform task processing according to the interface parameters.
[0087] Optionally, determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: If the first routing model successfully processes the task instruction, the second routing information generated by the first routing model based on the task instruction is obtained.
[0088] Optionally, the task instruction corresponding to the second routing information includes an intent instruction, and the second routing information includes tool interface information, which includes tool interface type and interface parameters.
[0089] The instruction processing apparatus provided in this disclosure can execute the instruction processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0090] Figure 3 A schematic diagram of the hardware circuit structure of an instruction processing device provided in an embodiment of this disclosure is shown.
[0091] like Figure 3 As shown, the instruction processing device 300 may include a controller 301 and a memory 302 storing computer program instructions.
[0092] Specifically, the controller 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0093] Memory 302 may include a large-capacity storage for information or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway device. In a particular embodiment, memory 302 is a non-volatile solid-state memory. In a particular embodiment, memory 302 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0094] The controller 301 performs the steps of the instruction processing method provided in the embodiments of this disclosure by reading and executing computer program instructions stored in the memory 302.
[0095] In one example, the instruction processing device 300 may further include a transceiver 303 and a bus 304. Wherein, as... Figure 3 As shown, the controller 301, memory 302 and transceiver 303 are connected via bus 304 and communicate with each other.
[0096] Bus 304 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 304 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0097] The following are embodiments of a computer-readable storage medium provided in this disclosure. This computer-readable storage medium and the instruction processing methods of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the computer-readable storage medium, please refer to the embodiments of the above instruction processing methods.
[0098] This embodiment provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform an instruction processing method.
[0099] Of course, the computer-executable instructions provided in the embodiments of this disclosure are not limited to the above-described method operations, but can also perform related operations in the instruction processing methods provided in any embodiment of this disclosure.
[0100] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this disclosure can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer cloud platform (which may be a personal computer, server, or network cloud platform, etc.) to execute the instruction processing methods provided in the various embodiments of this disclosure.
[0101] This disclosure also provides a smart terminal, including at least one of the following: the aforementioned instruction processing device; the aforementioned electronic device; and the aforementioned computer-readable storage medium. The smart terminal may include a vehicle or a unibody intelligent robot.
[0102] Note that the above description is merely a preferred embodiment and the technical principles employed in this disclosure. Those skilled in the art will understand that this disclosure is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this disclosure. Therefore, although this disclosure has been described in detail through the above embodiments, it is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this disclosure, and the scope of this disclosure is determined by the scope of the appended claims.
Claims
1. An instruction processing method, characterized in that, include: Receive mission instructions; The routing information corresponding to the task instruction is determined according to the first routing model and / or the second routing model; wherein the number of parameters of the first routing model is less than the number of parameters of the second routing model; Based on the routing information, execute the task corresponding to the task instruction.
2. The method according to claim 1, characterized in that, Determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: If the first routing model fails to process the task instruction, the second routing model obtains the first routing information generated by the second routing model based on the task instruction.
3. The method according to claim 2, characterized in that, In the event that the first routing model fails to process the task instruction, obtaining the first routing information generated by the second routing model based on the task instruction includes: The task instructions are input into the first routing model and the second routing model respectively; If the first routing model fails to process the task instruction, then the second routing model obtains the first routing information generated based on the task instruction.
4. The method according to any one of claims 2, characterized in that, In the event that the first routing model fails to process the task instruction, obtaining the first routing information generated by the second routing model based on the task instruction includes: The task instruction is input into the first routing model. If the first routing model fails to process the task instruction, the task instruction is input into the second routing model to obtain the first routing information generated by the second routing model based on the task instruction.
5. The method according to any one of claims 2-4, characterized in that, The first routing model fails to process the task instruction, including: The first routing model outputs routing failure information based on the task instruction.
6. The method according to any one of claims 2-5, characterized in that, The process of obtaining the first routing information generated by the second routing model based on the task instruction includes: Obtain the first routing information determined by the second routing model based on auxiliary information and the task instruction; wherein, the auxiliary information includes historical dialogue information and the card display status of the agent; wherein, the historical dialogue information includes multiple historical dialogues corresponding to multiple agents, and the card display status is used to characterize the display status of the front-end card corresponding to the agent in the foreground.
7. The method according to claim 6, characterized in that, The auxiliary information also includes at least one of user image and environmental signal; wherein the environmental signal is used to characterize the physical environment in which the user is located.
8. The method according to any one of claims 2-7, characterized in that, The task instructions corresponding to the first routing information include multiple intent instructions, and the first routing information includes multiple tool interface information. The intent instructions and the tool interface information correspond one-to-one, and the tool interface information includes tool interface type and interface parameters. The step of executing the task corresponding to the task instruction based on the routing information includes: For each intent instruction, the interface parameters corresponding to the intent instruction are transmitted to the agent associated with the tool interface type; wherein, the agent is used to perform task processing according to the interface parameters.
9. The method according to any one of claims 1-8, characterized in that, Determining the routing information corresponding to the task instruction based on the first routing model and / or the second routing model includes: If the first routing model successfully processes the task instruction, the second routing information generated by the first routing model based on the task instruction is obtained.
10. The method according to claim 9, characterized in that, The task instruction corresponding to the second routing information includes an intent instruction, and the second routing information includes tool interface information.
11. An instruction processing apparatus, characterized in that, include: The first acquisition module is used to acquire task instructions; The second obtaining module is used to determine the routing information corresponding to the task instruction based on the first routing model and / or the second routing model; wherein the number of parameters of the first routing model is less than the number of parameters of the second routing model; The routing module is used to execute the task corresponding to the task instruction based on the routing information.
12. An electronic device, characterized in that, The electronic device includes: Processor and memory; The processor executes the steps of the method as described in any one of claims 1 to 10 by invoking programs or instructions stored in the memory.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that cause a computer to perform the steps of the method as described in any one of claims 1 to 10.
14. A smart terminal, characterized in that, Includes at least one of the following: The instruction processing apparatus according to claim 11; The electronic device according to claim 12 above; The computer-readable storage medium as described in claim 13.