Dialogue task management method and system, vehicle, storage medium and program product
By interrupting and resuming dialogue tasks through a task stack management mechanism, the problems of low efficiency and safety hazards in existing voice interaction technologies are solved, achieving seamless connection and dynamic switching of dialogue tasks, thereby improving driving safety and interaction efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAQIN TECH CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-05-05
AI Technical Summary
Existing multi-domain dialogue systems based on user intent classification suffer from low voice interaction efficiency and safety hazards in driving scenarios, making it difficult to meet the safety and interaction continuity requirements in driving scenarios.
A multi-dialogue task interruption recovery mechanism based on a task stack is adopted. By obtaining the current dialogue command and task information input by the user, it determines whether to interrupt the current dialogue task, stores the task information in the task stack, and activates a new dialogue task. The task stack adopts a last-in-first-out structure to ensure seamless connection and dynamic switching of dialogue tasks.
It achieves seamless resumption of dialogue tasks, reduces distraction during driving, significantly improves voice interaction efficiency and driving safety, and meets the safety and interaction continuity requirements in driving scenarios.
Smart Images

Figure CN121979478A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and more particularly to a dialogue task management method, system, vehicle, storage medium, and program product. Background Technology
[0002] With the rapid development of intelligent connected vehicles, users' demand for intelligent cockpit voice interaction has increased significantly. Users need to complete a variety of dialogue tasks in driving scenarios and switch flexibly between multiple dialogue tasks.
[0003] In related technologies, multi-domain dialogue systems based on user intent classification are typically used for dialogue task management. Specifically, this multi-domain dialogue system pre-defines fixed dialogue domains such as navigation, vehicle control, audio / video, and casual conversation. It uses a natural language understanding model to classify the intent and extract entities from the user's input voice commands, and then a dialogue manager executes the dialogue response according to a pre-defined dialogue flow. Each dialogue domain has a predefined state machine and state transitions to achieve multi-turn dialogue task management.
[0004] However, the inventors found that the above-mentioned method of managing dialogue tasks using a multi-domain dialogue system based on user intent classification has low voice interaction efficiency and safety hazards in some scenarios, making it difficult to meet the safety and interaction continuity requirements in driving scenarios. Summary of the Invention
[0005] This application provides a dialogue task management method, system, vehicle, storage medium, and program product to address the problem that in some scenarios, the dialogue task management method using a multi-domain dialogue system based on user intent classification suffers from low voice interaction efficiency and safety hazards, making it difficult to meet the safety and interaction continuity requirements in driving scenarios.
[0006] In a first aspect, this application provides a dialogue task management method, comprising: acquiring a current dialogue instruction input by a user and task information of a first dialogue task, wherein the first dialogue task is a dialogue task currently being executed by the system; determining whether to interrupt the first dialogue task based on the current dialogue instruction and task information; if it is determined that the first dialogue task should be interrupted, storing the task information in a task stack and activating a second dialogue task corresponding to the current dialogue instruction, wherein the task stack adopts a last-in-first-out structure, and the background execution function of the interrupted first dialogue task continues to run; in response to the completion of the second dialogue task or the detection of a task resumption instruction input by the user, popping the task information from the task stack and resuming the execution of the first dialogue task based on the task information.
[0007] In one possible implementation, determining whether to interrupt the first dialogue task based on the current dialogue instruction and task information includes: determining the multi-semantic dimension level based on the current dialogue instruction and task information; identifying the target topic boundary type corresponding to the current dialogue instruction based on the multi-semantic dimension level using a preset multi-semantic dimension decision matrix; and determining whether to interrupt the first dialogue task based on the target topic boundary type.
[0008] In one possible implementation, the task information includes the previous round of user-inputted historical dialogue instructions, the N rounds of historical dialogue text corresponding to the first dialogue task, and the first task system prompts. The multi-semantic dimension levels include semantic jump level, referential dependency level, and task relevance level. Based on the current dialogue instructions and task information, the multi-semantic dimension levels are determined, including: concatenating the current dialogue instructions, historical dialogue instructions, and the first task system prompts, inputting them into a lightweight semantic model for text pair relevance calculation, obtaining a text pair relevance score output by the lightweight semantic model, and determining the semantic jump level based on the text pair relevance score; concatenating the current dialogue instructions, the N rounds of historical dialogue text, and the first task system prompts, inputting them into a lightweight large language model for referential dependency detection, obtaining referential dependency information output by the lightweight large language model, and determining the referential dependency level based on the referential dependency information; and concatenating the current dialogue instructions and the first task system prompts, inputting them into a lightweight semantic model for task relevance evaluation, obtaining a task relevance score output by the lightweight semantic model, and determining the task relevance level based on the task relevance score.
[0009] In one possible implementation, the target topic boundary type includes in-task continuation, same-task switching, out-of-task interruption, and new task initiation. Based on the target topic boundary type, it is determined whether to interrupt the first dialogue task, including: determining whether the target topic boundary type is out-of-task interruption; if the target topic boundary type is out-of-task interruption, then it is determined to interrupt the first dialogue task.
[0010] In one possible implementation, the dialogue task management method further includes: if the target topic boundary type is a new task start, then suspend the first dialogue task, clear the historical dialogue text corresponding to the first dialogue task, and clear all completed dialogue tasks stored in the task stack.
[0011] In one possible implementation, after activating the second dialogue task corresponding to the current dialogue instruction, the method further includes: inputting the system prompt words of the second task corresponding to the current dialogue instruction and the second dialogue task into the Large Language Model (LLM) to generate a natural language response; and executing the background execution function of the second dialogue task based on the natural language response.
[0012] Secondly, this application provides a vehicle infotainment system, including: a dialogue task management module, which is used to execute the dialogue task management method provided in the first aspect above.
[0013] In one possible implementation, the dialogue task management module includes a task state management layer for managing dialogue tasks stored using a hierarchical context storage structure.
[0014] Thirdly, this application provides a vehicle, including: a vehicle body and an in-vehicle infotainment system as provided in the second aspect.
[0015] Fourthly, embodiments of this application provide an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the dialogue task management method as provided in the first aspect.
[0016] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the dialogue task management method provided in the first aspect.
[0017] Sixthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the dialogue task management method as provided in the first aspect.
[0018] The dialogue task management method, system, vehicle, storage medium, and program product provided in this application, wherein the dialogue task management method obtains the current dialogue command input by the user and the task information of the first dialogue task being executed by the system, determines whether to interrupt the first dialogue task based on the current dialogue command and the task information, and stores the task information in the task stack when it is determined to interrupt the first dialogue task, and activates the second dialogue task corresponding to the current dialogue command, and then pops the task information from the task stack in response to the completion of the second dialogue task or the detection of the task resumption command input by the user, and resumes the execution of the first dialogue task based on the task information. This application employs a multi-dialogue task interruption and recovery mechanism based on a task stack. While the system is executing a first dialogue task, if a user initiates a new second dialogue task, the first dialogue task is interrupted, and its task information is stored in the task stack. Simultaneously, the second dialogue task is activated. Furthermore, upon completion of the second dialogue task or detection of a user-inputted task recovery command, the task information is popped from the task stack, and the first dialogue task resumes execution. This solves the problem of lost dialogue state after interruption in related technologies, avoids repeated operations on previously interrupted dialogue tasks, achieves seamless recovery of interrupted dialogue tasks, and enables dynamic switching between multiple dialogue tasks. It reduces distraction during driving, significantly improves voice interaction efficiency and driving safety, and meets the safety and interaction continuity requirements in driving scenarios. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] Figure 1 This is a schematic diagram of the vehicle infotainment system provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of the state transition of a dialogue task provided in an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of the hierarchical context storage structure provided in the embodiments of this application;
[0023] Figure 4 This is a schematic diagram of task stack operations provided in an embodiment of this application;
[0024] Figure 5 A flowchart illustrating the dialogue task management method provided in this application embodiment. Figure 1 ;
[0025] Figure 6 A flowchart illustrating the dialogue task management method provided in this application embodiment. Figure 2 ;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0027] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0029] In related technologies, multi-domain dialogue systems based on user intent classification are typically used for dialogue task management. Specifically, this multi-domain dialogue system pre-defines fixed dialogue domains such as navigation, vehicle control, audio / video, and casual conversation. It uses a natural language understanding model to classify the intent and extract entities from the user's input voice commands, and then a dialogue manager executes the dialogue response according to a pre-defined dialogue flow. Each dialogue domain has a predefined state machine and state transitions to achieve multi-turn dialogue task management.
[0030] However, the aforementioned method of managing dialogue tasks in a multi-domain dialogue system based on user intent classification has limitations when switching between multiple dialogue tasks. For example, if a driver temporarily asks a vehicle control question during navigation (such as "lower the air conditioning temperature" or "how to turn on the windshield wipers"), the previous navigation dialogue task cannot be automatically resumed after the vehicle control question is resolved. This results in the loss of dialogue state after the navigation dialogue task is interrupted, requiring the user to re-initiate the navigation voice command or repeat the already entered voice command. In driving scenarios, this method requires multiple user interactions, which can easily distract the driver and results in low voice interaction efficiency and safety hazards, making it difficult to meet the safety and interaction continuity requirements in driving scenarios.
[0031] Based on the technical problems existing in related technologies, the embodiments of this application adopt a multi-dialogue task interruption and recovery mechanism based on a task stack. When the system is executing a first dialogue task, if the user initiates a new second dialogue task, the first dialogue task is interrupted and the task information of the first dialogue task is stored in the task stack. At the same time, the second dialogue task is activated. Furthermore, when the second dialogue task is completed or a task recovery command input by the user is detected, the task information is popped from the task stack and the execution of the first dialogue task is resumed. This solves the problem of loss of dialogue state after dialogue task interruption in related technologies, avoids the user from repeating operations on the dialogue task before the interruption, realizes seamless connection and recovery of interrupted dialogue tasks and dynamic switching between multiple dialogue tasks, reduces attention distraction during driving, significantly improves voice interaction efficiency and driving safety, and meets the safety and interaction continuity requirements in driving scenarios.
[0032] The application scenarios of the embodiments of this application will be described below first.
[0033] The dialogue task management method provided in this application is applicable to the vehicle-machine system interaction scenario in intelligent connected vehicles during driving. Specifically, it can be applied to multi-skill dialogue interaction scenarios such as navigation, vehicle control, audio and video, and casual conversation.
[0034] The following is a combination of... Figure 1 The vehicle infotainment system provided in the embodiments of this application will be described.
[0035] Figure 1 This is a schematic diagram of the vehicle infotainment system provided in an embodiment of this application. Figure 1 As shown, the vehicle system includes a dialogue task management module, which includes a topic boundary detection layer, a dynamic routing decision layer, a task status management layer, and a skill repository management layer.
[0036] The topic boundary detection layer includes a semantic jump degree calculation unit, a referential dependency degree detection unit, and a task relevance evaluation unit. The semantic jump degree calculation unit measures the topic continuity between the text of the current dialogue instruction input by the user in the current round and the text of historical dialogue instructions input by the user in the previous round; its core is the calculation and matching of text pair relevance. The referential dependency degree detection unit detects whether there are referential words (such as "it," "this," "there," "other," "its," "other," etc.) in the current dialogue instruction input by the user in the current round, and determines whether the referent of the referential word is in the context of the first dialogue task being executed by the system. This process involves complex referential resolution processing and needs to be implemented based on deep semantic understanding. The task relevance evaluation unit determines whether the current dialogue instruction input by the user in the current round is related to the core task objective of the first dialogue task being executed by the system; its core is the relevance matching of the dialogue task.
[0037] It is understandable that referential resolution is a key semantic understanding task in natural language processing. It aims to identify referential words (such as pronouns and demonstratives) in text and associate them with the corresponding referential entities, objects, or events in the dialogue context or the current dialogue task context to clarify the specific referent of the referential words, eliminate semantic ambiguity, and ensure the coherence and accuracy of understanding in multi-turn dialogues. In the embodiments of this application, referential resolution refers to identifying the referential words in the current dialogue command input by the user in the current turn, associating them with the context in the first dialogue task to determine their specific referent, and determining whether the current user input continues the currently executed first dialogue task.
[0038] For example, in one possible implementation, the topic boundary detection layer calculates the semantic jump degree, the reference dependency degree, and the task relevance degree in parallel through the semantic jump degree calculation unit, the reference dependency degree detection unit, and the task relevance degree, respectively. The semantic jump degree, the reference dependency degree, and the task relevance degree are then input into a preset multi-semantic dimension decision matrix for fusion judgment, and the target topic boundary type is output to the dynamic routing decision layer.
[0039] The dynamic routing decision layer is used to determine the routing strategy corresponding to the target topic boundary type based on the target topic boundary type input from the topic boundary detection layer.
[0040] The task state management layer is used to maintain the task state machine, task stack, and hierarchical context storage structure. The task state machine includes states such as started, in progress, paused, and completed, and the task stack adopts a Last-In-First-Out (LIFO) structure.
[0041] Figure 2 This is a schematic diagram illustrating the state transition of a dialogue task provided in an embodiment of this application. Figure 2 As shown, this diagram illustrating the state transitions of a dialogue task demonstrates the complete lifecycle of a dialogue task between a user and a skill. The dialogue task states (i.e., the states of the task state machine) include: Started, In Progress, Paused, and Completed. The black arrows represent the state transition paths of the dialogue task.
[0042] like Figure 2 As shown, the trigger condition for the dialogue task status to transition from start to in progress can be that the user initiates a dialogue; the trigger condition for the transition from in progress to paused can be that the user initiates a new dialogue task; the trigger condition for the transition from paused to in progress can be that the user returns to the original dialogue task; the trigger condition for the transition from paused to completed can be that the user actively ends the dialogue task; and the trigger condition for the transition from in progress to completed can be that the user completes the dialogue task.
[0043] Optionally, the task state management layer is also used to manage dialogue tasks stored using a hierarchical context storage structure.
[0044] Figure 3 This is a schematic diagram of the hierarchical context storage structure provided in an embodiment of this application. For example... Figure 3 As shown, the hierarchical context storage structure includes, from top to bottom, the global context layer, the task stack layer, and the current task layer.
[0045] The global context layer stores long-term global information shared across dialogue tasks, such as user preferences, vehicle status, and environmental information. The information stored in this global context layer is not cleared when switching dialogue tasks.
[0046] The task stack layer uses a LIFO (Last-In-First-Out) structure to store the task information (such as the complete context) of interrupted dialogue tasks. The context of each dialogue task is stored independently and without interference; for example, the top of the stack stores the context of the navigation dialogue task, and the bottom of the stack stores the context of the music dialogue task. The task stack depth refers to the number of dialogue tasks that can be stored in the task stack layer.
[0047] For example, the task stack depth can be dynamically adjusted (e.g., 2-3 layers) based on the vehicle system's computing power configuration and / or dialogue task priority to avoid resource waste or task stack overflow. When the system detects a high computing power state, deeper-level dialogue tasks can be saved, supporting complex multi-dialogue task switching; when computing power is limited, the task stack depth is automatically compressed, prioritizing the preservation of the context of key dialogue tasks. This application embodiment does not limit the task stack depth; it can be determined based on actual application requirements.
[0048] Understandably, by dynamically adjusting the task stack depth, the system can support more complex multi-dialogue task switching scenarios when resources are sufficient, while prioritizing the preservation of context for critical dialogue tasks when resources are limited, thus avoiding context loss due to task stack overflow. Simultaneously, the dynamic resource allocation mechanism can reduce resource waste caused by a fixed task stack depth, improving the overall resource utilization of the system.
[0049] The current task layer stores fine-grained interaction records of currently running, active dialogue tasks, including but not limited to dialogue history text, collected entity information, and task progress nodes.
[0050] For example, the global context layer, the task stack layer, and the current task layer can be associated with each other by inheriting or referencing the global long-term information stored in the global context layer, and performing push or pop operations with the dialogue task context in the task stack layer.
[0051] Understandably, compared to related technologies that simply use the most recent rounds of dialogue as context input without distinguishing between "context within the current dialogue task" and "context across dialogue tasks," if a user asks five consecutive questions in a navigation dialogue task and then suddenly switches to a vehicle control dialogue task, the content of the previous five rounds of navigation dialogue will become interference in the routing decision of the vehicle control dialogue task, easily leading to semantic understanding errors. The hierarchical context storage structure provided in this application can both ensure the continuity of global long-term information and achieve independent and isolated storage of contexts of different dialogue tasks, effectively solving the problem of cross-dialogue task context pollution in related technologies and avoiding interference from historical dialogue text in cross-dialogue tasks with the current routing decision.
[0052] Optionally, the hierarchical context storage structure provided in this application embodiment may further include a cross-task correlation filtering module to dynamically identify and filter cross-dialogue task contexts that may interfere with the decision-making of the current dialogue task. For example, in a vehicle control dialogue task, if the context of the navigation dialogue task (such as "turn right 300 meters ahead") is detected to be irrelevant to the current dialogue task, the system automatically filters the context to prevent it from affecting the generation of vehicle control commands.
[0053] Figure 4 This is a schematic diagram of task stack operations provided in an embodiment of this application. Figure 4 As shown, the push and pop operation mechanism of the task stack is demonstrated using the typical scenario of "navigation dialogue → vehicle control dialogue → navigation dialogue".
[0054] like Figure 4 As shown in the diagram, in step 1, the navigation dialogue task is in progress, the current dialogue task is the navigation dialogue task, the task stack is empty, and the navigation broadcast is normal. In step 2, the user temporarily asks a vehicle control question. The system pushes the context of the navigation dialogue task onto the task stack for storage, the navigation dialogue task enters a paused state, and the vehicle control dialogue task is activated simultaneously. The current dialogue task is the vehicle control dialogue task, but the navigation broadcast continues in the background. In step 3, after the vehicle control dialogue task is completed, the system pops the navigation dialogue task context from the task stack and automatically outputs a prompt message such as "The navigation just said to turn right in 300 meters ahead, do you want to continue?". After the user confirms, the navigation dialogue task is seamlessly restored, and the current dialogue task is the navigation dialogue task. This task stack push and pop operation mechanism realizes seamless switching and one-click recovery of multiple dialogue tasks.
[0055] The skill repository management layer stores metadata corresponding to different skills, such as Skill 1, Skill 2, Skill 3, and Skill 4. Skill 1 can be a navigation skill, Skill 2 can be a vehicle control skill, Skill 3 can be an audio / video skill, and Skill 4 can be a casual conversation skill. The metadata for each skill includes, but is not limited to, task system prompts.
[0056] It should be noted that, in the embodiments of this application, a skill refers to a dialogue task unit that can independently perform a specific function. Each skill corresponds to an independent dialogue business scenario or vehicle function, and is used to respond to the user's dialogue instructions in the corresponding dialogue task scenario and perform corresponding operations.
[0057] Optionally, the dialogue task management module also includes a voice acquisition unit ( Figure 1 (Not shown in the image) is used to collect user-inputted voice commands and convert them into text commands that the vehicle system can recognize, i.e., dialogue commands.
[0058] For example, in the vehicle system provided in this application embodiment, the voice acquisition unit in the dialogue task management module, in response to receiving the current voice command input by the user, converts the current voice command into a current dialogue command and transmits the current dialogue command to the topic boundary detection layer; the topic boundary detection layer, based on the current dialogue command and the task information of the first dialogue task being executed by the system, outputs the target topic boundary type to the dynamic routing decision layer; the dynamic routing decision layer, based on the target topic boundary type, executes the corresponding routing strategy, such as pop or push operations, determines the currently activated second dialogue task, and outputs the second dialogue task to the skill warehouse management layer; the skill warehouse management layer selects the target skill corresponding to the second dialogue task, obtains the metadata (such as the task system prompt word) corresponding to the target skill, and inputs the task system prompt word and the context of the second dialogue task into the LLM to generate a natural language response.
[0059] For example, the vehicle-mounted system may also include a communication module for data synchronization with the skills repository management layer. The skills metadata in the skills repository management layer may be stored in the cloud.
[0060] For example, the in-vehicle infotainment system may also include a speaker for broadcasting natural language responses generated by the LLM.
[0061] It is understood that the vehicle system provided in this application embodiment can realize the organic combination of dialogue task perception and dynamic routing, and ensure accurate routing and efficient state management in multi-dialogue task scenarios through the collaborative work between various levels.
[0062] The following is based on Figure 1 The dialogue task management module or vehicle system shown in this application is the execution subject, and the specific implementation of the dialogue task management method provided in the embodiments of this application will be described in detail.
[0063] Figure 5 A flowchart illustrating the dialogue task management method provided in this application embodiment. Figure 1 .like Figure 5 As shown, a specific implementation of this dialogue task management method may include the following steps:
[0064] S501, obtain the current dialogue command input by the user and the task information of the first dialogue task.
[0065] The first dialogue task is the dialogue task that the system is currently executing.
[0066] For example, task information can be stored as described above. Figure 3 The current task layer in the hierarchical context storage structure shown.
[0067] The tasks or dialogue tasks described in the embodiments of this application all refer to dialogue interaction tasks between users and skills, and the background execution functions of skills (such as navigation broadcasts) always run independently.
[0068] For example, the first dialogue task can be a navigation dialogue task, that is, the initial scenario of the vehicle system can be that the user is using navigation to go to the company. In the task state management layer, the task state machine corresponding to the navigation dialogue task is in the "in progress" state, the task stack is empty, and the background execution function of the navigation skill corresponding to the navigation dialogue task (such as navigation broadcast) is proceeding normally.
[0069] For example, the current dialogue command can be obtained by converting the current voice command input by the user. The current voice command input by the user can be a voice command related to the currently executed navigation dialogue task (such as "Is there a traffic jam ahead?") or a voice command unrelated to the currently executed navigation dialogue task (such as "I'm a little hot").
[0070] For example, one possible way to convert the current voice command into the current dialogue command is to use speech recognition technology to input the current voice command into Automatic Speech Recognition (ASR) for text conversion to obtain the current dialogue command.
[0071] For example, task information includes, but is not limited to, the historical dialogue instructions entered by the user in the previous round, the collected entity information, the task progress nodes, the N rounds of historical dialogue text corresponding to the first dialogue task, the system prompt words for the first task, and the status information of the task state machine (such as started, in progress, paused, and completed).
[0072] It should be noted that task system prompts refer to structured prompt information pre-configured for the skills corresponding to each dialogue task, used to constrain the lightweight semantic model and lightweight LLM interaction behavior, and are a type of skill metadata. For example, the first task system prompt can be used to define the role positioning of the skill corresponding to the first dialogue task, limit the task scope of the first dialogue task, specify the format of the first dialogue task's response, semantic constraints, and other interaction conditions, etc.
[0073] S502, based on the current dialogue instructions and task information, determines whether to interrupt the first dialogue task.
[0074] For example, based on the current dialogue instruction and task information, it is determined whether the second dialogue task corresponding to the current dialogue instruction and the first dialogue task belong to the same dialogue task. If the second dialogue task and the first dialogue task belong to the same dialogue task, it is determined not to interrupt the first dialogue task; if the second dialogue task and the first dialogue task do not belong to the same dialogue task, it is determined to interrupt the first dialogue task.
[0075] For example, if it is determined that the first dialogue task will not be interrupted, the skill corresponding to the first dialogue task will continue to be used, the current dialogue instruction will be appended to the context of the first dialogue task, and input into the LLM to generate a natural language response; or within the scope of the first dialogue task, the skill corresponding to the first dialogue task will continue to be used, and the sub-state of the first dialogue task will be updated according to the current dialogue instruction.
[0076] S503, if it is determined that the first dialogue task is interrupted, the task information is stored in the task stack and the second dialogue task corresponding to the current dialogue instruction is activated.
[0077] The task stack adopts a last-in-first-out (LIFO) structure, and the background execution function of the first interrupted dialogue task continues to run.
[0078] The task stack can be a task stack within the task stack layer of the hierarchical context storage structure shown in Figure 3 above.
[0079] For example, in a last-in-first-out (LIFO) task stack, the last interrupted dialogue task is the first to resume execution.
[0080] It is understood that the dialogue task management method provided in this application decouples the dialogue task from the background execution function of its corresponding skill, that is, strictly distinguishes between "the dialogue interaction task between the user and the skill" (such as asking "how much further?") and "the background execution function of the skill" (such as navigation broadcasting, music playback). The dialogue task can be paused, interrupted, and resumed, while the background execution function always runs independently (e.g., when the navigation dialogue task is paused, the navigation route guidance and voice broadcasting continue to run), ensuring the continuity of user services. This decoupling mechanism can effectively reduce repetitive operations and attention distractions during driving, and is key to improving the safety of voice interaction.
[0081] Optionally, this decoupling mechanism can also incorporate a skill-priority preemptive scheduling strategy to ensure that high-priority background functions (such as emergency traffic announcements) can still preempt resources while the dialogue task is being executed. For example, when the navigation announces "Accident ahead, please pull over immediately," even if the user is playing music during a dialogue task, the system automatically interrupts the current dialogue task, prioritizes the emergency information, and automatically resumes the interrupted current dialogue task after the emergency information is broadcast. By adopting a skill-priority preemptive scheduling strategy, driving safety is significantly improved.
[0082] For example, one possible implementation of storing task information in the task stack layer is to compress and encapsulate the task information and then push it into the task stack layer. The first dialogue task can be pushed onto the top of the task stack.
[0083] For example, after the first dialogue task is interrupted, the state information of the task state machine in its task information is "paused".
[0084] S504, in response to the completion of the second dialogue task or the detection of a task resumption command input by the user, pops task information from the task stack and resumes the execution of the first dialogue task according to the task information.
[0085] For example, in one possible implementation, in response to the completion of the second dialogue task, the system automatically pops the task information of the first dialogue task from the top of the task stack and restores the context of the first dialogue task. Optionally, after restoring the context of the first dialogue task, the system can also automatically output prompt information to the user (such as "Regarding the navigation dialogue task just now, we mentioned...") to remind the user of the dialogue content before the interruption of the first dialogue task, thus achieving a seamless connection between the interrupted dialogue tasks.
[0086] For example, in one possible implementation, in response to detecting a user input task resumption instruction (such as "continue"), the system automatically pops the task information of the first dialogue task from the top of the task stack and restores the context of the first dialogue task.
[0087] For example, the trigger condition for the user-inputted task resumption command can be: in response to the completion of the second dialogue task, the system automatically outputs a prompt message to the user (such as "The navigation just mentioned the road conditions ahead, do you want to continue?") to prompt the user whether they need to resume the interrupted first dialogue task.
[0088] Optionally, in response to detecting a user-inputted task resumption command, the dialogue task management method provided in this application embodiment further includes: determining whether the second dialogue task has been completed; if the second dialogue task has not yet been completed, storing the task information of the second dialogue task in the task stack of the task stack layer. The specific implementation is similar to the above, and will not be repeated here.
[0089] This application embodiment employs a multi-dialogue task interruption recovery mechanism based on a task stack. While the system is executing a first dialogue task, when a user initiates a new second dialogue task, the first dialogue task is interrupted, and its task information is stored in the task stack. Simultaneously, the second dialogue task is activated. Furthermore, upon completion of the second dialogue task or detection of a user-inputted task recovery command, the task information is popped from the task stack, and the first dialogue task resumes execution. This solves the problem of lost dialogue state after a dialogue task is interrupted in related technologies, avoids repeated operations on dialogue tasks before interruption, achieves seamless recovery of interrupted dialogue tasks and dynamic switching between multiple dialogue tasks, reduces distraction during driving, significantly improves voice interaction efficiency and driving safety, and meets the safety and interaction continuity requirements in driving scenarios.
[0090] The following is combined Figure 6 The specific implementation of step S502, which determines whether to interrupt the first dialogue task based on the current dialogue instructions and task information, is explained in detail.
[0091] Figure 6 A flowchart illustrating the dialogue task management method provided in this application embodiment. Figure 2 .like Figure 6 As shown, a specific implementation of this dialogue task management method, which determines whether to interrupt the first dialogue task based on the current dialogue instruction and task information, may include the following steps:
[0092] S601 determines the multi-semantic dimension level based on the current dialogue instructions and task information.
[0093] Optionally, the multi-semantic dimension levels include semantic jump level, referential dependency level, and task relevance level.
[0094] Optionally, one possible implementation of this step is as follows: concatenate the current dialogue command, historical dialogue commands, and the first task system prompt, and input them into a lightweight semantic model to calculate text pair relevance, obtaining the text pair relevance score output by the lightweight semantic model, and determining the semantic jump level based on the text pair relevance score; concatenate the current dialogue command, N rounds of historical dialogue text, and the first task system prompt, and input them into a lightweight large language model to detect referential dependency, obtaining the referential dependency information output by the lightweight large language model, and determining the referential dependency level based on the referential dependency information; concatenate the current dialogue command and the first task system prompt, and input them into a lightweight semantic model to evaluate task relevance, obtaining the task relevance score output by the lightweight semantic model, and determining the task relevance level based on the task relevance score.
[0095] For example, the calculation of the semantic jump level, the reference dependency level, and the task relevance level can be performed in parallel.
[0096] For example, a lightweight semantic model can be a lightweight semantic Rerank model (such as a Cross-Encoder architecture) fine-tuned with in-vehicle dialogue data.
[0097] For example, the text-to-relevance score ranges from 0 to 1.
[0098] For example, semantic jump levels include low jump, medium jump, and high jump. Low jump indicates that the topic is highly continuous; medium jump indicates that the topic has some changes; and high jump indicates that the topic has a significant shift.
[0099] For example, one possible implementation of determining the semantic jump level based on the text pair relevance score is to map the text pair relevance score to a semantic jump level based on a text pair relevance score threshold. Specifically, if the text pair relevance score is greater than or equal to 0.7, the semantic jump level is determined to be low jump; if the text pair relevance score is greater than or equal to 0.3 and less than 0.7, the semantic jump level is determined to be medium jump; and if the text pair relevance score is less than 0.3, the semantic jump level is determined to be high jump.
[0100] This application does not limit the threshold for the relevance score of text pairs; it can be determined according to the actual application requirements.
[0101] For example, the value of N can be 3-5. This application does not limit the value of N; it can be determined according to the actual application requirements.
[0102] For example, dependency information can be in structured JSON format, including the following fields:
[0103] has_anaphora: true / false (whether it contains a pronoun);
[0104] antecedent_exists: true / false (indicates whether the object exists in the context of the first dialogue task);
[0105] confidence: 0-100 (confidence level, taken from the probability value output by the Softmax layer of the large language model, representing the degree of certainty of the large language model regarding the prediction result).
[0106] For example, the levels of dependency can be categorized as high dependency, medium dependency, and low dependency.
[0107] For example, when has_anaphora=true (indicating that the user input explicitly uses a pronoun) and antecedent_exists=true (indicating that the referent exists in the context of the first dialogue task) and confidence≥70 (indicating that the large language model is highly confident in the prediction result), it is determined to be high dependency; when has_anaphora=true and antecedent_exists=false (indicating that the referent does not exist in the context of the first dialogue task, and may refer to an earlier dialogue task or common sense), or 30≤confidence<70 (indicating that the large language model has a moderate grasp of the prediction result), it is determined to be medium dependency; when has_anaphora=false (indicating that the user input does not contain a pronoun), or confidence<30 (indicating that the large language model has a very low grasp of the prediction result, and the result is unreliable), it is determined to be low dependency.
[0108] For example, the task relevance score ranges from 0 to 1.
[0109] For example, task relevance levels include low relevance, medium relevance, and high relevance. High relevance indicates that the current dialogue instruction is closely related to the first dialogue task; medium relevance indicates that the current dialogue instruction is partially related to the first dialogue task; and low relevance indicates that the current dialogue instruction is basically unrelated to the first dialogue task.
[0110] For example, one possible implementation of determining the task relevance level based on the task relevance score is to map the task relevance score to a task relevance level based on a task relevance score threshold. Specifically, when the task relevance score is greater than or equal to 0.7, the task relevance level is determined to be high relevance; when the text pair relevance score is greater than or equal to 0.3 and less than 0.7, the task relevance level is determined to be medium relevance; and when the text pair relevance score is less than 0.3, the task relevance level is determined to be low relevance.
[0111] Optionally, the model parameters of the lightweight semantic model used to determine the semantic jump level and task relevance level, and the lightweight large language model used to determine the referential dependency level, can be dynamically adjusted based on the user's confirmation or correction of the routing results (such as "the previous navigation suggestion was incorrect"), to improve the model's adaptability in specific scenarios.
[0112] S602, based on a preset multi-semantic dimension decision matrix, identifies the target topic boundary type corresponding to the current dialogue instruction according to the multi-semantic dimension level.
[0113] Table 1 is a preset multi-semantic dimension decision matrix provided in the embodiments of this application.
[0114]
[0115] As shown in Table 1, in the preset multi-semantic dimension decision matrix provided in this application embodiment, when the combinations of semantic jump degree level, referential dependency degree level, and task relevance degree are: [low jump degree, high dependency degree, high relevance], [low jump degree, medium dependency degree, high relevance], and [low jump degree, low dependency degree, high relevance], the corresponding topic boundary type is intra-task continuation; when the combinations are: [medium jump degree, high dependency degree, high relevance], [medium jump degree, medium dependency degree, high relevance], and [medium jump degree, low dependency degree, high relevance], the corresponding topic boundary type is same-task switching; when the combinations are: [high jump degree, low dependency degree, high relevance], [high jump degree, low dependency degree, medium relevance], the corresponding topic boundary type is out-of-task interruption; and when the combinations are: [high jump degree, low dependency degree, low relevance], the corresponding topic boundary type is new task start.
[0116] Table 1 is only one example. This application does not limit the combination form of the multi-semantic dimension level in the preset multi-semantic dimension decision matrix and the corresponding topic boundary type. The specific combination can be determined according to the actual application requirements.
[0117] Optionally, the preset multi-semantic dimension decision matrix may also include the following combinations (not shown in Table 1 above): When the combination of semantic jump level, referential dependency level, and task relevance level is in the order of: [low jump, low dependency, high relevance], [low jump, low dependency, medium relevance], the corresponding topic boundary type can be context correction or context clarification; when the combination is in the order of [medium jump, low dependency, low relevance], the corresponding topic boundary type can be casual conversation or irrelevant topic; when the combination is in the order of... When the combinations are: [high jump degree, medium dependency degree, high relevance], [high jump degree, medium dependency degree, medium relevance], and [high jump degree, medium dependency degree, low relevance], the corresponding topic boundary type can be interruption or new task; when the combinations are: [high jump degree, high dependency degree, low relevance], the corresponding topic boundary type can be historical task reference; when the combinations are: [low jump degree, medium dependency degree, low relevance], and [medium jump degree, medium dependency degree, low relevance], the corresponding topic boundary type can be ambiguous reference pending confirmation, etc.
[0118] Optionally, different routing strategies correspond to different topic boundary types. Table 2 shows the correspondence between topic boundary types and routing strategies provided in the embodiments of this application.
[0119] As shown in Table 2, when the topic boundary type is "intra-task continuation (with reference)," the corresponding routing strategy is to execute the task, requiring reference resolution; when the topic boundary type is "intra-task continuation (vague reference)," the corresponding routing strategy is to execute the task, with euphemistic clarification of the reference; when the topic boundary type is "intra-task continuation (without reference)," the corresponding routing strategy is to directly execute the task; when the topic boundary type is "same-task switching (with reference)," the corresponding routing strategy is to switch sub-task modules, requiring reference resolution; when the topic boundary type is "same-task switching (vague reference)," the corresponding routing strategy is to switch sub-task modules, with euphemistic clarification of the reference; when the topic boundary type is "same-task switching (without reference)," the corresponding routing strategy is to switch sub-task modules; when the topic boundary type is "extra-task interruption (related interrupt)," the corresponding routing strategy is to initiate a temporary interrupt, and then query for recovery after completion; when the topic boundary type is "extra-task interruption (edge interrupt)," the corresponding routing strategy is to initiate a temporary interrupt, and then automatically recover after completion; when the topic boundary type is "new task start," the corresponding routing strategy is to archive the old task and start the new task.
[0120] Understandably, when the topic boundary type is "continuation within a task," the corresponding routing strategy is to continue using the skills of the currently executing dialogue task and append the user's newly input dialogue command to the context of that dialogue task. When the topic boundary type is "switching within the same task," the corresponding routing strategy is to remain within the currently executing dialogue task and update the task sub-state. When the topic boundary type is "interruption outside a task," the corresponding routing strategy is to store the context of the currently executing dialogue task to the task stack and activate the skills of the dialogue task corresponding to the user's newly input dialogue command. When the topic boundary type is "starting a new task," the corresponding routing strategy is to clear the context of the currently executing dialogue task, pop the completed dialogue task from the task stack, and activate the skills of the dialogue task corresponding to the user's newly input dialogue command.
[0121] For example, switching between tasks means that the skill to which the dialogue task belongs (such as vehicle control skill) remains unchanged, while using that skill to perform different sub-dialogue tasks (such as air conditioning control, windshield wiper control, window control, etc.).
[0122] Table 2 is only one example. This application does not limit the correspondence between topic boundary types and routing strategies. The specific correspondence can be determined according to the actual application requirements.
[0123]
[0124] Optionally, when the topic boundary type is context correction or context clarification, the corresponding routing strategy can be to correct the slot of the current dialogue task; when the topic boundary type is casual conversation or irrelevant topic, the corresponding routing strategy can be to trigger casual conversation without changing the current dialogue task; when the topic boundary type is interruption or new task, the corresponding routing strategy can be to clarify the reference first, and then determine whether it is an interruption or a new task; when the topic boundary type is a reference to a historical task, the corresponding routing strategy can be to search the history and ask whether to switch tasks; when the topic boundary type is a reference that is ambiguous and needs to be confirmed, the corresponding routing strategy can be to initiate a clarification dialogue, etc.
[0125] Understandably, compared to related technologies that rely on keyword lists for routing decisions, traditional methods cannot understand the diverse expressions of users. For example, if a user inputs a dialogue command like "I'm hungry," traditional methods may not be able to match life service skills, resulting in poor routing generalization ability. This application's embodiments improve the accuracy and generalization ability of routing strategies by semantically understanding user needs across multiple semantic dimensions and further matching routing strategies based on topic boundary types obtained from semantic understanding.
[0126] S603, determine whether to interrupt the first dialogue task based on the target topic boundary type.
[0127] For example, the target topic boundary type can be any one of the following: in-task continuation, same-task switching, out-of-task interruption, or new task start.
[0128] For example, based on the correspondence between dialogue boundary types and routing strategies shown in Table 2 above, the target routing strategy corresponding to the target topic boundary type is determined according to the target topic boundary type, and further, based on the target routing strategy, it is determined whether to interrupt the first dialogue task.
[0129] Alternatively, one possible implementation is to determine whether the target topic boundary type is an out-of-task interruption; if the target topic boundary type is an out-of-task interruption, then determine to interrupt the first dialogue task.
[0130] In this embodiment, by determining the multi-semantic dimension level based on the current dialogue instruction and task information, and based on the preset multi-semantic dimension decision matrix, identifying the target topic boundary type corresponding to the current dialogue instruction according to the multi-semantic dimension level, and further determining whether to interrupt the first dialogue task according to the target topic boundary type, the semantic understanding ability of user input is improved, thereby improving the routing accuracy.
[0131] Compared to related technologies, it is difficult to accurately identify whether user input continues the current dialogue task, switches to a subtask within the current dialogue task, or starts a new dialogue task (e.g., when a user says "Is there a traffic jam ahead?", it may be checking traffic conditions in a navigation scenario (same task switching) or starting a new topic for casual conversation (new task starting). The boundary recognition of multiple dialogue task switching is ambiguous, resulting in low routing accuracy. In this application's embodiment, based on task information such as the current dialogue command input by the user and the context of the first dialogue task, and leveraging the semantic understanding capabilities of a lightweight large language model and a lightweight semantic model, the relationship between the user's current input and the currently executing first dialogue task is accurately identified in three semantic dimensions: semantic jump degree, referential dependency degree, and task relevance. The relationship between the user's current input and the first dialogue task is classified into four different scenarios: continuation within the task, switching within the same task, interruption outside the task, and starting a new task. Furthermore, corresponding routing strategies are matched based on the identified four different scenarios to improve routing accuracy and generalization ability.
[0132] Optionally, the dialogue task management method provided in this application embodiment further includes: if the target topic boundary type is a new task start, then suspend the first dialogue task and clear the historical dialogue text corresponding to the first dialogue task, as well as all completed dialogue tasks stored in the task stack.
[0133] The routing strategy for starting a new task is similar to that described above, and will not be repeated here.
[0134] For example, pausing the first dialogue task means that the dialogue interaction between the user and the skill in the first dialogue task is paused, but the background execution functions of the skill (such as navigation playback and music playback) continue to run independently and are not affected by the state of the dialogue task. For example, when the navigation dialogue task is paused, the navigation playback continues normally.
[0135] It is understood that in the dialogue task management method provided in this application embodiment, the task stack is only used to store interrupted dialogue tasks that need to be resumed, and the context of completed dialogue tasks is not pushed onto the task stack.
[0136] Optionally, the dialogue task management method provided in this application embodiment, after activating the second dialogue task corresponding to the current dialogue instruction, further includes: inputting the system prompt word of the second task corresponding to the current dialogue instruction and the second dialogue task into the LLM to generate a natural language response; and executing the background execution function of the second dialogue task according to the natural language response.
[0137] Optionally, one possible implementation for generating a natural language response by inputting the current dialogue command and the corresponding second task system prompts into the LLM can be: acquiring multimodal data other than voice commands, and then inputting the multimodal data, the current dialogue command, and the corresponding second task system prompts into the LLM through an attention mechanism or feature concatenation to generate a natural language response. The multimodal data can be data acquired through input sources such as touch, gestures, and sensors, such as the status of the air conditioning interface on the central control screen (current temperature setting).
[0138] Understandably, multimodal input fusion can significantly improve the richness and accuracy of context, reducing ambiguity caused by single-modal input. For example, when speech is ambiguous (such as "turn it down a bit"), the system can accurately generate a response based on the touch interface status (current temperature), avoiding repeated clarification from the user. Simultaneously, multimodal data provides LLM with more comprehensive decision-making support, improving routing and response quality in complex scenarios.
[0139] The following example, “Navigation dialogue → Vehicle control dialogue → Navigation dialogue,” i.e., the scenario of navigation dialogue task interruption and recovery, illustrates the dialogue task management method provided in this application.
[0140] System initial state: The user is using navigation to go to the company, the navigation dialogue task is in the "in progress" state, the task stack is empty, and the navigation broadcast is proceeding normally.
[0141] 1) The user inputs voice command 1: "Is there a traffic jam ahead?" This voice command 1 is converted into a dialogue command, and based on this dialogue command and the navigation dialogue task context, the following operations are performed:
[0142] Semantic jump level: Medium jump (related to road conditions and navigation);
[0143] Dependency level: Low (no pronoun);
[0144] Task relevance level: High relevance (LLM judgment is relevant to navigation dialogue tasks);
[0145] Topic boundary type: Same as task switching;
[0146] Routing strategy: Continue using the navigation skills of the navigation dialogue task, then switch to the traffic query subtask function;
[0147] Task stack operations: No changes;
[0148] Navigation announcement: Continues as normal;
[0149] 2) The user inputs voice command 2: "I'm a little hot." This voice command 2 is converted into a dialogue command, and based on this dialogue command and the navigation dialogue task context, the following operations are performed:
[0150] Semantic jump level: High jump (jumping from road conditions to body sensation);
[0151] Dependency level: Low dependency;
[0152] Task relevance level: Low relevance (LLM determines that the navigation dialogue task is irrelevant);
[0153] Topic boundary type: Out-of-task interruption;
[0154] Routing strategy: Push the navigation dialogue task context onto the task stack and activate the vehicle control skills of the vehicle control dialogue task;
[0155] Task stack operations: Push navigation dialogue tasks onto the stack;
[0156] Navigation announcements are still running normally in the background.
[0157] 3) Vehicle control dialogue task execution:
[0158] The system recognizes the vehicle control intent and adjusts the air conditioning temperature accordingly;
[0159] The vehicle control dialogue task is complete, and the system outputs the message "The navigation just mentioned the road conditions ahead, do you want to continue?";
[0160] 4) The user inputs voice command 3: "Continue". This voice command 3 is converted into a dialogue command, and based on the dialogue command and prompt information, the following operations are performed:
[0161] Semantic jump level: / (Special instruction);
[0162] Dependency level: High dependency ("Continue" refers to the paused navigation dialogue task);
[0163] Task relevance level: / ;
[0164] Routing strategy: Resume paused navigation dialogue tasks;
[0165] Task stack operations: Pop the navigation dialog task from the task stack and restore the dialog context;
[0166] The system continues the navigation dialogue: "There is traffic congestion 300 meters ahead. We suggest you take XX Road instead."
[0167] Navigation announcement: Still running normally in the background without interruption.
[0168] In summary, the dialogue task management method provided in this application has the following beneficial effects:
[0169] 1) Seamless resumption of dialogue for long-process dialogue tasks such as navigation: The dialogue state of paused dialogue tasks is automatically saved through the task stack mechanism. After the user finishes the temporary dialogue task, the original dialogue task progress can be resumed with one click without repeating the voice commands that have already been spoken. This improves driving safety and voice interaction efficiency and meets the safety and interaction continuity requirements in driving scenarios.
[0170] 2) Significantly improved routing accuracy: By accurately identifying the relationship between the user's current input and the dialogue task being performed by the system through multiple semantic dimensions, semantic understanding based on lightweight LLM and lightweight semantic model replaces traditional keyword matching, which can understand the diverse expressions of users and significantly reduce the routing misjudgment rate;
[0171] 3) Avoid cross-dialogue task context pollution: By adopting a hierarchical context storage structure, physical isolation of different dialogue task contexts is achieved, ensuring that the current routing decision is only affected by the history within the current dialogue task and is not interfered with by the history of irrelevant dialogue tasks.
[0172] 4) Decoupling of background execution functions of skills from dialogue task status: background execution functions such as navigation broadcast and music playback run independently from dialogue task status, ensuring that users can obtain continuous service under any circumstances without interruption due to dialogue task switching;
[0173] 5) Strong cockpit scene adaptability: Specifically designed for driving scenarios, it solves practical pain points such as interruption and recovery of navigation dialogue tasks and quick switching between multiple dialogue tasks, improving the safety and convenience of interaction during driving.
[0174] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0175] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 70 includes at least one processor 701 and a memory 702.
[0176] Optionally, the electronic device 70 also includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0177] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.
[0178] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0179] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0180] The memory may include random access memory (RAM) and non-volatile memory (NVM), such as at least one disk storage device.
[0181] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0182] This application also provides a vehicle, including a vehicle body and an in-vehicle infotainment system.
[0183] The vehicle can be a smart connected car. The in-vehicle infotainment system is similar to that described above, and will not be repeated here.
[0184] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0185] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0186] The aforementioned readable storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0187] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0188] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0190] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0191] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0192] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0193] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention 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, and is not limited to the precise structures 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 dialogue task management method, characterized in that, include: Obtain the current dialogue command input by the user and the task information of the first dialogue task, where the first dialogue task is the dialogue task being executed by the system. Based on the current dialogue instruction and the task information, determine whether to interrupt the first dialogue task; If it is determined that the first dialogue task is interrupted, the task information is stored in the task stack, and the second dialogue task corresponding to the current dialogue instruction is activated. The task stack adopts a last-in-first-out structure, and the background execution function of the interrupted first dialogue task continues to run. In response to the completion of the second dialogue task or the detection of a task resumption command input by the user, the task information is popped from the task stack, and the first dialogue task is resumed according to the task information.
2. The dialogue task management method according to claim 1, characterized in that, The step of determining whether to interrupt the first dialogue task based on the current dialogue instruction and the task information includes: Based on the current dialogue instructions and the task information, determine the multi-semantic dimension level; Based on a preset multi-semantic dimension decision matrix, the target topic boundary type corresponding to the current dialogue instruction is identified according to the multi-semantic dimension level. Based on the target topic boundary type, determine whether to interrupt the first dialogue task.
3. The dialogue task management method according to claim 2, characterized in that, The task information includes the previous round of user-inputted historical dialogue commands, the N rounds of historical dialogue text corresponding to the first dialogue task, and the first task system prompts. The multi-semantic dimension levels include semantic jump level, referential dependency level, and task relevance level. Determining the multi-semantic dimension levels based on the current dialogue command and the task information includes: The current dialogue command, the historical dialogue command, and the first task system prompt are concatenated and input into a lightweight semantic model to calculate the text pair relevance. The text pair relevance score output by the lightweight semantic model is obtained, and the semantic jump level is determined based on the text pair relevance score. The current dialogue instruction, the N rounds of historical dialogue text, and the prompt words from the first task system are concatenated and then input into a lightweight large language model for reference dependency detection. The reference dependency information output by the lightweight large language model is obtained, and the reference dependency level is determined based on the reference dependency information. The current dialogue command and the first task system prompt are concatenated and then input into a lightweight semantic model for task relevance evaluation. The task relevance score output by the lightweight semantic model is obtained, and the task relevance level is determined based on the task relevance score.
4. The dialogue task management method according to claim 2, characterized in that, The target topic boundary types include in-task continuation, same-task switching, out-of-task interruption, and new task initiation. Determining whether to interrupt the first dialogue task based on the target topic boundary type includes: Determine whether the target topic boundary type is an out-of-task interruption; If the target topic boundary type is the task-external interruption, then the first dialogue task is determined to be interrupted.
5. The dialogue task management method according to claim 4, characterized in that, Also includes: If the target topic boundary type is the new task start, then the first dialogue task is paused, and the historical dialogue text corresponding to the first dialogue task, as well as all completed dialogue tasks stored in the task stack, are cleared.
6. The dialogue task management method according to any one of claims 1 to 5, characterized in that, After activating the second dialogue task corresponding to the current dialogue instruction, the method further includes: Input the current dialogue instruction and the second task system prompt word corresponding to the second dialogue task into the large language model to generate a natural language response; Based on the natural language response, execute the background execution function of the second dialogue task.
7. A vehicle infotainment system, characterized in that, include: A dialogue task management module, wherein the dialogue task management module is used to execute the dialogue task management method as described in any one of claims 1 to 6.
8. The vehicle infotainment system according to claim 7, characterized in that, The dialogue task management module includes a task state management layer, which is used to manage dialogue tasks stored using a hierarchical context storage structure.
9. A vehicle, characterized in that, include: The vehicle body and the vehicle infotainment system as described in claim 7 or 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the dialogue task management method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Voice interaction method and electronic equipment
CN111724775A
Dialogue management method and device, electronic equipment and storage medium
CN114360540A
Voice processing method and device, equipment and computer storage medium
CN116631388A
Vehicle-mounted voice navigation method and device based on stack management, and storage medium
CN118758332A
Vehicle-mounted voice control method, device and system
CN120783753A