Dialogue state tracking method, device, human-machine dialogue system and operating machine
By combining user input text, dialogue robot preset outline and historical dialogue information, a deep learning model is used to generate dialogue states, which solves the problem of low accuracy of dialogue states in the existing technology and improves user experience.
Patent Information
- Application Number
- CN202111404933.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-11-24
AI Technical Summary
Existing multi-turn dialogue state tracking methods only rely on the semantic information currently input by the user, resulting in low accuracy of dialogue states and affecting user experience.
By obtaining the user input text of the current round of dialogue and the dialogue robot's preset dialogue outline information, combined with the historical dialogue text and the previous round of dialogue status information, long and short memory artificial neural networks and deep learning models are used to generate dialogue status information, making full use of multiple source information.
It improves the accuracy of dialogue status tracking and improves the user experience during subsequent human-computer dialogue.
Smart Images

Figure CN114297352B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a dialogue state tracking method, device, human-machine dialogue system and operating machinery. Background Art
[0002] In recent years, human-computer dialogue systems have been used in more and more scenarios. As an important function of human-computer dialogue systems, dialogue state tracking aims to accurately identify the dialogue state. Only by accurately identifying the dialogue state can a correct response to user instructions be made.
[0003] Existing dialogue state tracking methods applied to multi-round dialogues generally use the semantic information input by the user in the current round to first encode the semantic information, predict the user's intention, and judge the slot type, and finally generate the slot value and return the dialogue state that meets the needs of the human-computer dialogue system.
[0004] However, the above-mentioned dialogue state tracking method only utilizes the semantic information currently input by the user, which will result in low accuracy of the tracked dialogue state, and may further lead to a poor user experience in the subsequent human-computer dialogue process. Summary of the invention
[0005] The present invention provides a dialogue state tracking method, device, human-machine dialogue system and operating machine, which are used to solve the defects in the prior art.
[0006] The present invention provides a method for tracking a dialog state, comprising:
[0007] Obtaining user input text of the current round of dialogue, and determining a first encoding feature based on the user input text;
[0008] Determining preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information;
[0009] Determine a fusion feature based on the first encoding feature and the second encoding feature;
[0010] Based on the fused features, the dialogue state information of the current dialogue round is generated.
[0011] A method for tracking a dialog state according to the present invention further includes:
[0012] Acquiring dialogue state information of a previous dialogue round before the current dialogue round, and determining a third coding feature based on the dialogue state information of the previous dialogue round;
[0013] Accordingly, determining the fusion feature based on the first coding feature and the second coding feature specifically includes:
[0014] The fusion feature is determined based on the first coding feature, the second coding feature, and the third coding feature.
[0015] According to a method for tracking a dialog state provided by the present invention, determining a third coding feature based on the dialog state information of the previous round of dialog specifically includes:
[0016] Based on the dialogue state graph corresponding to the dialogue robot, the dialogue state information of the previous round of dialogue is encoded to obtain the third encoding feature.
[0017] According to a method for tracking a dialog state provided by the present invention, the dialog state graph is constructed based on the following method:
[0018] Determine the nodes of the dialogue state graph according to user intentions, slot value types, and slot values corresponding to the multiple dialogue robots;
[0019] Define user intention connection edges, slot value type connection edges and slot value connection edges, and construct the dialogue state graph based on the nodes, the user intention connection edges, the slot value type connection edges and the slot value connection edges.
[0020] According to a method for tracking a dialog state provided by the present invention, the preset dialog outline information includes preset user intention information, preset slot type information, and preset slot value information;
[0021] The preset user intention information is obtained by splicing the name text of the dialogue robot and the intention description text corresponding to the dialogue robot;
[0022] The preset slot type information is obtained by splicing the name text and the slot type description text corresponding to the conversational robot;
[0023] The preset slot value information is obtained by splicing the slot type description text and the slot value corresponding to the dialogue robot.
[0024] According to a method for tracking a dialog state provided by the present invention, determining a second coding feature based on the preset dialog outline information specifically includes:
[0025] The preset user intention information, the preset slot type information, and the preset slot value information are respectively encoded to obtain the second encoding feature.
[0026] According to a method for tracking a dialog state provided by the present invention, determining a first coding feature based on the user input text specifically includes:
[0027] Acquire historical conversation texts of historical rounds of conversations, and concatenate the user input text with the historical conversation text to obtain a concatenated text;
[0028] The concatenated text is encoded to obtain the first encoding feature.
[0029] According to a method for tracking a dialog state provided by the present invention, generating the dialog state information of the current dialog turn based on the fusion feature specifically includes:
[0030] Inputting the fused features into a long short-term memory artificial neural network model based on an attention mechanism to obtain a context vector output by the long short-term memory artificial neural network model;
[0031] Inputting the context vector into a deep learning model to obtain the dialogue state information of the current dialogue round output by the deep learning model;
[0032] Among them, the long short-term memory artificial neural network model is trained based on feature samples carrying context vector labels; and the deep learning model is trained based on context vector samples carrying dialogue state labels.
[0033] The present invention also provides a dialogue state tracking device, comprising:
[0034] A first encoding module, used to obtain a user input text of a current round of dialogue, and determine a first encoding feature based on the user input text;
[0035] The second encoding module is further used to determine the preset dialogue outline information corresponding to the dialogue robot, and determine the second encoding feature based on the preset dialogue outline information;
[0036] A fusion module, used for obtaining a fusion feature based on the first coding feature and the second coding feature;
[0037] A generation module is used to generate the dialogue state information of the current round of dialogue based on the fusion feature.
[0038] The present invention also provides a human-computer dialogue system, including the above-mentioned dialogue state tracking device.
[0039] The present invention also provides an operating machine, comprising the above-mentioned human-machine dialogue system.
[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for tracking the conversation status are implemented.
[0041] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for tracking the dialog state are implemented.
[0042] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned methods for tracking the dialog state are implemented.
[0043] The dialogue state tracking method, device, human-machine dialogue system and operating machine provided by the present invention first obtain the user input text of the current round of dialogue, and determine the first coding feature based on the user input text; then determine the preset dialogue outline information corresponding to the dialogue robot, and determine the second coding feature based on the preset dialogue outline information; obtain the fusion feature based on the first coding feature and the second coding feature; finally, generate the dialogue state information of the current round of dialogue according to the fusion feature. Not only the user input text of the current round of dialogue is considered, but also the preset dialogue outline information corresponding to the dialogue robot is considered, and the dialogue state information of the current round of dialogue is generated by combining the feature fusion method, which can make full use of multi-source information, not only making full use of the information, but also making the tracked dialogue state information of the current round of dialogue more accurate, thereby ensuring the good user experience in the subsequent human-machine dialogue process. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings in the following description without paying any creative work.
[0045] Figure 1 It is a flowchart of the method for tracking the conversation state provided by the present invention;
[0046] Figure 2 It is a structural schematic diagram of a conversation state tracking device provided by the present invention;
[0047] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Since the existing dialogue state tracking method applied to multi-round dialogue only uses the semantic information currently input by the user, the accuracy of the tracked dialogue state will be low, which may lead to a poor user experience in the subsequent human-computer dialogue process. To this end, an embodiment of the present invention provides a dialogue state tracking method to solve the problems existing in the prior art.
[0050] Figure 1 A flow chart of a method for tracking a dialog state provided in an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:
[0051] S1, obtaining a user input text of a current round of dialogue, and determining a first coding feature based on the user input text;
[0052] S2, determining preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information;
[0053] S3, obtaining a fusion feature based on the first coding feature and the second coding feature;
[0054] S4: Generate the dialogue state information of the current dialogue round based on the fusion features.
[0055] Specifically, the dialogue state tracking method provided in the embodiment of the present invention is applied to the dialogue state tracking in a multi-round dialogue scenario. The dialogue state refers to the representation of one or more stages of the dialogue in which the user provides input to the dialogue robot. The input provided by the user can be in the form of voice or text, which is not specifically limited in the embodiment of the present invention. When the input provided by the user is in the form of voice, the dialogue robot converts it into text for subsequent processing.
[0056] The executor of the method is a conversation status tracking device, which can be configured in a server. The server can be a local server or a cloud server. The local server can specifically be a computer, a tablet computer, a smart phone, etc., which is not specifically limited in the embodiments of the present invention.
[0057] Execute step S1 to obtain the user input text of the current round of dialogue. The current round of dialogue can be any round of dialogue in multiple rounds of dialogue, for example, it can be the initial round of dialogue, it can also be the last round of dialogue, or it can be a round of dialogue between the initial round of dialogue and the last round of dialogue, which is not specifically limited here.
[0058] The user input text may be a text representation of the input provided by the user in the current round of dialogue. As mentioned above, the input provided by the user may be in either voice or text form. When the input provided by the user is in voice form, it may be converted into text to obtain the user input text. When the input provided by the user is in text form, it may be directly used as the user input text.
[0059] After obtaining the user input text, a first coding feature can be determined according to the user input text. The first coding feature refers to a text coding feature, which can be obtained by directly encoding the user input text or by encoding the user input text after performing corresponding processing, which is not specifically limited here.
[0060] Execute step S2 to determine the preset dialogue schema information corresponding to the dialogue robot. The dialogue robot refers to the dialogue robot involved in multiple rounds of dialogue. The dialogue robot has preset dialogue schema information. The preset dialogue schema information refers to the key information that the dialogue robot needs to obtain to realize the dialogue function, for example, it may include preset user intention information, preset slot type information, and preset slot value information. The preset user intention information refers to the information related to the user intention corresponding to the dialogue robot, the preset slot type information refers to the information related to the slot type corresponding to the dialogue robot, and the preset slot value information refers to the information related to the slot value corresponding to the dialogue robot. The preset dialogue schema information is only related to the dialogue robot and has nothing to do with the user input text. It belongs to the attribute information of the dialogue robot.
[0061] After determining the preset dialogue outline information corresponding to the dialogue robot, the second coding feature can be determined according to the preset dialogue outline information corresponding to the dialogue robot. The second coding feature refers to the preset dialogue outline coding feature, which can be obtained by directly encoding the preset dialogue outline information, or by encoding the preset dialogue outline information after corresponding processing, which is not specifically limited here.
[0062] It is understandable that the execution order of step S1 and step S2 can be set as needed. Step S1 can be executed first and then step S2, or step S2 can be executed first and then step S1, or steps S1 and S2 can be executed simultaneously, which is not specifically limited here.
[0063] Then, step S3 is performed to obtain a fusion feature based on the first coding feature and the second coding feature. In an embodiment of the present invention, the first coding feature and the second coding feature can be respectively input into a fusion model to obtain a fusion feature output by the fusion model. The fusion model can be used to fuse the first coding feature and the second coding feature, and encode them to obtain a fusion feature.
[0064] The fusion model may be a deep learning model, for example, including but not limited to a long short-term memory artificial neural network (LSTM) model, a convolutional neural network (CNN) model, and an attention model, etc. The fusion model may be obtained through supervised training or unsupervised training, which is not specifically limited in the embodiments of the present invention.
[0065] Finally, step S4 is executed to generate the dialogue state information of the current dialogue round according to the fused features. When generating the dialogue state information of the current dialogue round, the fused features can be decoded first, and then the dialogue state information of the current dialogue round is determined by combining the decoding result with the trained neural network model. The dialogue state information of the current dialogue round also includes information such as user intention, slot type, and slot value.
[0066] The method for tracking the dialogue state provided in the embodiment of the present invention first obtains the user input text of the current dialogue round, and determines the first coding feature based on the user input text; then determines the preset dialogue outline information corresponding to the dialogue robot, and determines the second coding feature based on the preset dialogue outline information; obtains the fusion feature based on the first coding feature and the second coding feature; and finally generates the dialogue state information of the current dialogue round according to the fusion feature. Not only the user input text of the current dialogue round is considered, but also the preset dialogue outline information corresponding to the dialogue robot is considered, and the dialogue state information of the current dialogue round is generated by combining the feature fusion method, which can make full use of multi-source information, not only making full use of the information, but also making the tracked dialogue state information of the current dialogue round more accurate, thereby ensuring the good user experience in the subsequent human-computer dialogue process.
[0067] Based on the above embodiment, the dialog state tracking method provided in the embodiment of the present invention further includes:
[0068] Acquiring dialogue state information of a previous dialogue round before the current dialogue round, and determining a third coding feature based on the dialogue state information of the previous dialogue round;
[0069] Accordingly, determining the fusion feature based on the first coding feature and the second coding feature specifically includes:
[0070] The fusion feature is determined based on the first coding feature, the second coding feature, and the third coding feature.
[0071] Specifically, in an embodiment of the present invention, the dialogue state information of the previous round of dialogue of the current round of dialogue can also be obtained. The previous round of dialogue refers to a round of dialogue conducted before the current round of dialogue. The dialogue state information of each round of dialogue can be characterized by user intent, slot type and slot value. User intent can represent the functions that the user needs to achieve through the dialogue robot, such as "ticket booking", "inquiry", etc., that is, the field involved in the dialogue. The slot type can represent the attribute type of the slot, such as "time", "place", "person", etc. The slot value can represent the specific information of the slot, such as "January 1, 2005", "Beijing", "Zhang San", etc.
[0072] After obtaining the dialogue state information of the previous round of dialogue, the third coding feature can be determined according to the dialogue state information of the previous round of dialogue. The third coding feature refers to the dialogue state coding feature, which can be obtained by directly encoding the dialogue state information of the previous round of dialogue, or by encoding the dialogue state information of the previous round of dialogue after corresponding processing, which is not specifically limited here.
[0073] It can be understood that the above-mentioned step of determining the third coding feature and the execution order of step S1 and step S2 can be set as needed. Step S1, step S2 and the step of determining the third coding feature can be executed in sequence, or the step of determining the third coding feature can be executed first, then step S2, and finally step S1. Step S1, step S2 and the step of determining the third coding feature can also be executed simultaneously, which is not specifically limited here.
[0074] Furthermore, when determining the fusion feature, the third coding feature can be combined, that is, the first coding feature, the second coding feature and the third coding feature can be respectively input into the fusion model to obtain the fusion feature output by the fusion model. The fusion model can be used to fuse the first coding feature, the second coding feature and the third coding feature, and encode them to obtain the fusion feature.
[0075] It can be understood that if the first coding feature is fused with the second coding feature, the fusion model has two inputs and one output, and if the first coding feature, the second coding feature and the third coding feature are fused, the fusion model has three inputs and one output.
[0076] In an embodiment of the present invention, in addition to considering the user input text of the current round of dialogue and the preset dialogue outline information corresponding to the dialogue robot, the dialogue state information of the previous round of dialogue before the current round of dialogue is also considered, which can further make full use of multi-source information, improve the accuracy of the dialogue state information of the current round of dialogue, and further improve the user experience in the subsequent human-computer dialogue process.
[0077] On the basis of the above-mentioned embodiment, in the dialog state tracking method provided in the embodiment of the present invention, the preset dialog outline information includes preset user intention information, preset slot type information and preset slot value information;
[0078] The preset user intention information is obtained by splicing the name text of the dialogue robot and the intention description text corresponding to the dialogue robot;
[0079] The preset slot type information is obtained by splicing the name text and the slot type description text corresponding to the conversational robot;
[0080] The preset slot value information is obtained by splicing the slot type description text and the slot value corresponding to the dialogue robot.
[0081] Specifically, in an embodiment of the present invention, the preset dialogue outline information corresponding to the dialogue robot may include preset user intention information, preset slot type information, and preset slot value information.
[0082] The preset user intention information can be obtained by concatenating the name text of the dialogue robot with the intention description text corresponding to the dialogue robot. The name text may refer to the text representation of the name of the dialogue robot, such as "ticket booking robot", "query robot", etc. The intention description text corresponding to the dialogue robot refers to the text representation of the description information of the user intention corresponding to the dialogue robot. The intention description text may correspond to the detailed explanation information of the user intention. For example, if the dialogue robot is a "ticket booking robot", then its corresponding user intention is "ticket booking", and its intention description text may be "obtain relevant tickets by cash or equivalent exchange, which can generally be divided into performance tickets, air tickets, train tickets, movie tickets, meal tickets, food tickets, subpoenas, visiting tickets, exhibition tickets, and bus tickets, etc."
[0083] The intent description text can be retrieved from a pre-built intent dictionary, which stores each intent and its corresponding detailed explanation information.
[0084] The splicing method of the name text of the dialogue robot and the intention description text corresponding to the dialogue robot can be set as needed, for example, it can be spliced in chronological order, which is not specifically limited in the embodiment of the present invention.
[0085] The preset slot type information can be obtained by concatenating the name text with the slot type description text corresponding to the dialogue robot. The slot type description text corresponding to the dialogue robot refers to the text representation of the description information of the slot type corresponding to the dialogue robot. The slot type description text can correspond to the detailed explanation information of the slot type. For example, if the slot type corresponding to the dialogue robot is "time", then the slot type description text can be "Time is the manifestation of the eternal movement of matter, the continuity of change, and the sequentiality."
[0086] The slot type description text may be obtained by querying a pre-built slot type dictionary, in which each slot type and its corresponding detailed explanation information are stored.
[0087] The splicing method of the name text and the slot type description text corresponding to the dialogue robot can be set as needed, for example, it can be spliced in sequence, which is not specifically limited in the embodiment of the present invention.
[0088] The preset slot value information can be obtained by concatenating the slot type description text with the slot value corresponding to the dialogue robot. The slot value corresponding to the dialogue robot refers to the relevant information on the slot of the slot type corresponding to the dialogue robot. For example, the slot value corresponding to the dialogue robot can be "January 1, 2005".
[0089] The splicing method of the slot type description text and the slot value corresponding to the dialogue robot can be set as needed, for example, it can be spliced in sequence, which is not specifically limited in the embodiment of the present invention.
[0090] In the embodiment of the present invention, when determining the preset user intent information, the preset slot type information and the preset slot value information, text splicing is introduced respectively, and the semantic information contained in the user intent, the slot type and the slot value itself is considered, so that the generalization ability of the dialogue state tracking is stronger and it can have higher scalability, and it can also be applicable whenever a new intent or slot type is created in a new field.
[0091] On the basis of the above embodiment, the method for tracking the dialog state provided in the embodiment of the present invention, wherein the determining the second coding feature based on the preset dialog outline information specifically includes:
[0092] The preset user intention information, the preset slot type information, and the preset slot value information are respectively encoded to obtain the second encoding feature.
[0093] Specifically, in an embodiment of the present invention, when determining the second coding feature, the preset user intention information, the preset slot type information and the preset slot value information can be encoded respectively to obtain a first coding result corresponding to the preset user intention information, a second coding result corresponding to the preset slot type information and a third coding result corresponding to the preset slot value information. The first coding result, the second coding result and the third coding result are all second coding features.
[0094] Here, a text encoder may be used to implement encoding, that is, the preset user intention information, the preset slot type information, and the preset slot value information may be respectively input into the text encoder to obtain a second encoding feature output by the text encoder.
[0095] The text encoder may include but is not limited to TFIDF, Word2vec, Bert and other Bert-like models that can semantically encode words and sentences. The text encoder can be obtained by supervised training of information samples to be encoded with encoding feature labels, or by unsupervised training of information samples to be encoded, and is not specifically limited here.
[0096] In the embodiment of the present invention, the preset user intention information, the preset slot type information and the preset slot value information are respectively encoded to obtain the second coding feature, which can ensure the diversity and richness of the second coding feature.
[0097] On the basis of the above embodiment, the method for tracking a dialog state provided in the embodiment of the present invention, wherein determining the first coding feature based on the user input text specifically includes:
[0098] Acquire historical conversation texts of historical rounds of conversations, and concatenate the user input text with the historical conversation text to obtain a concatenated text;
[0099] The concatenated text is encoded to obtain the first encoding feature.
[0100] Specifically, in an embodiment of the present invention, when determining the first coding feature according to the user input text, the historical dialogue text of the historical dialogue rounds can be obtained first. The historical dialogue rounds refer to all dialogue rounds before the current dialogue round, and the historical dialogue text refers to the dialogue text of all dialogue rounds before the current dialogue round, which may include the user input text and the feedback text of the dialogue robot.
[0101] Then, the user input text of the current round of dialogue is concatenated with the historical dialogue text to obtain a concatenated text, and then the concatenated text is encoded to obtain a first encoding feature. Here, the concatenated text can be input into a text encoder to obtain a first encoding feature output by the text encoder.
[0102] In the embodiment of the present invention, by splicing the user input text of the current round of dialogue with the historical dialogue text, the historical dialogue text can be fully utilized, thereby improving the reliability of the dialogue state tracking result.
[0103] On the basis of the above embodiment, the method for tracking the dialog state provided in the embodiment of the present invention, wherein the determining of the third coding feature based on the dialog state information of the previous round of dialog, specifically includes:
[0104] Based on the dialogue state graph corresponding to the dialogue robot, the dialogue state information of the previous round of dialogue is encoded to obtain the third encoding feature.
[0105] Specifically, in an embodiment of the present invention, when determining the third coding feature, the dialogue state information of the previous round of dialogue can be encoded according to the dialogue state map corresponding to the dialogue robot, thereby obtaining the third coding feature. The dialogue state map is a pre-constructed map for characterizing the relationship between user intentions, slot types, and slot values corresponding to each dialogue robot. In combination with the dialogue state map, the dialogue state information of the previous round of dialogue can be encoded using a graph neural network model, and the encoding methods used include but are not limited to GCN, GAT, GraphSAGE, etc.
[0106] In an embodiment of the present invention, when determining the third coding feature, a conversation state map is used to consider the association relationship between user intentions, slot types, and slot values corresponding to each conversation robot, thereby improving the accuracy of conversation state tracking.
[0107] On the basis of the above-mentioned embodiment, in the method for tracking the dialog state provided in the embodiment of the present invention, the dialog state graph is constructed based on the following method:
[0108] Determine the nodes of the dialogue state graph according to user intentions, slot value types, and slot values corresponding to the multiple dialogue robots;
[0109] Define user intention connection edges, slot value type connection edges and slot value connection edges, and construct the dialogue state graph based on the nodes, the user intention connection edges, the slot value type connection edges and the slot value connection edges.
[0110] Specifically, in an embodiment of the present invention, the dialogue state map used when determining the third coding feature can be constructed by the following method: first, according to the user intentions, slot value types, and slot values corresponding to multiple dialogue robots, the nodes of the dialogue state map are determined, that is, the user intentions, slot types, and slot values corresponding to the multiple dialogue robots are used as nodes. Then, three types of connection edges of the dialogue state map are defined: user intention connection edge, slot value type connection edge, and slot value connection edge. Finally, the dialogue state map is constructed through the determined nodes and the defined three connection edges.
[0111] The embodiment of the present invention provides a method for constructing a dialogue state graph, which can ensure the feasibility of the solution.
[0112] On the basis of the above embodiment, the dialogue state tracking method provided in the embodiment of the present invention, wherein the generating of the dialogue state information of the current dialogue round based on the fusion feature specifically includes:
[0113] Inputting the fused features into a long short-term memory artificial neural network model based on an attention mechanism to obtain a context vector output by the long short-term memory artificial neural network model;
[0114] Inputting the context vector into a deep learning model to obtain the dialogue state information of the current dialogue round output by the deep learning model;
[0115] Among them, the long short-term memory artificial neural network model is trained based on feature samples carrying context vector labels; and the deep learning model is trained based on context vector samples carrying dialogue state labels.
[0116] Specifically, in an embodiment of the present invention, when generating the dialogue state information of the current round of dialogue by fusing features, the fused features can be decoded first. The decoding process can be achieved by inputting the fused features into a long short-term memory artificial neural network (LSTM) model based on an attention mechanism to obtain a context vector output by the long short-term memory artificial neural network model, and the context vector is the decoding result.
[0117] The context vector is then input into the deep learning model to obtain the dialogue state information of the current dialogue round output by the deep learning model. The deep learning model can be an LSTM model, an Attention model, a Transformer model, a Pointer Network model, etc.
[0118] Here, the LSTM model can be trained by feature samples carrying context vector labels; the deep learning model can be trained by context vector samples carrying dialogue state labels.
[0119] In the embodiment of the present invention, the dialogue state information of the current round of dialogue can be tracked through the deep learning model, ensuring the reliability and accuracy of the tracking results.
[0120] Based on the above embodiment, the dialog state tracking method provided in the embodiment of the present invention further includes:
[0121] Obtaining a user portrait text, and encoding the user portrait text to obtain user portrait features;
[0122] Fusing the first coding feature, the second coding feature, the third coding feature, and the user portrait feature to obtain a final fused feature;
[0123] Based on the final fusion features, the dialogue state information of the current round of dialogue is generated.
[0124] Specifically, in the embodiment of the present invention, the user portrait text refers to the text representation of the relevant information of the user portrait involved in the current round of dialogue, and the user portrait text can be input into the text encoder, and the user portrait text is encoded by the text encoder to obtain the user portrait feature. Then, the first encoding feature, the second encoding feature, the third encoding feature and the user portrait feature are fused to obtain the final fused feature.
[0125] The final fusion feature can be regarded as a fusion feature obtained by fusing the first coding feature, the second coding feature and the third coding feature, and the fusion feature obtained by fusing the user portrait feature.
[0126] In the embodiment of the present invention, when the user modeling is good, the user portrait text can be introduced to enrich the fusion features and further improve the accuracy of the dialogue state information of the current round of dialogue obtained by tracking.
[0127] On the basis of the above embodiments, the dialogue state tracking method provided in the embodiments of the present invention can directly obtain a dense dialogue state tracking vector when the amount of data is large, that is, the dialogue state information of the current round of dialogue is represented by the dialogue state tracking vector. In this way, there is no need to extract specific dialogue state information such as user intention, slot type, slot value, etc., which can save calculation amount and reduce tracking costs.
[0128] like Figure 2 As shown, based on the above embodiment, an embodiment of the present invention provides a conversation state tracking device, including:
[0129] A first encoding module 21, used to obtain a user input text of a current round of dialogue, and determine a first encoding feature based on the user input text;
[0130] The second encoding module 22 is further used to determine the preset dialogue outline information corresponding to the dialogue robot, and determine the second encoding feature based on the preset dialogue outline information;
[0131] A fusion module 23, configured to determine a fusion feature based on the first coding feature and the second coding feature;
[0132] The generating module 24 is used to generate the dialogue state information of the current dialogue round based on the fusion feature.
[0133] On the basis of the above embodiment, the dialog state tracking device provided in the embodiment of the present invention further includes a third encoding module, which is used to:
[0134] Acquiring dialogue state information of a previous dialogue round before the current dialogue round, and determining a third coding feature based on the dialogue state information of the previous dialogue round;
[0135] Accordingly, the fusion module is specifically used for:
[0136] The fusion feature is determined based on the first coding feature, the second coding feature, and the third coding feature.
[0137] On the basis of the above-mentioned embodiment, in the dialog state tracking device provided in the embodiment of the present invention, the preset dialog outline information includes preset user intention information, preset slot type information and preset slot value information;
[0138] The preset user intention information is obtained by splicing the name text of the dialogue robot and the intention description text corresponding to the dialogue robot;
[0139] The preset slot type information is obtained by splicing the name text and the slot type description text corresponding to the conversational robot;
[0140] The preset slot value information is obtained by splicing the slot type description text and the slot value corresponding to the dialogue robot.
[0141] On the basis of the above embodiment, in the dialog state tracking device provided in the embodiment of the present invention, the second encoding module is specifically used for:
[0142] The preset user intention information, the preset slot type information, and the preset slot value information are respectively encoded to obtain the second encoding feature.
[0143] On the basis of the above embodiment, in the dialog state tracking device provided in the embodiment of the present invention, the first encoding module is specifically used for:
[0144] Acquire historical conversation texts of historical rounds of conversations, and concatenate the user input text with the historical conversation text to obtain a concatenated text;
[0145] The concatenated text is encoded to obtain the first encoding feature.
[0146] On the basis of the above embodiment, in the dialog state tracking device provided in the embodiment of the present invention, the third encoding module is specifically used for:
[0147] Based on the dialogue state graph corresponding to the dialogue robot, the dialogue state information of the previous round of dialogue is encoded to obtain the third encoding feature.
[0148] On the basis of the above embodiment, the dialog state tracking device provided in the embodiment of the present invention further includes a graph construction module, which is used to:
[0149] Determine the nodes of the dialogue state graph according to user intentions, slot value types, and slot values corresponding to the multiple dialogue robots;
[0150] Define user intention connection edges, slot value type connection edges and slot value connection edges, and construct the dialogue state graph based on the nodes, the user intention connection edges, the slot value type connection edges and the slot value connection edges.
[0151] On the basis of the above-mentioned embodiment, in the dialog state tracking device provided in the embodiment of the present invention, the generating module is specifically used for:
[0152] Inputting the fused features into a long short-term memory artificial neural network model based on an attention mechanism to obtain a context vector output by the long short-term memory artificial neural network model;
[0153] Inputting the context vector into a deep learning model to obtain the dialogue state information of the current dialogue round output by the deep learning model;
[0154] Among them, the long short-term memory artificial neural network model is trained based on feature samples carrying context vector labels; and the deep learning model is trained based on context vector samples carrying dialogue state labels.
[0155] Specifically, the functions of each module in the conversation state tracking device provided in the embodiment of the present invention correspond one-to-one to the operation flow of each step in the above method embodiment, and the effects achieved are also consistent. Please refer to the above embodiment for details, which will not be repeated in the embodiment of the present invention.
[0156] Based on the above embodiments, an embodiment of the present invention provides a human-computer dialogue system, including the dialogue state tracking device provided in the above embodiments, so as to track the dialogue state information of the current dialogue round through the dialogue state tracking device.
[0157] Based on the above embodiments, an operating machine is provided in an embodiment of the present invention, including the human-computer dialogue system provided in the above embodiments, so as to realize human-computer dialogue through the human-computer dialogue system, and during the human-computer dialogue process, the function of tracking the dialogue status information of the current round of dialogue can be realized.
[0158] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the dialogue state tracking method provided in the above embodiments, the method comprising: obtaining the user input text of the current round of dialogue, and determining a first coding feature based on the user input text; determining the preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information; determining a fusion feature based on the first coding feature and the second coding feature; and generating the dialogue state information of the current round of dialogue based on the fusion feature.
[0159] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0160] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the dialogue state tracking method provided in the above-mentioned embodiments, and the method includes: obtaining user input text of the current round of dialogue, and determining a first coding feature based on the user input text; determining preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information; determining a fusion feature based on the first coding feature and the second coding feature; and generating dialogue state information of the current round of dialogue based on the fusion feature.
[0161] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the dialogue state tracking method provided in the above-mentioned embodiments, the method comprising: obtaining user input text of the current round of dialogue, and determining a first coding feature based on the user input text; determining preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information; determining a fusion feature based on the first coding feature and the second coding feature; and generating dialogue state information of the current round of dialogue based on the fusion feature.
[0162] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0163] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for tracking dialogue state, It is characterized in that include: Obtaining user input text of the current round of dialogue, and determining a first encoding feature based on the user input text; Determining preset dialogue outline information corresponding to the dialogue robot, and determining a second coding feature based on the preset dialogue outline information; The preset dialogue outline information includes preset user intention information, preset slot type information and preset slot value information; Acquiring dialogue state information of a previous dialogue round before the current dialogue round, and determining a third coding feature based on the dialogue state information of the previous dialogue round; Determining the fusion feature based on the first coding feature, the second coding feature, and the third coding feature; Based on the fusion features, generating the dialogue state information of the current round of dialogue; The determining of the third coding feature based on the dialogue state information of the previous round of dialogue specifically includes: Based on the dialogue state graph corresponding to the dialogue robot, encode the dialogue state information of the previous round of dialogue to obtain the third encoding feature; The conversation state graph is constructed based on the following method: Determine the nodes of the dialogue state graph according to user intentions, slot value types, and slot values corresponding to the multiple dialogue robots; Define user intention connection edges, slot value type connection edges and slot value connection edges, and construct the dialogue state graph based on the nodes, the user intention connection edges, the slot value type connection edges and the slot value connection edges.
2. The method for tracking the conversation state according to claim 1, It is characterized in that The preset user intention information is obtained by splicing the name text of the dialogue robot and the intention description text corresponding to the dialogue robot; The preset slot type information is obtained by splicing the name text and the slot type description text corresponding to the conversational robot; The preset slot value information is obtained by splicing the slot type description text and the slot value corresponding to the dialogue robot.
3. The method for tracking the conversation state according to claim 1, It is characterized in that The determining of the first coding feature based on the user input text specifically includes: Acquire historical conversation texts of historical rounds of conversations, and concatenate the user input text with the historical conversation text to obtain a concatenated text; The concatenated text is encoded to obtain the first encoding feature.
4. The method for tracking a dialog state according to claim 1, It is characterized in that The generating the dialogue state information of the current round of dialogue based on the fusion feature specifically includes: Inputting the fused features into a long short-term memory artificial neural network model based on an attention mechanism to obtain a context vector output by the long short-term memory artificial neural network model; Inputting the context vector into a deep learning model to obtain the dialogue state information of the current dialogue round output by the deep learning model; Among them, the long short-term memory artificial neural network model is trained based on feature samples carrying context vector labels; and the deep learning model is trained based on context vector samples carrying dialogue state labels.
5. A conversation state tracking device, It is characterized in that include: A first encoding module, used to obtain a user input text of a current round of dialogue, and determine a first encoding feature based on the user input text; The second encoding module is further used to determine preset dialogue outline information corresponding to the dialogue robot, and determine a second encoding feature based on the preset dialogue outline information; the preset dialogue outline information includes preset user intention information, preset slot type information and preset slot value information; A third encoding module, used to obtain the dialogue state information of the previous dialogue round of the current dialogue round, and determine a third encoding feature based on the dialogue state information of the previous dialogue round; a fusion module, configured to determine the fusion feature based on the first coding feature, the second coding feature and the third coding feature; A generation module, used to generate the dialogue state information of the current round of dialogue based on the fusion feature; The third encoding module is specifically used for: Based on the dialogue state graph corresponding to the dialogue robot, encode the dialogue state information of the previous round of dialogue to obtain the third encoding feature; Also includes graph building modules for: Determine the nodes of the dialogue state graph according to user intentions, slot value types, and slot values corresponding to the multiple dialogue robots; Define user intention connection edges, slot value type connection edges and slot value connection edges, and construct the dialogue state graph based on the nodes, the user intention connection edges, the slot value type connection edges and the slot value connection edges.
6. A human-computer dialogue system, It is characterized in that It comprises the dialogue state tracking device as claimed in claim 5.
7. A working machine, It is characterized in that Comprising the human-computer dialogue system as claimed in claim 6.
