Voice-driven intelligent agent interactive control method and device for water conservation
By constructing an intent dialogue tree and simulating a semantic tensor field, the problem of lack of context in voice interaction is solved, and accurate and coherent responses in multi-turn voice interaction are achieved, which is applicable to intelligent agent interaction control in the field of water conservation.
Patent Information
- Application Number
- CN202511062697.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-07-31
Smart Images

Figure CN120564702B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of voice interaction technology, and in particular to a voice-driven intelligent agent interaction control method and device for water conservation. Background Art
[0002] In existing voice interaction technologies, when users ask questions in multiple rounds, the agent typically responds only based on the current statement, failing to effectively connect with the semantics of the preceding task. This results in a lack of contextual coherence and insufficient information completeness in the response. Meanwhile, some technical solutions attempt to form long text inputs by splicing together all historical dialogues. While this can preserve context to some extent, it suffers from low processing efficiency, high computational overhead, and is prone to semantic shifts, ultimately leading to redundant, inaccurate, or logically disjointed responses, failing to meet the requirements of coherence and response quality in complex semantic tasks. To address these issues, this application designs a voice-driven intelligent agent interaction control method and device for the field of water conservation. Summary of the Invention
[0003] The technical problem addressed in this application is to overcome the shortcomings of existing technologies by providing a voice-driven intelligent agent interaction control method and device for water conservation. This method manages semantic segments by constructing an intent dialogue tree structure, enabling contextual continuity and task succession in multi-turn voice interactions. The method determines the optimal attachment path for semantic segments through semantic tensor representation and tensor field simulation, completes the current semantics based on the parent node's response content, generates query vectors by matching plugins, and guides the intelligent agent to generate accurate responses. The device integrates modules for voice acquisition, semantic parsing, structure management, plugin scheduling, and voice broadcasting, making it suitable for voice interaction control in intelligent water-saving terminals.
[0004] To achieve the above objectives, this application provides the following technical solution:
[0005] A voice-driven intelligent agent interaction control method for water conservation, the method comprising:
[0006] Obtain the voice input of the current conversation and generate semantic fragments;
[0007] If the current dialogue is the first round of voice interaction, initialize an intent dialogue tree and attach the semantic fragment as the root node to the intent dialogue tree; if the current dialogue is not the first round of voice interaction, attach the semantic fragment as a child node to the intent dialogue tree.
[0008] Based on the structure of the intent dialogue tree, task input information is constructed and the corresponding plugin is matched. The plugin generates input prompts for the agent to control the agent to generate response content. The plugin is used to generate query vectors before the agent is invoked. The task input information is determined based on semantic fragments and their corresponding parent nodes.
[0009] The generation of semantic fragments includes:
[0010] Convert the voice input into text information;
[0011] Semantic parsing is performed on the text information to extract the task intent identifier and at least one parameter field corresponding to the task intent identifier;
[0012] The task intent identifier and the parameter fields are combined according to a preset semantic structure template to generate a semantic fragment.
[0013] If the current dialogue is not the first round of voice interaction, the semantic fragment is attached as a child node to the intent dialogue tree, including:
[0014] Candidate path nodes are selected based on the semantic tensor representation of each path node in the intent dialogue tree and the semantic fragment;
[0015] Multiple virtual tree structure copies are generated based on the intent dialogue tree, and the root node of each virtual tree structure copy corresponds to a candidate path node.
[0016] The semantic fragment is attached as a leaf node to the copy of the virtual tree structure;
[0017] The virtual semantic state of the virtual tree structure copy is calculated by performing virtual semantic state calculation on the virtual tree structure copy using a preset semantic self-consistency calculation method, and the virtual tree semantic self-consistency of the corresponding virtual tree structure copy is obtained.
[0018] Based on the semantic self-consistency of the virtual tree, a virtual tree structure copy that meets the attachment conditions is determined, and the semantic fragment is attached as a child node to the path node corresponding to the virtual tree structure copy that meets the attachment conditions.
[0019] The process of filtering candidate path nodes includes:
[0020] Based on the semantic type, parameter structure, and path level of each path node in the intent dialogue tree, construct the corresponding semantic tensor representation;
[0021] The semantic tensor representations are combined to generate a semantic intent tensor field, wherein the semantic intent tensor field represents the structural distribution and semantic attraction potential of path nodes in a multidimensional semantic space;
[0022] The semantic fragment is encoded into a semantic vector and simulated in the semantic intent tensor field to obtain the attraction trajectory of the semantic vector;
[0023] Candidate path nodes are determined based on the convergence path of the attraction trajectory.
[0024] The step of performing virtual semantic state calculation on the virtual tree structure copy using a preset semantic self-consistency calculation method includes:
[0025] Semantic fragments and candidate path nodes are mapped to the first and second structural units in a predefined semantic structure template, respectively.
[0026] Semantic matching analysis is performed on the first and second structural units to calculate the semantic self-consistency of the virtual tree, wherein the semantic matching analysis includes type matching and parameter coverage matching.
[0027] Based on the structural state of the intent dialogue tree, construct task input information and match the corresponding plugins, including:
[0028] Obtain the query content and response content corresponding to the parent node of the semantic fragment in the intent dialogue tree, wherein the query content is the first plugin corresponding to the parent node, and the response content is the response information generated by the parent node;
[0029] Semantic elements are extracted from the response content, and the extracted elements are embedded into the semantic fragment to obtain task semantic information. The second plugin that the task semantic information matches is then obtained.
[0030] Based on the plugin mapping relationship between the first plugin and the second plugin, a third plugin is determined for generating query vectors.
[0031] Semantic elements are extracted from the response content, and the extracted elements are embedded into the semantic fragment to obtain task semantic information, including:
[0032] The response content is semantically parsed and mapped into a structured set of intent roles, wherein the set of intent roles includes task intent, target object, time range, and numerical information;
[0033] Based on the structural position of the semantic fragment, match the corresponding semantic elements in the intent role set, and fill the semantic elements in the semantic fragment according to the structural position;
[0034] Consistency verification is performed on the filled semantic fragments to generate task semantic information.
[0035] The response content shall include at least one of the following:
[0036] The query results generated based on the task input information include water consumption, time period, water source, and user water behavior tags.
[0037] Logical judgments based on the query results, including water conservation reminders, water usage tips, and water usage warnings;
[0038] Comparison information generated based on the differences between historical response content and current semantic fragments;
[0039] The scenario feedback content includes water-saving suggestions, actionable options, and customizable prompts.
[0040] A voice-driven intelligent agent interactive control device for water conservation, the device comprising:
[0041] Voice acquisition component, used to collect user voice input information;
[0042] A voice output component is used to read aloud the response content generated by the agent;
[0043] The memory is used to store the intent dialogue tree data structure, plugin mapping relationships, and semantic parsing rules;
[0044] The control processor is connected to the voice acquisition component, the voice output component, and the memory;
[0045] The intelligent agent interaction interface component connects the control processor and the voice output component, and is used to receive the query vector generated by the control processor, call the intelligent agent to generate response content, and output the response content to the voice output component for broadcasting.
[0046] The control processor includes a semantic generation module, a structure management module, a semantic completion module, and a plug-in control module, wherein:
[0047] The semantic generation module is used to convert the voice input information provided by the voice acquisition component into text, and generate corresponding semantic fragments based on the text.
[0048] The structure management module is used to build and maintain the intent dialogue tree structure, and to attach semantic fragments to the corresponding path nodes during non-first round dialogues;
[0049] The semantic completion module is used to obtain the query content and response content corresponding to the parent node of the semantic fragment, and to structurally complete the semantic elements in the response content with the current semantic fragment to generate task semantic information;
[0050] The plugin control module is used to locate the target plugin based on the task semantic information, and determine the target plugin for generating the query vector by combining the mapping relationship between the plugin corresponding to the parent node and the current plugin, and control the target plugin to generate the query vector.
[0051] Compared with the prior art, the beneficial effects of this application are:
[0052] This application achieves structured attachment of semantic segments by constructing an intent dialogue tree, enabling the orderly organization and inheritance of task intents in multi-turn voice interaction, effectively improving the continuity of semantic context. By introducing semantic tensor representation and tensor field attraction trajectory simulation mechanism, the attachment position of semantic segments in the historical semantic structure can be accurately located, reducing the risk of misattachment. Simultaneously, the semantic elements of the response content are used to complete the current semantic segment, and a query vector is generated based on the plug-in mapping relationship to guide the agent to output response content that conforms to the contextual logic, thereby improving the accuracy, coherence, and intelligence of voice interaction. Attached Figure Description
[0053] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0054] Figure 1 This is a schematic diagram of the voice model interaction in an embodiment of this application;
[0055] Figure 2 This is a schematic diagram illustrating an exemplary application scenario of an embodiment of this application;
[0056] Figure 3 This is a flowchart illustrating the voice-driven intelligent agent interaction control method for water conservation, as described in an embodiment of this application.
[0057] Figure 4 This is a schematic diagram of the voice interaction judgment process in an embodiment of this application;
[0058] Figure 5 This is a schematic diagram illustrating the path node filtering principle in an embodiment of this application;
[0059] Figure 6 A schematic diagram of the method for generating plugins for embodiments of this application. Detailed Implementation
[0060] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0061] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0062] This application applies to intelligent agent control scenarios for voice interaction tasks requiring complex intent structure expression, particularly voice-driven control systems with multi-turn semantic references, context-skipping queries, and parameter completion-type task expressions. In such voice interactions, due to the inherent ambiguity and unstructured nature of user expressions, intelligent agents, lacking structural memory and semantic preservation mechanisms, are highly susceptible to problems such as response deviations, parameter coverage conflicts, or context breaks. In intelligent interaction within the water-saving field, typical application scenarios include, but are not limited to:
[0063] In voice query tasks for water conservation behavior management, users ask questions about historical water use data in a discontinuous manner, while the actual query path involves complex interactive behaviors such as cross-round jumps, parameter reuse, or result referencing.
[0064] In the continuous control instructions for task-oriented intelligent agents, there are needs for extended intents such as supplementary explanations and follow-up questions. If structural archiving and completion parsing are not performed, it is easy to cause ambiguity in the response or incorrect invocation of plugins.
[0065] In a multi-plugin collaborative model, the same speech segment may be associated with both the intent of the preceding task and the current completion target. Therefore, it is necessary to fuse and understand the nodes of the upper and lower structures to accurately generate the query vector.
[0066] The method proposed in this application does not rely on fixed task scripts, preset context splicing, or traditional multi-turn history splicing methods. Instead, it uses an intent dialogue tree as the semantic carrier structure and completes the structural construction and response control of dynamic task semantics through structural attachment, completion, tracking, and plug-in mapping mechanisms.
[0067] It should be noted that the method described in this application is applicable to voice control scenarios with one of the following interactive complexity characteristics:
[0068] The current voice request does not explicitly declare all task parameters; the semantics must be obtained through structural completion.
[0069] In a new round of speech, the user implicitly references response information from the previous or earlier rounds, which cannot be inferred from the context window alone;
[0070] The task semantic path exhibits branching jumps, cross-references, or structural negation behaviors;
[0071] The plugin invocation logic needs to be determined based on a joint judgment of the parent intent and the current semantics.
[0072] It is understood that this application can also be extended to other large-scale language interaction models with complex context preservation requirements, including but not limited to intelligent interaction scenarios such as industrial human-machine control, medical voice inquiry, and educational auxiliary question answering.
[0073] For example, regarding voice model interaction, please refer to... Figure 1 To understand, Figure 1 This is a schematic diagram of the voice model interaction in an embodiment of this application. Figure 1 The interaction modes of two typical voice interaction models are shown to facilitate understanding of the problem addressed by the solution in this application.
[0074] In the first voice interaction model, after receiving the current voice input, the voice interaction model only performs semantic understanding based on the sub-requirement 2 expressed in the current round and the sub-requirement 1 expressed in some historical interaction voices. Since it fails to fully combine the semantic information involved in the previous round sub-requirement 1 or previous rounds, there are obviously problems such as broken semantic chains, one-sided response content and inability to continuously connect the context, which affects the user's interaction experience.
[0075] In the second voice interaction model, to improve continuity, the voice interaction model concatenates historical voice requests and all sub-requests into the input voice model to achieve a more complete semantic understanding. Clearly, this approach not only increases the length and load of the input processed by the model, but also easily leads to semantic interference and response shifts when there is a large amount of historical content.
[0076] It should be understood that the problem addressed in this application is primarily aimed at voice-interactive intelligent agents, whose semantic understanding relies on implicit referencing relationships between tone, context, and historical turns in spoken expression. In traditional text-based interactive models, this type of problem is relatively weakened because text input itself has higher information density and structural integrity, and users usually fill in the parameters themselves.
[0077] Please see Figure 2 This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.
[0078] Figure 2 The diagram shows multiple historical user voice inputs and the current user voice input, representing the user's natural language expression in different rounds of voice interaction. The large-scale voice interaction model sequentially performs speech recognition and text parsing processes on the voice input, generating corresponding semantic fragments 1, 2, 3, and 4. These semantic fragments are used to express the user's task intent and parameter fields in each round of voice request.
[0079] Figure 2 The large-scale voice interaction model further illustrates that it includes a semantic understanding module, an intent tree update module, a query vector generation module, and an agent, among which:
[0080] The semantic understanding module is used to parse the contextual relationships between semantic segments and identify semantic behaviors such as structural citations, supplements, negations, or probing questions.
[0081] The intent tree update module, based on the semantic understanding results, attaches the current semantic fragment to the corresponding position in the intent dialogue tree to construct a semantic structure graph;
[0082] The query vector generation module determines the query vector used to control the agent's response based on the current semantic fragment and its structural context information in the intent dialogue tree.
[0083] The intelligent agent generates response content based on the query vector to complete the current voice interaction process;
[0084] Figure 2 The diagram further illustrates that after semantic fragment 4 is input into the semantic understanding module, semantic fragment 4 is attached to the previously saved intent dialogue tree to update the intent dialogue tree.
[0085] Understandably, multiple semantic fragments are linked together in a structure tree diagram, showing parent-child relationships and structural references between the semantic fragments. Figure 2 For example, semantic fragment 4 is attached as a child node to semantic fragment 1.
[0086] Figure 2 Semantic fragment 1 and semantic fragment 4 are further illustrated. It is understood that semantic fragment 4 does not fully express a new independent intent, but rather provides semantic supplementation, parameter correction, or context extension to the historical request corresponding to semantic fragment 1. Through a structured semantic organization, it is ensured that the current task input can be completed by combining the plugin call path and response content of semantic fragment 1 when generating the query vector.
[0087] For example, semantic fragment 4 may contain semantically ambiguous expressions such as "not yesterday, but the day before yesterday" or "compare it with last week" and need to be understood in conjunction with the context of semantic fragment 1.
[0088] In an optional embodiment, the large voice interaction model of this application can be a water-saving intelligent agent deployed in a water-saving scenario.
[0089] Understandably, the water-saving intelligent agent integrates large language model capabilities and combines a plug-in mechanism to complete the structured parsing and response generation of water-saving related tasks, which is used to query, judge and respond to user voice commands to realize water use behavior data.
[0090] In some possible implementations, the water-saving intelligent agent may include, but is not limited to, a voice-driven interactive model with capabilities such as speech recognition, task semantic understanding, water usage data access, and plugin mapping. Its task processing capabilities can cover water-saving control applications in residential water use, enterprise water use, industrial park water management, or other scenarios. This application does not limit the specific model architecture adopted by the water-saving intelligent agent, as long as it possesses natural language understanding and water usage behavior response functions, and supports task decomposition and semantic completion control through a plugin mechanism.
[0091] Next, with reference to the accompanying drawings, the voice-driven intelligent agent interaction control method for water conservation provided in the embodiments of this application will be introduced. Figure 3 The method shown includes the following steps S1-S4:
[0092] S1: Obtain the voice input of the current dialogue and generate semantic fragments;
[0093] In this embodiment, voice input can be acquired in digital audio form by a voice acquisition component, and then transcribed into text data through speech recognition processing. The semantic fragment generation process not only extracts task intent keywords from the statement, but also includes parameter fields paired with the intent, and constructs them in a structured manner. As the smallest task unit for subsequent semantic attachment and plugin invocation, the semantic fragment can form a preliminary semantic information representation without relying on the user's complete expression.
[0094] It is understood that voice acquisition components include, but are not limited to, microphone arrays, voice sampling chips, or audio modules with voice recognition preprocessing capabilities installed on smart voice terminals, home controllers, or mobile devices.
[0095] Those skilled in the art will understand that a voice acquisition component only needs to be able to receive and digitize voice signals to a minimum to meet the input requirements before semantic processing, and this application does not impose any limitations on this.
[0096] S2: If the current dialogue is the first round of voice interaction, initialize an intent dialogue tree and attach the semantic fragment as the root node to the intent dialogue tree;
[0097] In this embodiment, the intent dialogue tree is a directed graph structure used to maintain the semantic structural relationships of voice interaction tasks. During the initial interaction phase, semantic fragments are added to the newly created intent dialogue tree as root nodes. The root node records the intent identifier and parameter fields of the current semantic expression, and annotates the session timestamp and contextual metadata of the source statement summary in its node attributes.
[0098] S3: If the current dialogue is not the first round of voice interaction, attach the semantic fragment as a child node to the intent dialogue tree;
[0099] In this embodiment, to achieve structural management of semantic continuity, the current semantic segment will perform a path matching operation in the intent dialogue tree, prioritizing the selection of historical nodes with relevance as candidate attachment points. Furthermore, a virtual copy is generated with this path node as the root, structural semantic state calculation is performed, self-consistency score is calculated, and structural attachment is completed under path nodes that meet the attachment conditions.
[0100] Understandably, the intent dialogue tree in this application supports complex semantic links such as cross-round completion, skip-reference, and progressive follow-up questions, thereby enhancing the contextual fusion capability of voice interaction.
[0101] Those skilled in the art will understand that the intent dialogue tree is defined as a directed acyclic graph structure, wherein each semantic fragment node is connected to the root node by a unique path, and each non-leaf node can carry multiple semantic fragment nodes, supporting multi-path concurrent attachment and hierarchical structure expansion.
[0102] Furthermore, the intent dialogue tree can be dynamically expanded and updated in real time based on the semantic relationships between each turn of the voice interaction, used to represent the structural extension process of the task intent and the contextual logic of the parameter reference chain. This application does not limit the number of nodes, tree height, or branching factor of the intent dialogue tree, as long as its structure supports semantic path expression and attachment logic deduction.
[0103] S4: Based on the structural state of the intent dialogue tree, construct task input information and hit the corresponding plugin. Generate input prompts for the agent through the plugin to control the agent to generate response content.
[0104] In this embodiment, after the semantic fragment is structurally attached, the query content and response content corresponding to its parent node in the intent dialogue tree are extracted. This response content is parsed into a structured set of intent roles to complete the missing semantic fields of the current semantic fragment. The task input information constructed in this way is compared with preset plugin matching rules to match the corresponding plugin. Further, the current plugin combines its own functional identifier with the parent node plugin to form a mapping relationship, determining the target plugin used to generate the final query vector. This plugin will output a query vector that meets the task requirements before being invoked by the agent, driving the agent to output the corresponding response content, ultimately converting it into a voice broadcast result.
[0105] Before going into the specific implementation steps, it is important to emphasize that the voice interaction control problem addressed in this application is not a natural language processing task in the traditional sense, but rather a complex task-oriented voice interaction scenario that includes structured target paths, context cross-round references, and multi-plugin mapping execution. It is particularly suitable for the intelligent agent interaction control needs in the water-saving field, which requires continuous reasoning, semantic completion, and plug-in calling capabilities.
[0106] In actual use, users' voice interaction commands regarding water usage are often incomplete or inconsistent, and they frequently express their query needs in a fragmented, progressive, and non-explicit manner.
[0107] Conventional large language models typically rely on context concatenation strategies, using the concatenation of the current request and historical statements as input to generate a response. However, as historical semantic chains lengthen and referencing paths become more complex, simple concatenation can easily lead to context dilution, semantic gaps, or incorrect plugin invocation. This is especially problematic in water-saving scenarios where users tend to use natural speech and do not explicitly define parameter boundaries or query conditions, causing a misalignment between plugin accuracy and response logic.
[0108] This application uses an intent dialogue tree as the core semantic attachment structure to attach and locate semantic fragments generated in each round of voice interaction, forming a traceable and updatable semantic path graph. Each node in the intent dialogue tree contains the task intent of the current round, parameter fields, and response reference information of its parent node. It supports reverse tracing of the semantic context from any child node, enabling accurate completion and response logic restoration for the current round without reconstructing the complete context.
[0109] Furthermore, the semantic completion process no longer relies on static template matching. Instead, it combines the response content of the parent node in the intent tree structure, generates a set of intent roles through structural parsing, and further embeds them with the current semantic fragment structure to construct dynamic task semantic information. Plugin invocation is no longer based on direct matching of the current round of semantic fragments. Instead, it introduces a plugin mapping relationship chain, establishes a related plugin mapping between the parent plugin and the current semantic, and finally determines the target plugin used for query vector generation, thereby achieving unified processing of multi-round task semantics.
[0110] Next, we will further elaborate on the semantic understanding aspect of the method in this application.
[0111] In one example, generating semantic fragments includes:
[0112] S1.1: Convert the voice input into text information;
[0113] Specifically, since the user input is unstructured natural language speech information, subsequent semantic analysis and structured modeling are impossible without speech-to-text processing. Therefore, it is necessary to first process the speech signal into text. This application employs a speech recognition engine based on the fusion of acoustic modeling and language modeling to transcribe the collected speech input into continuous text content. The speech recognition engine can be implemented based on existing deep neural network architectures, such as sequence modeling architectures incorporating attention mechanisms, which will not be elaborated upon here.
[0114] In an optional embodiment, the raw audio signal acquired by the voice acquisition component undergoes a short-time Fourier transform to obtain a Mel-spectrum, which serves as the feature input to the speech recognition engine for text decoding. The speech recognition engine can embed a language model training method based on a domain-defined vocabulary to improve the recognition stability of water conservation terminology. Simultaneously, to further reduce sentence-end semantic drift, the speech recognition engine supports annotation of speech pauses, enhancing its ability to perceive sentence boundaries.
[0115] S1.2: Perform semantic parsing on the text information to extract the task intent identifier and at least one parameter field corresponding to the task intent identifier;
[0116] In this embodiment, the semantic parsing logic is built on a multi-task learning architecture, which can be a long short-term memory neural network or a convolutional neural network. This application does not limit the specific architecture.
[0117] The first task is intent recognition, which outputs task type labels, such as "query water usage data", "compare a certain time period", and "determine whether the limit is exceeded".
[0118] The second task is slot extraction, used to locate parameter fields in the statement, including but not limited to "time range", "object label", "numerical threshold", and "comparison type". The semantic parsing logic can improve recognition accuracy by encoding syntactic context relationships and can introduce a prior domain dictionary to enhance the recognition capability of low-frequency task intents.
[0119] S1.3: Combine the task intent identifier and the parameter field according to the preset semantic structure template to generate a semantic fragment.
[0120] Next, we will further elaborate on the part of the method in this application regarding voice interaction.
[0121] See also Figure 4 , Figure 4 This is a schematic diagram of the voice interaction judgment process in an embodiment of this application. In this embodiment, there are two voice interaction scenarios.
[0122] In the first voice interaction scenario, the current dialogue is the first round of voice interaction.
[0123] In this embodiment, the first round of voice interaction refers to the initial voice request when the user initiates a task command for the first time, before a structured contextual reference relationship has been formed. In the corresponding scenario, the root node of the intent dialogue tree will be constructed directly based on the semantic fragment generated from the current voice input, and the semantic structure graph will be initialized. The task intent of the first round of semantic fragments is usually independent and executable, and therefore can serve as the starting point of the task semantic path.
[0124] Furthermore, in terms of semantic structure construction, the current semantic segment will not be connected to other semantic nodes, but will be stored as an independent semantic branch and serve as the structural anchor point for subsequent speech rounds. To improve the stability of the semantic chain, the current root node can also record context parameters such as transcribed text, recognition confidence, and task time range in its attribute fields for reference during subsequent structure completion.
[0125] Understandably, there is no historical semantic dependency in the first round of voice interaction scenarios, so there is no need to perform structural path tracing, node attachment matching, or semantic completion operations. The required plugins can directly match the task intent type in the current semantic segment and generate query vectors, making the execution process relatively simple.
[0126] In the second voice interaction scenario, the current dialogue is not the first round of voice interaction.
[0127] It's easy to understand that this scenario often occurs when a user's current voice request has a semantic continuity with a previous or earlier interaction. To achieve structured management of such semantic continuity, this application employs a semantic fragment attachment mechanism, attaching the current semantic fragment as a child node to a historical node in the intent dialogue tree that has a semantic relationship with it. The selection of the attachment path is based on semantic intent tensor field simulation and virtual semantic state calculus strategies to ensure logical continuity and semantic self-consistency in the structure. After attachment, the missing parameter fields in the current semantic fragment can be structurally completed by combining the response content of the parent node, ultimately generating task input information.
[0128] Understandably, semantic segment processing in non-first-round voice interaction scenarios is no longer an independently executed process, but a semantic extension behavior nested within the historical task path. Its processing strategy emphasizes context inheritance, response semantic reference, and plugin path reconstruction, thereby effectively supporting cross-round task-driven processing and maintaining semantic integrity.
[0129] In real-world applications, users may initiate multiple semantically independent task requests in the same voice interaction session.
[0130] For example, a user might first ask "yesterday's water usage", then ask "how will the weather be next week", and then ask "how much more water did I use than my neighbor last month?" In the corresponding scenarios, there are multiple task topics in the speech sequence, and they have no direct semantic inheritance relationship with each other in terms of intent, parameter range or data dimension.
[0131] In this embodiment, to avoid mistakenly attaching semantically unrelated voice requests to the same intent structure, which could cause semantic pollution or path confusion, this application supports the construction of multiple coexisting intent dialogue trees. Each tree maintains an independent task semantic path, containing a root node and its subsequent semantic substructures. When a new voice request arrives, the generated semantic fragment needs to be matched with the semantic type, parameter structure, and path context information of the root node in each intent dialogue tree. Only when the matching degree meets a preset matching threshold is the attachment process within the tree allowed. If no matching tree meets the attachment conditions, a new intent dialogue tree is created to accommodate the semantic structure of the current request.
[0132] In one example, the specific steps of S3 are as follows:
[0133] S3.1: Filter candidate path nodes based on the semantic tensor representation of each path node in the intent dialogue tree and the semantic fragment;
[0134] Specifically, if the current dialogue is not the first round of voice interaction, a reasonable range of candidate attachments needs to be determined based on the semantic structure matching relationship between the current semantic segment and the existing semantic nodes in the intent dialogue tree. Since each node in the intent dialogue tree may be a potential semantic attachment point, directly performing attachment calculations on all nodes in the entire tree will cause a rapid increase in computational overhead, especially in voice dialogues with many tree branches and frequent historical interactions.
[0135] In one example, the filtering of candidate path nodes includes:
[0136] S3.1.1: Construct the corresponding semantic tensor representation based on the semantic type, parameter structure, and path level of each path node in the intent dialogue tree;
[0137] Specifically, in order to realize the subsequent semantic attraction field simulation, the path nodes in the intent dialogue tree are first transformed into a unified vectorized structure that can participate in the computation.
[0138] Understandably, without such a unified representation, it is impossible to perform an effective simulation of attraction trajectories in tensor space, nor can a continuous metric be formed regarding which historical node is more suitable as a structural connection point. The goal of this step is to compress the multidimensional heterogeneous information contained in the semantic structure into a unified semantic tensor representation, serving as the foundation for constructing the tensor field.
[0139] In this embodiment, the semantic tensor of each path node is represented as a fixed-length vector structure, which consists of three parts.
[0140] The first part is semantic type encoding, which uses a fixed classification dictionary to encode each task intent identifier independently, ensuring that semantics of the same type are comparable;
[0141] The second part is the parameter field structure, which uses slot key names and hash weights to construct sparse vectors and then converts them into dense embeddings through linear mapping. This is used to express the existence, importance and current value constraints of each parameter.
[0142] The third part is path-level encoding, which uses a learnable position encoding method to encode the depth of a node in the tree and its order relative to its sibling nodes into the vector dimension, thereby enhancing the ability to perceive structural hierarchy.
[0143] Finally, the three parts mentioned above are spliced together and mapped into a semantic tensor representation through nonlinear projection.
[0144] S3.1.2: Combine the semantic tensor representations to generate a semantic intent tensor field, wherein the semantic intent tensor field represents the structural distribution and semantic attraction potential of path nodes in a multidimensional semantic space;
[0145] Specifically, to simulate the attraction trajectory of semantic fragments in the semantic structure space, it is necessary to first construct a variable vector space containing tensors of all path nodes, and define the semantic association tension between each tensor point, that is, to construct a semantic intent tensor field. The semantic intent tensor field is not just a set of points, but more importantly, it defines the tension between points and the attraction or repulsion weights.
[0146] In an optional embodiment, the semantic intent tensor field is constructed in the following three ways:
[0147] Firstly, the semantic tensors of all path nodes are used as stable points in the vector field to establish vector point relationships in space.
[0148] Secondly, a semantic gravity weight is defined for each stable point, wherein the semantic gravity weight includes three dimensions: task semantic similarity, parameter complementarity, and structural path compatibility.
[0149] Understandably, the semantic gravity weight determines the strength of the attraction of the stable point in the entire tensor field. To more precisely control the attraction range, each node tensor in the tensor field also has a semantic potential decay model based on a Gaussian kernel function, which controls the weakening of its attraction range as the semantic distance increases, preventing long-distance erroneous attachments;
[0150] Thirdly, to handle semantically conflicting path nodes or logically contradictory expressions, the tensor field also includes a structural repulsion factor, which is used to dynamically adjust the attraction weights of paths marked as conflicting, redundant, or negative. The update of the structural repulsion factor is based on the semantic negation mapping between semantic fragments and historical responses. If there are behaviors such as reverse semantic pointing, logical mutual exclusion, or timeline violation, the attraction potential of the corresponding tensor point in the tensor field is automatically reduced or eliminated, thereby effectively improving the rationality of the attachment direction and the convergence accuracy.
[0151] S3.1.3: Encode the semantic fragment into a semantic vector and simulate it in the semantic intent tensor field to obtain the attraction trajectory of the semantic vector;
[0152] Specifically, after constructing the semantic intent tensor field, the semantic fragment to be attached needs to be mapped as a floating vector point in the tensor field, and its trajectory within the tensor potential energy structure needs to be simulated to deduce its natural convergence point or attraction direction. The simulation process is essentially a dynamic potential energy search path planning, which requires integrating semantic directionality with the tensor potential field response results.
[0153] In this embodiment, semantic fragments are first encoded into structure-aligned semantic vectors. The semantic vectors are generated in the same way as the path node tensors, ensuring that the two have a co-occurrence semantic dimension in the same tensor space.
[0154] Furthermore, using the semantic vector as the initial floating point, a simulation step size search is performed. In each simulation process, the position is updated based on the direction of the resultant force on the current point and the change in the gradient in the field, until it converges to a certain stable node or reaches the maximum step size, thus obtaining the attraction trajectory.
[0155] In an optional embodiment, the simulation employs a dynamically adjusted learning rate strategy, increasing the step size in regions with sparse signals and slowing down the pace in regions with high gradient changes to ensure trajectory stability.
[0156] Furthermore, each simulated node in the attraction trajectory records its force direction, current semantic potential energy value, and historical response conflict coefficient, which are used as a path scoring reference when selecting subsequent path nodes. The final attraction trajectory can be regarded as the natural landing path of the current semantic in the tensor space, and its endpoint is the optimal convergence candidate node or a set of candidate nodes.
[0157] S3.1.4: Determine candidate path nodes based on the convergence path of the attraction trajectory.
[0158] Taking the semantic intent tensor field as an example, please refer to... Figure 5 To understand, Figure 5 This is a schematic diagram illustrating the path node filtering principle in an embodiment of this application.
[0159] Figure 5An intent dialogue tree is shown, which expands with path node 1 as the root node and includes three branches: path node 2, path node 5 and path node 6. Path node 2 also includes branch paths of path node 3 and path node 4, and path node 6 includes branch paths of path node 7 and path node 8.
[0160] Figure 5 The diagram shows that each path node has a semantic tensor representation, mapped to a semantic intent tensor field. It can be understood that path node 1, as the root node, has tensor representations for all stable points of all path nodes. Furthermore, if there are branching relationships between path nodes, there will also be corresponding tensor representations. Figure 5 The dashed double-headed arrows in the image can be understood as the semantic attraction tension relationship between path nodes in the semantic intent tensor field. This relationship is used to indicate that there is a structural association or parameter migration possibility between two path nodes in the semantic space.
[0161] It is understandable that, in addition to attractive tension, repulsive tension should also be included. Figure 5 To simplify understanding, these are not shown in the diagram. The child nodes of different branch paths should have a repulsive tension relationship, such as path node 3 and path node 7.
[0162] Figure 5 The study further demonstrates that the semantic vectors formed by the semantic fragments diverge towards historical path nodes in the tensor field through attractive trajectories, eventually converging at path node 1. The formation of the attractive path is influenced by the attraction weights between tensors, and each point in the trajectory records information on semantic potential energy changes and direction changes. The final converged path determines the candidate path nodes as path node 4, path node 3, path node 2, and path node 1, in that order.
[0163] S3.2: Generate multiple virtual tree structure copies based on the intent dialogue tree, where the root node of each virtual tree structure copy corresponds to a candidate path node;
[0164] Specifically, after obtaining candidate path nodes, the current semantic segment cannot be directly connected to them, because the structural state under different paths may have different carrying capacity for new semantics.
[0165] In an alternative embodiment, the parallelism and comparability of the structural state evolution simulation are ensured by performing multi-path parallel verification in the structural simulation space.
[0166] In this embodiment, each candidate path node is abstracted as the root node of a virtual semantic subtree, and its entire structural state in the intent dialogue tree is copied to generate a corresponding virtual tree structure copy. The virtual tree structure copy not only retains the semantic information, child node topology, and node attributes of the original path, but also its plugin call history and response summary information to support subsequent completion judgments and path recovery operations. The virtual tree copy does not affect the original structure of the intent graph dialogue tree after generation; it is only used in the structural simulation evaluation process and will be destroyed or merged after the evaluation is completed.
[0167] S3.3: Attach the semantic fragment as a leaf node to the virtual tree structure copy;
[0168] Specifically, to determine the structural fit of the current semantic fragment after it is attached to each candidate node, it is necessary to simulate the actual attachment operation in the virtual tree. The goal of this step is to verify the carrying capacity of each candidate path in the semantic expansion process, with structural consistency as a constraint, for use in subsequent self-consistency evaluation.
[0169] S3.4: Perform virtual semantic state calculation on the virtual tree structure copy using the preset semantic self-consistency calculation method to obtain the virtual tree semantic self-consistency of the corresponding virtual tree structure copy;
[0170] Specifically, after semantic fragments are attached to each virtual tree, only the structural assembly is completed; their semantic rationality and consistency cannot yet be determined. The technical purpose of this step is to quantitatively evaluate the degree of fit between the semantic fragments and the attached paths in terms of content expression, intent logic, and parameter continuity.
[0171] In one example, the virtual semantic state calculation of the virtual tree structure copy using a preset semantic self-consistency calculation method includes:
[0172] S3.4.1: Map semantic fragments and candidate path nodes to the first and second structural units in the predefined semantic structure template, respectively;
[0173] Specifically, to achieve semantic matching at the structural level, it is necessary to first abstract the current semantic segment and the target candidate path node into comparable representation units in the same semantic structure space. Since semantic expression in voice interaction inherently involves ambiguity and inconsistent expression distribution, directly comparing the semantic content of semantic segments and nodes can lead to misjudgments due to differences in language style, word order, and parameter dimensions.
[0174] In this embodiment, multiple sets of general semantic structure templates are preset. The template structure is constructed by combining task type, parameter fields and optional context labels, specifically including task instruction templates, data type templates and intent modification templates.
[0175] It is understood that the template settings can be determined by those skilled in the art through extensive experimentation, and will not be elaborated upon here.
[0176] Furthermore, before being attached, the current semantic fragment will first be categorized into the corresponding task template by a semantic type classifier. Subsequently, its parameter fields will be structurally mapped according to the definition in the template and filled into standard structural unit slots to generate the first structural unit. Correspondingly, the candidate path nodes, which already have structural semantic tensors, are also deconstructed and mapped into the second structural unit in this step to ensure that the two are in a structurally aligned state.
[0177] In an optional embodiment, when processing unstructured semantic fragments such as special expressions like rhetorical questions, metaphorical instructions, and non-explicit parameters, this embodiment also includes fuzzy slot identification logic.
[0178] Furthermore, the fuzzy slot recognition logic performs contextual deduction and historical content reference for non-standard expression fields, and adds confidence weights when generating structural units so that they can participate in the similarity weighted calculation during subsequent matching judgment.
[0179] S3.4.2: Perform semantic matching analysis on the first structural unit and the second structural unit, and calculate the semantic self-consistency of the virtual tree, wherein the semantic matching analysis includes type matching and parameter coverage matching;
[0180] Specifically, after aligning the structural units, it is necessary to further calculate their consistency in terms of semantic intent, structural parameters, and path coherence to assess whether the current semantic segment can be attached as a subtask to the candidate path node. This step is essentially a structural-level self-consistency analysis, rather than solely based on text similarity judgment.
[0181] In this embodiment, semantic matching analysis comprises two core components:
[0182] The first core component is type matching;
[0183] Understandably, type matching is used to determine whether two structural units belong to the same semantic task flow;
[0184] For example, the semantic fragment expresses "yesterday's water consumption", while the candidate path node is "water consumption trend in the past 7 days". Both belong to time range query tasks, that is, they belong to the same semantic type, and the matching result is highly relevant.
[0185] In this embodiment, type matching is determined by the task intent encoder. Clustering-level normalization is performed based on the semantic role classification results, and the rationality is evaluated in conjunction with the historical conversation context. The task intent encoder can be implemented using a multi-class semantic task recognition model. This model is fine-tuned based on a pre-trained language model (such as BERT or RoBERTa) and constructed using a domain-specific intent tagging system, supporting multi-level classification of the subject intent in sentences. When constructing the task intent encoder, a semantic tag set specifically for the water conservation domain needs to be introduced, including but not limited to: query intents, suggestion intents, and control intents.
[0186] Furthermore, semantic segments are first input into the encoder using context vector encoding, and the model outputs the corresponding semantic intent distribution vector. The intent information of candidate path nodes can also be extracted as label vectors in the same format. Subsequently, the system standardizes the two vectors and calculates cosine similarity, KL divergence, or other distance metrics as the core scoring indicators for type matching.
[0187] The second core part is parameter coverage matching;
[0188] Understandably, parameter coverage matching focuses on the complementary relationship between the fields of two structural units.
[0189] In this embodiment, the core of parameter coverage matching lies in determining whether the parameters carried by the current semantic segment complete, modify, or deepen the structural content of the candidate node. The matching logic is based on the field slot mapping table, calculating the coverage, intersection density, and whether important parameters between the two field sets are completely matched, which is not limited in this application.
[0190] For example, if a candidate path node represents "water consumption in a certain month," and the current semantic fragment is "whether the water consumption in this month is higher than the average," then this matching relationship can be identified as logically progressive completion, and the matching score will increase. Conversely, if there is a parameter conflict between the current fragment and the node, the matching degree will decrease. This matching method also considers the explicitness of fields, historical modification markers, and confidence weights during the calculation process.
[0191] In an optional embodiment, the matching analysis also includes a structural path compatibility factor to determine whether attaching the current segment to the tree structure will disrupt the integrity of the original semantic path or cause semantic overlap or conflict. If the matching process identifies that the attached path forms a semantic loop or has a dead link across paths, the self-consistency score is forcibly lowered to prevent erroneous expansion.
[0192] It is easy to understand that by weighting and fusing the type matching results, parameter coverage matching degree, and path structure factors, a semantic self-consistency score is formed for each virtual tree structure copy, which serves as the main criterion for path selection and attachment execution.
[0193] S3.5: Based on the semantic self-consistency of the virtual tree, determine the virtual tree structure replica that meets the attachment conditions, and attach the semantic fragment as a child node to the path node corresponding to the virtual tree structure replica that meets the attachment conditions;
[0194] Specifically, among all evaluated virtual tree structure replicas, the replica with the highest semantic consistency and meeting the attachment threshold should be selected as the actual attachment target. The current semantic fragment is then formally written into the intent dialogue tree, completing the structural organization of the semantic fragment in this round. If multiple replicas meet the attachment conditions, they can be ranked and selected based on secondary indicators such as plugin path density and historical completion success rate.
[0195] In this embodiment, the path node corresponding to the selected virtual tree copy will be located in the original intent dialogue tree, and the structural child node of the current semantic fragment will be formally generated under that node.
[0196] In an optional embodiment, there is clearly a situation where a semantic fragment cannot meet the attachment criteria of any virtual tree structure replica, that is, it cannot meet the attachment threshold. An intent dialogue tree needs to be initialized, and the semantic fragment is attached to the newly created intent dialogue tree as the root node.
[0197] Please see Figure 6 , Figure 6 This is a flowchart illustrating the method for generating a plugin according to an embodiment of this application. In one example, the specific steps of S4 are as follows:
[0198] S4.1: Obtain the query content and response content corresponding to the parent node of the semantic fragment in the intent dialogue tree, wherein the query content is the first plugin corresponding to the parent node, and the response content is the response information generated by the parent node;
[0199] Specifically, in multi-turn voice interactions, the current semantic segment is often not the starting point of an independent task, but rather a continuation, modification, or progression of the preceding semantics. If the current semantic segment is directly input into a large model in isolation, contextual breaks are likely to occur, causing the response to deviate from the user's true intent. Therefore, the purpose of this step is to restore the parent context of the current semantic segment. By referencing the structural content corresponding to its parent node in the intent dialogue tree, we can obtain the historical query behavior and response conclusion that are most strongly related to the current semantics.
[0200] In this embodiment, after the current semantic fragment is attached to the intent dialogue tree structure, the system identifies its direct parent node and reads the plugin information that the parent node hit during generation as the first plugin. The first plugin is the underlying semantic scheduling information corresponding to the query of the parent node, which constitutes the query content. At the same time, it also needs to call the voice response or its transcribed text generated by the parent node at that time as the response content. This content contains part of the semantic context of the current task, such as existing time conditions, statistical dimensions, comparison objects, etc.
[0201] S4.2: Extract semantic elements from the response content and embed the extracted elements into the semantic fragment to obtain task semantic information, and obtain the second plugin that the task semantic information matches;
[0202] Specifically, because users often use pronouns, ellipses, or suggestive words in continuous speech, these expressions are often incomplete in semantic segments and cannot be directly mapped to plugins. Therefore, in order to construct complete task intent semantic information, it is necessary to perform semantic parsing on the response content of the parent node, extract inheritable information units, and embed them into the current semantic segment structure to complete the task semantic completion.
[0203] In this embodiment, the response content is first processed through syntactic segmentation and semantic role labeling to extract relevant semantic elements. These semantic elements are labeled with corresponding intent roles, including but not limited to time, subject object, indicator category, and constraint threshold, and stored in the fragment template structure in a structured slot manner. Then, the current semantic fragment is structurally fused with the extracted elements to form a complete semantic fragment representation, i.e., task semantic information.
[0204] Furthermore, the fusion strategy also includes a structural site matching mechanism to avoid field misalignment or semantic overlap. Based on the preset priority and slot mutual exclusion relationships in the template, redundant or low-confidence fields are automatically eliminated.
[0205] For example, if the current semantic fragment explicitly expresses "this week", the "last week" field in the parent node will not be inherited; however, if the current fragment only says "continue from last time", then the time dimension field will be completed and the source of inheritance will be marked.
[0206] In one example, semantic elements are extracted from the response content, and the extracted elements are embedded into the semantic fragment to obtain task semantic information, including:
[0207] S4.2.1: Perform semantic structure parsing on the response content and map it into a structured set of intent roles, wherein the set of intent roles includes task intent, target object, time range and numerical information;
[0208] S4.2.2: Based on the structural position of the semantic fragment, match the corresponding semantic elements in the intent role set, and fill the semantic elements in the semantic fragment according to the structural position;
[0209] S4.2.3: Perform consistency verification on the filled semantic fragments and generate task semantic information;
[0210] S4.3: Determine the third plugin for generating the query vector based on the plugin mapping relationship between the first plugin and the second plugin;
[0211] Specifically, after the task semantic information is constructed, it is not directly used to generate query vectors. Instead, the plugin mapping relationship model is further called, and the second plugin corresponding to the current subtask and the first plugin corresponding to its historical parent task are combined to deduce the third plugin that is ultimately responsible for generating query vectors.
[0212] In this embodiment, the plugin mapping relationship is determined by a pre-constructed plugin dependency graph, which defines the combination methods, parameter flow rules, and semantic inheritance mechanisms between different task plugins in a continuous semantic path. The mapping relationship includes not only plugin name mapping, but also invocation methods, parameter inheritance strategies, and contextual dependency conditions.
[0213] During the invocation process, if it is determined that the task logic of the second plugin and the first plugin has a continuity relationship, the mapping relationship model will derive a comparison judgment class plugin for handling cross-task reasoning semantics as the third plugin, which is used to synthesize the content of the preceding and following tasks to generate a unified query vector. Otherwise, if the current task is an independent task that only inherits parameters but does not require reasoning, the third plugin is the second plugin itself.
[0214] In some possible implementations, in a semantic interactive agent oriented towards water conservation, the response content includes at least one of the following:
[0215] The query results generated based on the task input information include water consumption, time period, water source, and user water behavior tags.
[0216] Logical judgments based on the query results, including water conservation reminders, water usage tips, and water usage warnings;
[0217] Comparison information generated based on the differences between historical response content and current semantic fragments;
[0218] The scenario feedback content includes water-saving suggestions, actionable options, and customizable prompts.
[0219] In one example, this application provides a voice-driven intelligent agent interaction control device for the field of water conservation, the device comprising:
[0220] A voice acquisition component is used to acquire the user's voice input information. The voice acquisition component includes, but is not limited to, an array microphone, a far-field pickup module, an echo cancellation chip, a noise reduction filter circuit, and an audio preprocessor. It is used to acquire the user's voice content with high fidelity in a low-noise environment and to digitize and encode it in real time.
[0221] The voice output component is used to broadcast the response content generated by the intelligent agent. The voice output component includes, but is not limited to, a TTS speech synthesis engine, a speaker array, an echo enhancement module, a language model cache unit, and a tone adjustment algorithm module. It supports multi-round continuous broadcasting, response semantic emotion adjustment, and interactive rhythm control functions.
[0222] The memory is used to store the intent dialogue tree data structure, plug-in mapping relationship and semantic parsing rules. The memory includes, but is not limited to, local high-speed cache chip, Flash module, heterogeneous storage controller, updatable rule mapping library, etc. The intent dialogue tree is stored in a hierarchical structure in graph database format, the plug-in mapping relationship is mapped to the mapping table in the form of ternary path, and the semantic parsing rules are encapsulated in syntax template, slot dictionary and intent mapping set, which can be remotely updated and pushed through an external management platform.
[0223] The control processor, connected to the voice acquisition component, voice output component and memory, includes a semantic generation module, a structure management module, a semantic completion module and a plug-in control module;
[0224] The intelligent agent interaction interface component connects the control processor and the voice output component. It is used to receive the query vector generated by the plug-in control module, call the intelligent agent to generate response content, and output the response content to the voice output component for broadcasting. The interface component includes, but is not limited to, an API adaptation module, a large model interface caller, a token traffic scheduler, a context splicing engine, and a response preprocessing module. It supports adaptation to various intelligent agent architectures, such as cloud-based large language models, local micro language models, and domain knowledge plug-in frameworks.
[0225] The control processor includes a semantic generation module, a structure management module, a semantic completion module, and a plug-in control module, wherein:
[0226] The semantic generation module is used to convert the voice input information provided by the voice acquisition component into text, and generate corresponding semantic fragments based on the text.
[0227] The structure management module is used to build and maintain the intent dialogue tree structure, and to attach semantic fragments to the corresponding path nodes during non-first round dialogues;
[0228] The semantic completion module is used to obtain the query content and response content corresponding to the parent node of the semantic fragment, and to structurally complete the semantic elements in the response content with the current semantic fragment to generate task semantic information;
[0229] The plugin control module is used to locate the target plugin based on the task semantic information, and determine the target plugin for generating the query vector by combining the mapping relationship between the plugin corresponding to the parent node and the current plugin, and control the target plugin to generate the query vector.
[0230] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A voice-driven intelligent agent interaction control method for water conservation, characterized in that, The method includes: Obtain the voice input of the current conversation and generate semantic fragments; If the current dialogue is the first round of voice interaction, an intent dialogue tree is initialized, and the semantic fragment is attached to the intent dialogue tree as the root node. If the current dialogue is not the first round of voice interaction, the semantic fragment is attached to the intent dialogue tree as a child node, including: Candidate path nodes are selected based on the semantic tensor representation of each path node in the intent dialogue tree and the semantic fragment; Multiple virtual tree structure copies are generated based on the intent dialogue tree, and the root node of each virtual tree structure copy corresponds to a candidate path node. The semantic fragment is attached as a leaf node to the copy of the virtual tree structure; The virtual semantic state of the virtual tree structure copy is calculated by performing virtual semantic state calculation on the virtual tree structure copy using a preset semantic self-consistency calculation method, and the virtual tree semantic self-consistency of the corresponding virtual tree structure copy is obtained. Based on the semantic self-consistency of the virtual tree, a virtual tree structure copy that meets the attachment conditions is determined, and the semantic fragment is attached as a child node to the path node corresponding to the virtual tree structure copy that meets the attachment conditions. Based on the structure of the intent dialogue tree, task input information is constructed and the corresponding plugin is matched. The plugin generates input prompts for the agent to control the agent to generate response content. The plugin is used to generate query vectors before the agent is invoked. The task input information is determined based on semantic fragments and their corresponding parent nodes.
2. The voice-driven intelligent agent interaction control method for water conservation as described in claim 1, characterized in that, The generation of semantic fragments includes: Convert the voice input into text information; Semantic parsing is performed on the text information to extract the task intent identifier and at least one parameter field corresponding to the task intent identifier; The task intent identifier and the parameter fields are combined according to a preset semantic structure template to generate a semantic fragment.
3. The voice-driven intelligent agent interaction control method for water conservation as described in claim 1, characterized in that, The process of filtering candidate path nodes includes: Based on the semantic type, parameter structure, and path level of each path node in the intent dialogue tree, construct the corresponding semantic tensor representation; The semantic tensor representations are combined to generate a semantic intent tensor field, wherein the semantic intent tensor field represents the structural distribution and semantic attraction potential of path nodes in a multidimensional semantic space; The semantic fragment is encoded into a semantic vector and simulated in the semantic intent tensor field to obtain the attraction trajectory of the semantic vector; Candidate path nodes are determined based on the convergence path of the attraction trajectory.
4. The voice-driven intelligent agent interaction control method for water conservation as described in claim 1, characterized in that, The step of performing virtual semantic state calculation on the virtual tree structure copy using a preset semantic self-consistency calculation method includes: Semantic fragments and candidate path nodes are mapped to the first and second structural units in a predefined semantic structure template, respectively. Semantic matching analysis is performed on the first and second structural units to calculate the semantic self-consistency of the virtual tree, wherein the semantic matching analysis includes type matching and parameter coverage matching.
5. The voice-driven intelligent agent interactive control method for water conservation as described in claim 1, characterized in that, Based on the structural state of the intent dialogue tree, construct task input information and match the corresponding plugins, including: Obtain the query content and response content corresponding to the parent node of the semantic fragment in the intent dialogue tree, wherein the query content is the first plugin corresponding to the parent node, and the response content is the response information generated by the parent node; Semantic elements are extracted from the response content, and the extracted elements are embedded into the semantic fragment to obtain task semantic information. The second plugin that the task semantic information matches is then obtained. Based on the plugin mapping relationship between the first plugin and the second plugin, a third plugin is determined for generating query vectors.
6. The voice-driven intelligent agent interaction control method for water conservation as described in claim 5, characterized in that, Semantic elements are extracted from the response content, and the extracted elements are embedded into the semantic fragment to obtain task semantic information, including: The response content is semantically parsed and mapped into a structured set of intent roles, wherein the set of intent roles includes task intent, target object, time range and numerical information; Based on the structural position of the semantic fragment, match the corresponding semantic elements in the intent role set, and fill the semantic elements in the semantic fragment according to the structural position; Consistency verification is performed on the filled semantic fragments to generate task semantic information.
7. The voice-driven intelligent agent interaction control method for water conservation as described in claim 1, characterized in that, The response content shall include at least one of the following: The query results generated based on the task input information include water consumption, time period, water source, and user water behavior tags. Logical judgments based on the query results, including water conservation reminders, water usage tips, and water usage warnings; Comparison information generated based on the differences between historical response content and current semantic fragments; The scenario feedback content includes water-saving suggestions, actionable options, and customizable prompts.
8. A voice-driven intelligent agent interactive control device for water conservation, used to implement the voice-driven intelligent agent interactive control method for water conservation as described in any one of claims 1-7, characterized in that, The device includes: Voice acquisition component, used to collect user voice input information; A voice output component is used to read aloud the response content generated by the agent; The memory is used to store the intent dialogue tree data structure, plugin mapping relationships, and semantic parsing rules; The control processor is connected to the voice acquisition component, the voice output component, and the memory; The intelligent agent interaction interface component connects the control processor and the voice output component, and is used to receive the query vector generated by the control processor, call the intelligent agent to generate response content, and output the response content to the voice output component for broadcasting.
9. The voice-driven intelligent agent interactive control device for water conservation as described in claim 8, characterized in that, The control processor includes a semantic generation module, a structure management module, a semantic completion module, and a plug-in control module, wherein: The semantic generation module is used to convert the voice input information provided by the voice acquisition component into text, and generate corresponding semantic fragments based on the text. The structure management module is used to build and maintain the intent dialogue tree structure, and to attach semantic fragments to the corresponding path nodes during non-first round dialogues; The semantic completion module is used to obtain the query content and response content corresponding to the parent node of the semantic fragment, and to structurally complete the semantic elements in the response content with the current semantic fragment to generate task semantic information; The plugin control module is used to locate the target plugin based on the task semantic information, and determine the target plugin for generating the query vector by combining the mapping relationship between the plugin corresponding to the parent node and the current plugin, and control the target plugin to generate the query vector.
Citation Information
Patent Citations
Dialogue-based inquiry method and device
CN112836026A