A method for multi-intent recognition and dynamic process control in intelligent question answering
By constructing an intent-dependent directed acyclic graph matrix and a memory sandbox state set, combined with dynamic slot synchronization and blocking matrices, the low resource utilization and incorrect entity data allocation problems of multi-intent processing in intelligent question-answering systems are solved, achieving efficient and accurate multi-intent flow control.
Patent Information
- Application Number
- CN202611257396.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-10
AI Technical Summary
Existing intelligent question-answering systems suffer from problems such as low resource utilization, incorrect allocation of entity data, chaotic intent execution, high computational overhead, and execution deadlock when handling multi-intent scenarios, making it difficult to meet the needs of complex business scenarios.
By constructing an adjacency matrix of an intent-dependent directed acyclic graph, topological sorting and parallel execution of intent nodes are achieved. Combined with a memory sandbox state set and a context namespace lock, dynamic slot synchronization and blocking matrices are used for slot data management. Local parsing whitelist constraints are introduced to limit the parsing range of the natural language understanding engine.
It improves system resource utilization and task processing efficiency, reduces user dialogue rounds, ensures correct allocation of entity data, reduces computational overhead, improves entity recognition accuracy, and is easy to expand and maintain.
Smart Images

Figure CN123068029A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question answering technology, and in particular to a method for multi-intent recognition and dynamic process control in intelligent question answering. Background Technology
[0002] Intelligent question-answering systems, as the core entry point for human-computer interaction, have been widely applied in various fields such as government services, e-commerce customer service, and financial consulting. They can automatically parse users' natural language input and call corresponding business interfaces to complete tasks. With increasingly complex user needs, single-turn, single-intent interaction modes can no longer meet practical application requirements. Multi-intent recognition and process control have become core research directions in the field of intelligent question answering. Existing multi-intent processing technologies are mainly divided into two categories: serial recognition and parallel recognition. Serial recognition parses user intents sequentially and executes corresponding tasks, while parallel recognition identifies all intents at once and executes them in batches. Currently, mainstream solutions mostly rely on pre-trained language models to achieve intent classification and slot filling, managing task execution processes through simple finite state machines. However, in complex business scenarios where multiple intents have temporal dependencies and missing parameters, the process control capabilities of existing solutions are significantly insufficient, making it difficult to guarantee the system's execution efficiency and reliability. Therefore, there is an urgent need for an intelligent question-answering method that can achieve dynamic control of multi-intent processes.
[0003] Existing intelligent question-answering multi-intent processing solutions have the following shortcomings: First, the serial execution scheme interrupts the entire dialogue process when a parameter is missing in a certain intent, making it impossible to execute other undependent intents in parallel, resulting in low system resource utilization and a significant increase in user dialogue rounds. Second, there is a lack of an effective slot data isolation mechanism. Entity data supplemented by the user for missing parameters may be incorrectly assigned to other unexecuted intent nodes, causing intent execution chaos and requiring multiple clarifications to complete the task. Third, intent dependency management often uses fixed finite state machines, which cannot dynamically adjust the execution order based on actual recognition results. When intent dependencies are complex, execution deadlocks or sequence errors are prone to occur. Fourth, when parameters are missing, the parsing range of the natural language understanding engine is not constrained. The engine will parse all possible entity types, increasing unnecessary computational overhead and the probability of entity misidentification. Summary of the Invention
[0004] The main objective of this invention is to provide a method for multi-intent recognition and dynamic process control in intelligent question answering. By constructing an adjacency matrix of an intent-dependent directed acyclic graph and performing topological sorting, the execution sequence of each intent node is accurately determined, supporting parallel execution of independent intents, significantly improving system resource utilization and task processing efficiency, and reducing user dialogue rounds. A memory sandbox state set is used to achieve isolated storage of slot data. Combined with a context namespace locking mechanism, it ensures that user-added entity data is only bound to the currently suspended intent node, fundamentally avoiding incorrect allocation of entity data and intent execution chaos. Dynamic slot synchronization and blocking matrices enable fine-grained management of the slot states and execution processes of different intent nodes, allowing for flexible dynamic control of suspending some intents while others continue execution. A local parsing whitelist constraint is introduced to restrict the natural language understanding engine to only parse entity types related to the currently suspended intent, reducing computational overhead while significantly improving entity recognition accuracy. Each module interacts through a standardized data structure, exhibiting high modularity, ease of expansion and maintenance, and rapid adaptation to the multi-intent processing needs of different business scenarios.
[0005] The technical solution of the present invention is as follows:
[0006] Firstly, a method for multi-intent recognition and dynamic process control in intelligent question answering is proposed, which includes the following steps:
[0007] S1. Obtain the user input text sequence and the global hard parameter requirement table, and structure them into the corresponding hard parameter requirement set according to the intent node;
[0008] S2. Perform dependency parsing and entity extraction on the user input text sequence to generate an extracted slot set, remove mutually exclusive intent nodes, perform topological sorting on the remaining intent nodes to generate an intent-dependent directed acyclic graph adjacency matrix, and write the extracted slots into the memory database to form a memory sandbox state set.
[0009] S3. Traverse intent nodes in topological order, perform parameter integrity verification based on the set of hard parameter requirements and the set of memory sandbox states, generate a task execution state vector, and generate a current execution suspension pointer when there are missing parameters.
[0010] S4. By integrating the set of hard parameter requirements, the set of memory sandbox states, and the current execution suspension pointer, a two-dimensional mapping relationship between intent and slot is constructed, and the dynamic slot synchronization and blocking matrix is calculated.
[0011] S5. Based on the dynamic slot synchronization and blocking matrix, suspend the interface call flow of the current intent node and its dependent nodes corresponding to the missing slot, generate clarification and follow-up text, and generate context namespace locks and local parsing whitelist constraints for other unexecuted intent nodes.
[0012] S6. Receive supplementary text from the user, extract entities under the local parsing whitelist constraint and write them into the memory sandbox namespace of the currently suspended intent node, and update the dynamic slot synchronization and blocking matrix; when the missing slots of the currently suspended intent node are filled, unblock and resume the interface call pipeline, repeat the execution until the task execution status vector is successful.
[0013] A further improvement of the present invention is that the specific content of S1 is as follows: the access gateway obtains the original natural language string of the front-end user, performs lexicalization sequence processing on the original natural language string, converts the continuous text into a discrete lexical sequence, and generates the user input text sequence. The scheduling end parses the interface documentation of the underlying business registry, extracts the required field structure for each interface execution, and generates a global hard parameter requirement table. The global hard parameter requirement table The system is split according to the intent node to generate the set of hard parameter requirements for the i-th intent node. , It contains all entity slot identifiers necessary for the execution of the interface corresponding to the i-th intent node. Each element in the array corresponds to a globally defined slot type index j, where i is the intent node index, j is the slot type index, and the value range is 1-K, where K is the total number of globally defined slot types.
[0014] A further improvement of the present invention is that step S2 includes the following specific steps:
[0015] S21, Based on the user input text sequence The natural language understanding server at the parsing end performs dependency parsing and entity extraction to extract entity data contained in the user input text sequence, forming a set of extracted slots. The set of extracted slots The number of key-value pairs contained is equal to the number of its elements. The key of each key-value pair is the slot type index j, and the value is the corresponding entity data.
[0016] S22. Based on semantic similarity algorithm and preset business rules, identify and remove mutually exclusive intent nodes. The mutually exclusive intent nodes are intent nodes that cannot be executed simultaneously in the same session logically. Perform topological sorting on the remaining valid intent nodes to determine the execution order among the intent nodes and generate an intent-dependent directed acyclic graph adjacency matrix. , Let N×N be the adjacency matrix of a directed acyclic graph. The elements in this matrix are... 1 indicates that the a-th intent node depends on the b-th intent node and can only be executed after the b-th intent node has finished executing. The element is... 0 indicates that the a-th intent node and the b-th intent node have no temporal dependency, and N is the total number of valid intent nodes identified in the current session;
[0017] S23. Collect the extracted slots. Write to the in-memory database to generate a memory sandbox state set. Output a structured set of parsed states , .
[0018] A further improvement of the present invention is that step S3 includes the following specific steps:
[0019] S31. Extract the set of hard parameter requirements for the i-th intent node. and the parsing of the structured set of states Based on the structured set of parsed states Intention-dependent adjacency matrix of directed acyclic graph Generate a topology execution sequence that satisfies all temporal dependencies, and traverse all intent nodes sequentially according to the topology execution sequence;
[0020] S32. For the i-th intent node encountered during traversal, perform parameter integrity verification and calculate the set of hard parameter requirements. With memory sandbox state set The difference set between them represents the set of entity slots that the i-th intent node needs but has not yet acquired;
[0021] S33, If the set of hard parameter requirements With memory sandbox state set If the difference between the two sets is empty, the scheduler will call the corresponding underlying business interface and obtain the interface execution return status code. , These are standard status codes for the Hypertext Transfer Protocol, with values being integers. 200 indicates successful interface execution, 500 indicates an internal server error, and 404 indicates the requested interface does not exist. (If there are hard parameter requirements...) With memory sandbox state set If the difference between them is not empty, the scheduler will trigger an execution block, stopping the interface call process of the current intent node;
[0022] S34. Generate the task execution state vector , ; among which components This indicates the execution status of the i-th intent node. The range of values is , This indicates that the i-th intent node was executed successfully. 0 indicates that the i-th intent node is suspended due to missing parameters. This indicates that the i-th intent node failed to execute; when the task execution state vector... Components appearing in At time 0, the scheduler extracts the index i of the node and generates the currently executing suspended pointer. Transmitted to the parser. The value is the index of the intent node.
[0023] A further improvement of the present invention is that the specific content of S4 is as follows:
[0024] S41. The parser receives the current execution suspend pointer. At the same time, obtain the set of hard parameter requirements for local storage. and memory sandbox state set Construct a two-dimensional mapping relationship between intent and slot, where the row corresponds to the intent node index i, with a value range of 1-N, and the column corresponds to the slot type index j, with a value range of 1-K;
[0025] S42. For each coordinate (i,j), the element values of the dynamic slot synchronization and blocking matrix C are calculated using a piecewise function. The expression for the piecewise function is:
[0026] ;
[0027] in, This indicates that the j-th slot is not a required parameter for the i-th intent node. 1 indicates that the j-th slot is a required parameter for the i-th intent node and has already been obtained from the initial memory sandbox set. This indicates that the j-th slot is the currently suspended slot. Required parameters for each intent node that have not yet been retrieved. This indicates that the j-th slot is a required parameter for other unexecuted intent nodes and has not yet been acquired; generate and output an N×K order dynamic slot synchronization and blocking matrix C.
[0028] A further improvement of the present invention is that step S5 includes the following specific steps:
[0029] S51, the global scanning module of the scheduling end traverses all elements of the dynamic slot synchronization and blocking matrix C; when an element is scanned... At that time, confirm the current execution suspension pointer. The intent node being pointed to is missing entity data corresponding to the j-th slot. The scheduler suspends the interface call flow of the intent node and all subsequent intent nodes that depend on the intent node in the intent dependency directed acyclic graph. The dialog response generator is called. The dialog response generator generates the corresponding clarification question text according to the type of the j-th slot and the preset question template, and outputs the clarification question text to the downstream front end.
[0030] S52, When an element is scanned When it is confirmed that there are missing slots in other unexecuted intent nodes besides the currently suspended intent node, the parser allocates an independent slot storage namespace for each intent node within the natural language understanding engine and generates a context namespace lock. The context namespace lock ensures that the subsequently supplemented entity data is only bound to the namespace of the currently suspended intent node. The scheduler outputs a local parsing whitelist constraint to the parser based on the scan results.
[0031] A further improvement of the present invention is that step S6 includes the following specific steps:
[0032] S61. The new natural language string provided by the user in response to the clarification question is transmitted to the access gateway. The access gateway performs lexical processing on the string to generate a new user input text sequence, and then transmits the new user input text sequence to the parsing end.
[0033] S62. Under the constraint of the local parsing whitelist, the parsing end only performs entity extraction operations related to the currently suspended intent node on new user input text sequences. The newly extracted entity slots can only be bound to the coordinates with a value of -1 in the blocking matrix C, that is, they can only be bound to the dynamic slots. The namespace of the intent node;
[0034] S63. Write the newly extracted entity data into the memory sandbox state set. In the namespace corresponding to the currently suspended intent node, generate an updated memory sandbox state set, recalculate the dynamic slot synchronization and blocking matrix C, and update the corresponding element with the original value of -1 to 1;
[0035] S64. Monitor the dynamic slot synchronization and the state changes of the blocking matrix C in real time. When the difference between the set of hard parameter requirements of the currently suspended intent node and the updated memory sandbox state set is an empty set, release the execution blocking, resume the interface call pipeline, continue to execute subsequent intent nodes according to the topology execution sequence, and update the task execution state vector. Repeat S3 to S6 until all components of the task execution state vector become 1, all intent nodes are completed, and the session process is terminated.
[0036] Secondly, a computer-readable storage medium is proposed, on which a computer program is stored. When the computer program is executed by a processor, it implements the above-mentioned method for multi-intent recognition and dynamic process control of intelligent question answering.
[0037] Thirdly, an electronic device is proposed, including a memory for storing instructions and a processor for executing the instructions, causing the device to perform a multi-intent recognition and dynamic process control method for intelligent question answering as described above.
[0038] The technical effects of this invention are as follows:
[0039] A multi-intent recognition and dynamic process control method for intelligent question answering is constructed. By building an adjacency matrix of an intent-dependent directed acyclic graph and performing topological sorting, the execution timing relationship of each intent node is accurately determined, supporting parallel execution of dependent intents, improving system resource utilization and task processing efficiency, and reducing user dialogue rounds. A memory sandbox state set is used to achieve isolated storage of slot data. Combined with a context namespace locking mechanism, it ensures that user-added entity data is only bound to the currently suspended intent node, avoiding incorrect allocation of entity data and intent execution chaos. Dynamic slot synchronization and blocking matrices enable fine-grained management of the slot states and execution processes of different intent nodes, allowing for dynamic control of suspending some intents while others continue execution. A local parsing whitelist constraint is introduced to restrict the natural language understanding engine to only parse entity types related to the currently suspended intent, reducing computational overhead while significantly improving entity recognition accuracy. All modules interact through standardized data structures, exhibiting high modularity, ease of expansion and maintenance, and rapid adaptation to the multi-intent processing needs of different business scenarios. Attached Figure Description
[0040] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0041] Figure 1 This is a flowchart illustrating a multi-intent recognition and dynamic process control method for intelligent question answering according to Embodiment 1 of the present invention. Detailed Implementation
[0042] Example 1: This example proposes a multi-intent recognition and dynamic process control method for intelligent question answering. By constructing an adjacency matrix of an intent-dependent directed acyclic graph and performing topological sorting, the execution timing relationship of each intent node is accurately determined, supporting parallel execution of dependent intents, improving system resource utilization and task processing efficiency, and reducing user dialogue rounds. A memory sandbox state set is used to achieve isolated storage of slot data. Combined with a context namespace locking mechanism, it ensures that user-added entity data is only bound to the currently suspended intent node, avoiding incorrect allocation of entity data and intent execution chaos. Dynamic slot synchronization and blocking matrices enable fine-grained management of the slot states and execution processes of different intent nodes, allowing for flexible dynamic control of suspending some intents while others continue execution. A local parsing whitelist constraint is introduced to restrict the natural language understanding engine to only parse entity types related to the currently suspended intent, reducing computational overhead while significantly improving entity recognition accuracy. Each module interacts through a standardized data structure, exhibiting high modularity, ease of expansion and maintenance, and rapid adaptation to the multi-intent processing needs of different business scenarios. Specifically, such as... Figure 1 As shown, the intelligent question-answering multi-intent recognition and dynamic process control method proposed in this embodiment includes the following specific steps:
[0043] S1. Obtain the user input text sequence and the global hard parameter requirement table, and structure them into the corresponding hard parameter requirement set according to the intent node;
[0044] In this embodiment, the specific content of S1 is as follows: the access gateway obtains the original natural language string of the front-end user, performs lexicalization sequence processing on the original natural language string, converts the continuous text into a discrete lexical sequence, and generates the user input text sequence. The scheduling end parses the interface documentation of the underlying business registry, extracts the required field structure for each interface execution, and generates a global hard parameter requirement table. The global hard parameter requirement table The system is split according to the intent node to generate the set of hard parameter requirements for the i-th intent node. , It contains all entity slot identifiers necessary for the execution of the interface corresponding to the i-th intent node. Each element in the array corresponds to a globally defined slot type index j, where i is the intent node index, j is the slot type index, and the value range is 1-K, where K is the total number of globally defined slot types.
[0045] In this embodiment, the gateway first obtains the original natural language string from the front-end user. Lexicalization sequence processing is then performed on the original natural language string, converting continuous text into a discrete word sequence to generate the user input text sequence. The lexicalization process uses a byte-pair encoding algorithm, with a vocabulary size of 30,000 and a maximum word sequence length of 512. Parts exceeding the maximum length are truncated, and parts shorter than the maximum length are padded with padding characters. The scheduling end parses the interface documentation of the underlying business registration center, extracts the required fields for each interface execution, and generates a global hard parameter requirement table. This global hard parameter requirement table is a two-dimensional array, where the first dimension corresponds to the intent node index, and the second dimension corresponds to the slot type index. Array elements are of boolean type; a true value indicates that the corresponding slot is a required parameter for the corresponding intent node, and a false value indicates that the corresponding slot is not a required parameter for the corresponding intent node. The global hard parameter requirement table is split according to intent nodes to generate the hard parameter requirement set for the i-th intent node. The hard parameter requirement set contains all entity slot identifiers necessary for the execution of the interface corresponding to the i-th intent node. Each element in the hard parameter requirement set corresponds to a globally defined slot type index j, where i is the intent node index, with a value range of 1-N, N is the total number of valid intent nodes identified in the current session, j is the slot type index, with a value range of 1-K, and K is the total number of globally defined slot types. The value of K is set according to the business scenario, including but not limited to common slot types such as user name, user ID number, order number, product number, time, location, amount, and contact information.
[0046] S2. Perform dependency parsing and entity extraction on the user input text sequence to generate an extracted slot set, remove mutually exclusive intent nodes, perform topological sorting on the remaining intent nodes to generate an intent-dependent directed acyclic graph adjacency matrix, and write the extracted slots into the memory database to form a memory sandbox state set.
[0047] In this embodiment, step S2 includes the following specific steps:
[0048] S21, Based on the user input text sequence The natural language understanding server at the parsing end performs dependency parsing and entity extraction to extract entity data contained in the user input text sequence, forming a set of extracted slots. The set of extracted slots The number of key-value pairs contained is equal to the number of its elements. The key of each key-value pair is the slot type index j, and the value is the corresponding entity data.
[0049] S22. Based on semantic similarity algorithm and preset business rules, identify and remove mutually exclusive intent nodes. The mutually exclusive intent nodes are intent nodes that cannot be executed simultaneously in the same session logically. Perform topological sorting on the remaining valid intent nodes to determine the execution order among the intent nodes and generate an intent-dependent directed acyclic graph adjacency matrix. , Let N×N be the adjacency matrix of a directed acyclic graph. The elements in this matrix are... 1 indicates that the a-th intent node depends on the b-th intent node and can only be executed after the b-th intent node has finished executing. The element is... 0 indicates that the a-th intent node and the b-th intent node have no temporal dependency, and N is the total number of valid intent nodes identified in the current session;
[0050] S23. Collect the extracted slots. Write to the in-memory database to generate a memory sandbox state set. Output a structured set of parsed states , .
[0051] In this embodiment, based on the user-input text sequence, the natural language understanding server at the parsing end performs dependency parsing and entity extraction to extract entity data contained in the user-input text sequence, forming an extracted slot set. The extracted slot set is a dictionary type, containing key-value pairs equal to the number of its elements. The key of each key-value pair is the slot category index j, and the value is the corresponding entity data. Entity extraction uses a named entity recognition model based on a pre-trained language model. The model adopts a BERT-based architecture with a hidden layer dimension of 768, 12 attention heads, and 12 hidden layers. The model is fine-tuned on a labeled business domain dataset with a batch size of 32 and a learning rate of [missing information]. The number of training rounds was set to 10, the AdamW optimizer was used, and the weight decay coefficient was set to 0.01.
[0052] Mutually exclusive intent nodes are identified and eliminated based on semantic similarity algorithms and preset business rules. Mutually exclusive intent nodes are intent nodes that are logically impossible to execute simultaneously in the same session. The semantic similarity algorithm uses the cosine similarity algorithm to calculate the cosine similarity between the semantic vectors of two intent nodes. When the cosine similarity is greater than the preset threshold of 0.8 and there is a conflict in the business logic of the two intent nodes, they are determined to be mutually exclusive intent nodes. The preset business rules are configured through a business rule engine and written in a rule description language. The rules have a higher priority than the judgment result of the semantic similarity algorithm.
[0053] Perform topological sorting on the remaining valid intent nodes to determine the execution order among them, and generate an intent-dependent directed acyclic graph adjacency matrix. This matrix is an N×N ordered directed acyclic graph adjacency matrix, containing elements... 1 indicates that the a-th intent node depends on the b-th intent node and can only be executed after the b-th intent node has finished executing. The element is... 0 indicates that the a-th intention node and the b-th intention node have no temporal dependency. The topological sorting uses the Kahn algorithm, with a time complexity of O(n log n). , where E is the number of edges in the directed acyclic graph.
[0054] The extracted slot set is written to the in-memory database to generate a memory sandbox state set. The in-memory database uses a Redis database, and the data is stored using a hash table structure. Each intent node corresponds to an independent hash table. The key of the hash table is the slot type index j, and the value is the corresponding entity data. The output is a parsed state structured set.
[0055] S3. Traverse intent nodes in topological order, perform parameter integrity verification based on the set of hard parameter requirements and the set of memory sandbox states, generate a task execution state vector, and generate a current execution suspension pointer when there are missing parameters.
[0056] In this embodiment, step S3 includes the following specific steps:
[0057] S31. Extract the set of hard parameter requirements for the i-th intent node. and the parsing of the structured set of states Based on the structured set of parsed states Intention-dependent adjacency matrix of directed acyclic graph Generate a topology execution sequence that satisfies all temporal dependencies, and traverse all intent nodes sequentially according to the topology execution sequence;
[0058] S32. For the i-th intent node encountered during traversal, perform parameter integrity verification and calculate the set of hard parameter requirements. With memory sandbox state set The difference set between them represents the set of entity slots that the i-th intent node needs but has not yet acquired;
[0059] S33, If the set of hard parameter requirements With memory sandbox state set If the difference between the two sets is empty, the scheduler will call the corresponding underlying business interface and obtain the interface execution return status code. , These are standard status codes for the Hypertext Transfer Protocol, with values being integers. 200 indicates successful interface execution, 500 indicates an internal server error, and 404 indicates the requested interface does not exist. (If there are hard parameter requirements...) With memory sandbox state set If the difference between them is not empty, the scheduler will trigger an execution block, stopping the interface call process of the current intent node;
[0060] S34. Generate the task execution state vector , ; among which components This indicates the execution status of the i-th intent node. The range of values is , This indicates that the i-th intent node was executed successfully. 0 indicates that the i-th intent node is suspended due to missing parameters. This indicates that the i-th intent node failed to execute; when the task execution state vector... Components appearing in At time 0, the scheduler extracts the index i of the node and generates the currently executing suspended pointer. Transmitted to the parser. The value is the index of the intent node.
[0061] In this embodiment, the hard parameter requirement set and the parsed state structure set of the i-th intent node are extracted. A topological execution sequence satisfying all temporal dependencies is generated based on the adjacency matrix of the directed acyclic graph of intent dependencies in the parsed state structure set. All intent nodes are traversed sequentially according to the topological execution sequence. For the i-th intent node encountered, parameter integrity is checked, and the difference between the hard parameter requirement set and the memory sandbox state set is calculated. This difference represents the set of entity slots that the i-th intent node needs but has not yet acquired. If the difference between the hard parameter requirement set and the memory sandbox state set is empty, the scheduler calls the corresponding underlying business interface and obtains the interface execution return status code. The return status code is a standard Hypertext Transfer Protocol status code, with integer values: 200 indicates successful interface execution, 500 indicates an internal server error, and 404 indicates the requested interface does not exist. If the difference between the hard parameter requirement set and the memory sandbox state set is not empty, the scheduler triggers execution blocking, stopping the interface call process of the current intent node. Generate a task execution state vector. When a component in the task execution state vector has a value of zero, the scheduler extracts the index i of that node, generates a current execution suspension pointer, and transmits it to the parser. The value of the current execution suspension pointer is the index value of the intent node.
[0062] S4. By integrating the set of hard parameter requirements, the set of memory sandbox states, and the current execution suspension pointer, a two-dimensional mapping relationship between intent and slot is constructed, and the dynamic slot synchronization and blocking matrix is calculated.
[0063] In this embodiment, the specific content of S4 is as follows:
[0064] S41. The parser receives the current execution suspend pointer. At the same time, obtain the set of hard parameter requirements for local storage. and memory sandbox state set Construct a two-dimensional mapping relationship between intent and slot, where the row corresponds to the intent node index i, with a value range of 1-N, and the column corresponds to the slot type index j, with a value range of 1-K;
[0065] S42. For each coordinate (i,j), the element values of the dynamic slot synchronization and blocking matrix C are calculated using a piecewise function. The expression for the piecewise function is:
[0066] ;
[0067] in, This indicates that the j-th slot is not a required parameter for the i-th intent node. 1 indicates that the j-th slot is a required parameter for the i-th intent node and has already been obtained from the initial memory sandbox set. This indicates that the j-th slot is the currently suspended slot. Required parameters for each intent node that have not yet been retrieved. This indicates that the j-th slot is a required parameter for other unexecuted intent nodes and has not yet been acquired; generate and output an N×K order dynamic slot synchronization and blocking matrix C.
[0068] S5. Based on the dynamic slot synchronization and blocking matrix, suspend the interface call flow of the current intent node and its dependent nodes corresponding to the missing slot, generate clarification and follow-up text, and generate context namespace locks and local parsing whitelist constraints for other unexecuted intent nodes.
[0069] In this embodiment, step S5 includes the following specific steps:
[0070] S51, the global scanning module of the scheduling end traverses all elements of the dynamic slot synchronization and blocking matrix C; when an element is scanned... At that time, confirm the current execution suspension pointer. The intent node being pointed to is missing entity data corresponding to the j-th slot. The scheduler suspends the interface call flow of the intent node and all subsequent intent nodes that depend on the intent node in the intent dependency directed acyclic graph. The dialog response generator is called. The dialog response generator generates the corresponding clarification question text according to the type of the j-th slot and the preset question template, and outputs the clarification question text to the downstream front end.
[0071] S52, When an element is scanned When it is confirmed that there are missing slots in other unexecuted intent nodes besides the currently suspended intent node, the parser allocates an independent slot storage namespace for each intent node within the natural language understanding engine and generates a context namespace lock. The context namespace lock ensures that the subsequently supplemented entity data is only bound to the namespace of the currently suspended intent node. The scheduler outputs a local parsing whitelist constraint to the parser based on the scan results.
[0072] In this embodiment, the global scanning module of the scheduling terminal traverses all elements of the dynamic slot synchronization and blocking matrix C. The traversal order is row-major, that is, it first traverses all columns of the first row, then all columns of the second row, and so on. When an element is scanned... When it is confirmed that the intent node pointed to by the currently executing suspension pointer is missing entity data corresponding to the j-th slot, the scheduler suspends the interface call flow of this intent node and all subsequent intent nodes that depend on this node in the intent dependency directed acyclic graph. The subsequent intent nodes that depend on this node are determined by traversing the adjacency matrix of the intent dependency directed acyclic graph. For each intent node k, if there exists a path from node k to node... Then node k depends on node The process calls a dialogue response generator, which generates corresponding clarification follow-up questions based on the type of the j-th slot and a preset follow-up question template. The preset follow-up question templates are stored in a template database, with multiple templates for each slot type. Template selection is randomized to improve the naturalness of the dialogue. The clarification follow-up question text is then output to the downstream frontend. When an element is scanned... Upon confirming that slots are missing in other unexecuted intent nodes besides the currently suspended intent node, the parser allocates an independent slot storage namespace for each intent node within the natural language understanding engine, generating a context namespace lock. This context namespace lock ensures that subsequently supplemented entity data is only bound to the namespace of the currently suspended intent node. The scheduler outputs a local parsing whitelist constraint to the parser based on the scan results. This local parsing whitelist constraint includes the index of the currently suspended intent node. And the set of indexes for the missing slot types of this node.
[0073] S6. Receive supplementary text from the user, extract entities under the local parsing whitelist constraint and write them into the memory sandbox namespace of the currently suspended intent node, and update the dynamic slot synchronization and blocking matrix; when the missing slots of the currently suspended intent node are filled, unblock and resume the interface call pipeline, repeat the execution until the task execution status vector is successful.
[0074] In this embodiment, step S6 includes the following specific steps:
[0075] S61. The new natural language string provided by the user in response to the clarification question is transmitted to the access gateway. The access gateway performs lexical processing on the string to generate a new user input text sequence, and then transmits the new user input text sequence to the parsing end.
[0076] S62. Under the constraint of the local parsing whitelist, the parsing end only performs entity extraction operations related to the currently suspended intent node on new user input text sequences. The newly extracted entity slots can only be bound to the coordinates with a value of -1 in the blocking matrix C, that is, they can only be bound to the dynamic slots. The namespace of the intent node;
[0077] S63. Write the newly extracted entity data into the memory sandbox state set. In the namespace corresponding to the currently suspended intent node, generate an updated memory sandbox state set, recalculate the dynamic slot synchronization and blocking matrix C, and update the corresponding element with the original value of -1 to 1;
[0078] S64. Monitor the dynamic slot synchronization and the state changes of the blocking matrix C in real time. When the difference between the set of hard parameter requirements of the currently suspended intent node and the updated memory sandbox state set is an empty set, release the execution blocking, resume the interface call pipeline, continue to execute subsequent intent nodes according to the topology execution sequence, and update the task execution state vector. Repeat S3 to S6 until all components of the task execution state vector become 1, all intent nodes are completed, and the session process is terminated.
[0079] In this embodiment, the new natural language string provided by the user in response to clarification questions is transmitted to the access gateway. The access gateway performs lexicalization on the string to generate a new user input text sequence, which is then transmitted to the parsing end. Under the constraint of a local parsing whitelist, the parsing end only performs entity extraction operations related to the currently suspended intent node on the new user input text sequence. The newly extracted entity slots can only be bound to the coordinates with a value of -1 in the blocking matrix C, synchronized with the dynamic slots; that is, they can only be bound to... The intent node namespace is defined, and entities of other slot types are ignored during entity extraction to avoid incorrect allocation of entity data. Newly extracted entity data is written to the namespace corresponding to the currently suspended intent node in the memory sandbox state set, generating an updated memory sandbox state set. The dynamic slot synchronization and blocking matrix C is recalculated, updating elements with original values of -1 to 1. The state changes of the dynamic slot synchronization and blocking matrix C are monitored in real-time at a frequency of once every 100 milliseconds. When the difference between the hard parameter requirement set of the currently suspended intent node and the updated memory sandbox state set is empty, execution blocking is lifted, the interface call pipeline resumes, and subsequent intent nodes continue to be executed according to the topology execution sequence. The task execution state vector is updated, setting the component corresponding to the currently suspended intent node to 1. The above steps of parameter integrity verification, dynamic slot synchronization and blocking matrix calculation, clarification question generation, and entity supplementation are repeated until all components of the task execution state vector become 1, all intent nodes are executed, and the session flow is terminated.
[0080] It should be noted that existing intelligent question-answering systems typically employ a serial intent recognition and execution approach when processing multi-intent user input. When a parameter is missing for a particular intent, the entire dialogue flow is interrupted, and subsequently supplemented entity data may be incorrectly assigned to other unexecuted intents, leading to inconsistent intent execution and low dialogue efficiency. This invention determines the temporal relationship of intent execution by constructing an intent-dependent directed acyclic graph adjacency matrix, utilizes a memory sandbox state set for isolated storage of slot data, and achieves fine-grained management of slot states for different intent nodes through dynamic slot synchronization and blocking matrices. Combined with context namespace locks and local resolution whitelist constraints, it ensures that user-supplemented entity data is only bound to the currently suspended intent node, thereby achieving dynamic control and parallel execution of multi-intent flows and improving the processing efficiency and accuracy of the intelligent question-answering system.
[0081] Example 2: This example provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-described intelligent question-answering multi-intent recognition and dynamic process control method by calling the computer program stored in the memory.
[0082] The electronic device can vary considerably depending on its configuration or performance. It may include one or more Central Processing Units (CPUs) and one or more memories, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the intelligent question-answering multi-intent recognition and dynamic flow control method provided in the above-described embodiment. The electronic device may also include other components for implementing its functions; for example, it may have wired or wireless network interfaces and input / output interfaces for data input and output. Details will not be elaborated upon in this embodiment.
[0083] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0084] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0085] This invention is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and block diagrams, as well as combinations of blocks in the flowchart illustrations and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and boxes Figure 1 The steps of the function specified in one or more boxes.
[0087] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for multi-intent recognition and dynamic process control in intelligent question answering, characterized in that: The specific steps include the following: S1. Obtain the user input text sequence and global hard parameter requirement table, and structure them into the corresponding hard parameter requirement set according to the intent node; S2. Perform dependency parsing and entity extraction on the user input text sequence to generate an extracted slot set, remove mutually exclusive intent nodes, perform topological sorting on the remaining intent nodes to generate an intent-dependent directed acyclic graph adjacency matrix, and write the extracted slots into the memory database to form a memory sandbox state set. S3. Traverse intent nodes in topological order, perform parameter integrity verification based on the set of hard parameter requirements and the set of memory sandbox states, generate a task execution state vector, and generate a current execution suspension pointer when there are missing parameters. S4. By integrating the set of hard parameter requirements, the set of memory sandbox states, and the current execution suspension pointer, a two-dimensional mapping relationship between intent and slot is constructed, and the dynamic slot synchronization and blocking matrix is calculated. S5. Based on the dynamic slot synchronization and blocking matrix, suspend the interface call flow of the current intent node and its dependent nodes corresponding to the missing slot, generate clarification and follow-up text, and generate context namespace locks and local parsing whitelist constraints for other unexecuted intent nodes. S6. Receive supplementary text from the user, extract entities under the local parsing whitelist constraint and write them into the memory sandbox namespace of the currently suspended intent node, and update the dynamic slot synchronization and blocking matrix; when the missing slots of the currently suspended intent node are filled, unblock and resume the interface call pipeline, repeat the execution until the task execution status vector is successful.
2. The method for multi-intent recognition and dynamic process control of intelligent question answering according to claim 1, characterized in that: The specific content of S1 is as follows: the access gateway obtains the original natural language string of the front-end user, performs lexicalization sequence processing on the original natural language string to convert the continuous text into a discrete lexical sequence, and generates the user input text sequence. ; The scheduling end parses the interface documentation of the underlying business registry, extracts the required field structure for each interface execution, and generates a global hard parameter requirement table. The global hard parameter requirement table The system is split according to the intent node to generate the set of hard parameter requirements for the i-th intent node. , It contains all entity slot identifiers necessary for the execution of the interface corresponding to the i-th intent node. Each element in the array corresponds to a globally defined slot type index j, where i is the intent node index, j is the slot type index, and the value range is 1-K, where K is the total number of globally defined slot types.
3. The method for multi-intent recognition and dynamic process control of intelligent question answering according to claim 2, characterized in that: S2 includes the following specific steps: S21, Based on the user input text sequence The natural language understanding server at the parsing end performs dependency parsing and entity extraction to extract entity data contained in the user input text sequence, forming a set of extracted slots. The set of extracted slots The number of key-value pairs contained is equal to the number of its elements. The key of each key-value pair is the slot type index j, and the value is the corresponding entity data. S22. Based on semantic similarity algorithm and preset business rules, identify and remove mutually exclusive intent nodes. The mutually exclusive intent nodes are intent nodes that cannot be executed simultaneously in the same session logically. Perform topological sorting on the remaining valid intent nodes to determine the execution order among the intent nodes and generate an intent-dependent directed acyclic graph adjacency matrix. , Let N×N be the adjacency matrix of a directed acyclic graph. The elements in this matrix are... 1 indicates that the a-th intent node depends on the b-th intent node and can only be executed after the b-th intent node has finished executing. The element is... 0 indicates that the a-th intent node and the b-th intent node have no temporal dependency, and N is the total number of valid intent nodes identified in the current session; S23. Collect the extracted slots. Write to the in-memory database to generate a memory sandbox state set. Output a structured set of parsed states , .
4. The method for multi-intent recognition and dynamic process control of intelligent question answering according to claim 3, characterized in that: S3 includes the following specific steps: S31. Extract the set of hard parameter requirements for the i-th intent node. and the parsing of the structured set of states Based on the structured set of parsed states Intention-dependent adjacency matrix of directed acyclic graph Generate a topology execution sequence that satisfies all temporal dependencies, and traverse all intent nodes sequentially according to the topology execution sequence; S32. For the i-th intent node encountered during traversal, perform parameter integrity verification and calculate the set of hard parameter requirements. With memory sandbox state set The difference set between them represents the set of entity slots that the i-th intent node needs but has not yet acquired; S33, If the set of hard parameter requirements With memory sandbox state set If the difference between the two sets is empty, the scheduler will call the corresponding underlying business interface and obtain the interface execution return status code. , These are standard status codes for the Hypertext Transfer Protocol, with values being integers. 200 indicates successful interface execution, 500 indicates an internal server error, and 404 indicates the requested interface does not exist. (If there are hard parameter requirements...) With memory sandbox state set If the difference between them is not empty, the scheduler will trigger an execution block, stopping the interface call process of the current intent node; S34. Generate the task execution state vector , ; among which components This indicates the execution status of the i-th intent node. The range of values is , This indicates that the i-th intent node was executed successfully. 0 indicates that the i-th intent node is suspended due to missing parameters. This indicates that the i-th intent node failed to execute; When the task execution state vector Components appearing in At time 0, the scheduler extracts the index i of the node and generates the currently executing suspended pointer. Transmitted to the parser. The value is the index of the intent node.
5. The method for multi-intent recognition and dynamic process control of intelligent question answering according to claim 4, characterized in that: The specific content of S4 is as follows: S41. The parser receives the current execution suspend pointer. At the same time, obtain the set of hard parameter requirements for local storage. and memory sandbox state set Construct a two-dimensional mapping relationship between intent and slot, where the row corresponds to the intent node index i, with a value range of 1-N, and the column corresponds to the slot type index j, with a value range of 1-K; S42. For each coordinate (i,j), the element values of the dynamic slot synchronization and blocking matrix C are calculated using a piecewise function. The expression for the piecewise function is: ; in, This indicates that the j-th slot is not a required parameter for the i-th intent node. 1 indicates that the j-th slot is a required parameter for the i-th intent node and has already been obtained from the initial memory sandbox set. This indicates that the j-th slot is the currently suspended slot. Required parameters for each intent node that have not yet been retrieved. This indicates that the j-th slot is a required parameter for other unexecuted intent nodes and has not yet been acquired; generate and output an N×K order dynamic slot synchronization and blocking matrix C.
6. The method for multi-intent recognition and dynamic process control of intelligent question answering according to claim 5, characterized in that: S5 includes the following specific steps: S51, the global scanning module of the scheduling end traverses all elements of the dynamic slot synchronization and blocking matrix C; when an element is scanned... At that time, confirm the current execution suspension pointer. The intent node being pointed to is missing entity data corresponding to the j-th slot. The scheduler suspends the interface call flow of the intent node and all subsequent intent nodes that depend on the intent node in the intent dependency directed acyclic graph. The dialog response generator is called. The dialog response generator generates the corresponding clarification question text according to the type of the j-th slot and the preset question template, and outputs the clarification question text to the downstream front end. S52, When an element is scanned When it is confirmed that there are missing slots in other unexecuted intent nodes besides the currently suspended intent node, the parser allocates an independent slot storage namespace for each intent node within the natural language understanding engine and generates a context namespace lock. The context namespace lock ensures that the subsequently supplemented entity data is only bound to the namespace of the currently suspended intent node. The scheduler outputs a local parsing whitelist constraint to the parser based on the scan results.
7. The method for multi-intent recognition and dynamic flow control of intelligent question answering according to claim 6, characterized in that: S6 includes the following specific steps: S61. The new natural language string provided by the user in response to the clarification question is transmitted to the access gateway. The access gateway performs lexical processing on the string to generate a new user input text sequence, and then transmits the new user input text sequence to the parsing end. S62. Under the constraint of the local parsing whitelist, the parsing end only performs entity extraction operations related to the currently suspended intent node on new user input text sequences. The newly extracted entity slots can only be bound to the coordinates with a value of -1 in the blocking matrix C, that is, they can only be bound to the dynamic slots. The namespace of the intent node; S63. Write the newly extracted entity data into the memory sandbox state set. In the namespace corresponding to the currently suspended intent node, generate an updated memory sandbox state set, recalculate the dynamic slot synchronization and blocking matrix C, and update the corresponding element with the original value of -1 to 1; S64. Monitor the dynamic slot synchronization and the state changes of the blocking matrix C in real time. When the difference between the set of hard parameter requirements of the currently suspended intent node and the updated memory sandbox state set is an empty set, release the execution blocking, resume the interface call pipeline, continue to execute subsequent intent nodes according to the topology execution sequence, and update the task execution state vector. Repeat S3 to S6 until all components of the task execution state vector become 1, all intent nodes are completed, and the session process is terminated.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for multi-intent recognition and dynamic process control of intelligent question answering as described in any one of claims 1-7.
9. An electronic device, characterized in that, It includes a memory for storing instructions; and a processor for executing the instructions, causing the device to perform a method for multi-intent recognition and dynamic process control of intelligent question answering as described in any one of claims 1 to 7.
