A dialogue system intent recognition method and related apparatus
Patent Information
- Application Number
- CN202611179561.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]然而,词汇、句法和浅层语义层面的分析结果只能识别用户通过文字直接表达出的表层意图,在面对模糊表达、隐含需求等场景时,可能会因用户当前输入文本存在省略、歧义、隐含需求等原因,导致匹配到错误的预定义意图标签,进而影响对话系统的任务执行准确率和用户体验
[0040]借由上述技术方案,为了避免单纯依靠当前轮对话的用户输入文本进行意图识别,导致意图识别不准确,本申请提供的对话系统意图识别方法,不仅获取用户输入文本,还获取历史对话序列,再根据用户输入文本和历史对话序列生成情境表示,该情境表示用于表征当前轮对话所处的当前对话场景及上下文背景,由此可以更准确地感知对话情境,为后续意图识别提供了结构化的情境依据。
Smart Images

Figure CN122964833A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and related apparatus for recognizing the intent of a dialogue system. Background Technology
[0002] Intent recognition in dialogue systems is an important research area in natural language processing, and it is widely used in scenarios such as intelligent customer service, personal assistants, and task-oriented dialogues. The goal of intent recognition is to accurately understand the true needs expressed by user input, thereby driving the dialogue system to perform corresponding operations or generate appropriate responses.
[0003] Currently, intent recognition in dialogue systems primarily employs Natural Language Understanding (NLU)-based approaches. These approaches take the user's current input text as input and map it to one or more labels from a predefined set of intent labels using a classification model. Essentially, this approach treats intent recognition as a text classification task, performing only lexical, syntactic, and shallow semantic analysis on the user's current input text to match the most similar predefined intent labels.
[0004] However, the analysis results at the lexical, syntactic, and shallow semantic levels can only identify the surface intent that users directly express through text. When faced with scenarios such as ambiguous expressions and implicit needs, the system may match incorrect predefined intent tags due to omissions, ambiguities, or implicit needs in the user's current input text, thereby affecting the task execution accuracy and user experience of the dialogue system. Summary of the Invention
[0005] In view of the above problems, this application provides a method and related apparatus for intent recognition in a dialogue system, so as to achieve multi-dimensional comprehensive intent recognition by combining user literal expression, dialogue scenario constraints, and implicit needs. The specific solution is as follows:
[0006] The first aspect of this application provides a method for intent recognition in a dialogue system, comprising:
[0007] Obtain the user input text for the current round of dialogue and the historical dialogue sequence;
[0008] Based on the user input text and the historical dialogue sequence, a contextual representation is generated, which is used to characterize the current dialogue scenario and context of the current round of dialogue.
[0009] The user input text is subjected to surface semantic restatement encoding based on the historical dialogue sequence to obtain a surface intent vector representing the literal intent;
[0010] Based on the context representation, the surface intent vector is modified by context constraint to obtain a context correction vector, wherein the context constraint modification is used to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario.
[0011] Based on the contextual representation, deep demand reasoning is performed on the user input text to obtain a potential intent vector representing the user's implicit intent;
[0012] The surface intent vector, the context correction vector, and the latent intent vector are fused in multiple dimensions to obtain the intent recognition result.
[0013] In one possible implementation, generating a contextual representation based on the user input text and the historical dialogue sequence includes:
[0014] The user input text and the historical dialogue sequence are input into the dialogue state tracking module to obtain the target entity representing the current dialogue scenario, the user state representing the context background, and the unclosed intent information. The user state is a structured summary of the user's current situation, behavioral stage, and emotional tendency made by the dialogue system, and the unclosed intent information is a topic or intent that has been initiated but not yet ended in the dialogue.
[0015] The target entity, the user state, and the unclosed intent information are organized into a graph structure representation or key-value pairs as the context representation.
[0016] In one possible implementation, the surface semantic restatement encoding of the user input text in conjunction with the historical dialogue sequence includes:
[0017] Based on the historical dialogue sequence, the user input text is rewritten into a declarative sentence expressing the literal intent, which serves as the surface restatement text;
[0018] The surface restatement text is encoded to obtain the surface intent vector.
[0019] In one possible implementation, the step of performing deep demand reasoning on the user input text based on the context representation includes:
[0020] Based on the surface restated text, the contextual representation, and the user input text, a thought chain prompt word is generated and input into the large language model. The large language model is then guided to output an implicit demand description or a target triple. The target triple includes a cognitive state, an expected goal, and an intentional action. The cognitive state represents the user's current known or present state. The expected goal represents the result that the user expects to achieve in the cognitive state. The intentional action represents the action to be performed based on the cognitive state and the expected goal.
[0021] The output of the large language model is encoded into the latent intent vector.
[0022] In one possible implementation, the context constraint correction of the surface intent vector based on the context representation includes:
[0023] Based on the context representation, the surface intent vector is dereferenced and then mapped to the intent space corresponding to the current dialogue scenario to obtain the context correction vector.
[0024] In one possible implementation, the multi-dimensional fusion of the surface intent vector, the context-corrected vector, and the latent intent vector to obtain the intent recognition result includes:
[0025] The intent recognition result is obtained by employing at least one of the feature-level fusion method and the scoring-level fusion method.
[0026] The feature-level fusion method involves concatenating the surface intent vector, the context correction vector, and the latent intent vector and inputting them into a multilayer perceptron to obtain the probability distribution of each candidate intent in the candidate intent set.
[0027] The scoring level fusion method is as follows: for each of the surface intent vector, the context correction vector, and the latent intent vector, each candidate intent is scored according to the vector to obtain the scoring vector corresponding to the vector, and the scoring vectors corresponding to the surface intent vector, the context correction vector, and the latent intent vector are weighted and fused to obtain the probability distribution of each candidate intent.
[0028] One possible implementation also includes:
[0029] Obtain the confidence level of the intent recognition result;
[0030] If the confidence level is less than or equal to a preset confidence threshold, then based on the probability distribution finally determined by the multidimensional fusion process, the multiple candidate intentions with the highest probabilities are selected to generate clarification questions and sent to the user, so as to determine the final intention based on the user's response to the clarification questions;
[0031] If the confidence level is greater than the confidence level threshold, then the intent recognition result is taken as the final intent.
[0032] One possible implementation also includes:
[0033] Obtain the intent slot parameters corresponding to the final intent, the intent slot parameters including parameter information required to execute the operation indicated by the final intent;
[0034] An intent task is generated based on the final intent and the intent slot parameters, and then sent to an external system for execution.
[0035] In response to the task execution result returned by the external system, the task execution result is converted into a natural language response, which serves as the response text corresponding to the user's input text.
[0036] A second aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the dialogue system intent recognition method described in the first aspect or any implementation thereof.
[0037] A third aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0038] The memory is used to store computer programs;
[0039] The processor is used to execute the computer program so that the electronic device can implement the dialogue system intent recognition method of the first aspect or any implementation thereof.
[0040] By employing the above technical solutions, in order to avoid inaccurate intent recognition due to relying solely on the user input text in the current round of dialogue, the intent recognition method for the dialogue system provided in this application not only acquires the user input text but also acquires the historical dialogue sequence. Then, it generates a contextual representation based on the user input text and the historical dialogue sequence. This contextual representation is used to characterize the current dialogue scenario and contextual background in the current round of dialogue, thereby enabling a more accurate perception of the dialogue context and providing a structured contextual basis for subsequent intent recognition.
[0041] Furthermore, to accurately identify the surface intent of the user's input text, this application first performs surface semantic restatement encoding on the user's input text in conjunction with the historical dialogue sequence to obtain a surface intent vector representing the literal intent, thus realizing a structured representation of the user's literal expression. On this basis, context constraint correction and deep demand reasoning are performed respectively. Specifically, context constraint correction uses context representation to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario, so that the intent recognition result conforms to the possible intent range under the current dialogue scenario. Deep demand reasoning mines the user's unstated implicit needs based on context representation and user input text.
[0042] Finally, by multidimensionally fusing vectors from three dimensions—surface intent, contextual modification, and latent needs—the intent recognition results integrate the user's literal expression, dialogue scenario constraints, and implicit needs. This overcomes the limitations of existing solutions that rely solely on surface text analysis and improves the accuracy of intent recognition in scenarios involving ambiguous expressions, omissions, and implicit needs. Attached Figure Description
[0043] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0044] Figure 1 A schematic diagram of a system architecture provided for this application;
[0045] Figure 2 A flowchart illustrating a dialogue system intent recognition method provided in this application;
[0046] Figure 3 A schematic diagram of the structure of a dialogue system intent recognition device provided in this application;
[0047] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0048] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0049] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0050] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0051] This application provides a method and related apparatus for identifying intent in a dialogue system, which can be applied to scenarios such as intelligent customer service, personal assistant, task-oriented dialogue system, in-vehicle voice interaction, and smart home control that require understanding user natural language commands and performing corresponding operations. It is especially suitable for complex dialogue scenarios with multi-turn dialogue interaction, incomplete user expression, or implicit needs.
[0052] It should be noted that the above scenarios are merely examples and are not intended to limit this application.
[0053] Optionally, the dialogue system intent recognition method provided in this application can be applied to, for example... Figure 1 The system architecture shown includes a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 1 (This example uses a server as an illustration).
[0054] Either terminal 100 or server 200 can be used independently to execute the dialogue system intent recognition method provided in the embodiments of this application. Alternatively, terminal 100 and server 200 can also be used collaboratively to execute the dialogue system intent recognition method provided in the embodiments of this application.
[0055] like Figure 1 As shown, terminal 100 is used to collect the current round dialogue input (hereinafter referred to as the user input text of the current round dialogue) and the historical dialogue sequence in the form of voice or text input by the user, and send them to server 200; server 200 is used to obtain the user input text of the current round dialogue and the historical dialogue sequence, generate a contextual representation based on the user input text and the historical dialogue sequence, perform surface semantic restatement on the user input text in combination with the historical dialogue sequence and encode it into a surface intent vector, perform contextual constraint correction on the surface intent vector based on the contextual representation to obtain a contextual correction vector, perform deep demand reasoning based on the contextual representation and the surface restatement text to obtain a latent intent vector, perform multi-dimensional fusion of the surface intent vector, the contextual correction vector and the latent intent vector to obtain the intent recognition result, and return the intent recognition result to terminal 100.
[0056] In other embodiments, the steps of generating context representation, surface semantic restatement, context constraint correction, deep requirement reasoning, and multi-dimensional fusion can all be executed independently by the terminal 100 without relying on the server 200.
[0057] It should be noted that the above process is merely an example and is not intended to limit this application.
[0058] The following description Figure 1The product form of the terminal 100; in this application embodiment, the terminal 100 can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.
[0059] To enable those skilled in the art to better understand this application, the intent recognition method of the dialogue system according to the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0060] Reference Figure 2 , Figure 2 This application provides a flowchart illustrating a dialogue system intent recognition method as an embodiment of the present application. Figure 2 As shown, the intent recognition method for this dialogue system may include:
[0061] Step S201: Obtain the user input text for the current round of dialogue and the historical dialogue sequence.
[0062] Here, user input text refers to the text content provided by the user in the current round of dialogue, such as "How's the weather over there?". Since user input text is usually a continuation of the historical dialogue sequence, it may contain omissions, references, etc. The specific entity or complete intent referred to by the user cannot be determined solely by the user input text. Therefore, in order to improve the accuracy of intent recognition, this embodiment also needs to obtain the historical dialogue sequence to provide contextual basis for subsequent steps.
[0063] The aforementioned historical dialogue sequence refers to a record of all or part of the dialogue rounds that have occurred between the user and the dialogue system prior to the current round, including the text entered by the user and the text of the system's responses. Optionally, the historical dialogue sequence can be read from the dialogue system's dialogue log or cache.
[0064] Step S202: Generate a contextual representation based on the user input text and the historical dialogue sequence.
[0065] Understandably, in task-oriented dialogues, a user's intent is not independent of the dialogue context; the same sentence may express completely different intentions in different scenarios. For example, "How is it over there?" might be asking about the weather in a travel scenario, or asking about product reviews in a shopping scenario.
[0066] To accurately identify the current dialogue context, this embodiment can generate a context representation based on user input text and historical dialogue sequences. Here, the context representation is a structured data object used to summarize the overall context of the current dialogue. More specifically, the context representation is used to characterize the current dialogue scenario and background of the current round of dialogue.
[0067] The current dialogue scenario refers to the business or task situation in which the user is currently engaged, such as a travel scenario, a project reporting scenario, or a shopping consultation scenario; the context refers to the historical information that led to the current dialogue state, such as topics that have been discussed previously, key information that has been identified, and the user's emotional state.
[0068] Step S203: Combine the historical dialogue sequence to perform surface semantic restatement encoding on the user input text to obtain a surface intent vector representing the literal intent.
[0069] Considering that user input text often contains colloquial, fragmented, or non-standard expressions—for example, if the user input text is "Over there," directly encoding this text would be difficult to obtain a stable semantic representation. To obtain a more stable and accurate semantic vector to accurately identify the surface intent expressed by the user input text, this embodiment can combine historical dialogue sequences to perform surface semantic restatement of the user input text, and then encode the restated text into a surface intent vector. Here, the surface intent vector is a fixed-length numerical vector used to represent the semantic information of the user's literal intent.
[0070] Step S204: Based on the context representation, perform context constraint correction on the surface intent vector to obtain the context correction vector. The context constraint correction is used to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario.
[0071] Understandably, the surface intent vector extracted solely from user input text may represent multiple intent candidates, some of which may not be valid in the current dialogue context. For example, "How is it over there?" might be asking about the weather in a travel scenario or about product reviews in a shopping scenario. If the current dialogue scenario is a travel scenario, the candidate asking about product reviews needs to be eliminated to obtain an intent that better fits the current dialogue scenario.
[0072] To achieve the above effects, this embodiment can perform contextual constraint correction on the surface intent vector based on contextual representation, so as to compress the semantic candidates corresponding to the surface intent vector from the global literal intent space to the intent space corresponding to the current dialogue scenario. Thus, the semantic representation of the obtained context-corrected vector only takes values within the intent space corresponding to the current dialogue scenario. Here, the intent space corresponding to the current dialogue scenario refers to the set of all possible intent labels in the current dialogue scenario.
[0073] This embodiment uses contextual constraint correction to filter out intent candidates that are impossible in the current dialogue scenario, making subsequent intent recognition more accurate.
[0074] Step S205: Perform deep demand reasoning on the user input text based on the contextual representation to obtain a potential intent vector representing the user's implicit intent.
[0075] It should be understood that users' true needs are often not fully reflected in the text description of the current round. For example, in a scenario where the legal process of Project A is delayed due to the lack of a stamp, a user inputting "Never mind, let's leave it at that for now" implies that the user is giving up on advancing the current matter, but the underlying need is to seek help from a superior or administrator. In order to delve deeper into the deeper needs and potential motivations that users do not directly express in their input text, this embodiment can perform deep need reasoning on the user's input text based on the contextual representation to obtain a potential intent vector that represents the user's implicit intent.
[0076] Step S206: Perform multi-dimensional fusion of the surface intent vector, context correction vector, and latent intent vector to obtain the intent recognition result.
[0077] As mentioned earlier, the surface intent vector is a vectorized representation of the user's literal intent, mainly describing what the user is currently saying. The context correction vector is a vectorized representation of the reasonable intent in the current dialogue scenario, mainly describing the reasonable meaning of the user's input content in the current dialogue scenario. The latent intent vector is a vectorized representation of the user's latent intent obtained after mining the background of "why the user asked". The three vectors describe the true intent that the user's input text wants to express from different perspectives. Therefore, by multi-dimensionally fusing the surface intent vector, context correction vector and latent intent vector, a high-precision intent recognition result that reflects the user's true intent can be obtained.
[0078] To avoid inaccurate intent recognition due to relying solely on user input text in the current round of dialogue, the intent recognition method for the dialogue system provided in this application not only acquires user input text but also acquires historical dialogue sequences. Then, it generates a contextual representation based on the user input text and historical dialogue sequences. This contextual representation is used to characterize the current dialogue scenario and contextual background of the current round of dialogue, thereby enabling a more accurate perception of the dialogue context and providing a structured contextual basis for subsequent intent recognition.
[0079] Furthermore, to accurately identify the surface intent of the user's input text, this application first performs surface semantic restatement encoding on the user's input text in conjunction with the historical dialogue sequence to obtain a surface intent vector representing the literal intent, thus realizing a structured representation of the user's literal expression. On this basis, context constraint correction and deep demand reasoning are performed respectively. Specifically, context constraint correction uses context representation to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario, so that the intent recognition result conforms to the possible intent range under the current dialogue scenario. Deep demand reasoning mines the user's unstated implicit needs based on context representation and user input text.
[0080] Finally, by multidimensionally fusing vectors from three dimensions—surface intent, contextual modification, and latent needs—the intent recognition results integrate the user's literal expression, dialogue scenario constraints, and implicit needs. This overcomes the limitations of existing solutions that rely solely on surface text analysis and improves the accuracy of intent recognition in scenarios involving ambiguous expressions, omissions, and implicit needs.
[0081] In some embodiments of this application, the process of step S202, "generating a contextual representation based on user input text and historical dialogue sequence", is described in detail.
[0082] The dialogue system in this embodiment may have a built-in dialogue state tracking module, which is used to extract and maintain the state information of the current dialogue from multi-turn dialogues. Specifically, in this embodiment, user input text and historical dialogue sequences can be input into the dialogue state tracking module to obtain target entities representing the current dialogue scenario, user states representing the context, and unclosed intent information.
[0083] The target entity is used to represent the specific constituent elements of the current dialogue scenario, including specific objects such as key people, locations, times, items, or topics extracted from the dialogue. For example, in the sentence "I'm going on a business trip to X location next week," the target entity could include the time "next week," the location "X location," and the event "business trip."
[0084] User status is a structured summary of a user's current situation, behavioral stage, and emotional tendency by the dialogue system. Optionally, user status may include one or more of the following dimensions: the user's current physical situation, the user's current behavioral stage, and the user's emotional or attitudinal tendency. This user status can be continuously updated by the dialogue status tracking module from historical dialogue sequences and user input text. For example, from "The legal department hasn't stamped the delivery documents for Project A yet," it can be inferred that the user's emotional tendency is "anxious" or "helpless," and from "I'm going on a business trip to X place next week," it can be inferred that the user is in the "pre-trip preparation stage."
[0085] Unclosed intent information refers to topics or intents that have been initiated but not yet concluded in a conversation. Specifically, in a conversation, a user may initiate a topic or intent (e.g., "I want to check the weather"), but before that intent is executed or confirmed, the user moves on to other topics. At this point, the intent is in an unclosed state and needs to be addressed in subsequent conversations. For example, if a user first asks "How's the weather over there?", and after the system replies, the user then enters "What about transportation?", the "weather" topic is now closed, but the "transportation" topic is unclosed. Similarly, if a user mentions "I want to book a flight" but hasn't provided the destination and date, the "book a flight" intent is in an unclosed state.
[0086] In one possible implementation, the aforementioned dialogue state tracking module can be based on a large language model (such as the iFlytek Xinghuo large model, the Deepin Search large model, etc.). The dialogue state tracking module pre-stores a dialogue state tracking prompt instruction template, which includes a current dialogue content slot and a historical dialogue content slot. The dialogue state tracking prompt instruction template is used to instruct the large language model to extract key entities and attributes based on the dialogue content in the two dialogue content slots, thereby obtaining the target entity representing the current dialogue scenario, the user state representing the context, and the unclosed intent information.
[0087] Based on this, this embodiment can fill the current dialogue content slot with user input text, fill the historical dialogue sequence with historical dialogue content slot, obtain dialogue state tracking prompts and input them into the large language model, and obtain the target entity, user state and unclosed intent information output by the model.
[0088] In another possible implementation, the above-mentioned dialogue state tracking module can be implemented based on pre-built dialogue state extraction rules. That is, in this embodiment, key entities and attributes can be extracted from user input text and historical dialogue sequences through dialogue state extraction rules to obtain target entities representing the current dialogue scenario, user states representing the context, and unclosed intent information.
[0089] Furthermore, target entities, user states, and unclosed intent information can be organized into graph structures or key-value pairs as contextual representations.
[0090] For example, taking key-value pairs as an example, one possible scenario is as follows:
[0091] "{"Destination": "xx Province",
[0092] Date: June 3, 2026
[0093] Topic: "pre_travel"
[0094] "Unclosed intent information": ["weather"]}.
[0095] Optionally, the contextual representation can be updated after each round of dialogue based on information such as the current round of dialogue, intent recognition results, and system execution feedback, and then passed on to the next round of dialogue for continued use.
[0096] This embodiment extracts target entity, user state, and unclosed intent information from user input text and historical dialogue sequences in one go through the dialogue state tracking module, and organizes it into a structured contextual representation. This allows downstream processing modules (surface parsing module, contextual reasoning module, implicit target inference module, intent fusion and decision module, etc.) to directly read and use the structured contextual information without having to repeatedly parse the original historical dialogue, thus improving processing efficiency and ensuring the consistency of contextual information used by each module. Simultaneously, the contextual representation is dynamically updated with each round of dialogue, accurately reflecting the continuous changes in dialogue state and providing a reliable contextual basis for intent recognition in subsequent rounds.
[0097] The following embodiment describes the specific implementation of step S203, "combining historical dialogue sequences to perform surface semantic restatement encoding on user input text".
[0098] First, the user input text is restated on a surface semantic level by combining the historical dialogue sequence to obtain the restated text.
[0099] Optionally, the process of surface semantic restatement may include: rewriting the user input text into a statement expressing literal intent based on the historical dialogue sequence, as the surface restatement text.
[0100] In one possible implementation, the surface semantic restatement process can be implemented using a large language model. In this embodiment, the large language model is configured to receive prompts containing rewriting instructions and user input text, and output the rewritten surface restatement text. An example of a rewriting instruction is: "Please rewrite the user input into a statement that clearly expresses the user's task intent. If the user input contains omissions, please complete the omitted information based on the history of the dialogue."
[0101] In this step, the purpose of restating based on the historical dialogue sequence is to complete the omitted information in the user's input text. Specifically, the user's input text and a preset rewriting instruction template are combined into prompt words, which are then input into the large language model. The large language model rewrites the user's input text according to the instructions, referring to the historical dialogue sequence during the rewriting process to complete the omitted information, generating a semantically complete, unambiguous, and clearly expressible statement, which serves as the surface restated text.
[0102] For example, if the user inputs the text "Do I need to bring warm clothes?", and the historical dialogue sequence contains "I am going to X place for a business trip tomorrow", then the large language model will refer to the historical dialogue sequence when rewriting and restate it as "The user wants to know if the temperature in X place tomorrow requires warm clothes".
[0103] It should be noted that the restatement in this step only standardizes the expression of the user input text and completes the omitted information, but does not perform cross-scenario intent mapping or deep demand mining.
[0104] Furthermore, the surface restatement text is encoded to obtain the surface intent vector.
[0105] Optionally, sentence vector encoders, such as Sentence-BERT (Sentence Bidirectional Encoder Representations from Transformers) or BGE (Bilingual General Embedding), can be used to encode the surface restatement text into a surface intent vector.
[0106] This embodiment rewrites user input based on historical dialogue sequences using a large language model, generating semantically complete and well-expressed surface restated text. A sentence vector encoder then converts this surface restated text into fixed-length numerical vectors. Compared to directly encoding the user's original input text, this embodiment, by restating first and then encoding, achieves a more stable and accurate semantic vector representation. It reduces the impact of colloquial expressions, non-standard grammar, and omissions on vector quality, providing reliable surface semantic input for subsequent contextual constraint correction and multi-dimensional fusion.
[0107] In another embodiment of this application, the process of step S204, "correcting the context constraint of the surface intent vector based on the context representation", is described.
[0108] In the preceding process, surface semantic restatement can complete the omitted content in the user's input text. However, the user's input text may still contain unclear referents. To avoid inaccurate intent recognition due to unclear referents, this embodiment can perform referential resolution on the surface intent vector based on contextual representation. Referential resolution refers to the process of determining the specific entity referred to by pronouns (such as "over there," "tomorrow," "he," etc.) appearing in the text. In this embodiment, referential resolution is performed at the vector level, based on the target entity in the contextual representation, to update or enhance the vector components in the surface intent vector corresponding to the pronouns, so that the vector part obtains a clear referential direction.
[0109] For example, if the surface restatement text corresponding to the surface intent vector is "How is the weather over there?", and the target entity in the context representation includes {location: X}, then according to the context representation, it is identified that "over there" refers to "X". Thus, at the vector level, the vector components representing "over there" and the vector components representing "X" are associated and updated, so that the semantic reference of "over there" in the surface intent vector after referential resolution changes from vague to clear.
[0110] Optionally, the above-mentioned referential resolution process can be implemented using a large language model. Since the underlying data format processed by the large language model is a vector sequence, the above-mentioned referential resolution operation is manifested in the large language model as follows: using an attention mechanism to make the token vector corresponding to "over there" pay attention to the token vector corresponding to "X place", and obtaining a context-enhanced representation that incorporates the semantics of "X place" in the output.
[0111] Furthermore, the surface intent vector after referential resolution is mapped to the intent space corresponding to the current dialogue scenario to obtain the context correction vector.
[0112] Optionally, the surface intent vector after referential resolution can be concatenated with a vectorized contextual representation and input into a pre-trained mapping network (such as a linear layer or a multilayer perceptron) to obtain a context-corrected vector. During the training phase, this mapping network is optimized through supervised learning, making the context-corrected vector output from the input surface intent vector closer to the correct intent label in the current dialogue scenario in the vector space.
[0113] For example, if the contextual representation shows that the user is currently in the "check the weather before traveling" stage, then when the user enters "open navigation", the "depart immediately" intent needs to be removed, and only the surface intent vector after referential resolution needs to be mapped to the reasonable intent of "preview route".
[0114] This embodiment resolves the referential inference of the surface intent vector based on contextual representation, giving clear direction to previously ambiguous referential information and solving the problem of information loss caused by the use of pronouns in user input. By mapping the surface intent vector to the intent space corresponding to the current dialogue scenario, the contextual correction vector reflects only possible intent candidates in the current scenario, eliminating interference from unreasonable intents outside the scenario and avoiding topic drift. The contextual correction vector obtained after the above two steps not only clarifies the referential information but also effectively compresses the semantic space, thereby reducing the number of candidate intents in the subsequent multi-dimensional fusion stage, improving fusion efficiency and the accuracy of final recognition.
[0115] In some other embodiments of this application, the specific implementation of step S205, "performing deep demand reasoning on user input text based on contextual representation," is described in detail.
[0116] To improve the accuracy of deep requirement reasoning, optionally, in addition to the reference context representation and user input text, this embodiment can also introduce the surface restatement text mentioned above. That is, this embodiment can perform deep requirement reasoning based on the context representation, user input text and surface restatement text.
[0117] In an alternative embodiment, the deep requirement reasoning process can also be implemented through a large language model. The structure of the large language model can be referred to the previous description and will not be repeated here.
[0118] To guide the large language model to engage in deep thinking, this embodiment can generate thought chain prompts based on surface restatements, contextual representations, and user input text. These thought chain prompts, by incorporating guiding phrases such as "Please think step by step" and "Please analyze the following content and provide the reasoning process," can guide the large language model to generate a step-by-step reasoning process before outputting the final answer, thereby obtaining more accurate reasoning results.
[0119] After inputting the above thought chain prompts into the large language model, it can guide the large language model to output implicit requirement descriptions or target triples.
[0120] Implicit needs descriptions refer to deeper desires or motivations expressed in natural language but not explicitly stated in the user's input text, but inferred by the system. For example, for a user inputting "Do I need to bring warm clothes?", the implicit needs description might be "The user is worried about the weather changes at their destination and hopes to get advice on what to wear."
[0121] A goal triplet is a structured data set that includes three elements: cognitive state, desired goal, and intentional action.
[0122] Cognitive state refers to the user's current known or current state, that is, a structured generalization of the user's current known information and situation obtained from the contextual representation. For example, in the example of "Do I need to bring warm clothes?" above, the cognitive state is "The user is about to leave and is worried about the weather."
[0123] An expected goal represents the result that a user expects to achieve in a given cognitive state. For example, if the user's cognitive state is "the user is about to depart and is worried about the weather," the expected goal would be "avoid bringing unnecessary luggage and prevent catching a cold."
[0124] An intentional action represents an action identified based on the cognitive state and desired goal. This action can be a candidate action, which is an action that the user may need to perform, inferred by the large language model based on the cognitive state and desired goal. For example, the intentional action is "get clothing suggestions".
[0125] After obtaining the output of the large language model (implicit demand description or target triple), the output can be encoded into a latent intent vector.
[0126] The encoding method used here can be the same as or different from the process described above of encoding the surface restatement text into a surface intent vector; this application does not impose any specific limitations.
[0127] For example, in one possible implementation, when the output is an implicit demand description, the descriptive text is directly input into a sentence vector encoder to obtain a latent intent vector. When the output is a target triple, the texts of the three elements—cognitive state, expected goal, and intentional action—can be encoded separately and then concatenated or average-pooled to obtain a latent intent vector; alternatively, the three elements can be combined into a complete descriptive text before encoding.
[0128] This embodiment guides a large language model to perform deep reasoning on user input through a thought chain prompting method, enabling the discovery of implicit needs and deep motivations that users do not directly express in the text. The reasoning results are encoded as latent intent vectors, allowing implicit information to participate in subsequent multi-dimensional fusion in vector form, thus achieving joint judgment of implicit needs and other dimensions of intent.
[0129] To enable those skilled in the art to better understand the multidimensional vector fusion process of this application, the following embodiments will provide a detailed description of the process of step S206, "multidimensionally fusing the surface intent vector, contextual correction vector, and latent intent vector to obtain the intent recognition result".
[0130] The multidimensional fusion in this embodiment can be implemented in various ways, and the following fusion methods are provided, but not limited to. This application can use at least one of the following fusion methods to obtain the intent recognition result.
[0131] Method 1: Feature-level fusion. Specifically, the surface intent vector, context-corrected vector, and latent intent vector can be concatenated and input into a multilayer perceptron to obtain the probability distribution of each candidate intent in the candidate intent set. This probability distribution includes a probability value corresponding to each candidate intent, and the sum of all probability values is 1. The intent recognition result is then obtained based on this probability distribution.
[0132] Here, the candidate intent set refers to the set of all intent tags that may appear in the current business scenario, which is predefined by the system. For example, the candidate intent set for the travel scenario includes {check the weather, check traffic, check tickets, ...}.
[0133] Method 2: Scoring-based fusion. Specifically, for each vector among the surface intent vector, context-corrected vector, and latent intent vector, each candidate intent is scored according to the vector to obtain the corresponding scoring vector. The scoring vectors corresponding to the surface intent vector, context-corrected vector, and latent intent vector are then weighted and fused to obtain the probability distribution of each candidate intent. The intent recognition result is then obtained based on this probability distribution.
[0134] For example, a scorer can be trained for each of the surface intent vector, context-corrected vector, and latent intent vector. This scorer maps the input vector to a scoring vector with the same dimension as the number of candidate intents, where each dimension represents the degree of support the semantics represented by the vector has for the corresponding candidate intent. Then, the three scoring vectors are multiplied by their respective weight coefficients and summed element-wise to obtain a fused scoring vector, which is then normalized to a probability distribution using the Softmax function. The weight coefficients can be preset according to the application scenario or dynamically generated by the model based on the context representation.
[0135] If it is necessary to combine the two fusion methods mentioned above, the probability distributions generated by the two fusion methods can be weighted and summed to obtain the final probability distribution, and then the intent recognition result can be obtained based on the final probability distribution.
[0136] For example, the candidate intent corresponding to the highest probability in the probability distribution can be used as the intent recognition result.
[0137] This embodiment uses multiple fusion methods to fuse three vectors for intent recognition, thereby improving the robustness and accuracy of intent recognition.
[0138] Understandably, while multi-dimensional fusion can improve intent recognition results to some extent, the results may still be unreliable due to limited content provided by the user's input text and historical dialogue sequences. To avoid generating responses directly based on unreliable intent recognition results and thus degrading the user's system experience, this embodiment can output the confidence level of the intent recognition results along with the actual intent recognition results.
[0139] Therefore, after obtaining the confidence level of the intent recognition result, the confidence level can be compared with a preset confidence level threshold (such as 0.6). If the confidence level of the intent recognition result is greater than the confidence level threshold, it means that the system has a high degree of certainty about the recognition result. At this time, the intent recognition result can be directly used as the final intent.
[0140] Conversely, if the confidence level of the intent recognition result is less than or equal to the confidence threshold, it indicates that the system lacks sufficient certainty regarding the current recognition result. This could mean that multiple candidate intents have similar scores or that all candidate intents have generally low scores. In this case, based on the probability distribution ultimately determined by the multi-dimensional fusion process, the system can select the candidate intents with the highest probabilities to generate clarification questions and send them to the user. The final intent is then determined based on the user's response to the clarification questions. Here, when only one fusion method is used, the final determined probability distribution refers to the probability distribution obtained by that fusion method. When multiple fusion methods are used, the final determined probability distribution refers to the weighted sum of the probability distributions obtained by each of the multiple fusion methods.
[0141] Optionally, the process of "determining the final intent based on the user's response to the clarification question" includes: using the user's response to the clarification question as a new round of user input text, and re-performing intent recognition according to the previous process. In this case, to avoid excessive clarification attempts and a poor user experience, this embodiment can preset a maximum clarification threshold. Once the threshold is exceeded, no further clarification is triggered, and the final intent is directly obtained based on the highest probability.
[0142] Understandably, for a dialogue system, accurately identifying user intent aims to generate responses that meet the user's needs. Therefore, upon obtaining the final intent, the corresponding intent slot parameters can also be retrieved. These intent slot parameters include the parameter information required to execute the operation indicated by the final intent, including the parameter name and parameter value.
[0143] The aforementioned intent slot parameters can be output simultaneously with the intent recognition result during the multi-dimensional fusion process; or they can be generated when the final intent is determined. This embodiment does not impose any specific limitations.
[0144] For example, for the final intent to query the weather in location X on July 18, 2026, the intent slot parameter can be {"location": "location X", "date": "2026-07-18"}.
[0145] Furthermore, this embodiment can generate an intent task based on the final intent and intent slot parameters, and send it to an external system for execution. This intent task refers to a specific instruction that can be executed by an external system, formed by combining the final intent tag and the corresponding slot parameters. For example, if the final intent is to query the weather, and the intent slot parameters are {"location": "X location", "date": "2026-07-18"}, then the generated intent task is "Call the weather query API (Application Programming Interface), with parameters city=X location, date=2026-07-18". This intent task is then sent to an external system (such as a weather service provider, enterprise resource management system, database, etc.) for execution via interface calls, message queues, or function calls.
[0146] Therefore, in response to the task execution results returned by the external system, this system can convert the task execution results into natural language responses, which serve as the response text corresponding to the user's input text.
[0147] For example, if the weather query API returns data such as {"temperature":25, "weather":"cloudy", "humidity":60%}, the large language model will convert it into a natural language response such as "Today's temperature in location X is 25℃, cloudy, and humidity is 60%", and send it to the user to complete the current round of dialogue interaction.
[0148] This embodiment comprehensively judges the intent vectors of surface, context, and latent dimensions through multi-dimensional fusion, making the intent recognition results more accurate and comprehensive. Through confidence assessment and proactive clarification mechanisms, it proactively confirms with the user when the system is uncertain, avoiding misjudgments and erroneous executions caused by blind guessing, thus improving the system's controllability and reliability. By transforming the intent recognition results into specific intent tasks and entrusting them to external systems for execution, a complete closed loop from intent understanding to task execution is achieved, enabling the dialogue system to truly drive downstream business operations. Furthermore, this application can be overlaid on existing large language models using a callable architecture without modifying the base model parameters, allowing for rapid migration to different large language models and significantly reducing the implementation cost and computational barrier of the dialogue system.
[0149] To enable those skilled in the art to better understand this application, the complete process of the dialogue system intent recognition method provided in the embodiments of this application will be illustrated below with a specific workplace reporting scenario.
[0150] In the first round of dialogue, the employee typed, "Boss, the delivery documents for Project A haven't been stamped by the legal department yet, it's stuck." The dialogue system replied in a general way, "Okay, the delay in the legal process for Project A has been recorded."
[0151] In the second round of the conversation, the employee typed "Never mind, let's leave it at that for now."
[0152] If a traditional natural language understanding-based processing method is used, when detecting words like "never mind" or "like this," it usually matches predefined intent tags like "give_up" or "end_task," resulting in the intent recognition result "terminate_conversation." The dialogue system might then reply, "Okay, let's end this conversation." This approach seriously misjudges the user's true intent. Employees don't necessarily want to end the conversation; rather, they are frustrated by the process bottleneck and expect the system to understand their predicament and provide assistance.
[0153] If a traditional general-purpose large language model is used, for the same input, the dialogue system might generate a response like, "Okay, if you have no other questions, I'll take my leave now. Have a good day." While this approach captures negative emotions in the user's input, it fails to translate this signal into concrete business actions, treating it merely as part of a social conversation and failing to trigger business intentions such as risk warnings or escalation measures.
[0154] If the processing method of this application is adopted, the following structured information can be obtained based on user input text and historical dialogue sequences: the target entity is "Project A"; the user's state is "the user encountered legal approval blockage in the delivery document process of Project A, and the emotional tendency is negative and helpless"; the unclosed intent information is "the legal approval process has not yet been completed". The above structured information can be organized into the following contextual representation:
[0155] {
[0156] "project": "Project A",
[0157] "blocker": "Legal department not stamped",
[0158] "status": "Blocked",
[0159] "user_emotion": "negative"}.
[0160] This scenario is used to represent the current dialogue context (project reporting scenario, legal issues) and background (Project A's delivery documents are stuck in the legal process, and employees are expressing negative emotions).
[0161] Next, the system calls the large language model and combines it with the historical dialogue sequence to rewrite the user's original input "Never mind, let's leave it like this for now" into a declarative sentence that expresses the literal intent, resulting in the surface restatement text "The user indicates that he is giving up on advancing the current task". Then, the sentence vector encoder is used to encode the surface restatement text into a surface intent vector, representing the user's literal intent as "giving up the current task".
[0162] Furthermore, based on the information in the contextual representation, especially "legal department not stamped" and "blocked", the system recognizes that the user said "never mind" in the context of "legal department stuck", which is not really giving up on the project, but a helpless expression of the blocked node. Thus, a contextual correction vector is obtained, which represents the reasonable intention in the process blockage state.
[0163] Meanwhile, based on the user's input text "Never mind, let's leave it like this for now," contextual representation, and surface restatement text "The user indicates that they are giving up on advancing the current task," the system generates thought chain prompts to guide the large language model to conduct in-depth demand reasoning.
[0164] The thought process is as follows: The user previously mentioned that legal matters were causing the problem, but now says "never mind." This usually means that the user believes the process is blocked and they cannot resolve it themselves. The implicit needs may be: needing to seek help from a superior or administrator, or needing to record the risks.
[0165] Based on the above thought chain reasoning process, the system generates a potential intent vector, representing the user's implicit intent as upgrading or recording risk.
[0166] Finally, the three vectors are fused to obtain the final intent "Record project risks and notify the administrator" and the intent slot parameters "Project ID: A, Risk Level: High Risk, Reason for Blockage: Legal Department not stamped". This leads to the intent task, which includes: marking project A as "High Risk - Legal Department Blockage" in the project management system; automatically generating a notification message "Employee Zhang San reports that project A is blocked due to legal department stamping, and there is a risk of delay. Please pay attention" and sending it to the project manager via email or instant messaging.
[0167] After completing the above tasks, send the message to the user: "Understood. Project A is indeed quite troublesome due to the legal department's obstruction in obtaining the official seal. I have already informed your supervisor about this situation as a high-risk item and recorded the current progress."
[0168] Therefore, by decomposing intent recognition into three independent dimensions—surface semantic restatement encoding, context constraint correction, and deep demand reasoning—and fusing them together, the system can accurately identify that the user's true intent behind the vague expression "Never mind, let's leave it at that for now" is not to end the conversation, but rather to escalate the risk and seek assistance due to process blockage.
[0169] This application, by comprehensively considering the user's literal expression, the constraints of the current dialogue scenario, and the user's unspoken deep-seated needs, achieves a complete business loop from extracting the true intent from ambiguous expressions to understanding the intent, executing the task, and responding in natural language. This significantly improves the understanding accuracy and task execution capability of the dialogue system in complex business scenarios.
[0170] The above describes a method for identifying the intent of a dialogue system provided by an embodiment of this application. The following describes the apparatus for performing the above-described method for identifying the intent of a dialogue system.
[0171] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a dialogue system intent recognition device provided in an embodiment of this application. Figure 3 As shown, the intent recognition device for the dialogue system may include:
[0172] The dialogue data acquisition module 301 is used to acquire the user input text of the current round of dialogue and the historical dialogue sequence;
[0173] The context management module 302 is used to generate a context representation based on the user input text and the historical dialogue sequence. The context representation is used to characterize the current dialogue scenario and context background of the current round of dialogue.
[0174] The surface parsing module 303 is used to perform surface semantic restatement encoding on the user input text in combination with the historical dialogue sequence to obtain a surface intent vector representing the literal intent.
[0175] The context reasoning module 304 is used to perform context constraint correction on the surface intent vector based on the context representation to obtain the context correction vector. The context constraint correction is used to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario.
[0176] The implicit target inference module 305 is used to perform deep demand inference on the user input text based on the contextual representation to obtain a potential intent vector that represents the user's implicit intent.
[0177] The intent fusion and decision module 306 is used to perform multi-dimensional fusion of surface intent vector, context correction vector and potential intent vector to obtain intent recognition results.
[0178] The modules in the aforementioned dialogue system intent recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.
[0179] This application also provides an electronic device, which may include at least one processor and a memory connected to the processor, wherein:
[0180] Memory is used to store computer programs;
[0181] The processor is used to execute computer programs to enable electronic devices to implement any of the dialogue system intent recognition methods provided in the embodiments of this application.
[0182] refer to Figure 4 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0183] like Figure 4 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0184] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0185] This application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device causes the electronic device to implement any of the dialogue system intent recognition methods provided in this application. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0186] This application also provides a computer-readable storage medium carrying one or more computer programs. When these programs are executed by an electronic device, the electronic device can implement any of the dialogue system intent recognition methods provided in this application. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0187] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0188] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0189] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, 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 is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0190] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0191] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for intent recognition in a dialogue system, characterized in that, include: Obtain the user input text for the current round of dialogue and the historical dialogue sequence; Based on the user input text and the historical dialogue sequence, a contextual representation is generated, which is used to characterize the current dialogue scenario and context of the current round of dialogue. The user input text is re-encoded using the historical dialogue sequence to obtain a surface intent vector representing the literal intent. Based on the context representation, the surface intent vector is modified by context constraint to obtain a context correction vector, wherein the context constraint modification is used to constrain the literal intent represented by the surface intent vector to the intent space corresponding to the current dialogue scenario. Based on the contextual representation, deep demand reasoning is performed on the user input text to obtain a potential intent vector representing the user's implicit intent; The surface intent vector, the context correction vector, and the latent intent vector are fused in multiple dimensions to obtain the intent recognition result.
2. The dialogue system intent recognition method according to claim 1, characterized in that, The step of generating a contextual representation based on the user input text and the historical dialogue sequence includes: The user input text and the historical dialogue sequence are input into the dialogue state tracking module to obtain the target entity representing the current dialogue scenario, the user state representing the context background, and the unclosed intent information. The user state is a structured summary of the user's current situation, behavioral stage, and emotional tendency made by the dialogue system, and the unclosed intent information is a topic or intent that has been initiated but not yet ended in the dialogue. The target entity, the user state, and the unclosed intent information are organized into a graph structure representation or key-value pairs as the context representation.
3. The dialogue system intent recognition method according to claim 1, characterized in that, The step of performing surface semantic restatement encoding on the user input text in conjunction with the historical dialogue sequence includes: Based on the historical dialogue sequence, the user input text is rewritten into a declarative sentence expressing the literal intent, which serves as the surface restatement text; The surface restatement text is encoded to obtain the surface intent vector.
4. The dialogue system intent recognition method according to claim 3, characterized in that, The step of performing deep demand reasoning on the user input text based on the context representation includes: Based on the surface restated text, the contextual representation, and the user input text, a thought chain prompt word is generated and input into the large language model. The large language model is then guided to output an implicit demand description or a target triple. The target triple includes a cognitive state, an expected goal, and an intentional action. The cognitive state represents the user's current known or present state. The expected goal represents the result that the user expects to achieve in the cognitive state. The intentional action represents the action to be performed based on the cognitive state and the expected goal. The output of the large language model is encoded into the latent intent vector.
5. The dialogue system intent recognition method according to claim 1, characterized in that, The context constraint correction of the surface intent vector based on the context representation includes: Based on the context representation, the surface intent vector is dereferenced and then mapped to the intent space corresponding to the current dialogue scenario to obtain the context correction vector.
6. The dialogue system intent recognition method according to claim 1, characterized in that, The step of fusing the surface intent vector, the context-corrected vector, and the latent intent vector in multiple dimensions to obtain the intent recognition result includes: The intent recognition result is obtained by employing at least one of the feature-level fusion method and the scoring-level fusion method. The feature-level fusion method involves concatenating the surface intent vector, the context correction vector, and the latent intent vector and inputting them into a multilayer perceptron to obtain the probability distribution of each candidate intent in the candidate intent set. The scoring level fusion method is as follows: for each of the surface intent vector, the context correction vector, and the latent intent vector, each candidate intent is scored according to the vector to obtain the scoring vector corresponding to the vector, and the scoring vectors corresponding to the surface intent vector, the context correction vector, and the latent intent vector are weighted and fused to obtain the probability distribution of each candidate intent.
7. The dialogue system intent recognition method according to claim 6, characterized in that, Also includes: Obtain the confidence level of the intent recognition result; If the confidence level is less than or equal to a preset confidence threshold, then based on the probability distribution finally determined by the multidimensional fusion process, the multiple candidate intentions with the highest probabilities are selected to generate clarification questions and sent to the user, so as to determine the final intention based on the user's response to the clarification questions; If the confidence level is greater than the confidence level threshold, then the intent recognition result is taken as the final intent.
8. The dialogue system intent recognition method according to claim 7, characterized in that, Also includes: Obtain the intent slot parameters corresponding to the final intent, the intent slot parameters including parameter information required to execute the operation indicated by the final intent; An intent task is generated based on the final intent and the intent slot parameters, and then sent to an external system for execution. In response to the task execution result returned by the external system, the task execution result is converted into a natural language response, which serves as the response text corresponding to the user's input text.
9. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the dialogue system intent recognition method as described in any one of claims 1 to 8.
10. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the dialogue system intent recognition method as described in any one of claims 1 to 8.