A method for implementing a task-based AI dialogue system through a flowchart
Through deep learning technology and forward-backward-generation of interpretable flowcharts and codes to the network, the challenges of task-based AI dialogue systems in semantic understanding, task execution and user experience are solved, and more efficient semantic understanding and user satisfaction are achieved.
Patent Information
- Application Number
- CN202410237994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-02
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-03-02
AI Technical Summary
The prior art has difficulties in semantic understanding, intention recognition, dialogue process management, knowledge acquisition and integration, task automation execution, etc., resulting in problems in task-based AI dialogue systems in terms of response speed, language nature and user satisfaction.
Through deep learning technology, combined with forward and backward networks, interpretable flowcharts and code are generated to improve the semantic understanding of the dialogue system and task execution effect, and enhance the user experience. Specific steps include natural language recognition, flowchart generation, code conversion and process code-driven dialogue system.
The semantic understanding ability and task execution effect of task-based AI dialogue systems have been improved, the user experience has been enhanced, and the shortcomings of dialogue systems in the prior art in terms of response speed, language nature and user satisfaction.
Smart Images

Figure CN118194879B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for implementing a task-based AI dialogue system through a flowchart. Background Art
[0002] Automatic dialogue systems, especially task-based AI dialogue systems, have become an important research and application field in modern science and technology. These systems can understand and respond to users' natural language input, allowing users to interact with computers in a natural way. With the rapid development of artificial intelligence, automatic dialogue systems have been widely used in various fields, including customer service, virtual assistants, healthcare, financial services, etc. However, there are still many technical challenges and problems in realizing efficient, accurate and intelligent task-based AI dialogue systems.
[0003] A task-based AI dialogue system is a system that allows users to have goal-oriented dialogues with computer systems. Users can ask questions or requests in natural language, and the system will understand the user's intentions and provide corresponding responses or perform corresponding tasks based on pre-defined tasks and knowledge. This dialogue system has broad application potential in business, education, medical care and other fields. For example, a task-based AI dialogue system for customer service can help users solve problems, query information or perform transactions without human intervention.
[0004] The complexity of natural language makes it difficult for the system to accurately understand the user's intention. Existing technologies have limitations in semantic understanding and intent recognition, especially when dealing with complex or ambiguous user queries. The system needs to better understand context, ambiguity, and polysemy. Task-based AI dialogue systems usually need to handle multiple rounds of dialogue, and existing technologies have difficulties in managing and maintaining dialogue processes. The system needs to be able to track the history of the dialogue and maintain the context in order to provide consistent and meaningful responses in multiple rounds of dialogue. The dialogue system needs to access and integrate various knowledge and data sources in order to provide useful information and responses. In the existing technology, the acquisition and integration of knowledge usually requires a lot of manual effort, which limits the scalability and practicality of the system. One of the key functions of task-based AI dialogue systems is the ability to automatically perform specific tasks, such as booking air tickets, checking the weather, and conducting financial transactions. In the existing technology, the automated execution of tasks usually requires complex programming and scripts, which is not friendly to non-technical users. In task-based AI dialogue systems, user experience and human-computer interaction are crucial. In the existing technology, some systems still have problems in response speed, language naturalness, and user satisfaction. Summary of the invention
[0005] An embodiment of the present application provides a method for implementing a task-based AI dialogue system through a flowchart. The present invention utilizes deep learning technology, combined with forward and backward networks, to generate interpretable flowcharts and codes, thereby improving the semantic understanding and task execution effects of the dialogue system and enhancing the user experience.
[0006] The present application embodiment provides a method for implementing a task-based AI dialogue system through a flowchart, the method comprising:
[0007] Step 1: Obtain the target dialogue, perform natural language recognition on the target dialogue, obtain the recognition result, and generate a flowchart corresponding to the target dialogue based on the recognition result;
[0008] Step 2: Convert the flowchart into process code;
[0009] Step 3: Use process code to drive the task-based AI dialogue system; when the task-based AI dialogue system receives new input, the task-based AI dialogue system generates a response under the control of the process code.
[0010] Furthermore, step 1 specifically includes:
[0011] Step 1.1: Convert the target dialogue into sequence data, with each word represented by a one-hot encoding vector; let Indicates the first vocabulary, Indicates the corresponding true label;
[0012] Step 1.2: In order to convert the target dialogue into a vector representation that can be processed by the LSTM network, an embedding layer is used to map the one-hot encoded vector of each word to a low-dimensional real vector representation; the parameters of the embedding layer are , it will enter Mapped to the corresponding word embedding vector ;
[0013] Step 1.3: Use the long short-term memory network to capture the long-term dependencies in the target dialogue; the parameters of the long short-term memory network include the weight matrix , and the deviation vector ; The output of the long short-term memory network is the hidden state ;
[0014] Step 1.4: Use the output of LSTM to extract grammatical and semantic features about the target dialogue;
[0015] Step 1.5: In order to consider the context information of the target dialogue, the grammatical and semantic features of the target dialogue are processed using a bidirectional long short-term memory network; the bidirectional long short-term memory network includes two independent long short-term memory networks, one processes the sequence from left to right, which is a forward long short-term memory network, and the other processes the sequence from right to left, which is a backward long short-term memory network; then their outputs are connected to obtain a comprehensive context representation;
[0016] Step 1.6: Define the loss function To measure the comprehensive contextual representation and the true label The difference between; using the back-propagation algorithm and the gradient descent optimizer, the loss function is minimized by adjusting the parameters of the bidirectional long short-term memory network .
[0017] Furthermore, step 1.1 specifically includes: constructing a vocabulary that contains all possible words in the data set; assuming that the vocabulary includes different words, using express; Representation vocabulary The words; map each word to a unique integer index; convert each sentence in the target dialogue into a sequence of word indices; let the target dialogue be ,in Indicates sentences; each The words in are represented by their indices in the vocabulary, i.e. into a sequence data; convert the sequence data into a one-hot encoded vector; for each integer index , a length of The vector is created as a zero vector, and then the The corresponding true label It is represented by the modulus of the two-hot encoded vector.
[0018] Furthermore, let the parameter of the embedding layer be a word embedding matrix , whose dimensions are ,in represents the number of words in the vocabulary, Represents the dimension of each word embedding vector; each row ,in , which means the first word embedding vectors of words; for sequence data , where each element is the first The operation of the embedding layer is to transform each Mapped to the corresponding word embedding vector ; This process is expressed using the following formula:
[0019] ;
[0020] in, Indicates the first The word embedding vector of the vocabulary is a matrix No. Line; connect the embedded word embedding vectors into a sequence, that is ,in Represents the length of the sequence data; this sequence becomes the output of the embedding layer, with express.
[0021] Furthermore, the long short-term memory network in step 1.3 is expressed using the following formula:
[0022] ;
[0023] in, is the output of the input gate, which controls the degree to which new information flows into the cell state; it is a vector with values between 0 and 1, and is converted by the Sigmoid function Perform calculations; is the weight matrix of the input gate, used to calculate the Impact on the input gate; is the recursive weight matrix of the input gate, used to calculate the hidden state from the previous moment Impact on the input gate; is the bias vector of the input gate, used for offset calculation; is the output of the forget gate, which controls which information in the cell state should be forgotten; it is also a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the forget gate, which is used to calculate the to the influence of the Forget Gate; is the recursive weight matrix of the forget gate, which is used to calculate the hidden state from the previous moment to the influence of the Forget Gate; is the bias vector of the forget gate, used for offset calculation; is the output of the output gate, which controls the outflow of information in the cell state; similarly, it is a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the output gate, used to calculate the Impact on the output gate; is the recursive weight matrix of the output gate, which is used to calculate the hidden state from the previous moment Impact on the output gate; is the bias vector of the output gate, used for offset calculation; is the candidate cell state value, which is a candidate new cell state and is calculated by the tanh function; is the weight matrix of the candidate cell state values, used to calculate the The impact on candidate cell state values; is the recursive weight matrix of the candidate cell state value, which is used to calculate the hidden state from the previous moment The impact on candidate cell state values; is the deviation vector of the candidate cell state values, used for offset calculation; It is the output of the cell state, which represents the cell state of the LSTM network at the current moment, and is updated through the input gate, forget gate, and cell state candidate value; this cell state transmits information between different time steps; It is the output of the hidden state, which represents the hidden state of the LSTM network at the current moment, which is calculated based on the cell state and the output gate; this hidden state will be passed to the next time step.
[0024] Furthermore, in step 1.4, the hidden state of the LSTM network at each time step is selected As a feature representation, ; These feature representations will be used as candidate features; average pooling is performed on the candidate features to obtain feature representations of fixed dimensions ; The average pooling operation is expressed as:
[0025] ;
[0026] here, is the feature representation after average pooling; the feature representation after average pooling Input to the fully connected layer for further feature extraction and abstraction; the output of the fully connected layer is represented as , which contains the high-level features learned by the model; the output of the fully connected layer is expressed by the following formula:
[0027] ;
[0028] in, is the weight matrix of the fully connected layer, is the bias vector of the fully connected layer, Represents the activation function.
[0029] Furthermore, the formula of the forward long short-term memory network is:
[0030] ;
[0031] in, is the output of the input gate, which controls the degree to which new information flows into the cell state of the forward long short-term memory network; it is a vector with values between 0 and 1, which is converted by the Sigmoid function Perform calculations; is the output of the forget gate, which controls which information in the cell state of the forward long short-term memory network should be forgotten; is the output of the output gate, which determines the degree of information outflow in the cell state of the forward long short-term memory network; It is a candidate cell state value, which is a candidate new cell state, calculated by the tanh function to ensure that the output is between -1 and 1; is the output of the cell state, which represents the cell state of the forward long short-term memory network at the current time step, and is updated by the input gate, the forget gate, and the cell state candidate value; this cell state transmits information between different time steps and is calculated by element-by-element multiplication and addition; is the output of the hidden state, which represents the hidden state of the forward long short-term memory network at the current time step; the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the forward long short-term memory network; is the hidden state at the previous moment.
[0032] Furthermore, the formula of the backward long short-term memory network is:
[0033] ;
[0034] in, is the output of the input gate, which controls the degree to which new information flows into the cell state of the backward long short-term memory network; it is a vector with values between 0 and 1, which is converted by the Sigmoid function Perform calculations; is the output of the forget gate, which controls which information in the backward long short-term memory network cell state should be forgotten; is the output of the output gate, which determines the degree of information outflow in the cell state of the backward long short-term memory network; It is a candidate cell state value, which is a candidate new cell state, calculated by the tanh function to ensure that the output is between -1 and 1; is the output of the cell state, which represents the cell state of the backward long short-term memory network at the current time step, and is updated by the input gate, forget gate, and cell state candidate value; this cell state transmits information between different time steps and is calculated by element-by-element multiplication and addition; is the output of the hidden state, which represents the hidden state of the backward long short-term memory network at the current time step; the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the backward long short-term memory network; is the hidden state at the next moment.
[0035] Furthermore, the loss function is expressed using the following formula:
[0036] .
[0037] Furthermore, the method of converting the flowchart into the process code in step 2 includes: obtaining a set of real labels of the target dialogue through the recognition result of the target dialogue obtained in step 1, obtaining the process node corresponding to each real label according to the pre-established mapping relationship between the real label and the process node, and connecting the process nodes in the same position order according to the position order of the real labels in the target dialogue, so as to obtain the flowchart of the target dialogue; according to the flowchart, converting to obtain the corresponding process code.
[0038] The present application provides a method for implementing a task-based AI dialogue system through a flowchart, which has the following beneficial effects: the present invention adopts advanced natural language processing technology, including an embedding layer and a long short-term memory network, etc., to improve the system's ability to understand user intentions. The role of the embedding layer and word embedding in the present invention is to convert natural language text into a numerical representation that can be understood by the machine. Through the embedding layer, each word in the vocabulary is mapped to a unique integer index and represented as a unique hot encoding vector. This step provides a basis for subsequent model input, and can better handle the correlation between different words and improve the accuracy of semantic understanding. First, LSTM controls the inflow and outflow of information through a series of gated units (input gate, forget gate, and output gate) to maintain cell state and hidden state. This mechanism enables the system to better manage dialogue history and context information, and improve dialogue coherence and consistency. Secondly, the cell state and hidden state of LSTM are the basis for the dialogue system to understand and generate natural language. The cell state updates and transmits information through the control of the gated unit, thereby achieving an accurate understanding of user intentions and needs. The hidden state includes a transformation of the cell state, making it suitable for generating natural language responses. The forward long short-term memory network and the backward long short-term memory network are used in the present invention to capture the forward and backward relations of context information, respectively. The two networks play a synergistic role in the dialogue system, and control the inflow, outflow and update of cell states through units such as input gates, forget gates, output gates and cell state candidate values. The forward network is responsible for capturing the information of the previous text, and the backward network is responsible for capturing the information of the subsequent text. Together, they provide a more comprehensive contextual understanding of the dialogue system. This combination of forward and backward relations can better grasp the user's intentions and needs, and improve the accuracy and flexibility of the dialogue system. The flowchart and code generation part in the present invention convert the dialogue content into a visual flowchart and machine-executable code. This step is very helpful for users to understand the working principle and logic of the system. The flowchart clearly shows the system's processing flow of user dialogues, and code generation enables users to directly convert the dialogue content into code that can be used for automated tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0040] Figure 1 A method flow chart of a method for implementing a task-based AI dialogue system through a flowchart provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0042] Example 1: Reference Figure 1 , a method for implementing a task-based AI dialogue system through a flowchart, the method comprising:
[0043] Step 1: Obtain the target dialogue, perform natural language recognition on the target dialogue, obtain the recognition result, and generate a flowchart corresponding to the target dialogue based on the recognition result;
[0044] The main purpose of this step is to collect conversations between users of the AI system. Users can interact with the AI system through text input or voice input. The target conversation usually includes the user's questions, requests, or topics of the conversation. Obtaining the target conversation is the input of the entire task-based AI dialogue system. The principle of obtaining the target conversation is to receive the user's input through various input channels (such as text input boxes, voice recognizers, etc.) and pass it to the system for processing. This can involve text analysis, voice recognition technology, etc. to ensure that the user input can be understood by the system. The purpose of obtaining the target conversation is to provide raw data for subsequent natural language recognition. The user's input is the starting point of the dialogue system, which contains the user's needs and intentions.
[0045] Natural language recognition (NLP) is the process of converting natural language text or speech input by users into structured data that can be understood by machines. In this step, the original target conversation is analyzed and interpreted to extract information about user intent, topics, and key information. The principle of natural language recognition involves the use of NLP techniques, including text segmentation, part-of-speech tagging, syntactic analysis, named entity recognition, etc., to convert natural language text into a form that can be processed by computers. For voice input, the voice signal may need to be converted into text form and then further NLP processing.
[0046] Based on the results of natural language recognition, the system generates a flowchart corresponding to the target conversation. A flowchart is a graphical representation that shows the logical structure of the conversation, including different conversation nodes and decision paths. The principle of generating a flowchart involves converting the conversation logic into a flowchart based on the results of natural language recognition using natural language processing and graphical modeling techniques. This may include mapping intents to specific conversation nodes, determining the connection relationship between different conversation nodes, etc. The purpose of generating a flowchart is to clearly represent the logical structure of the conversation system so that subsequent steps can better understand and execute the conversation. The flowchart allows the system to automatically make decisions based on the user's input, select the appropriate conversation path, and generate a response.
[0047] Step 2: Convert the flowchart into process code;
[0048] The system converts the nodes, edges, and conditional relationships between nodes in the flowchart into corresponding computer program code. This usually requires the use of graph processing algorithms and graph data structures to represent and manipulate the flowchart. This principle uses automated tools and algorithms to automatically generate code based on the structure of the flowchart. This may include the use of templates, rule engines, or domain-specific languages (DSLs) to convert flowcharts into executable programs. In some cases, flowcharts can be converted into code in different programming languages. The system may need to have the ability to convert flowcharts into the required programming language, which usually requires the use of parsers and compilers for the programming language.
[0049] The generated code contains a programmatic representation of the dialogue logic, which can automatically control the behavior of the task-based AI dialogue system. This means that the system can automatically perform different actions and decisions based on user input and the logic of the flowchart. Automatically generated code is usually more maintainable than manually written code because it is generated based on flowcharts. This reduces errors and vulnerabilities and makes the system easier to update and maintain. Automatically generated code can more easily adapt to different dialogue scenarios and changes in requirements. If the dialogue logic needs to be updated or expanded, just modify the flowchart and regenerate the code without having to rewrite the entire program.
[0050] Step 3: Use process code to drive the task-based AI dialogue system; when the task-based AI dialogue system receives new input, the task-based AI dialogue system generates a response under the control of the process code.
[0051] The generated process code is usually integrated into the core of the dialogue system to ensure that the dialogue system can access and execute the code. The dialogue system is usually event-driven, waiting for user input or other triggering events. Once an event occurs, the system generates a response based on the generated code. The generated code may include state management to track the current state and context of the dialogue. This helps the system better understand the user's request and maintain the coherence of the dialogue.
[0052] Using process codes, the dialogue system is able to automatically generate responses based on the user's input and the current dialogue state. This means that the system can automatically perform different actions and decisions based on the logic of the flowchart without the need to manually write rules. The dialogue system is able to interact with the user in real time, responding based on the user's input and the system's process code. This makes the user experience more natural and smooth. Using process codes, the system can automatically adjust its behavior based on different dialogue scenarios to meet the user's needs. This increases the system's adaptability and flexibility.
[0053] Embodiment 2: Step 1 specifically comprises:
[0054] Step 1.1: Convert the target dialogue into sequence data, with each word represented by a one-hot encoding vector; let Indicates the first vocabulary, Indicates the corresponding true label;
[0055] Step 1.2: In order to convert the target dialogue into a vector representation that can be processed by the LSTM network, an embedding layer is used to map the one-hot encoded vector of each word to a low-dimensional real vector representation; the parameters of the embedding layer are , it will enter Mapped to the corresponding word embedding vector ;
[0056] Step 1.3: Use the long short-term memory network to capture the long-term dependencies in the target dialogue; the parameters of the long short-term memory network include the weight matrix , and the deviation vector ; The output of the long short-term memory network is the hidden state ;
[0057] Step 1.4: Use the output of LSTM to extract grammatical and semantic features about the target dialogue;
[0058] Step 1.5: In order to consider the context information of the target dialogue, the grammatical and semantic features of the target dialogue are processed using a bidirectional long short-term memory network; the bidirectional long short-term memory network includes two independent long short-term memory networks, one processes the sequence from left to right, which is a forward long short-term memory network, and the other processes the sequence from right to left, which is a backward long short-term memory network; then their outputs are connected to obtain a comprehensive context representation;
[0059] Bi-LSTM: Bi-LSTM is a variant of RNN for processing sequence data. It consists of two independent LSTM networks, one that processes the sequence from left to right (forward LSTM) and the other from right to left (backward LSTM). Each LSTM unit has a gating mechanism inside that controls the flow and preservation of information. The forward LSTM learns dependencies from the past to the future, while the backward LSTM learns dependencies from the future to the past. Their outputs are concatenated together to obtain a comprehensive contextual representation. By concatenating the outputs of the forward LSTM and the backward LSTM together, the contextual information in the target conversation can be fused to better understand the entire conversation. This means that for each word, the model takes into account the words before and after it to obtain more comprehensive contextual information.
[0060] By using Bi-LSTM, the model is able to consider the global context in the target conversation, rather than just the local information of a single word. This helps capture the semantic relationships and dependencies in the conversation more accurately. The ability of Bi-LSTM makes the model more powerful and better able to understand the semantics of the target conversation. It helps to correctly interpret the meaning of words, especially in complex sentence structures and long conversations. The output of Bi-LSTM can be used as feature representations of the conversation, and these features can be used for subsequent tasks such as classification, generating responses, or entity recognition. Context-rich feature representations can improve the performance of conversation systems. By considering contextual information, Bi-LSTM helps maintain the coherence of the conversation. This is especially important when dealing with long conversations or conversations across sentences, as it helps to correctly understand the user's intent.
[0061] Step 1.6: Define the loss function To measure the comprehensive contextual representation and the true label The difference between; using the back-propagation algorithm and the gradient descent optimizer, the loss function is minimized by adjusting the parameters of the bidirectional long short-term memory network .
[0062] Specifically, each word in the target dialogue is represented as a one-hot encoded vector. There is a corresponding true label . One-hot encoding is a method for representing words or categories, where each word is represented as a vector with only one element being 1 and the rest being 0. This representation allows each word to have a unique identifier. Convert natural language text into a form that can be processed by a computer and provide input data for subsequent steps. Each word is mapped to a one-hot encoded vector to construct sequence data. Use an embedding layer to map the one-hot encoded vector of each word to a low-dimensional real number vector representation, namely a word embedding vector. Word embedding is a technique for representing words that maps each word to a continuous low-dimensional vector space to capture the semantic relationship between words. Parameters of the embedding layer Used to perform this mapping. Using word embedding vectors instead of one-hot encoding vectors can improve the performance of the model because word embeddings contain more semantic information and can learn the relationship between words during training. Use a long short-term memory network (LSTM) to capture long-term dependencies in the target dialogue. LSTM has a weight matrix and the deviation vector . LSTM is a variant of recurrent neural network (RNN) that is specifically designed to process sequence data and has a memory mechanism that can effectively capture long-term dependencies. It controls the flow and preservation of information through gating units. Using LSTM can better understand the sequence information in the target dialogue, including the structure of syntax and semantics. This helps to extract the context information of the dialogue. Using the output of LSTM to extract grammatical and semantic features about the target dialogue. The output of LSTM contains encoded information about the target dialogue, which can be used to capture the grammatical structure and semantic content of the target dialogue. The output of LSTM is converted into a feature representation of the dialogue for use in subsequent steps, such as classification or generating responses. A bidirectional long short-term memory network (Bi-LSTM) is introduced to process the contextual information of the target dialogue. Bi-LSTM consists of two independent LSTM networks, one that processes sequences from left to right (forward LSTM) and the other from right to left (backward LSTM), and then connects their outputs to obtain a comprehensive contextual representation. The use of Bi-LSTM can better consider the contextual information in the target dialogue, including the previous and next vocabulary and dependencies, to improve the semantic understanding and feature extraction of the dialogue. The loss function is defined To measure the comprehensive contextual representation and the true label The difference between , and use the back-propagation algorithm and gradient descent optimizer to adjust the parameters of the bidirectional long short-term memory network to minimize the loss function The loss function is a measure of model performance, which usually uses methods such as cross entropy to measure the difference between the predicted results and the true labels. The gradient descent optimizer is used to adjust the model parameters to minimize the loss function.
[0063] Example 3: Step 1.1 specifically includes: constructing a vocabulary table containing all possible words in the data set; assuming that the vocabulary table includes different words, using express; Representation vocabulary The words; map each word to a unique integer index; convert each sentence in the target dialogue into a sequence of word indices; let the target dialogue be ,in Indicates sentences; each The words in are represented by their indices in the vocabulary, i.e. into a sequence data; convert the sequence data into a one-hot encoded vector; for each integer index , a length of The vector is created as a zero vector, and then the The corresponding true label It is represented by the modulus of the two-hot encoded vector.
[0064] Specifically, building a vocabulary helps capture all possible words in the dataset, ensuring that no important words are missed. This vocabulary will be used to map text data to integer indices. Mapping words in a sentence to integer indices helps quantize text data into a computer-processable format. This representation can also preserve the relationships between words, such as syntax and semantics. One-hot encoded vectors represent integer indices in a computer-understandable form, which are binary and can be directly input into a neural network. This encoding method also avoids the problem of interpreting integer indices as continuous values. For supervised learning tasks, the one-hot encoded vectors of the true labels are used to measure the performance of the model in order to calculate the loss and perform model training.
[0065] Example 4: Assume that the parameter of the embedding layer is a word embedding matrix , whose dimensions are ,in represents the number of words in the vocabulary, Represents the dimension of each word embedding vector; each row ,in , which means the first word embedding vectors of words; for sequence data , where each element is the first The operation of the embedding layer is to transform each Mapped to the corresponding word embedding vector ; This process is expressed using the following formula:
[0066] ;
[0067] in, Indicates the first The word embedding vector of the vocabulary is a matrix No. Line; connect the embedded word embedding vectors into a sequence, that is ,in Represents the length of the sequence data; this sequence becomes the output of the embedding layer, with express.
[0068] Specifically, the word embedding matrix is a The matrix of represents the number of words in the vocabulary, Represents the dimension of each word embedding vector. Each row Indicates the first Word embedding vectors for words. Sequence data Each element in is the first The embedding layer is a one-hot encoding vector of words, where only one element is 1 and the rest are 0, which is used to indicate the presence or absence of each word. Mapped to the corresponding word embedding vector This mapping uses the word embedding matrix The rows in Indicates the first The word embedding vectors of the vocabulary are connected into a sequence, that is, ,in Represents the length of the sequence data. This sequence becomes the output of the embedding layer, using express.
[0069] The role of the embedding layer is to convert the one-hot encoded vocabulary representation into a dense word embedding vector representation so that the deep learning model can better understand and process text data. The embedding layer operation is to convert the one-hot encoded vector into a dense word embedding vector representation so that the deep learning model can better understand and process text data. Multiplying them together, we can get the word embedding vector corresponding to each word. These word embedding vectors capture the semantic relationship between words because they are trained on large-scale text data. Word embedding vectors are dense real number vectors that more effectively represent the semantic information of words than sparse one-hot encoded vectors. This dense representation helps improve the performance of the model. The output of the embedding layer is a sequence of the one-hot encoded vectors of each word converted into word embedding vectors. This sequence can be input into subsequent deep learning models for natural language processing tasks such as sentiment analysis, text generation, etc.
[0070] Example 5: The long short-term memory network in step 1.3 is expressed using the following formula:
[0071] ;
[0072] in, is the output of the input gate, which controls the degree to which new information flows into the cell state; it is a vector with values between 0 and 1, and is converted by the Sigmoid function Perform calculations; is the weight matrix of the input gate, used to calculate the Impact on the input gate; is the recursive weight matrix of the input gate, used to calculate the hidden state from the previous moment Impact on the input gate; is the bias vector of the input gate, used for offset calculation; is the output of the forget gate, which controls which information in the cell state should be forgotten; it is also a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the forget gate, which is used to calculate the to the influence of the Forget Gate; is the recursive weight matrix of the forget gate, which is used to calculate the hidden state from the previous moment to the influence of the Forget Gate; is the bias vector of the forget gate, used for offset calculation; is the output of the output gate, which controls the outflow of information in the cell state; similarly, it is a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the output gate, used to calculate the Impact on the output gate; is the recursive weight matrix of the output gate, which is used to calculate the hidden state from the previous moment Impact on the output gate; is the bias vector of the output gate, used for offset calculation; is the candidate cell state value, which is a candidate new cell state and is calculated by the tanh function; is the weight matrix of the candidate cell state values, used to calculate the The impact on candidate cell state values; is the recursive weight matrix of the candidate cell state value, which is used to calculate the hidden state from the previous moment The impact on candidate cell state values; is the deviation vector of the candidate cell state values, used for offset calculation; It is the output of the cell state, which represents the cell state of the LSTM network at the current moment, and is updated through the input gate, forget gate, and cell state candidate value; this cell state transmits information between different time steps; It is the output of the hidden state, which represents the hidden state of the LSTM network at the current moment, which is calculated based on the cell state and the output gate; this hidden state will be passed to the next time step.
[0073] Specifically, the patent of this invention requires that the system can understand the user's natural language input, which includes identifying the user's intention, extracting key information, and processing context. In step 1.3, LSTM is used to convert the text data in the target dialogue into meaningful representations, including cell states and hidden states. These states contain the semantics and contextual information of the dialogue, which helps to understand the user's needs. The dialogue usually contains semantic relationships and contextual information between multiple sentences. The gating mechanism of LSTM allows it to dynamically update the cell state and hidden state according to the input and context at different time steps. This helps to ensure that the task-based AI dialogue system can understand and maintain the coherence of the context in order to correctly respond to the user's request. Some dialogues may involve long-term dependencies across multiple sentences. One of the design purposes of LSTM is to solve the gradient disappearance problem, allowing the network to better capture and process long-term dependencies. This is very important for understanding user intent and generating accurate responses. In step 1.4, the output of LSTM is used to extract grammatical and semantic features about the target dialogue. These features are used to generate flowcharts and codes in subsequent steps. The ability of LSTM is critical here because it can effectively capture grammatical and semantic information in text data. The LSTM network used in step 1.3 helps maintain the contextual information of the conversation. This is crucial for task-based AI dialogue systems because it ensures that the system can correctly process and respond to user queries in multiple rounds of dialogue without losing key information.
[0074] Example 6: In step 1.4, select the hidden state of the long short-term memory network at each time step As a feature representation, ; These feature representations will be used as candidate features; average pooling is performed on the candidate features to obtain feature representations of fixed dimensions ; The average pooling operation is expressed as:
[0075] ;
[0076] here, is the feature representation after average pooling; the feature representation after average pooling Input to the fully connected layer for further feature extraction and abstraction; the output of the fully connected layer is represented as , which contains the high-level features learned by the model; the output of the fully connected layer is expressed by the following formula:
[0077] ;
[0078] in, is the weight matrix of the fully connected layer, is the bias vector of the fully connected layer, Represents the activation function.
[0079] Specifically, at each time step , the LSTM network produces a hidden state These hidden states contain information from the input sequence and represent the text representation at different time steps. The average pooling operation calculates the average of the hidden states of all time steps to obtain a fixed-dimensional feature representation. This operation helps to merge the information of different time steps into a global representation, maintaining the important features of the sequence. The fully connected layer receives the feature representation after average pooling. As input, and using the weight matrix and the deviation vector Perform a linear transformation and then pass the activation function Perform nonlinear mapping to obtain the final high-level feature representation LSTM hidden state Contains information about the input sequence. By selecting these hidden states as feature representations, the original text data can be converted into a series of feature vectors, each of which represents a representation of a time step. The average pooling operation helps merge the feature representations of different time steps into a global feature of fixed dimension. This helps reduce the dimension and computational complexity while retaining the key information of the sequence. The fully connected layer receives the feature representation after average pooling and maps it to a higher-dimensional feature space through linear transformation and nonlinear activation function. This step helps to learn more advanced feature representations, enabling the model to better understand the input data and perform the next task, such as classification or generation. In task-based AI dialogue systems, these feature extraction and abstraction operations may be used to process dialogue history or user input so that the model can better understand the dialogue content and generate relevant responses. These operations can be used as part of feature engineering to help improve model performance and efficiency. The association with patents is usually based on the specific application of these feature extraction and abstraction operations in task-based AI dialogue systems and how they support the system's natural language understanding and generation capabilities. Through these operations, the model can extract important information from the dialogue history to better serve the needs of users.
[0080] Embodiment 7: The formula of the forward long short-term memory network is:
[0081] ;
[0082] in, is the output of the input gate, which controls the degree to which new information flows into the cell state of the forward long short-term memory network; it is a vector with values between 0 and 1, which is converted by the Sigmoid function Perform calculations; is the output of the forget gate, which controls which information in the cell state of the forward long short-term memory network should be forgotten; is the output of the output gate, which determines the degree of information outflow in the cell state of the forward long short-term memory network; It is a candidate cell state value, which is a candidate new cell state, calculated by the tanh function to ensure that the output is between -1 and 1; is the output of the cell state, which represents the cell state of the forward long short-term memory network at the current time step, and is updated by the input gate, the forget gate, and the cell state candidate value; this cell state transmits information between different time steps and is calculated by element-by-element multiplication and addition; is the output of the hidden state, which represents the hidden state of the forward long short-term memory network at the current time step; the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the forward long short-term memory network; is the hidden state at the previous moment.
[0083] Specifically, one of the purposes of task-based AI dialogue systems is to achieve natural language interaction with users. In this process, forward LSTM is used to capture the temporal dependencies in the dialogue history. It controls the update of cell states through input gates, forget gates, and output gates to ensure that the system can remember and utilize the previous dialogue content to better understand the user's requests and responses. The cell state of the forward LSTM passes information between different time steps. This allows the dialogue system to pass important information from one time step to the next time step, thereby building context and enabling the system to better understand the continuity of the dialogue. This is very important for performing task-based dialogues because user requests often involve multiple steps or turns. In addition to passing information, the forward LSTM can also extract features with its hidden state. In task-based AI dialogue systems, these features can be used to extract information about user intent, entity recognition, sentiment analysis, etc. from the dialogue history. These feature extractions help the system better understand the content of the dialogue. The output of the forward LSTM is usually provided as context information to other components, such as natural language understanding or answer generation modules. This context information helps improve the quality of decision-making. For example, when a user asks a series of questions, the forward LSTM can help the system track the order of questions and ensure context consistency. The forward LSTM can be used for various tasks in different task-based AI dialogue systems, including question-answering, recommendation, scheduling, etc. Its flexibility enables the system to adapt to different task requirements while maintaining a consistent model structure. The role of the forward long short-term memory network in the task-based AI dialogue system is to build context, capture time dependencies, extract features, support decision-making, and adapt to multiple tasks, thereby achieving a more natural and targeted dialogue between the system and the user. These roles contribute to the purpose of the invention, which is to improve the natural language understanding and generation capabilities of the task-based AI dialogue system to better serve the needs of users.
[0084] Embodiment 8: The formula of the backward long short-term memory network is:
[0085] ;
[0086] in, is the output of the input gate, which controls the degree to which new information flows into the cell state of the backward long short-term memory network; it is a vector with values between 0 and 1, which is converted by the Sigmoid function Perform calculations; is the output of the forget gate, which controls which information in the backward long short-term memory network cell state should be forgotten; is the output of the output gate, which determines the degree of information outflow in the cell state of the backward long short-term memory network; It is a candidate cell state value, which is a candidate new cell state, calculated by the tanh function to ensure that the output is between -1 and 1; is the output of the cell state, which represents the cell state of the backward long short-term memory network at the current time step, and is updated by the input gate, forget gate, and cell state candidate value; this cell state transmits information between different time steps and is calculated by element-by-element multiplication and addition; is the output of the hidden state, which represents the hidden state of the backward long short-term memory network at the current time step; the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the backward long short-term memory network; is the hidden state at the next moment.
[0087] Specifically, the main purpose of a task-based AI dialogue system is to understand the user's natural language input and generate relevant responses in context. The backward LSTM can help the system better understand the user's intent and context by capturing the temporal dependencies in the dialogue history. It can maintain information from the dialogue history to ensure that the system considers previous dialogues when generating responses. The cell state in the backward LSTM is used to pass information. This is very important for handling multi-round dialogues, because the user's request and the system's response may span multiple time steps. The cell state allows the system to pass important information from one time step to the next time step, ensuring the continuity and consistency of the dialogue. The hidden state helps the system better understand the user's input by capturing important features in the dialogue history. These features can be used for further natural language understanding, intent recognition, entity recognition and other tasks, thereby helping the system better meet the needs of users. The hidden state of the backward LSTM is often used to support the decision-making of the system. It provides contextual information in the dialogue history, which helps the system generate appropriate responses based on the user's request. This is critical for decision-making tasks in task-based dialogue systems, such as scheduling, recommendation systems, etc. The flexibility of the backward LSTM allows it to be used for different tasks. It can not only be applied to dialogue understanding, but also adapt to different natural language processing tasks, such as question answering, text classification, generative tasks, etc. This increases the versatility and adaptability of task-based AI dialogue systems. The role of the backward long short-term memory network in the task-based AI dialogue system is to enhance the system's natural language understanding and generation capabilities, help the system better understand user needs, maintain dialogue context, extract features, support decision-making, and have the flexibility to adapt to different tasks. This helps achieve the goal of task-based AI dialogue systems and provide users with a more intelligent and personalized dialogue experience.
[0088] Example 9: The loss function is expressed using the following formula:
[0089] .
[0090] Specifically, This part mainly calculates the ratio between the cell states of the forward and backward long short-term memory networks. It compares the information processing effects of the two networks by correlating the cell states of the forward and backward networks. This ratio helps to evaluate the relative performance of the forward and backward networks, and is further used for system training and optimization. The connection with the patent is that this ratio can be used to evaluate the effects of different models or configurations in task-based AI dialogue systems and help select the best model configuration.
[0091] This part is the cross entropy loss, which is used to measure the difference between the answers generated by the model and the true labels. It penalizes the model's incorrect predictions by calculating the negative log-likelihood between the probability distribution generated by the model and the true label. The connection with the patent is that the use of this loss function is to ensure that the model can generate correct answers relevant to the task, thereby improving the accuracy and performance of the system.
[0092] This part is the difference between the hidden states of the forward and backward long short-term memory networks. It measures the similarity or difference between the hidden states of the forward and backward networks by comparing them. The connection with the patent is that this difference can be used to adjust the weights and parameters of the model to better capture the information in the dialogue history. This helps to optimize the performance of the system. The role of this loss function in task-based AI dialogue systems is multifaceted. It is not only used to evaluate the performance of the forward and backward long short-term memory networks, but also to measure the accuracy of the answers generated by the model and guide the optimization of the model through the difference in hidden states. Its connection with the patent is that it can be used for the training and improvement of task-based AI dialogue systems to provide better dialogue experience and performance.
[0093] Embodiment 10: The method for converting the flowchart into process code in step 2 includes: obtaining a set of real labels of the target dialogue through the recognition result of the target dialogue obtained in step 1, obtaining the process node corresponding to each real label according to the pre-established mapping relationship between the real label and the process node, and connecting the process nodes in the same position order according to the position order of the real labels in the target dialogue, so as to obtain the flowchart of the target dialogue; according to the flowchart, converting to obtain the corresponding process code.
[0094] Specifically, NLP is a technology that allows computers to understand and process natural language text. In step 1, the target dialogue is processed by NLP technology and converted into a machine-readable text representation. This includes processes such as word segmentation, syntax analysis, entity recognition, and semantic understanding. The true labels are the names or keywords of the operations, instructions, or tasks involved in the target dialogue. These labels are usually defined in advance to identify the user's intention. The second step in step 2 is to extract these true labels from the text processed by NLP for subsequent processing. Establishing a mapping relationship between true labels and process nodes is a key step. This mapping relationship is a predefined set of rules that tells the system which node in the flowchart each true label should correspond to. This can be achieved through manually formulated rules, machine learning models, or other technologies. The accuracy and completeness of the mapping relationship are crucial to generating correct process code. The generated flowchart is a directed graph in which nodes represent different operations or steps, and edges represent the relationship and order between them. This flowchart is built based on the true labels and their order to simulate the user's task flow. The structure and content of the flowchart vary depending on the specific application, and it can include control structures such as sequential execution, conditional branches, and loops. Finally, the generated flowchart needs to be converted into executable process code. These codes can be a sequence of instructions in a specific programming language, or a scripting language for a specific domain. The way to generate the code depends on the structure of the flowchart and the execution environment. The generated code should be able to be interpreted and executed by the computer to complete the user's task. The principle of step 2 is based on the concept of converting natural language into computer executable code, where important steps include identifying real labels, establishing mapping relationships, building flowcharts, and generating process codes. The key to this process is to ensure that the user's intentions are accurately captured and converted into executable task processes to realize the automated execution function of the task-based AI dialogue system.
[0095] The present invention has been introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for implementing a task-based AI dialogue system through a flowchart, characterized in that: The method comprises: Step 1: Obtain the target dialogue, perform natural language recognition on the target dialogue, obtain the recognition result, and generate a flowchart corresponding to the target dialogue based on the recognition result; Step 2: Convert the flowchart into process code; Step 3: Use the process code to drive the task-based AI dialogue system; when the task-based AI dialogue system receives new input, the task-based AI dialogue system generates a response under the control of the process code; Step 1 specifically includes: Step 1.1: Convert the target dialogue into sequence data, with each word represented by a one-hot encoding vector; let Indicates the first vocabulary, Indicates the corresponding true label; Step 1.2: In order to convert the target dialogue into a vector representation that can be processed by the LSTM network, an embedding layer is used to map the one-hot encoded vector of each word to a low-dimensional real vector representation; the parameters of the embedding layer are , it will enter Mapped to the corresponding word embedding vector ; Step 1.3: Use the long short-term memory network to capture the long-term dependencies in the target dialogue; the parameters of the long short-term memory network include the weight matrix , and the deviation vector ; The output of the long short-term memory network is the hidden state ; Step 1.4: Use the output of LSTM to extract grammatical and semantic features about the target dialogue; Step 1.5: In order to consider the context information of the target dialogue, the grammatical and semantic features of the target dialogue are processed using a bidirectional long short-term memory network; the bidirectional long short-term memory network includes two independent long short-term memory networks, one processes the sequence from left to right, which is a forward long short-term memory network, and the other processes the sequence from right to left, which is a backward long short-term memory network; then their outputs are connected to obtain a comprehensive context representation; Step 1.6: Define the loss function To measure the comprehensive contextual representation and the true label The difference between; using the back-propagation algorithm and the gradient descent optimizer, the loss function is minimized by adjusting the parameters of the bidirectional long short-term memory network ; The loss function is expressed using the following formula: ; in, is the output of the input gate; It is the output of the forget gate of the forward long short-term memory network; is the candidate value of the cell state; is the output of the cell state; is the output of the hidden state; is the output of the input gate; is the output of the forget gate; is the candidate value of the cell state; is the output of the cell state; is the output of the hidden state.
2. The method for implementing a task-based AI dialogue system through a flowchart according to claim 1, characterized in that: Step 1.1 specifically includes: constructing a vocabulary that contains all possible words in the data set; assuming that the vocabulary includes different words, using express; Representation vocabulary The words; map each word to a unique integer index; convert each sentence in the target dialogue into a sequence of word indices; let the target dialogue be ,in Indicates sentences; each The words in are represented by their indices in the vocabulary, i.e. into a sequence data; convert the sequence data into a one-hot encoded vector; for each integer index , a length of The vector is created as a zero vector, and then the The corresponding true label It is represented by the modulus of the two-hot encoded vector.
3. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 2, characterized in that The parameter of the embedding layer is a word embedding matrix , whose dimensions are ,in represents the number of words in the vocabulary, Represents the dimension of each word embedding vector; each row ,in , which means the first word embedding vectors of words; for sequence data , where each element is the first The operation of the embedding layer is to transform each Mapped to the corresponding word embedding vector ; This process is expressed using the following formula: ; in, Indicates the first The word embedding vector of the vocabulary is a matrix No. Line; connect the embedded word embedding vectors into a sequence, that is ,in Indicates the length of the sequence data; This sequence becomes the output of the embedding layer, and is expressed as express.
4. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 3, characterized in that: The long short-term memory network in step 1.3 is expressed using the following formula: ; in, is the output of the input gate, which controls the degree to which new information flows into the cell state; it is a vector with values between 0 and 1, and is converted to the state by the Sigmoid function Perform calculations; is the weight matrix of the input gate, used to calculate the Impact on the input gate; is the recursive weight matrix of the input gate, used to calculate the hidden state from the previous moment Impact on the input gate; is the bias vector of the input gate, used for offset calculation; is the output of the forget gate, which controls which information in the cell state should be forgotten; it is also a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the forget gate, which is used to calculate the to the influence of the Forget Gate; is the recursive weight matrix of the forget gate, which is used to calculate the hidden state from the previous moment to the influence of the Forget Gate; is the bias vector of the forget gate, used for offset calculation; is the output of the output gate, which controls the outflow of information in the cell state; similarly, it is a vector with values between 0 and 1, which is passed through the Sigmoid function Perform calculations; is the weight matrix of the output gate, used to calculate the Impact on the output gate; is the recursive weight matrix of the output gate, which is used to calculate the hidden state from the previous moment Impact on the output gate; is the bias vector of the output gate, used for offset calculation; is the candidate cell state value, which is a candidate new cell state and is calculated by the tanh function; is the weight matrix of the candidate cell state values, used to calculate the The impact on candidate cell state values; is the recursive weight matrix of the candidate cell state value, which is used to calculate the hidden state from the previous moment The impact on candidate cell state values; is the deviation vector of the candidate cell state values, used for offset calculation; It is the output of the cell state, which represents the cell state of the LSTM network at the current moment, and is updated through the input gate, forget gate, and cell state candidate value; this cell state transmits information between different time steps; It is the output of the hidden state, which represents the hidden state of the LSTM network at the current moment, which is calculated based on the cell state and the output gate; this hidden state will be passed to the next time step.
5. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 4, characterized in that: In step 1.4, select the hidden state of the LSTM network at each time step As a feature representation, ; These feature representations will be used as candidate features; the candidate features are average pooled to obtain feature representations of fixed dimensions. ; The average pooling operation is expressed as: ; here, is the feature representation after average pooling; the feature representation after average pooling Input to the fully connected layer for further feature extraction and abstraction; the output of the fully connected layer is represented as , which contains the high-level features learned by the model; the output of the fully connected layer is expressed by the following formula: ; in, is the weight matrix of the fully connected layer, is the bias vector of the fully connected layer, Represents the activation function.
6. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 5, characterized in that: The formula of the forward long short-term memory network is: ; Among them, the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the forward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the forward long short-term memory network; is the hidden state at the previous moment.
7. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 6, characterized in that: The formula of the backward long short-term memory network is: ; Among them, the hidden state Is the cell state Through the output gate and the tanh function; , , and They are the recursive weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the weight matrices of the input gate, forget gate, output gate, and cell state candidate values of the backward long short-term memory network; , , and They are the input gate, forget gate, output gate and bias vector of the candidate cell state value of the backward long short-term memory network; is the hidden state at the next moment.
8. The method for implementing a task-based AI dialogue system through a flowchart as claimed in claim 7, characterized in that: The method for converting the flowchart into the process code in step 2 includes: obtaining a set of real labels of the target dialogue through the recognition result of the target dialogue obtained in step 1, obtaining the process node corresponding to each real label according to the pre-established mapping relationship between the real label and the process node, and connecting the process nodes in the same position order according to the position order of the real label in the target dialogue, so as to obtain the flowchart of the target dialogue; according to the flowchart, converting to obtain the corresponding process code.
Citation Information
Patent Citations
Task type dialogue interaction processing method and device based on artificial intelligence
CN110704594A
Network security entity overlapping relation identification method, device and equipment
CN113342974A