A method and system for identifying an intelligent agent conversation language intent through dual channels
By employing a dual-channel recognition method that combines fast response and deep intent channels, the system addresses the issues of response latency and insufficient intent recognition in intelligent dialogue systems caused by single-channel models. This approach enables efficient and accurate understanding and self-optimization of user intent, thereby improving the system's response speed and interpretability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING GUISHENG TECHNOLOGY CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-29
AI Technical Summary
Existing intelligent dialogue systems rely on single-channel language models, which suffer from high response latency, lack of long-term context learning capabilities, weak knowledge enhancement capabilities, single dimension of intent recognition, and insufficient interpretability, making it difficult to accurately identify user intent in complex scenarios.
A dual-channel recognition method is adopted, which utilizes the fast response channel and the deep intent channel to work together. The fast response channel generates immediate responses based on a large language model, while the deep intent channel performs multi-turn dialogue context analysis and deep semantic understanding based on the agent. It also combines a knowledge base and MCP tools to enhance external knowledge and perform semantic correction.
While maintaining high response speed, it improved the accuracy of understanding and handling complex commands and multi-turn dialogues, enhanced the system's self-optimization capabilities and interpretability, and improved the user experience.
Smart Images

Figure CN122114169A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to a method and system for identifying the dialogue language intent of an intelligent agent through dual channels. Background Technology
[0002] Most current intelligent dialogue systems are based on single-channel language understanding mechanisms. Mainstream solutions typically rely on a single large language model (such as Deepseek, Tongyiqianwen, etc.) to perform semantic understanding and generative responses to user input. The basic process includes: the user inputs a natural language question, the large language model understands the context and generates an answer, and returns the response to the user.
[0003] While large language models perform well in general semantic understanding, they have significant shortcomings in the following scenarios: Model output relies on immediate context, making it unable to continuously model long-term user intent from historical multi-turn dialogues; they cannot integrate with external knowledge bases, APIs (Application Programming Interfaces), or MCPs (Model Context Protocols) to achieve knowledge-enhanced reasoning; when the model is large, response time is long, sacrificing the quality of deep reasoning for faster response times; and in complex scenarios (e.g., mixed command and question-answering instructions), the model struggles to accurately distinguish between primary and secondary intents. For example, a user inputs: "Help me check my health data from yesterday and then recommend an exercise plan for today." Traditional single-channel models often only interpret this as a vague, composite request, failing to distinguish the logical relationship between the actions of "querying health data" and "generating an exercise plan."
[0004] In the process of realizing this invention, the inventors discovered that the existing technology mainly suffers from the following defects: First, the response generation and reasoning processes are highly coupled, with semantic recognition and content generation simultaneously compressed into the same model and the same reasoning channel, resulting in high overall response latency and insufficient controllability of output results; Second, it lacks the ability to learn and accumulate context over a long period, making it impossible to abstract, summarize, and continuously utilize user semantic intent in multi-round interactions; Third, its knowledge enhancement capabilities are weak, lacking intelligent calling and fusion mechanisms for external knowledge bases, tool interfaces, or other extended capabilities; Fourth, its intent recognition dimension is singular, only able to capture directly expressed explicit intent, while struggling to simultaneously identify implicit intents hidden in emotions, preferences, or contextual logic; Finally, the overall interpretability of the system is insufficient, with model output difficult to trace back to specific knowledge sources or reasoning chains, limiting the system's credibility and verifiability. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and system for identifying the dialogue language intent of an intelligent agent through dual channels, in order to solve at least one of the above-mentioned technical problems.
[0006] To achieve the above objectives, in a first aspect, a method for recognizing the dialogue language intent of an intelligent agent through dual channels is provided, comprising the following steps: S10: Receive the current dialogue statement input by the user; S20: Input the current dialogue statement in parallel to the fast response channel and the deep intent channel; the fast response channel is implemented based on a large language model; the deep intent channel is implemented based on an agent with the ability to independently record multi-turn dialogue context; S30: Generate and output an instantaneous natural language response based on the current dialogue statement through the fast response channel; S40: Through the deep intent channel, perform deep semantic analysis on the current dialogue statement and the instantaneous natural language response generated by the fast response channel to generate a deep semantic understanding result containing confidence. S50: Based on the deep semantic understanding results, and in conjunction with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, a decision is made to dynamically adjust the prompt words input to the fast response channel for the next round of response; or, trigger at least one preset action.
[0007] In a second aspect, a system is provided for realizing dual-channel recognition of the dialogue language intent of an intelligent agent, the system being used to perform the method described in the first aspect, the system comprising: The input module is used to receive the current dialogue statement input by the user; The channel allocation module is used to send the current dialogue statement to the fast response module and the deep intent analysis module in parallel; The fast response module, implemented based on a large language model, is used to generate and output an instantaneous natural language response based on the current dialogue statement. The deep intent analysis module is implemented based on an intelligent agent with the ability to independently record multi-turn dialogue context. It is used to perform deep semantic analysis on the current dialogue statement and the instant natural language response generated by the fast response module to generate a deep semantic understanding result containing confidence. The intent fusion and decision execution module is used to make decisions based on the deep semantic understanding results, combined with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, so as to dynamically adjust the prompt words input to the fast response module for the next round of response; or, trigger at least one preset action.
[0008] The above technical solution has the following beneficial technical effects: This invention ensures a smooth, millisecond-level interactive experience through a fast response channel, while utilizing a deep intent channel to achieve multi-turn context awareness and deep semantic reasoning, enabling the system to maintain high response speed while possessing deep intent understanding capabilities. Secondly, a closed-loop optimization mechanism from deep understanding to fast response is established. Based on the confidence level of the deep semantic understanding results and business rules, prompts or trigger actions are dynamically adjusted, giving the system a context-aware self-optimization capability and improving the accuracy of understanding and handling complex instructions, implicit intents, and multi-turn dialogues. Attached Figure Description
[0009] Figure 1 This is a flowchart of a method for recognizing the dialogue language intent of an intelligent agent through dual channels, according to an embodiment of the present invention. Figure 2 This is a detailed flowchart of step S40 in an embodiment of the present invention; Figure 3 This is a flowchart of step S41 in an embodiment of the present invention; Figure 4 This is a flowchart of step S42 in an embodiment of the present invention; Figure 5 This is a flowchart of step S43 in an embodiment of the present invention; Figure 6 This is a flowchart of step S50 in an embodiment of the present invention; Figure 7 This is a functional block diagram of a system for implementing dual-channel recognition of the dialogue language intent of an intelligent agent according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a computer system according to an embodiment of the present invention. Detailed Implementation
[0010] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0011] The present invention aims to include at least one of the following: providing a dual-channel language intent recognition method and system that decouples rapid response from deep intent recognition; establishing a collaborative recognition architecture composed of a Large Language Model (LLM) and an auxiliary agent, wherein the agent can independently record and think about dialogue content; realizing external knowledge-enhanced reasoning and semantic correction through a knowledge base and Model Context Protocol (MCP) tool interface; improving the system's understanding accuracy and context awareness of complex user commands; and enabling the agent to maintain high response speed while possessing stronger thinking and understanding capabilities.
[0012] The working principle of this invention is as follows: After the user inputs a statement, the system simultaneously activates two channels: a Quick Response (LLM) channel, which generates an instantaneous natural language response based on a large language model to achieve fluency in the dialogue; and a Deep Intent channel (Agent), which synchronously records user input and model output, and decomposes, labels, and infers semantics. The Deep Intent channel Agent utilizes a knowledge base and MCP (Model Context Protocol) tools to perform verification, search, invocation, or computation tasks. After the Agent completes deep semantic recognition, it feeds back the extracted "intent vector" to the intent fusion and decision execution module. The intent fusion and decision execution module dynamically adjusts the prompts for the next round of LLM or directly executes corresponding actions (such as API calls, task scheduling, data retrieval, etc.) based on context, confidence level, and business rules.
[0013] The method steps of this embodiment are as follows: receiving input statement S1; generating response R1 through the fast response channel; synchronously transmitting (S1,R1) to the deep intent channel; receiving input statement S2; generating response R2 through the fast response channel; synchronously transmitting [(S1,R1),(S2,R2)] to the deep intent channel; the deep intent channel performs semantic decomposition, intent clustering, knowledge retrieval, intent determination, and execution tools; outputting deep intent structure I1; the intent fusion and decision execution module adjusts the next round of context state or triggers action A1 according to the deep intent structure I1; the system returns the final optimized response R2 or execution result.
[0014] In one embodiment, the LLM model uses an open-source large language model (e.g., Deepseek, Qwen model); the deep intent channel agent is implemented using Dify's workflow and agent nodes, enabling knowledge base retrieval within the workflow, forming thought chains within the agent, and making MCP tool calls; the knowledge base uses a vector database, such as Milvus, Qdrant; the tool interface uses external APIs, databases, search engines, and business system interfaces registered based on the MCP protocol; the communication mechanism uses an asynchronous message queue (e.g., MQTT) to achieve dual-channel parallel execution.
[0015] This invention employs a dual-channel design to achieve deep semantic reasoning with millisecond-level response, thereby separating response from understanding and improving efficiency and depth. The deep intent channel agent performs semantic tagging and knowledge enhancement judgment on user statements, identifying implicit intents and enhancing semantic understanding. The deep intent channel agent continuously tracks multi-turn dialogue contexts, enabling long-term semantic modeling. Through knowledge base retrieval and MCP call results, the agent can self-adjust its reasoning path, achieving dynamic learning and self-optimization. It boasts strong scalability, supporting the addition of external tools and multimodal inputs (voice, images, etc.). Interpretability is improved, with agent reasoning logs tracing the reasoning path, facilitating system debugging and auditing. User experience is enhanced, maintaining natural dialogue while achieving deeper system understanding and responses that better meet users' real needs.
[0016] Example 1 Figure 1 This is a flowchart illustrating a method for recognizing the dialogue language intent of an intelligent agent using dual channels, according to an embodiment of the present invention. Figure 1 As shown, the method for recognizing the dialogue language intent of an intelligent agent through dual channels includes the following steps: S10: Receive the current dialogue statement input by the user; Specifically, users input the current dialogue statement through a terminal (such as a smartphone app, a web-based dialogue window, or a smart hardware voice interaction module) with the target dialogue system client installed. Input can be direct text or voice (voice input is converted to standard UTF-8 encoded text by the terminal's built-in speech-to-text module; the conversion model uses the open-source, small-scale Whisper-small speech-to-text model, with a voice sampling rate of 16kHz to ensure a speech-to-text accuracy of at least 95%). The system's input receiving module is deployed on a cloud server, receiving dialogue statement data transmitted from the terminal via HTTP / 2. Simultaneously, it connects to the asynchronous message queue MQTT (Message Queuing Telemetry Transport) publisher, encapsulating the received current dialogue statement into a JSON-formatted message (message fields include user ID, dialogue session ID, current statement content, and input timestamp), and immediately pushes it to the MQTT queue, completing the reception and initial encapsulation of the current dialogue statement.
[0017] S20: Input the current dialogue statement in parallel to the fast response channel and the deep intent channel; the fast response channel is implemented based on a large language model; the deep intent channel is implemented based on an agent with the ability to independently record multi-turn dialogue context; Specifically, the subscribers of the MQTT message queues are associated with the LLM inference service of the fast response channel and the Agent service of the deep intent channel, respectively. The parallel distribution of the current dialogue statement is achieved through the MQTT topic subscription mechanism. The fast response channel subscribes to the fast response topic, and the deep intent channel subscribes to the deep intent topic. Both channels simultaneously retrieve the same JSON-formatted current dialogue statement message from the MQTT queue, ensuring parallel execution without any sequential dependency. The LLM inference service of the fast response channel is deployed on a server, using the open-source Tongyi Qianwen 7B dialogue model, and has undergone dialogue scenario fine-tuning. The inference service communicates with the MQTT subscribers via the gRPC remote procedure call protocol. The Agent service of the deep intent channel is built on the Dify platform (an intelligent agent building and deployment platform), deployed in a Docker container on a cloud server. It directly subscribes to messages through the MQTT access plugin provided by Dify. The Agent service has pre-configured workflows (including semantic decomposition, intent clustering, and knowledge retrieval nodes) and Agent nodes (with the ability to generate thought chains), ensuring that the deep analysis process can be started immediately upon receiving a message.
[0018] S30: Generate and output an instantaneous natural language response based on the current dialogue statement through the fast response channel; Specifically, after receiving the current dialogue statement, the LLM inference service of the fast response channel first preprocesses the "current statement content" in the JSON message (removing leading and trailing whitespace characters, filtering special symbols, and retaining Chinese, English, numbers, and common punctuation). Then, the preprocessed statement is passed as input prompts to the Qwen-7B-Chat model. The model inference parameters are set as follows: temperature coefficient 0.7 (balancing response diversity and accuracy), maximum generation length 512 tokens, and a probability threshold top_p value of 0.95 in the kernel sampling strategy. The inference process uses a dynamic batch processing mechanism to ensure that the inference latency for a single statement is controlled within 500ms. After the model generates an instant natural language response, the inference service supplements the original JSON message with the response content (adding a "fast response content" field). On one hand, it returns the response to the user terminal in real time via HTTP / 2 protocol, displaying it instantly on the dialogue interface to ensure smooth dialogue; on the other hand, it synchronously pushes the complete message containing the current dialogue statement and the fast response content to the intent synchronization topic in the MQTT queue for subsequent association analysis by the deep intent channel, completing the generation and bidirectional output of the instant response.
[0019] S40: Through the deep intent channel, perform deep semantic analysis on the current dialogue statement and the instantaneous natural language response generated by the fast response channel to generate a deep semantic understanding result containing confidence. Specifically, the Agent service of the deep intent channel subscribes to intent synchronization topics to obtain complete data containing the current dialogue statement, quick response content, and historical dialogue context (retrieved from the conversation storage module of the intelligent application building platform Dify via the dialogue session ID, including previous messages [(S1,R1),(S2,R2)]). Then, it initiates a preset workflow to perform deep semantic analysis: First, the semantic decomposition node in the workflow calls the Jieba word segmentation tool to segment the current dialogue statement and quick response content. Combined with the Chinese basic version of the BERT pre-trained model, entity recognition (extracting user IDs, business keywords, numerical information, etc.) and preliminary intent tag extraction (e.g., basic tags such as query, consultation, operation request, etc.) are performed. Next, the intent clustering node uses the K-means algorithm to perform cluster analysis on the currently extracted intent tags and the intent tags from historical dialogues (clustering distance threshold set to 0.8, calculated based on cosine similarity), merging similar intents. Then, the knowledge retrieval node is triggered, converting the semantically decomposed keywords into 768-dimensional vectors (using sentence-level BERT). The encoding model is used for encoding, and the Milvus vector database is queried (index type is inverted file flat index IVF_FLAT, retrieval parameter is the number of probe clusters nprobe=10) to obtain the first 5 relevant knowledge base entries (the knowledge base has been pre-imported with structured data such as business manuals and FAQ databases); then the Agent node starts the thought process inference, combining the knowledge retrieval results with the MCP tool call. If business data verification is involved, the external business system API is called through the MCP protocol (for example, if a user queries an order, the order management system interface is called) to verify the rationality of the intent; finally, the Agent service calculates the confidence score (value range 0-1, rounded to two decimal places) based on semantic matching degree (weight 0.4), knowledge matching degree (weight 0.3), and multi-turn context consistency (weight 0.3), and generates a deep semantic understanding result containing the core intent (for example, querying the order status in November 2025), related entities, intent tags, confidence, knowledge retrieval results, and tool call logs. This result is stored in the Dify result storage module and associated with the corresponding dialogue session ID.
[0020] S50: Based on the deep semantic understanding results, and in conjunction with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, a decision is made to dynamically adjust the prompt words input to the fast response channel for the next round of response; or, trigger at least one preset action.
[0021] Specifically, the intent fusion module retrieves the deep semantic understanding results of the current dialogue from Dify's result storage module. First, it reads the confidence score, and then, combined with a preset confidence threshold (set to 0.8), the dialogue context (obtaining the association logic between preceding statements and responses via the dialogue session ID), and business rules (e.g., order query intent requires triggering an order system API call, confidence scores below 0.8 require prompting the user for additional information), it makes a decision: if the confidence score is ≥0.8 and the deep intent is a clear business action (e.g., query, appointment, data export), it triggers the corresponding preset action, i.e., calling an external system through an interface registered with the MCP protocol (e.g., calling the order system API to query orders within a specified time period, calling a search engine to obtain real-time data, calling a task management system to generate to-do items), and so on. After the system returns the execution result, it integrates the result into natural language text and feeds it back to the user terminal. If the confidence level is ≥0.8 but no external action is required (e.g., the intent is to obtain information already in the knowledge base), the LLM prompt words for the next round of fast response are dynamically adjusted. The prompt words are supplemented with the guiding instruction "Based on the user's [core intent], prioritize the use of [relevant entries] in the knowledge base for response" to ensure that the next round of response is more accurate. If the confidence level is <0.8, the LLM prompt words for the next round are adjusted to follow-up questions (e.g., to more accurately meet your needs, can you provide additional information [the information that needs to be supplemented, such as order number, time range]) and the preliminary intent and entity information in the current deep semantic understanding result are stored in the context cache for reuse in the next round of analysis, realizing dynamic adaptation of decision-making and subsequent actions.
[0022] This technical solution inputs the current dialogue statement into a fast response channel and a deep intent channel in parallel. Based on the real-time natural language response output that ensures the fluency of the dialogue by relying on a large language model, the deep intent channel simultaneously performs deep semantic analysis on both the user's statement and the real-time response. Combined with the multi-turn dialogue context and confidence level independently recorded by the agent and the decision based on preset business rules, it avoids the limitations of the traditional single fast response channel, which has rough intent recognition and semantic disconnect in multi-turn dialogues. It also solves the pain point of poor dialogue experience caused by the response delay of the pure deep analysis channel. Furthermore, it achieves the synergistic unity of real-time and smooth interaction and accurate intent recognition. At the same time, by dynamically adjusting the next round of prompts or triggering preset actions, the agent dialogue is upgraded from a passive response to an intelligent interaction that actively adapts to the user's real needs, improving the accuracy of intent recognition and the efficiency of business implementation in multi-turn dialogues.
[0023] Example 2 Figure 2 This is a detailed flowchart of step S40 in an embodiment of the present invention. Figure 2 As shown, in a further embodiment, step S40 may specifically include the following steps: S41: Semantically decompose the input current dialogue statement and immediate natural language response to obtain multiple semantic units; and perform intent clustering on the semantic units to generate at least one intent label; In one example, the Agent service of the deep intent channel receives the user's current dialogue statement, "Help me check my health data from yesterday, and then recommend a workout plan for today," and the instant natural language response generated by the quick response channel, "Okay, I'll first check your health data from yesterday, and then combine the data to recommend a suitable workout plan for today." Then, it initiates the semantic decomposition process. It calls the built-in Chinese semantic decomposition tool of the Dify intelligent application building platform (which integrates Jieba word segmentation and a Chinese basic version of the BERT pre-trained model) to first segment the two statements, breaking them down into basic lexical units such as "query," "yesterday," "health data," "recommendation," "today," and "workout plan." Then, through semantic role labeling, it identifies actions (query, recommendation), time entities (yesterday, today), core objects (health data, workout plan), and logical relationships (query first, then recommendation). Finally, it extracts three semantic units: "query action, yesterday's time, health data object," "recommendation action, today's time, workout plan object," and "query and recommendation are logically related sequentially," forming a structured semantic unit set. The intent clustering process is then initiated, calling the K-means clustering algorithm configured in the Dify workflow. The semantic units are encoded into 768-dimensional vectors using the sentence-level BERT Chinese encoding model. A clustering distance threshold of 0.85 based on Chinese semantic cosine similarity is set. The current semantic unit vector is compared with the intent vector clusters related to "health data query" and "exercise plan recommendation" in the historical dialogue. Since the two semantic units have a strong logical relationship and a semantic similarity of 0.92, they are merged to form a unified intent label for health data query and personalized exercise plan recommendation, ensuring that the intent label can fully cover the user's complex needs.
[0024] S42: Based on the knowledge base, perform knowledge enhancement retrieval on the semantic unit and the intent tag to obtain relevant supplementary knowledge; and use the supplementary knowledge to verify and semantically correct the semantic unit and the intent tag to obtain knowledge-enhanced semantic information; In the example above, knowledge-enhanced retrieval is initiated based on a Chinese health domain knowledge base deployed on the Milvus vector database (index type IVF_FLAT, retrieval parameter nprobe=12, the database stores structured data such as health data indicator definitions, exercise plan recommendation rules, and device binding specifications, and all data has been encoded into vectors using a sentence-level BERT Chinese encoding model). The semantic unit set obtained in step S41 is combined with the intent tag "health data query and personalized exercise plan recommendation" to form the search keyword "yesterday's health data query and today's exercise plan recommendation association". It is then passed to the Milvus vector database through the Dify built-in search interface. After performing a similarity search, the top 5 related supplementary knowledge are returned, including "health data query needs to be associated with the user's bound health monitoring device (such as smartwatch, fitness tracker), and the main indicators include heart rate, daily steps, sleep duration, and calorie consumption", "exercise plan recommendation needs to be based on yesterday's health data: if yesterday's steps are <5000, moderate intensity exercise (jogging, swimming for 30 minutes) is recommended; if yesterday's steps are 5000-10000, low intensity exercise (brisk walking, yoga for 20 minutes) is recommended; if yesterday's steps are >10000, stretching and relaxation exercise (15 minutes) is recommended" and "health data query time range supports the past 7 days, with yesterday corresponding to the natural day 00:00-24:00 statistical data". Subsequently, supplementary knowledge was used to verify and correct the semantic units and intent tags: verifying the validity of yesterday's time (which conforms to the query range of the past 7 days), clarifying the key indicator range of health data (excluding irrelevant data types), confirming that the "relationship logic between query and recommendation" conforms to the rule in the knowledge base that "exercise plan recommendations must be based on historical health data", and verifying the rationality of intent tags (with a 94% match rate with health management knowledge in the knowledge base). Finally, the knowledge-enhanced semantic information was obtained, which includes a complete semantic chain of "first querying the user's key health indicators from yesterday (heart rate, steps, sleep duration, calorie consumption), and then recommending an exercise plan of appropriate intensity for today based on the indicator value range".
[0025] S43: Based on the knowledge-enhanced semantic information, determine the intent and generate structured intent information as the result of the deep semantic understanding.
[0026] In the example above, based on the knowledge-enhanced semantic information obtained in step S42, the Agent node initiates Chinese thought chain reasoning to determine intent: combining the multi-turn dialogue context (the user has already bound a smartwatch in the previous dialogue and has not raised any other health-related requests) and the business rules in the supplementary knowledge, it clarifies that the user's core need is to obtain their own key health indicator data from yesterday and to obtain personalized exercise plan suggestions for today based on this data. The logic of the need is "data query as a premise, exercise recommendation as the goal," with no ambiguity or omissions in the key requests. Subsequently, a structured deep semantic understanding result is generated, which is stored in JSON format. The fields and specific content are as follows: Chinese core intent ("Query my own key health indicator data from yesterday and recommend a suitable exercise plan for today based on this data"), associated entities (user ID: XXX, time: yesterday 00:00-24:00, query object: key health indicators, recommendation object: today's exercise plan, associated device: bound smartwatch), intent tags (health data query and personalized exercise plan recommendation), and confidence (based on Chinese semantic matching degree 0.4 and knowledge matching degree 0). 35. Context consistency 0.25, weighted calculation 0.80), supplementary knowledge summary (requires calling the smartwatch binding interface to obtain health data, and the exercise plan is recommended in three levels based on yesterday's steps), verification result (legal intent, coherent semantic logic, clear core requirements), and dependency conditions (requires calling the user-bound smartwatch data interface). This structured result has complete fields and accurate data, which can directly provide a clear and executable basis for the decision of step S50 (triggering the smartwatch data interface call and subsequent exercise plan generation), and can be directly used to connect subsequent business logic and tool call processes.
[0027] In this technical solution, semantic decomposition provides precise guidance for knowledge retrieval, avoiding blind retrieval. Knowledge correction optimizes the accuracy of semantic units and intent tags. Finally, through structured output, the deep semantic understanding results can be directly connected to subsequent decision-making and business execution. This not only solves the problem of intent ambiguity and vagueness that easily occurs with single semantic decomposition, but also overcomes the drawback of knowledge retrieval being disconnected from actual intent, achieving a triple improvement in the accuracy, completeness, and usability of intent recognition.
[0028] Figure 3 This is a flowchart of step S41 in an embodiment of the present invention. Figure 3 As shown, in some embodiments, step S41 specifically includes: S411: Perform syntactic analysis and semantic role labeling on the current dialogue statement and the immediate natural language response to identify key predicates, entities, and the semantic relationships between the key predicates and the entities, forming a preliminary set of semantic units; S412: Based on the preset domain intent structure, the preliminary semantic unit set is cleaned and normalized to obtain standardized semantic units. S413: Map the standardized semantic units to vector representations, and use a clustering algorithm to perform unsupervised clustering on the vector representations, aggregating semantic units with similar meanings into the same cluster; S414: Assign an intent label that can characterize the common semantics of each cluster, and generate the at least one intent label.
[0029] The above scheme accurately captures key semantic elements through syntactic analysis and semantic role labeling, cleans and normalizes the semantic expression to reduce ambiguity, and then aggregates similar semantics through vector mapping and unsupervised clustering to finally generate intent tags that accurately represent common semantics, which greatly improves the standardization of semantic unit extraction and the accuracy of intent tags.
[0030] In some embodiments, step S411 specifically includes: S4111: Perform dependency parsing on the current dialogue statement and the immediate natural language response to identify the core grammatical components and their dependency relationships in the sentence, and obtain a syntactic parsing tree; S4112: Based on the syntactic parsing tree, perform semantic role labeling, identify the target predicates in the statement, and label each target predicate with its related semantic role and corresponding entity, forming a set of triples of predicate, role, and entity; S4113: Extract key predicates, entities and semantic relations from the set of triples to form the preliminary set of semantic units, wherein each semantic unit contains a predicate, an associated entity and its semantic role.
[0031] In some embodiments, step S412 specifically includes: S4121: Based on the domain-related word list and stop word list preset in the domain intent structure, remove semantic units that are not related to the target domain and semantic units corresponding to stop words from the preliminary semantic unit set; S4122: Based on the thesaurus and semantic normalization rules defined in the domain intent structure, perform synonym replacement and semantic normalization processing on the filtered semantic units to obtain a set of normalized semantic units; S4123: Perform part-of-speech tagging on the semantic units in the standardized semantic unit set to obtain the corresponding part-of-speech tagging results, and perform consistency verification on the semantic units and their part-of-speech tagging results according to the semantic patterns defined in the domain intent structure to obtain the final standardized semantic units.
[0032] In some embodiments, step S413 specifically includes: S4131: Use a pre-trained language model encoder to convert each standardized semantic unit into a fixed-dimensional vector representation; S4132: Calculate the semantic similarity between the vector representations and construct a similarity matrix; S4133: Based on the similarity matrix, an unsupervised clustering algorithm is used to group the vector representations, and vector representations with similarity higher than a preset threshold are grouped into the same cluster. S4134: Optimize the formed clusters. The optimization process includes: calculating the centroid distance between any two clusters; if the centroid distance is less than a preset centroid distance merging threshold, and the number of vector representations contained in each of the two clusters is less than a preset cluster size merging threshold, then merge the two clusters; delete noisy clusters that contain fewer than a preset minimum size threshold.
[0033] As an example, in step S413, the standardized semantic units are first transformed into 768-dimensional dense vector representations using a BERT pre-trained model fine-tuned with health domain corpus. Then, the cosine similarity algorithm is used to calculate the similarity between all vector pairs, and a similarity matrix is constructed to quantify the semantic association strength. Based on this matrix, the K-means clustering algorithm is applied and a preset similarity threshold (e.g., 0.8) is used to group the vectors, so that semantically similar units are aggregated into the same cluster. Finally, the clustering results are optimized: the centroid distance between clusters is calculated, and if the distance is less than the merging threshold (e.g., 0.7) and the cluster size is lower than the size threshold, the clusters are merged. At the same time, noisy clusters with fewer than the minimum size threshold (e.g., 2) are deleted, thereby ensuring that the clustering results are both semantically coherent and structurally reasonable.
[0034] Specifically, in step S4131, the pre-trained language model encoder is a sentence-level BERT Chinese pre-trained language model fine-tuned with target domain (e.g., health domain) corpus, used to convert standardized semantic units into dense vector representations of fixed dimensions. In step S4132, the semantic similarity between vector representations is calculated using a cosine similarity algorithm, and a similarity matrix is constructed based on the pairwise similarity calculation results of all vectors. The rows and columns of the matrix correspond to the vector representations, and the matrix elements are the similarity values of the corresponding vectors. In step S4133, an unsupervised clustering algorithm is used to group the vector representations, and the affiliation of the vector representations is determined by a preset semantic similarity threshold. Vector representations with similarity higher than the threshold are grouped into the same cluster. In step S4134, the optimization processing of the formed clusters includes the following steps: calculating the centroid distance between any two clusters; if the centroid distance is less than a preset centroid distance merging threshold, and the number of vector representations contained in each of the two clusters is less than a preset cluster size merging threshold, then merging the two clusters; deleting noisy clusters containing fewer than a preset minimum size threshold. The centroid distance merging threshold, cluster size merging threshold, and minimum size threshold are optimization parameters preset based on the semantic characteristics of the target business domain.
[0035] Further, the vector representation in step S4131 is generated by a multi-layer semantic encoder, which includes: a basic language model encoder for obtaining the contextual semantic feature representation of the semantic unit; a domain concept encoder for enhancing the semantic unit with domain knowledge based on the domain concept graph defined in the domain intent structure to generate a domain semantic feature representation; a cross-sentence semantic dependency encoder for extracting cross-sentence semantic dependencies from historical dialogue rounds to generate a cross-sentence semantic dependency feature representation; and a multi-layer semantic fusion module for weighted fusion of the contextual semantic feature representation, the domain semantic feature representation, and the cross-sentence semantic dependency feature representation to generate an enhanced vector representation containing multi-dimensional semantic features.
[0036] Further, the operation in step S4132 used to calculate the semantic similarity between vector representations is performed by a multi-scale semantic similarity model, which is used for: Local semantic similarity is calculated based on the semantic feature vector generated by the local context window of the corresponding semantic unit; Domain semantic similarity is calculated based on domain semantic feature vectors generated from predefined semantic patterns and domain labels in the domain intent structure; Structural semantic similarity is calculated based on the structural semantic feature vector generated by the structural position of semantic units in the cross-sentence semantic dependency graph; the cross-sentence semantic dependency graph is constructed by the cross-sentence semantic dependency encoder according to the historical dialogue rounds and is used to represent the semantic dependency relationship between different sentences; The final semantic similarity is obtained by weighting and combining the local semantic similarity, the domain semantic similarity, the structural semantic similarity, and the adaptive weights. The adaptive weights are dynamically adjusted based on a stability index determined by the rate of change of the dialogue context features.
[0037] The cross-sentence semantic dependency encoder can be constructed based on graph neural network (GNN), Transformer or bidirectional recurrent neural network (BiLSTM) structure. It generates structural semantic feature vectors to represent cross-sentence semantic dependencies by modeling the referential and semantic succession relationships between historical multi-turn dialogue statements.
[0038] The adaptive weights are dynamically adjusted based on the rate of change of dialogue context features. Specifically, the system calculates cosine or Euclidean distances based on the semantic representation vectors of adjacent dialogue rounds (e.g., sentence vectors generated by an encoder) to obtain the rate of change of context features. When the rate of change of context features is less than a preset threshold, it indicates that the current dialogue topic is relatively stable, and the system increases the weights of domain semantic similarity and structural semantic similarity while decreasing the weights of local semantic similarity. When the rate of change of context features is greater than the preset threshold, it indicates that the dialogue topic has changed or that semantics has abruptly changed, and the system increases the weights of local semantic similarity while decreasing the weights of domain semantics and structural semantics. The weight adjustment is achieved through a normalized weighting function, thereby achieving an adaptive balance of contributions to local, domain, and structural semantic similarity, ensuring that the final semantic similarity remains stable and accurate under different dialogue contexts.
[0039] The above-mentioned scheme improves the accuracy and stability of semantic matching in multi-turn dialogues by jointly calculating similarity on three semantic scales: local, domain, and structure, and adaptively adjusting the weights according to the change rate of the dialogue context. This enables the system to maintain accurate recognition of the user's true intent in scenarios with topic jumps or semantic continuity.
[0040] Figure 4 This is a flowchart of step S42 in an embodiment of the present invention. Figure 4 As shown, in some embodiments, step S42 specifically includes the following sub-steps: S421: Construct a query statement based on the semantic unit and the intent tag, wherein the query statement contains semantic elements and the association relationships between the semantic elements; S422: Input the query statement into the knowledge base for multi-dimensional retrieval. The knowledge base includes a structured knowledge graph and vectorized knowledge representation. The retrieval process includes graph traversal search and semantic similarity matching. S423: Retrieve and obtain supplementary knowledge related to the query statement from the knowledge base, the supplementary knowledge including entity attributes, relationship paths, domain rules and context constraints; S424: Perform logical consistency verification between the supplementary knowledge and the semantic units and intent tags obtained from step S41, identify and record existing semantic ambiguities, logical conflicts or knowledge gaps, and generate verification results. S425: Based on the verification result, perform semantic correction on the semantic unit and the intent label. The semantic correction includes entity disambiguation, relation completion, and intent refinement, and finally generate knowledge-enhanced semantic information.
[0041] Specifically, the multi-dimensional retrieval described in S422 includes: querying the structured knowledge graph through graph traversal search, using entities extracted from the query statement as starting nodes, traversing adjacent nodes and paths along relation edges to obtain structured knowledge that has a direct relationship with the query statement; querying the vectorized knowledge representation through semantic similarity matching, converting the query statement into a vector representation, calculating its similarity with the vectorized knowledge representation in the knowledge base, and retrieving the most relevant knowledge points whose similarity exceeds a preset threshold; and fusing the structured knowledge obtained by graph traversal search with the relevant knowledge points obtained by semantic similarity matching to form complete supplementary knowledge.
[0042] Specifically, the entity attributes include state, numerical, and category information describing entity characteristics; the relationship path contains a sequence of semantic relationships connecting entities through intermediate entities; the domain rules use "If-Then" rule form to represent business logic constraints in a specific domain; and the context constraints include at least one of time range restrictions, spatial location restrictions, and user permission restrictions.
[0043] Specifically, in step S424, a logical consistency cross-validation is performed on the supplementary knowledge, the semantic unit obtained from step S41, and the intent label. This includes: verifying whether the specific dialogue scenario described by the semantic unit conforms to the domain facts defined by the supplementary knowledge; verifying whether the intent label belongs to a reasonable intent that can be established under the joint support of the dialogue scenario described by the semantic unit and the domain facts defined by the supplementary knowledge; and identifying and recording existing semantic ambiguities, logical conflicts, or knowledge gaps through the cross-validation, and generating a verification result.
[0044] As an example, in step S424, the logical consistency cross-validation specifically manifests as: verifying whether the specific scenario parsed from the dialogue matches the domain facts in the knowledge base, and determining whether the identified intent label is a reasonable intent supported by the scenario and facts. For example, when a user inputs "I want to reschedule my flight to City A tomorrow morning to the afternoon," the system parses the scenario as "the user requests to reschedule a specific flight (destination City A, original time tomorrow morning) to tomorrow afternoon"; the domain facts retrieved from the aviation travel knowledge base include whether the flight exists, whether rescheduling is allowed, the user's membership level permissions, etc.; the system then verifies whether the intent label "rescheduling flight" is reasonable. If the flight does not exist or has already taken off, the intent conflicts with the domain facts and is an unreasonable intent; if the flight exists and rescheduling is allowed, it is a reasonable intent. Through this multi-dimensional cross-validation, the system can identify problems such as semantic ambiguity (e.g., unclear flight reference), logical conflict (e.g., intent contradicting rules), or knowledge gaps (e.g., lack of relevant rescheduling policies) and generate structured validation results.
[0045] Specifically, entity disambiguation refers to selecting the entity meaning that best matches the current dialogue context when the same entity name corresponds to multiple entities with different meanings in the knowledge base, based on the contextual constraints and domain rules in the supplementary knowledge, and updating the entity reference in the semantic unit. Relationship completion refers to filling in missing semantic relationships in the semantic unit based on the relation paths in the supplementary knowledge, or semantically enhancing existing relationships to form a more complete semantic expression. Intent refinement refers to decomposing the intent tag from coarse-grained to more specific sub-intents based on the domain rules and entity attributes in the supplementary knowledge, or specifying the applicable conditions and execution parameters of the intent based on domain facts.
[0046] In a further embodiment, the multi-dimensional retrieval in step S422 may further include: calling external resources through a tool interface based on the Model Context Protocol (MCP), wherein the external resources include at least one of external application programming interfaces (APIs), databases, search engines, and business system interfaces registered through the MCP protocol; and integrating the real-time data and business logic information returned by the external resources with the retrieval results of the knowledge base to form comprehensive supplementary knowledge.
[0047] Specifically, the process of integrating the information returned from external resources with the retrieval results of the knowledge base includes: semantic alignment and logical association of information from different sources; merging and deduplication when information points to the same entity or concept; and resolving conflicts when information conflicts exist based on the reliability weights preset for different data sources and the timeliness of the information. Ultimately, a unified, non-redundant, and logically conflict-free knowledge set is generated as supplementary knowledge to the comprehensive process.
[0048] Specifically, the business logic information refers to the rules and status information obtained from the external business system interface, which is used to determine whether and how a user request can be executed. It includes at least one of business rules, process constraints, status conditions, and execution permissions.
[0049] In a further embodiment, the logical consistency verification in step S424 may further include: calling an external verification service through a tool interface based on the Model Context Protocol (MCP) to perform third-party verification on the semantic unit and the intent tag; the external verification service includes at least one of a syntax checker, a logic reasoning engine, and a business rule verification system; and comprehensively evaluating the verification result of the external verification service with the verification result based on the knowledge base.
[0050] Specifically, the syntax checker is used to verify the correctness of the semantic unit in terms of syntactic structure and semantic role labeling; the logic reasoning engine verifies the logical consistency between the semantic unit and the intent label based on formal logic rules; and the business rule verification system verifies the feasibility of the user request represented by the intent label in the business context according to the business rules and state constraints of a specific domain.
[0051] Specifically, the comprehensive evaluation of the verification results from external verification services and the verification results based on the knowledge base includes the following steps: aligning and normalizing the results from different verification sources to establish a unified format for representing verification conclusions; generating a consistency verification pass conclusion when the conclusions from different verification sources are consistent; and generating a comprehensive verification conclusion when the conclusions from different verification sources conflict, making a weighted decision based on the preset reliability weights of each verification service.
[0052] In a further embodiment, the semantic correction in step S425 may further include: calling an external semantic processing tool through a tool interface based on the Model Context Protocol (MCP) to assist in the semantic correction; the external semantic processing tool includes at least one of a thesaurus, a semantic network inference engine, a domain ontology library, and a terminology library interface; and enhancing the accuracy or completeness of entity disambiguation, relation completion, and intent refinement based on the semantic resources provided by the external semantic processing tool.
[0053] Specifically, the thesaurus is a structured lexical knowledge base that organizes vocabulary through a tree-like hierarchical structure, providing semantic relationship support such as synonyms, near-synonyms, and hyponyms for word disambiguation and semantic expansion. The semantic network inference engine, based on a large graph composed of concept nodes and semantic relationship edges, is capable of path discovery and relationship reasoning, thereby uncovering deep semantic connections in the text that are not explicitly expressed. The domain ontology defines a standardized description system of concepts, attributes, constraints, and logical relationships between concepts within a specific domain, providing a rigorous domain model and axiomatic constraints for semantic understanding. The terminology database interface provides access to authoritative, standardized domain terms and their definitions, ensuring the accuracy and professionalism of semantic processing. These tools work together to provide multi-level, structured knowledge support for semantic correction, from vocabulary and relationships to domain concepts.
[0054] Figure 5 This is a flowchart of step S43 in an embodiment of the present invention. Figure 5 As shown, in a further embodiment, step S43 may specifically include: S431: Extract features from the knowledge-enhanced semantic information to construct an intent determination feature vector, wherein the intent determination feature vector includes semantic role features, entity relationship features and context association features; S432: Input the intent determination feature vector into a pre-trained intent classification model, which is implemented based on a multilayer perceptron or a transformer classifier, and output a preliminary intent classification result and a corresponding confidence score; the preliminary intent classification result includes the intent type and preliminary intent parameters; S433: Based on the domain rules and context constraints in the knowledge-enhanced semantic information, perform logical verification and conflict resolution on the preliminary intent classification result, generate an optimized intent determination result, and determine the final intent parameters; S434: The final intent parameters, the confidence score, and the semantic units, entity attributes, and relational paths associated with the intent determination result are structurally encapsulated to generate structured intent information.
[0055] Further, the feature extraction of the knowledge-enhanced semantic information described in step S431 specifically includes: semantic role encoding of the action, time, and object elements in the knowledge-enhanced semantic information to generate semantic role feature vectors; constructing triples based on the relationships between entities in the knowledge-enhanced semantic information and vectorizing the relationship types to generate entity relationship feature vectors; calculating the semantic similarity between the knowledge-enhanced semantic information and the preceding dialogue context to generate context association feature vectors; and concatenating the semantic role feature vectors, the entity relationship feature vectors, and the context association feature vectors to form a multi-dimensional intent determination feature vector.
[0056] Furthermore, the pre-trained intent classification model in step S432 is a classifier obtained by fine-tuning the Transformer architecture on a specific domain corpus; the preliminary intent classification result includes composite intent types and corresponding refinement parameters, wherein the composite intent type is composed of a combination of multiple single intents automatically identified by the classification model based on input features.
[0057] Further, the logical verification and conflict resolution based on domain rules and context constraints described in step S433 specifically includes: dependency verification, which verifies whether the composite intent type in the preliminary intent classification result conforms to the intent dependency relationship defined by the domain rules; if it conforms, it proceeds to parameter range verification; if it does not conform, it is determined to be a logical conflict; parameter range verification, which verifies whether the preliminary intent parameter is within the executable range of the context constraints; if it is within the executable range, the parameter is adopted; if it exceeds the executable range, it is corrected or determined to be a conflicting parameter according to the context; conflict resolution and parameter generation, which refers to resolving or refining the preliminary intent parameter according to the domain rules when the dependency verification determines it to be a logical conflict or the parameter range verification determines it to be a conflicting parameter, generating the final intent parameter containing complete execution rules.
[0058] Furthermore, the structured intent information generated by the structured encapsulation in step S434 adopts a standardized data format; the structured intent information includes the final intent type, final intent parameters, confidence score, associated semantic units, entity attributes, and relational path fields; wherein, the final intent parameter field stores detailed parameters including time range, operation object, and execution rules in key-value pair form.
[0059] By constructing an intent determination feature vector with multi-dimensional features, and then performing structured encapsulation after classification by a pre-trained model, domain rule verification, and conflict resolution, the accuracy, confidence reliability, and direct usability of intent determination in the health domain can be significantly improved.
[0060] Figure 6This is a flowchart of step S50 in an embodiment of the present invention. Figure 6 As shown, in a further embodiment, step S50 specifically includes: S51: Extract the confidence level and intent classification information from the deep semantic understanding results; compare the extracted confidence level with a preset confidence level threshold; and determine the processing priority of the current dialogue context based on the extracted intent classification information and the preset business rules. S52: If the confidence level is higher than the confidence level threshold and the processing priority meets the fast response condition, then the decision is to trigger the at least one preset action; S53: If the confidence level is lower than the confidence level threshold, or the processing priority indicates that intention disambiguation is required, the decision is to dynamically adjust the prompt words used to generate the next round of responses; wherein, the dynamic adjustment includes adding semantic disambiguation guidance to the prompt words, or injecting contextual information extracted from the deep semantic understanding results.
[0061] Specifically, the preset confidence threshold is set based on the statistical accuracy of historical dialogue intent recognition, used to balance recognition accuracy and user experience. The preset business rules include dividing processing priorities into multiple levels, including at least urgent, high, medium, and low levels; the urgent and high levels meet the conditions for rapid response. Triggering at least one preset action includes: calling an external application programming interface (API) through the Model Context Protocol (MCP) to obtain data, and / or calling domain-specific tools to generate personalized content; the actions are executed in parallel through an asynchronous message queue. Dynamically adjusting prompts includes: adding clarification requests for ambiguous semantics to the prompts as semantic disambiguation guidance, and injecting contextual information extracted from the deep semantic understanding results. The semantic disambiguation guidance includes explicit inquiries about time ranges, object references, or operational parameters; the injected extracted contextual information includes user-bound device information, queryable data types, or constraints confirmed in historical dialogues.
[0062] Specifically, triggering at least one preset action in step S52 includes at least one of the following: calling an external application programming interface (API) to execute a specific task; generating a structured query statement to retrieve data from the database; creating or updating a task plan and adding the task plan to the task scheduling queue.
[0063] Specifically, determining the processing priority of the current dialogue context based on the extracted intent classification information and the preset business rules includes: matching the extracted intent classification information with the intent types defined in the preset business rules; determining the business importance level and processing urgency level corresponding to the intent classification information according to the matched business rule entries; and querying a priority mapping table based on the combination of the business importance level and the processing urgency level to determine the final processing priority label.
[0064] Specifically, the intelligent agent upon which the deep intent channel is based includes a workflow engine and an inference decision module. The workflow engine is used to schedule and execute knowledge base retrieval operations and Model Context Protocol (MCP) tool invocation operations. The inference decision module is used to form thought processes and make inference decisions based on the execution results of the workflow engine to complete the deep semantic analysis. Further, the workflow engine is built on a visual workflow platform and is configured to perform the following operations: automatically schedule knowledge base retrieval operations based on semantic units in the received dialogue statements to obtain domain knowledge related to the semantic units; automatically schedule MCP tool invocation operations based on the knowledge base retrieval results to obtain real-time data from external data sources; integrate the knowledge base retrieval results and MCP tool invocation results to generate structured intermediate execution results, and push these structured intermediate execution results to the inference decision module. The reasoning and decision-making module is configured to perform the following operations: parse key information in the intermediate execution results pushed by the workflow engine, including tool-returned data, knowledge base rules, and execution status; form a multi-step thinking chain based on the parsed information, the thinking chain including at least one step of confirming the user's core intent, verifying data validity, matching knowledge base rules, and judging unmet conditions; perform multiple rounds of logical verification and reasoning decisions based on the thinking chain to generate a deep semantic understanding result containing core intent, related data, recommendation basis, and confidence level.
[0065] In a further embodiment, when making a decision in step S50, the following steps are also performed: based on the difference between the confidence level of the deep semantic understanding result and a preset threshold, and the complexity of the current dialogue context, the contribution weights of the fast response channel and the deep intent channel in generating the final response are dynamically calculated; according to the contribution weights, the immediate natural language response generated by the fast response channel and the deep semantic understanding result generated by the deep intent channel are weighted and fused to generate a comprehensive response and output it.
[0066] Specifically, the dynamic calculation of the contribution weights of the fast response channel and the deep intent channel includes: calculating the absolute difference between the confidence level of the deep semantic understanding result and a preset threshold; quantifying the complexity of the current dialogue context to obtain a complexity coefficient; wherein the complexity coefficient is assigned a value based on the dialogue round, statement relevance, and intent complexity; and calculating the first contribution weight of the fast response channel and the second contribution weight of the deep intent channel using a predefined linear weighting formula based on the absolute difference and the complexity coefficient; wherein the values of the first contribution weight and the second contribution weight are in the range of [0.1, 0.9] to ensure that neither channel is completely blocked.
[0067] Specifically, the linear weighting formula is: The first contribution weight = basic weight - (absolute difference × first coefficient) - (complexity coefficient × second coefficient); the second contribution weight = 1 - the first contribution weight; wherein, the basic weight, the first coefficient and the second coefficient are preset constants.
[0068] Specifically, the weighted fusion to generate a comprehensive response includes: using the instant natural language response generated by the fast response channel as a basic framework; and embedding key business information from the deep semantic understanding results generated by the deep intent channel into the basic framework according to the contribution weight; wherein the key business information includes at least one of entity attributes, relationship paths, and execution rules.
[0069] In a further embodiment, step S60 is included after step S50: S60: Based on the deep semantic understanding results and the execution effect of the decision actions triggered by them, incremental learning is performed on the semantic analysis model of the deep intent channel to dynamically update its internal knowledge representation and reasoning rules.
[0070] Specifically, the incremental learning in step S60 includes: establishing the association between the intent label, semantic unit and subsequent user feedback in the deep semantic understanding result; when the user feedback is positive, strengthening the connection weight of the reasoning path that generated the deep semantic understanding result in the model; when the user feedback is negative or the triggered action fails to execute, weakening the connection weight of the corresponding reasoning path and triggering the re-annotation and knowledge retrieval of the relevant semantic units.
[0071] Specifically, the establishment of the association is achieved through a relational database. The database table contains fields such as session ID, intent tag, semantic unit set, decision action type, action execution result, user feedback content, feedback type, and inference path identifier.
[0072] Specifically, the strengthening of connection weights involves: locating key node connections in the semantic analysis model that correspond to the inference path identifier, increasing their connection weights by a preset strengthening coefficient, and updating the model parameters using a mini-batch gradient descent method.
[0073] Specifically, the triggering of re-annotation and knowledge retrieval of relevant semantic units includes: for negative feedback scenarios, calling the manual auxiliary annotation interface to re-annotate ambiguous semantic units; for action execution failure scenarios, automatically retrieving domain knowledge base to supplement anomaly handling scheme knowledge entries and updating inference rules.
[0074] The above approach dynamically updates the knowledge representation and reasoning rules of the deep intent channel semantic analysis model through incremental learning based on the results of deep semantic understanding and the execution effect of decision actions, thereby enabling the model to continuously self-optimize and improving the accuracy of intent recognition and scenario adaptability in subsequent dialogues.
[0075] In a further embodiment, step S70 is included after step S50: Based on the user's feedback to the instant natural language response generated by the fast response channel in multi-turn dialogue, the difference between the user's true intent obtained through deep semantic analysis and the expressive intent directly parsed from the user's current dialogue statement is identified, and an intent game model is constructed. The adversarial dialogue samples are generated using the intent game model, and the models of the fast response channel and the deep intent channel are adversarially trained to optimize the model parameters of the fast response channel and the deep intent channel, thereby improving the system's ability to identify and defend against users' implicit intentions and leading questions.
[0076] Specifically, the construction of the intent game model is carried out using a reinforcement learning-based framework; the state space of the reinforcement learning framework includes expressed intent features, true intent features, and user feedback types; the reward function of the reinforcement learning framework uses the quantified value of intent difference and the accuracy of constraint extraction as evaluation indicators.
[0077] Specifically, the reinforcement learning-based framework includes the following elements: a state space, which contains expressive intent features extracted from the current dialogue, true intent features obtained through deep semantic analysis, and user feedback type features; an action space, defined as the set of three types of actions that the intent game model can execute: difference identification, constraint supplementation, and intent correction; and a reward function, which uses the quantified value of intent difference and the accuracy of constraint extraction as evaluation metrics to calculate the reward value obtained by the model after executing the action. The reward function is configured as follows: a positive reward is given when the model action successfully reduces the difference between the expressive intent and the true intent; a negative reward is given when the model action fails to effectively identify or correct the intent difference; and the model is trained using a policy gradient algorithm in a multi-turn dialogue scenario to maximize the cumulative reward.
[0078] Specifically, the action space defined by the intention game model includes three types of actions: difference identification, constraint supplementation, and intention correction. Through multiple rounds of iterative training, the intention game model acquires the ability to adaptively select and execute corresponding actions based on the difference between the expressed intention and the true intention.
[0079] Specifically, in the action space defined by the intention game model, the difference identification action refers to comparing the expressed intention with the true intention, identifying and classifying the difference type, which includes at least one of information-deficient difference, logical conflict difference, and constraint difference; the constraint supplementation action refers to extracting implicit constraints from the dialogue context or domain knowledge and adding them to the intention expression when information-deficient difference or constraint difference is identified; the intention correction action refers to correcting or reconstructing the intention expression with logical errors based on domain rules and contextual evidence when logical conflict difference is identified.
[0080] Specifically, the information-deficient difference refers to the absence of key entities or attributes contained in the true intention in the expressed intention; the logical conflict difference refers to the contradiction between the expressed intention and the true intention in terms of action, object, or logical relationship; and the constraint condition difference refers to the absence of the time, space, or state preconditions on which the true intention depends in the expressed intention.
[0081] Specifically, generating adversarial dialogue samples includes generating two types of samples: implicit intent samples, which are derived directly from the user's current dialogue statement and show a difference between the expressed intent and the true intent, and leading question samples, which are derived directly from the user's current dialogue statement and contain misleading statements or logical traps.
[0082] Specifically, the adversarial training aims to: improve the ability of the fast response channel model to capture implicit constraints from the details of user statements; and enhance the ability of the deep intent channel model to resolve semantic ambiguity and identify misleading information.
[0083] Specifically, after the adversarial training is completed, a verification step is also included, which uses a reserved test set to verify the performance of the trained intention game model, ensuring that its implicit intention recognition accuracy and induced question defense rate are improved to above the preset performance threshold.
[0084] The above scheme constructs an intention game model by identifying the difference between the true intention and the expressed intention, and generates adversarial examples. The adversarial training of the dual-channel model is beneficial to efficiently improve the system's ability to identify implicit intentions and defend against leading questions.
[0085] Example 3 Figure 7 This is a functional block diagram of a system for implementing dual-channel recognition of the dialogue language intent of an intelligent agent, according to an embodiment of the present invention. The system is used to execute the above-described method, such as... Figure 7 As shown, the system includes: The input module is used to receive the current dialogue statement input by the user; The channel allocation module is used to send the current dialogue statement to the fast response module and the deep intent analysis module in parallel; The fast response module, implemented based on a large language model, is used to generate and output an instantaneous natural language response based on the current dialogue statement. The deep intent analysis module is implemented based on an intelligent agent with the ability to independently record multi-turn dialogue context. It is used to perform deep semantic analysis on the current dialogue statement and the instant natural language response generated by the fast response module to generate a deep semantic understanding result containing confidence. The intent fusion and decision execution module is used to make decisions based on the deep semantic understanding results, combined with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, so as to dynamically adjust the prompt words input to the fast response module for the next round of response; or, trigger at least one preset action.
[0086] The specific working process of each module in the above system can be referred to the corresponding process in the aforementioned method embodiments, and will not be repeated here.
[0087] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements any of the methods described above for recognizing the dialogue language intent of an intelligent agent through dual channels. The present invention can implement all or part of the processes in the methods of the above embodiments, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.
[0088] The present invention also provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a method for recognizing the intent of a smart agent's dialogue language through dual channels, as provided by the present invention. Figure 8 As shown, the computer system 800 of the electronic device of the present invention includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the computer system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804. The following components are connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A driver 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is mounted on the drive 810 as needed so that a computer program read from it can be installed into the storage section 808 as needed. Embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, containing program code for performing the methods shown in the main step diagram. In the above embodiments, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit 801, it performs the functions defined in the system of the present invention.
[0089] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for recognizing the intent of a smart agent's dialogue language through dual channels, characterized in that, Includes the following steps: S10: Receive the current dialogue statement input by the user; S20: Input the current dialogue statement in parallel to the fast response channel and the deep intent channel; The fast response channel is implemented based on a large language model; the deep intent channel is implemented based on an intelligent agent with the ability to independently record multi-turn dialogue context. S30: Generate and output an instantaneous natural language response based on the current dialogue statement through the fast response channel; S40: Through the deep intent channel, perform deep semantic analysis on the current dialogue statement and the instantaneous natural language response generated by the fast response channel to generate a deep semantic understanding result containing confidence. S50: Based on the deep semantic understanding results, and combined with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, a decision is made to dynamically adjust the prompt words input to the fast response channel for the next round of response. Alternatively, trigger at least one preset action.
2. The method according to claim 1, characterized in that, Step S40 specifically includes: S41: Semantically decompose the input current dialogue statement and immediate natural language response to obtain multiple semantic units; and perform intent clustering on the semantic units to generate at least one intent label; S42: Based on the knowledge base, perform knowledge enhancement retrieval on the semantic unit and the intent tag to obtain relevant supplementary knowledge; and use the supplementary knowledge to verify and semantically correct the semantic unit and the intent tag to obtain knowledge-enhanced semantic information; S43: Based on the knowledge-enhanced semantic information, determine the intent and generate structured intent information as the result of the deep semantic understanding.
3. The method according to claim 2, characterized in that, Step S41 specifically includes: S411: Perform syntactic analysis and semantic role labeling on the current dialogue statement and the immediate natural language response to form a preliminary set of semantic units; S412: Process the preliminary semantic unit set based on the preset domain intent structure to obtain standardized semantic units; S413: Map the standardized semantic units to vector representations, and use a clustering algorithm to cluster the vector representations, aggregating semantic units with similar meanings into the same cluster; S414: Assign an intent label that can characterize the common semantics of each cluster, and generate the at least one intent label.
4. The method according to claim 2, characterized in that, Step S42 specifically includes: S421: Construct a query statement based on the semantic unit and the intent tag; S422: Input the query statement into the knowledge base for multi-dimensional retrieval; S423: Retrieve and obtain supplementary knowledge related to the query statement from the knowledge base, the supplementary knowledge including entity attributes, relationship paths, domain rules and context constraints; S424: Perform logical consistency verification between the supplementary knowledge and the semantic unit and intent label, and generate a verification result; S425: Based on the verification result, perform semantic correction on the semantic unit and the intent label to finally generate knowledge-enhanced semantic information.
5. The method according to claim 4, characterized in that, The multi-dimensional retrieval described in step S422 also includes: Call external resources through a tool interface based on the Model Context Protocol (MCP); The real-time data and business logic information returned by the external resources are integrated with the retrieval results of the knowledge base to form comprehensive supplementary knowledge.
6. The method according to claim 2, characterized in that, Step S43 specifically includes: S431: Extract features from the knowledge-enhanced semantic information to construct an intent determination feature vector; S432: Input the intent determination feature vector into the pre-trained intent classification model, and output the preliminary intent classification result and the corresponding confidence score; the preliminary intent classification result includes the intent type and preliminary intent parameters; S433: Based on the domain rules and context constraints in the knowledge-enhanced semantic information, perform logical verification and conflict resolution on the preliminary intent classification result, generate an optimized intent determination result, and determine the final intent parameters; S434: The final intent parameters, the confidence score, and the semantic units, entity attributes, and relational paths associated with the intent determination result are structurally encapsulated to generate structured intent information.
7. The method according to claim 1, characterized in that, Step S50 specifically includes: S51: Extract the confidence level and intent classification information from the deep semantic understanding results; compare the extracted confidence level with a preset confidence level threshold; and determine the processing priority of the current dialogue context based on the extracted intent classification information and the preset business rules. S52: If the confidence level is higher than the confidence level threshold and the processing priority meets the fast response condition, then the decision is to trigger the at least one preset action; S53: If the confidence level is lower than the confidence level threshold, or the processing priority indicates that disambiguation is required, the decision is to dynamically adjust the prompt words used to generate the next round of responses.
8. The method according to claim 1, characterized in that, Step S50 is followed by step S60: S60: Based on the deep semantic understanding results and the execution effect of the decision actions triggered by them, incremental learning is performed on the semantic analysis model of the deep intent channel to dynamically update its internal knowledge representation and reasoning rules.
9. The method according to claim 1, characterized in that, Step S50 is followed by step S70: Based on the user's feedback to the instant natural language response generated by the fast response channel in multi-turn dialogue, the difference between the user's true intent obtained through deep semantic analysis and the expressive intent directly parsed from the user's current dialogue statement is identified, and an intent game model is constructed. The intent game model is used to generate adversarial dialogue samples, and the models of the fast response channel and the deep intent channel are trained adversarially.
10. A system for realizing dual-channel recognition of the dialogue language intent of an intelligent agent, characterized in that, The system is used to perform the method according to any one of claims 1-9, the system comprising: The input module is used to receive the current dialogue statement input by the user; The channel allocation module is used to send the current dialogue statement to the fast response module and the deep intent analysis module in parallel; The fast response module, implemented based on a large language model, is used to generate and output an instantaneous natural language response based on the current dialogue statement. The deep intent analysis module is implemented based on an intelligent agent with the ability to independently record multi-turn dialogue context. It is used to perform deep semantic analysis on the current dialogue statement and the instant natural language response generated by the fast response module to generate a deep semantic understanding result containing confidence. The intent fusion and decision execution module is used to make decisions based on the deep semantic understanding results, combined with the current dialogue context, the confidence level of the deep semantic understanding results, and preset business rules, so as to dynamically adjust the prompt words input to the fast response module for the next round of response; or, trigger at least one preset action.