A method, device and electronic device for processing conversation interaction
By finding session topics that match the current input content in the intelligent customer service system, the problem of inaccurate intentions is solved, and the accuracy and interaction efficiency of intent acquisition are improved.
Patent Information
- Application Number
- CN202010609093.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-06-29
AI Technical Summary
In an intelligent customer service system, relying solely on the processing of the consulting question itself to determine the user's intention may lead to inaccurate intentions and cause the reply to not meet user needs.
By finding the target session topics that match the current input in the session topic collection, the user's behavioral intent is obtained based on the session topics in the previous session, thereby generating reply content to avoid inaccurate intent analysis.
Improves the accuracy of user intention acquisition, reduces the number of interactions users continue to revolve around the same session topic, and improves interaction efficiency.
Smart Images

Figure CN111753073B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent customer service technology, and in particular to a method, device and electronic device for processing conversational interaction. Background Art
[0002] In the intelligent customer service system, for each user's consultation question, the intelligent customer service usually gives multiple sentences to enrich the reply content fed back to the user. For example, when the user asks the question "Are you a robot?", the intelligent customer service system will not only reply "Yes" in accordance with the conversation cooperation principle, but also reply other content that does not conform to the conversation cooperation principle: "You can call me a robot or a virtual agent", thereby providing users with a variety of reply content.
[0003] Currently, when responding to users' inquiries, it is usually necessary to perform natural language recognition and other processing on the inquiries to determine the user's inquiry intent, and then provide the user with an answer based on the inquiry intent, such as asking about price or performance.
[0004] However, if the consultation intent is determined solely by the handling of the consultation question itself, the consultation intent may be inaccurate. Summary of the invention
[0005] In view of this, the present application provides a method, device and electronic device for processing conversation interaction, including:
[0006] A method for processing a conversation interaction, comprising:
[0007] Get the current input content of the user in the current session;
[0008] Searching in a conversation topic set whether there is a target conversation topic that matches the current input content; wherein the conversation topic set includes at least one conversation topic, and the conversation topic is a conversation topic corresponding to a conversation before the current conversation;
[0009] If there is a target conversation topic matching the current input content in the conversation topic set, the user's first behavioral intention is obtained at least based on the target conversation topic, and the first behavioral intention is used to generate reply content.
[0010] The above method, preferably, further comprises:
[0011] According to the first behavioral intention, a first reply content is output, wherein the first reply content includes a reply sentence corresponding to the first behavioral intention and satisfying a preset conversation cooperation principle.
[0012] In the above method, preferably, the conversation topic set includes at least one first conversation topic and / or second conversation topic;
[0013] The first conversation topic is: the conversation topic corresponding to the historical reply statement in the historical reply content of the customer service system in the previous conversation that does not meet the conversation cooperation principle;
[0014] The second conversation topic is: when there is no historical reply statement satisfying the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation, the conversation topic corresponding to the historical input content of the user in the previous conversation.
[0015] In the above method, preferably, the first conversation topic is obtained by:
[0016] Obtaining historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence;
[0017] If there are historical reply sentences in the historical reply content that do not meet the conversation cooperation principle, a first conversation topic corresponding to the historical reply sentences that do not meet the conversation cooperation principle is obtained.
[0018] In the above method, preferably, the second conversation topic is obtained by:
[0019] Obtaining historical input content of the user in a previous session of the current session;
[0020] If there is no historical reply statement satisfying the session cooperation principle in the historical reply content of the customer service system in the previous session of the current session, a second session topic corresponding to the historical input content is obtained.
[0021] In the above method, preferably, the conversation topic set is obtained by:
[0022] Obtaining historical input content of the user and historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence;
[0023] Obtaining historical reply sentences satisfying the conversation cooperation principle and historical reply sentences not satisfying the conversation cooperation principle in the historical reply content;
[0024] Adding historical reply sentences in the historical reply content that satisfy the conversation cooperation principle to the first sentence set, and adding historical reply sentences in the historical reply content that do not satisfy the conversation cooperation principle to the second sentence set;
[0025] If the first statement set is empty, obtaining a second conversation topic corresponding to the historical input content;
[0026] If the second statement set is not empty, obtain the first conversation topic corresponding to the historical reply statements in the second statement set.
[0027] The above method preferably obtains the historical reply sentences satisfying the conversation cooperation principle and the historical reply sentences not satisfying the conversation cooperation principle in the historical reply content, including:
[0028] Processing the historical input content and the historical reply content of the user by using a sentence classification model to obtain a classification result output by the sentence classification model, wherein the classification result includes: historical reply sentences in the historical reply content that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle;
[0029] The sentence classification model is trained using multiple sentence pair samples, and one sentence pair sample includes at least an input content sentence, a first reply sentence and a second reply sentence, the first reply sentence has a label that satisfies the conversation cooperation principle, and the second reply sentence has a label that does not satisfy the conversation cooperation principle.
[0030] The above method, preferably, further comprises:
[0031] If there is no conversation topic matching the current input content in the conversation topic set, obtaining a second behavior intention of the user according to the current input content;
[0032] According to the second behavioral intention, a second reply content is output, and the second reply content includes: a reply statement corresponding to the second behavioral intention and satisfying the conversation cooperation principle, and / or a reply statement corresponding to the current input content and not satisfying the conversation cooperation principle.
[0033] A conversation interaction processing device, comprising:
[0034] An input acquisition unit, used to obtain the current input content of the user in the current session;
[0035] A topic search unit, configured to search a conversation topic set for a target conversation topic that matches the current input content; wherein the conversation topic set includes at least one conversation topic that is a conversation topic corresponding to a conversation before the current conversation;
[0036] An intention acquisition unit is used to obtain the user's first behavioral intention based on at least the target conversation topic if the topic search unit has a target conversation topic matching the current input content in the conversation topic set, and the first behavioral intention is used to generate reply content.
[0037] An electronic device, comprising:
[0038] A memory, used to store applications and data generated by the operation of the applications;
[0039] A processor is used to execute the application to achieve: obtaining the current input content of the user in the current session; searching in a session topic set whether there is a target session topic that matches the current input content; wherein the session topic set contains at least one session topic, and the session topic is a session topic corresponding to the previous session of the current session; if there is a target session topic that matches the current input content in the session topic set, obtaining the first behavior intention of the user based on at least the target session topic, and the first behavior intention is used to generate reply content.
[0040] It can be seen from the above scheme that in a method, device and electronic device for processing conversational interaction provided by the present application, after obtaining the current input content of the user, the conversation topic that matches the current input content is searched in the conversation topic involved in the user's previous conversation, thereby obtaining the user's behavioral intention based on the conversation topic that matches the current input content in the previous conversation. It can be seen that the present application no longer relies solely on the current input content to determine the behavioral intention, but obtains the user's behavioral intention based on the conversation topic that matches the current input content in the previous conversation, thereby avoiding inaccurate intention analysis, thereby achieving the purpose of improving the accuracy of intention acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A flowchart of a method for processing a conversation interaction provided in Embodiment 1 of the present application;
[0043] Figure 2 This is an example diagram of an embodiment of the present application;
[0044] Figure 3Another flowchart of a method for processing a conversation interaction provided in Embodiment 1 of the present application;
[0045] Figure 4-Figure 6 They are respectively another exemplary diagram of the embodiment of the present application;
[0046] Figure 7 Another flow chart of a method for processing a conversation interaction provided in the first embodiment of the present application;
[0047] Figure 8 This is another exemplary diagram of an embodiment of the present application;
[0048] Fig. 9 A schematic diagram of the structure of a conversation interaction processing device provided in Embodiment 2 of the present application;
[0049] Fig.10 Another structural diagram of a conversation interaction processing device provided in Embodiment 2 of the present application;
[0050] Fig.11 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application;
[0051] Fig.12 Another structural schematic diagram of an electronic device provided in Embodiment 3 of the present application;
[0052] Fig.13 This is an example flowchart of an embodiment of the present application when applied to an intelligent customer service system. DETAILED DESCRIPTION
[0053] 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 ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] refer to Figure 1 , is a flowchart of a method for processing a conversation interaction provided in the first embodiment of the present application, which can be applied to an electronic device capable of interacting with a user or an electronic device connected to a device capable of interacting with a user, such as a computer or server with an intelligent customer service system. The technical solution in this embodiment is mainly used to improve the accuracy of identifying user behavior intentions.
[0055] Specifically, the method in this embodiment may include the following steps:
[0056] Step 101: Obtain the current input content of the user in the current session.
[0057] The current session refers to the human-computer session between the user and the electronic device through the interactive interface in the intelligent customer service system, such as Figure 2 As shown in , in the current session, the user performs input operations in the input area of the interactive interface, and accordingly, the electronic device obtains the current input content generated by the user's input operation. For example, the user enters "virtual agent?" in the input area, and in this embodiment, the current input content "virtual agent?" is obtained.
[0058] Step 102: Search the conversation topic set to see whether there is a target conversation topic that matches the current input content. If the conversation topic set is found to have a target conversation topic that matches the current input content, then execute step 103.
[0059] The conversation topic set includes at least one conversation topic, and the conversation topics in the conversation topic set are conversation topics corresponding to the conversation before the current conversation. That is, in this embodiment, the conversation content involved in the conversation before the current conversation is obtained and processed, such as Figure 2 As shown in , in the previous conversation, the user inputs "are you abot?", and the intelligent customer service system replies "Yes, you could call me a bot / robot or a virtualagent." In this embodiment, these conversation sentences are acquired and processed such as semantic analysis to obtain the conversation topics involved in these conversation sentences, and these conversation topics constitute a conversation topic set.
[0060] Specifically, in this embodiment, semantic analysis may be performed on the current input content to search in the conversation topic set whether there is a target conversation topic that matches the current input content.
[0061] Step 103: Obtain the user's first behavior intention at least according to the target conversation topic.
[0062] Among them, the first behavior is intended to be used to generate reply content.
[0063] Specifically, in this embodiment, the target conversation topic that matches the current input content may be processed to determine the first behavior intention corresponding to the target conversation topic;
[0064] Alternatively, in this embodiment, after semantic analysis of the current input content, the result of the semantic analysis may be further analyzed in combination with the target conversation topic to obtain the user's first behavior intention. Furthermore, in this embodiment, corresponding reply content may be generated according to the first behavior intention.
[0065] like Figure 2As shown in , among the conversation topics involved in the previous conversation: calling bot, calling virtual agent, the current input content is matched to obtain the target conversation topic "calling virtual agent?" that matches the current input content "virtual agent?", and combined with the conversation topic to obtain the behavioral intention corresponding to the current input content: it is necessary to determine whether it is a virtual agent, and the obtained behavioral intention can be more in line with the user's current input content, that is, the user needs to determine whether it is a virtual agent, rather than simply wanting to understand "what is the definition of virtual agent", thereby improving the accuracy of the obtained behavioral intention.
[0066] It can be seen from the above scheme that in a method for processing conversational interaction provided in Example 1 of the present application, after obtaining the current input content of the user, the conversation topic that matches the current input content is searched in the conversation topic involved in the user's previous conversation, thereby obtaining the user's behavioral intention based on the conversation topic that matches the current input content in the previous conversation. It can be seen that in the present application, the behavioral intention is no longer determined solely by the current input content, but the user's behavioral intention is obtained based on the conversation topic that matches the current input content in the previous conversation, thereby avoiding inaccurate intention analysis, thereby achieving the purpose of improving the accuracy of intention acquisition.
[0067] In one implementation, after step 103, the present embodiment may further include the following steps: Figure 3 As shown in:
[0068] Step 104: Output the first reply content according to the first behavior intention.
[0069] The first reply content includes a reply statement that corresponds to the first behavioral intention and satisfies a preset conversation cooperation principle.
[0070] It should be noted that the conversation cooperation principle refers to the principle that both parties must cooperate with each other and follow in order to make the conversation and cooperation go smoothly and achieve the common communication purpose. In this embodiment, the multiple reply contents corresponding to the first behavioral intention can be analyzed and screened according to the conversation cooperation principle to output a reply statement that meets the conversation cooperation principle. The reply statement that meets the conversation cooperation principle here can be understood as a reply statement that can meet the user's first behavioral intention or can meet the user's interaction needs. Among them, in this embodiment, multiple behavioral intentions and one or more reply statements (contents) corresponding to each behavioral intention are pre-stored in the database of the customer service system, so that after obtaining the behavioral intention, one or more reply statements can be selected from the reply statements corresponding to the behavioral intention as the reply content.
[0071] That is to say, in this embodiment, after obtaining the first behavioral intention, since the first behavioral intention is a behavioral intention generated based on the conversation topic involved in the previous conversation that matches the current input content, in order to improve the conversation progress, this embodiment can output a reply statement that satisfies the conversation cooperation principle for the first behavioral intention, so as to avoid the user from continuing to interact around the conversation topic involved in the previous conversation. Therefore, after outputting a reply statement corresponding to the first behavioral intention and satisfying the conversation cooperation principle for the user, the user can get a direct affirmative or negative reply content, thereby reducing the number of times the user continues to interact around the same conversation topic and improving the interaction efficiency.
[0072] like Figure 4 As shown in , among the conversation topics involved in the previous conversation: calling bot, calling virtual agent, the current input content is matched to obtain a target conversation topic "calling virtual agent" that matches the current input content "virtual agent?", and combined with the conversation topic to obtain a behavioral intention corresponding to the current input content: it is necessary to determine whether it is a virtual agent, and the obtained behavioral intention can be more in line with the user's current input content, that is, the user needs to determine whether it is a virtual agent, rather than simply wanting to know "what is the definition of a virtual agent", thereby improving the accuracy of the obtained behavioral intention. Furthermore, in order to avoid the user from continuing to interact around the virtual agent, this embodiment directly provides the user with a "yes" or "Yes" reply content that meets the conversation cooperation principle to improve the interaction efficiency.
[0073] like Figure 5 As shown in , the user's current input content is "why?". In the previous conversation, the user inputted "how old are you?", and the customer service system replied "Some of us never age." Therefore, the conversation topics involved in the previous conversation: age, never aging, are matched with the current input content to obtain a target conversation topic matching the current input content: never aging. Combined with the conversation topic, a behavioral intention corresponding to the current input content is obtained, that is, what is the reason for never aging, rather than simply asking why or asking about age. Thus, the accuracy of the obtained behavioral intention is improved. Furthermore, in order to avoid users from continuing to interact around the topic of never aging, this embodiment directly provides users with a reply content of "we remain forever" that meets the conversation cooperation principle to improve interaction efficiency.
[0074] In one implementation, the conversation topic set may include only at least one first conversation topic, or the conversation topic set may include only at least one second conversation topic, or the conversation topic set may include both at least one first conversation topic and at least one second conversation topic. The first conversation topic and the second conversation topic here refer to topics for different conversation statement owners. For example, the first conversation topic is: the conversation topic corresponding to the historical reply statement in the customer service system's historical reply content in the previous conversation that does not meet the conversation cooperation principle, such as Figure 2 In the previous conversation shown in , “you could call me a bot / robot or a virtual agent.” is a historical response sentence that does not meet the conversation cooperation principle, and its corresponding conversation topic is the first conversation topic, in which “yes” is a historical response sentence that meets the conversation cooperation principle.
[0075] The second conversation topic is: the conversation topic corresponding to the historical input content of the user in the previous conversation, when there is no historical reply sentence that meets the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation. Figure 5 In the previous conversation shown in , "Some of us never age." is a historical response sentence that does not meet the conversation cooperation principle. If there is no historical response sentence that meets the conversation cooperation principle, the conversation topic corresponding to the user input content "how old are you?" is used as the second conversation topic.
[0076] In a specific implementation, the first conversation topic in the conversation topic set can be obtained separately in the following manner:
[0077] First, obtain the historical reply content of the customer service system in the previous session of the current session, where the historical reply content includes at least one historical reply sentence, such as the historical reply sentence "yes" and "you could call me a bot / robot or a virtual agent." replied by the customer service system;
[0078] Afterwards, determine whether there are sentences in the historical reply content that do not meet the conversation cooperation principle. If there are historical reply sentences in the historical reply content that do not meet the conversation cooperation principle, then obtain the first conversation topic corresponding to these historical reply sentences that do not meet the conversation cooperation principle.
[0079] Specifically, in this embodiment, semantic analysis can be performed on these historical reply statements that do not meet the conversation cooperation principle to obtain the first conversation topic corresponding to each historical reply statement that does not meet the conversation cooperation principle. For example, semantic analysis is performed on the reply statement that does not meet the conversation cooperation principle, "you could call me a bot / robot or a virtual agent." to obtain the first conversation topic: "call bot", "call virtual agent".
[0080] The second conversation topic in the conversation topic set can be obtained separately in the following way:
[0081] First, obtain the user's historical input content in the previous session of the current session, such as the content input by the user in the previous session, "are you a bot?"; then, determine whether there is a historical reply sentence that meets the session cooperation principle in the historical reply content of the customer service system in the previous session. If there is no historical reply sentence that meets the session cooperation principle in the historical reply content of the customer service system in the previous session of the current session, then obtain the session topic corresponding to the user's historical input content in the previous session, which is the second session topic.
[0082] Specifically, in this embodiment, semantic analysis can be performed on the user's historical input sentences in the previous session to obtain the first session topic corresponding to each historical input sentence. For example, semantic analysis is performed on the user's historical input sentence "are you a bot?" to obtain the second session topic: "Confirm bot".
[0083] Alternatively, in another implementation, the conversation topic set may obtain the first conversation topic and the second conversation topic therein in the following manner:
[0084] First, in this embodiment, the user's historical input content and the customer service system's historical reply content in the previous session of the current session are obtained, wherein the user's historical input content may include one historical input sentence or multiple historical input sentences, and the historical reply content may include one or more historical reply sentences.
[0085] Secondly, in this embodiment, historical reply sentences that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle are obtained in the historical reply content. Specifically, in this embodiment, each historical reply sentence in the historical reply content can be analyzed according to the user's historical input sentences to screen out historical reply sentences that meet the conversation cooperation principle for the historical input sentences and historical reply sentences that do not meet the conversation cooperation principle for the historical input sentences.
[0086] For example, Figure 2In the conversation shown, the customer service system's historical reply content "Yes, you could call me a bot / robot or a virtual agent." is analyzed based on the user's historical input content "are you a bot?", thereby determining the historical reply sentence "Yes" that meets the conversation cooperation principle and the historical reply sentence "you could call me a bot / robot or a virtual agent." that does not meet the conversation cooperation principle.
[0087] For example, Figure 5 In the conversation shown, the customer service system's historical reply content "Some of us never age." is analyzed based on the user's historical input content "how old are you?", thereby determining that the historical reply sentence that meets the conversation cooperation principle is empty, and determining the historical reply sentence that does not meet the conversation cooperation principle is "Some of us never age.".
[0088] For example, Figure 6 In the conversation shown in , the historical reply content "Yes." of the customer service system is analyzed based on the historical input content "are you a bot?" of the user, thereby determining the historical reply sentence "Yes." that satisfies the conversation cooperation principle, and determining that the historical reply sentence that does not satisfy the conversation cooperation principle is empty.
[0089] Then, the historical reply sentences that meet the conversation cooperation principle in the historical reply content are added to the first sentence set, and the historical reply sentences that do not meet the conversation cooperation principle in the historical reply content are added to the second sentence set. Thus, the historical reply content is structurally divided into two sets, wherein the first sentence set contains historical reply sentences that meet the conversation cooperation principle, and the second sentence set contains historical reply sentences that do not meet the conversation cooperation principle. For example, Figure 2 In the conversation shown in , the first sentence set includes the sentence "Yes", and the second sentence set includes the sentence "you could call me a bot / robot or a virtual agent."; For another example, Figure 5 In the conversation shown, the first sentence set is empty, and the second sentence set contains the sentence "Some of us never age."; for another example, Figure 6 In the session shown in , the first statement set includes the statement “Yes.”, and the second statement set is empty.
[0090] Based on this, if the first sentence set is empty, that is, the historical reply content does not contain historical reply sentences that meet the conversation cooperation principle, then the conversation topic corresponding to the user's historical input content obtained in this embodiment is the second conversation topic, and if the second sentence set is not empty, that is, the historical reply content contains historical reply sentences that do not meet the conversation cooperation principle, then the conversation topic corresponding to the historical reply sentences in the second sentence set obtained in this embodiment is the first conversation topic.
[0091] In a specific implementation, in this embodiment, when obtaining historical reply sentences that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle in the historical reply content, the sentence classification model can be used to process the user's historical input content and historical reply content to obtain the classification results output by the sentence classification model, and the classification results output by the sentence classification model include: historical reply sentences that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle in the historical reply content. Of course, in one possibility, the historical reply content may not contain historical reply sentences that meet the conversation cooperation principle, and in another possibility, the historical reply content may not contain historical reply sentences that do not meet the conversation cooperation principle.
[0092] The sentence classification model is pre-built based on the classification algorithm and trained using multiple sentence pair samples, wherein each sentence pair sample contains multiple sentences, for example, the sentence pair sample contains at least an input content sentence, a first reply sentence, and a second reply sentence, wherein the first reply sentence has a label that satisfies the conversation cooperation principle, and the second reply sentence has a label that does not satisfy the conversation cooperation principle. Therefore, in this embodiment, after the sentence pair sample is input into the sentence classification model, the model parameters in the sentence classification model are adjusted according to the sentence classification results output by the sentence classification model and the labels in the sentence pair sample, so as to reduce the loss parameters of the sentence classification model. As more sentence pair samples are trained on the sentence classification model, the loss function of the sentence classification model gradually decreases to the minimum and no longer changes. At this time, the training of the sentence classification model is terminated. The trained sentence classification model can classify the input historical input content and historical reply content, thereby classifying the historical reply sentences that meet the conversation cooperation principle and the historical reply sentences that do not meet the conversation cooperation principle for the historical input content.
[0093] In one implementation, if the target conversation topic matching the current input content is not found in the conversation topic set in step 102, that is, there is no conversation topic matching the current input content in the conversation topic set, then the method in this embodiment may further include the following steps: Figure 7 As shown in:
[0094] Step 105: Obtain the user's second behavior intention according to the current input content.
[0095] In this embodiment, the second behavior intention of the user can be obtained by performing semantic analysis on the current input content.
[0096] like Figure 8 In the conversation shown in , the user's historical input content is "what's your name?", and the customer service system's historical reply content is "my name is moli.". The corresponding conversation topic set includes conversation topics "name inquiry" and "name answer", and the user's current input content is "hi moli, i have some question about my moto z 2.". Therefore, in this embodiment, after receiving the user's current input content, there is no conversation topic matching the current input content "hi moli, i have some question about my moto z 2." in the conversation topic set. At this time, in this embodiment, the user's behavioral intention "ask about the product moto z 2" is obtained according to the current input content "hi moli, i have some question about my moto z 2."
[0097] Step 106: Output the second reply content according to the second behavior intention.
[0098] The second reply content includes a reply sentence corresponding to the second behavioral intention and satisfying the conversation cooperation principle, and / or a reply sentence corresponding to the current input content and not satisfying the conversation cooperation principle. For example, in this embodiment, for the behavioral intention of "inquiring about the product moto z 2", the reply content "OK" or "OK, I'm waiting" is output. Figure 8 As shown in , "OK" is a reply sentence that satisfies the conversation cooperation principle, and "i'm waiting" is a reply sentence that does not satisfy the conversation cooperation principle. Therefore, by outputting reply sentences that satisfy and do not satisfy the conversation cooperation principle, the reply content provided to the user is enriched, thereby improving the user's interactive experience.
[0099] refer to Fig. 9 , is a schematic diagram of the structure of a conversation interaction processing device provided in the second embodiment of the present application, which can be applied to an electronic device capable of interacting with a user or an electronic device connected to a device capable of interacting with a user, such as a computer or server with an intelligent customer service system. The technical solution in this embodiment is mainly used to improve the accuracy of identifying user behavior intentions.
[0100] Specifically, the device in this embodiment may include the following units:
[0101] The input acquisition unit 901 is used to obtain the current input content of the user in the current session.
[0102] The topic search unit 902 is used to search whether there is a target conversation topic matching the current input content in the conversation topic set; wherein the conversation topic set contains at least one conversation topic, which is a conversation topic corresponding to the previous conversation of the current conversation;
[0103] The intention acquisition unit 903 is used to obtain the user's first behavior intention at least based on the target conversation topic if the topic search unit finds a target conversation topic that matches the current input content in the conversation topic set, and the first behavior intention is used to generate the reply content.
[0104] It can be seen from the above scheme that in a conversation interaction processing device provided in the second embodiment of the present application, after obtaining the current input content of the user, the conversation topic that matches the current input content is searched in the conversation topic involved in the user's previous conversation, thereby obtaining the user's behavior intention based on the conversation topic that matches the current input content in the previous conversation. It can be seen that in this embodiment, the present application no longer relies solely on the current input content to determine the behavior intention, but obtains the user's behavior intention based on the conversation topic that matches the current input content in the previous conversation, thereby avoiding the situation of inaccurate intention analysis, thereby achieving the purpose of improving the accuracy of intention acquisition.
[0105] In one implementation, the device in this embodiment may also include the following structure: Fig.10 As shown in:
[0106] The reply output unit 904 is used to output a first reply content according to the first behavior intention, wherein the first reply content includes a reply statement corresponding to the first behavior intention and satisfying a preset conversation cooperation principle.
[0107] In one implementation, the conversation topic set includes at least one first conversation topic and / or a second conversation topic;
[0108] The first conversation topic is: the conversation topic corresponding to the historical reply statement in the historical reply content of the customer service system in the previous conversation that does not meet the conversation cooperation principle;
[0109] The second conversation topic is: when there is no historical reply statement satisfying the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation, the conversation topic corresponding to the historical input content of the user in the previous conversation.
[0110] In an optional manner, the topic search unit 902 may obtain the first conversation topic in the following manner:
[0111] Obtaining historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence;
[0112] If there are historical reply sentences in the historical reply content that do not meet the conversation cooperation principle, a first conversation topic corresponding to the historical reply sentences that do not meet the conversation cooperation principle is obtained.
[0113] In another optional manner, the topic search unit 902 may obtain the second conversation topic in the following manner:
[0114] Obtaining historical input content of the user in a previous session of the current session;
[0115] If there is no historical reply statement satisfying the session cooperation principle in the historical reply content of the customer service system in the previous session of the current session, a second session topic corresponding to the historical input content is obtained.
[0116] In another optional manner, the topic search unit 902 may obtain the conversation topic set in the following manner:
[0117] Obtaining historical input content of the user and historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence;
[0118] Obtaining historical reply sentences satisfying the conversation cooperation principle and historical reply sentences not satisfying the conversation cooperation principle in the historical reply content;
[0119] Adding historical reply sentences in the historical reply content that meet the conversation cooperation principle to the first sentence set, and adding historical reply sentences in the historical reply content that do not meet the conversation cooperation principle to the second sentence set;
[0120] If the first statement set is empty, obtaining a second conversation topic corresponding to the historical input content;
[0121] If the second statement set is not empty, obtain the first conversation topic corresponding to the historical reply statements in the second statement set.
[0122] Preferably, the topic search unit 902 can obtain the historical reply sentences satisfying the conversation cooperation principle and the historical reply sentences not satisfying the conversation cooperation principle in the historical reply content by the following methods:
[0123] Processing the historical input content and the historical reply content of the user by using a sentence classification model to obtain a classification result output by the sentence classification model, wherein the classification result includes: historical reply sentences in the historical reply content that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle;
[0124] The sentence classification model is trained using multiple sentence pair samples, and one sentence pair sample includes at least an input content sentence, a first reply sentence and a second reply sentence, the first reply sentence has a label that satisfies the conversation cooperation principle, and the second reply sentence has a label that does not satisfy the conversation cooperation principle.
[0125] In one implementation, if the topic search unit 902 does not find a conversation topic matching the current input content in the conversation topic set, the intention acquisition unit 903 is also used to: obtain the user's second behavioral intention based on the current input content; based on this, the reply output unit 904 is also used to output a second reply content based on the second behavioral intention, and the second reply content includes: a reply statement corresponding to the second behavioral intention and satisfying the conversation cooperation principle, and / or a reply statement corresponding to the current input content and not satisfying the conversation cooperation principle.
[0126] It should be noted that the specific implementation of each unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0127] refer to Fig.11 , is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present application, and the electronic device may be an electronic device capable of interacting with a user or an electronic device connected to a device capable of interacting with a user, such as a computer or server with an intelligent customer service system. The technical solution in this embodiment is mainly used to improve the accuracy of identifying user behavior intentions.
[0128] Specifically, the electronic device in this embodiment may include the following structure:
[0129] The memory 1101 is used to store the application program and the data generated by the running of the application program.
[0130] Processor 1102 is used to execute an application program to achieve: obtaining current input content of a user in a current session; searching in a session topic set whether there is a target session topic that matches the current input content; wherein the session topic set includes at least one session topic, and the session topic is a session topic corresponding to a session before the current session; if there is a target session topic that matches the current input content in the session topic set, obtaining a first behavior intention of the user based on at least the target session topic, and the first behavior intention is used to generate reply content.
[0131] In addition, the electronic device in this embodiment may also include a display 1103, such as a touch screen or other types of display screens. Fig.12 As shown in , the display 1103 is used to output the reply content generated by the processor 1102. Of course, the display 1103 can also be used to output the user's input content.
[0132] It can be seen from the above scheme that in an electronic device provided by Embodiment 3 of the present application, after obtaining the current input content of the user, the conversation topic that matches the current input content is searched in the conversation topic involved in the user's previous conversation, thereby obtaining the user's behavioral intention based on the conversation topic that matches the current input content in the previous conversation. It can be seen that in this embodiment, the present application no longer relies solely on the current input content to determine the behavioral intention, but obtains the user's behavioral intention based on the conversation topic that matches the current input content in the previous conversation, thereby avoiding the situation of inaccurate intention analysis, thereby achieving the purpose of improving the accuracy of intention acquisition.
[0133] Taking intelligent customer service dialogue as an example, users solve their problems through communication with bots. The interaction between users and bots is a dialogue mode. The ideal and simple dialogue mode is a question-and-answer mode between users (questions) and bots (answers). In the interaction, the user's historical input is user_input1, and accordingly, the bot understands the user's intent input1_intent1, and then the bot returns the historical reply intent1_reply1 that the user has previously written. However, since the reply content corresponding to the intent is manually edited, different humans have different editing styles, and the edited reply content is also diverse. Based on this, different bot replies will have different guiding effects on subsequent conversations, and the user's next input will also be different due to different bot replies.
[0134] Currently, when the user intent user_intent1 is determined, the intelligent customer service bot will randomly select an intent_reply_i from the reply set intent1_reply_set corresponding to user_intent1, and push intent_reply_i as an answer. The bot will not consider the user feedback caused by the pushed reply. Therefore, when the user's input is based on the bot's historical replies, it will be difficult for the bot to understand the user's intent because it is not covered, which will ultimately lead to inaccurate understanding of the bot's intent and make the reply fail to meet the user's needs.
[0135] To solve the above problems, based on the technical solutions in the previous text, this application proposes a solution for analyzing the user's next input intention by extracting the speech structure in the interactive conversation socialtalk, and by extracting the structure of the bot's reply content, analyzing which reply content will affect the user's next input, and combining these reply contents to better understand the user's intention. Among them, in this application, the user_intent and bot_reply pairs can be first extracted, and then the structure of bot_reply can be analyzed, including the intended answer content bot_reply__direct_answer_content and the content that guides the conversation bot_reply__non_answer_content, that is, the reply statements that comply with the conversation cooperation principle and the reply statements that do not comply with the conversation cooperation principle. After that, the input direction (range) of the user that may be triggered by bot_reply is analyzed to better understand the user's intention.
[0136] Based on the above theory, the implementation scheme of this application is mainly used in the case where the input of socialtalk users is based on the reply content of the previous round of dialogue bot. The core points are:
[0137] First, according to the user_intent and bot_reply pairs, bot_reply is divided into sentences;
[0138] After that, extract the structure of the bot reply content bot_reply, including the pure answer content bot_reply__direct_answer_content of the intent and the content that guides the conversation bot_reply__non_answer_content;
[0139] Then, analyze the user input range that may be triggered by bot_reply;
[0140] Finally, by combining the possible input range analyzed above, we can understand the user's intention more broadly and accurately.
[0141] Therefore, the above implementation scheme adopted in this application can well understand the user's intention when the user's input is based on the bot's reply in the previous round, even if the bot's reply content is diverse, making the conversation smoother and the user experience better.
[0142] Here are a few examples to illustrate the above definition:
[0143] 1)user_input_1:are you a bot?
[0144] bot_reply_1:Yes,you could call me a bot / robot or a virtual agent.
[0145] user_input_2:virtual agent?
[0146] analyze:
[0147] user_intent:chat_identity__if_bot
[0148] bot_reply:
[0149] bot_reply__direct_answer_content:{“yes”}
[0150] bot_reply__non_answer_content:{“you could call me a bot / robot or avirtual agent”}
[0151] 2)user_input_1:are you a bot?
[0152] bot_reply_1:Yes.
[0153] user_input_2:oh,i have a moto z.
[0154] analyze:
[0155] user_intent:chat_identity__if_bot
[0156] bot_reply:
[0157] bot_reply__direct_answer_content:{“yes”}
[0158] bot_reply__non_answer_content:{}
[0159] 3) user_input_1: how old are you?
[0160] bot_reply_1: Some of us never age.
[0161] user_input_2: why?
[0162] Analysis:
[0163] user_intent: chat_bot_about__age
[0164] bot_reply:
[0165] bot_reply__direct_answer_content:{}
[0166] bot_reply__non_answer_content: {"Some of us never aget"}
[0167] 4) user_input_1: what’s the time?
[0168] bot_reply_1: It's time to learn about Motorola products! What questions do you have?
[0169] user_input_2: i mean the time.
[0170] Analysis:
[0171] user_intent: chat_non_bu_question__time_or_data
[0172] bot_reply:
[0173] bot_reply__direct_answer_content:{}
[0174] bot_reply__non_answer_content:{"It's time to learn about Motorolaproducts!","What questions do you have?"}
[0175] 5)user_input_1:what's your name?
[0176] bot_reply_1:my name is moli.
[0177] user_input_2:hi moli,i have some questions about my moto z 2.
[0178] analyze:
[0179] user_intent:chat_bot_about__name
[0180] bot_reply:
[0181] bot_reply__direct_answer_content:{"my name is moli."}
[0182] bot_reply__non_answer_content:{}
[0183] Combination Fig.13 As shown in the flowchart, the intent analysis is implemented in this application through the following process:
[0184] First, analyze the last round of conversation user_input_1 and bot_reply_1 to extract the user's intention user_intent and the bot's reply content bot_reply;
[0185] Then, structure the bot_reply, that is, divide the bot_reply content into sentences, and then judge the relationship between each sentence of the bot_reply and the user_intent according to the conversation cooperation principle. If it meets the conversation cooperation principle, put it into bot_reply__direct_answer_content, otherwise put it into bot_reply__non_answer_content;
[0186] After that, analyze the user's next input scope. If bot_reply__direct_answer_content is empty, the user may continue to ask query1 around the previous input intention. If bot_reply__non_answer_content is not empty, the user may continue to input around one of the instructions: query2, query3........, so the user's next input scope is uesr_next_input_scope = [query1, query2, query3,......];
[0187] Finally, identify the user's intent, for example, determine which range of [query1, query2, query3, ...] the user's current input falls into, that is, the current intent.
[0188] Based on the intent obtained above, the bot launches a reply, specifically: reply according to the current intent and the scope of the previous round of intent.
[0189] Here are some examples:
[0190] 1)user_input_1:how old are you?
[0191] bot_reply_1:Some of us never age.
[0192] user_input_2:why?
[0193] analyze:
[0194] a) Analyze user_input_1 and bot_reply_1 in the previous conversation: user_input_1 = {chat_bot_about__age}, bot_reply_1 = {“Some of us never age”};
[0195] b) Structured bot_reply:bot_reply__direct_answer_content:{},bot_reply__non_answer_content={“Some of us never age”};
[0196] c) Analyze the user's next input scope: user_next_input_scope = {query1: "Continue to ask botage", query2: "Asking a counter-question to bot_reply__non_answer_content"};
[0197] d) Identify user intent: the user’s input falls within query2;
[0198] e) The bot sends a reply: bot_reply = {because robots have no age}.
[0199] 2)user_input_1:what's the time?
[0200] bot_reply_1:It's time to learn about Motorola products! What questions do you have?
[0201] user_input_2:i mean the time.
[0202] analyze:
[0203] a) Analyze the last round of dialogue user_input_1 and bot_reply_1: user_input_1={chat_non_bu_question__time_or_data}, bot_reply_1={"It's time to learn about Motorolaproducts! What questions do you have?"};
[0204] b) Structured bot_reply:bot_reply__direct_answer_content:{},bot_reply__non_answer_content={"It's time to learn about Motorola products!","Whatquestions do you have?"};
[0205] c) Analyze the user's next input scope: user_next_input_scope = {query1: "Continue to ask botage", query2: "Asking a counter-question to bot_reply__non_answer_content"};
[0206] d) Identify user intent: the user’s input falls within query1;
[0207] e) The bot sends a reply: bot_reply = {ok, it is xx:xx}.
[0208] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0209] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0210] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0211] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing a conversation interaction, comprising: Get the current input content of the user in the current session; Performing semantic analysis on the current input content, searching in a conversation topic set whether there is a target conversation topic that matches the current input content; wherein the conversation topic set includes at least one conversation topic, and the conversation topic is a conversation topic corresponding to a conversation before the current conversation; If there is a target conversation topic matching the current input content in the conversation topic set, obtaining a first behavior intention of the user at least according to the target conversation topic, and the first behavior intention is used to generate a reply content; The conversation topic set includes at least one first conversation topic and / or a second conversation topic; The first conversation topic is: the conversation topic corresponding to the historical reply statement in the historical reply content of the customer service system in the previous conversation that does not meet the conversation cooperation principle; The second conversation topic is: when there is no historical reply statement satisfying the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation, the conversation topic corresponding to the historical input content of the user in the previous conversation; The conversation topic set is obtained in the following way: Obtaining historical input content of the user and historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence; Obtaining historical reply sentences satisfying the conversation cooperation principle and historical reply sentences not satisfying the conversation cooperation principle in the historical reply content; Adding historical reply sentences in the historical reply content that satisfy the conversation cooperation principle to the first sentence set, and adding historical reply sentences in the historical reply content that do not satisfy the conversation cooperation principle to the second sentence set; If the first statement set is empty, obtaining a second conversation topic corresponding to the historical input content; If the second statement set is not empty, obtain the first conversation topic corresponding to the historical reply statements in the second statement set.
2. The method according to claim 1, further comprising: According to the first behavioral intention, a first reply content is output, wherein the first reply content includes a reply sentence corresponding to the first behavioral intention and satisfying a preset conversation cooperation principle.
3. According to the method of claim 1, the first conversation topic is obtained by: Obtaining historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence; If there are historical reply sentences in the historical reply content that do not meet the conversation cooperation principle, a first conversation topic corresponding to the historical reply sentences that do not meet the conversation cooperation principle is obtained.
4. According to the method of claim 1, the second conversation topic is obtained by: Obtaining historical input content of the user in a previous session of the current session; If there is no historical reply statement satisfying the session cooperation principle in the historical reply content of the customer service system in the previous session of the current session, a second session topic corresponding to the historical input content is obtained.
5. According to the method of claim 1, obtaining the historical reply sentences satisfying the conversation cooperation principle and the historical reply sentences not satisfying the conversation cooperation principle in the historical reply content comprises: Processing the historical input content and the historical reply content of the user by using a sentence classification model to obtain a classification result output by the sentence classification model, wherein the classification result includes: historical reply sentences in the historical reply content that meet the conversation cooperation principle and historical reply sentences that do not meet the conversation cooperation principle; The sentence classification model is trained using multiple sentence pair samples, and one sentence pair sample includes at least an input content sentence, a first reply sentence and a second reply sentence, the first reply sentence has a label that satisfies the conversation cooperation principle, and the second reply sentence has a label that does not satisfy the conversation cooperation principle.
6. The method according to claim 1 or 2, further comprising: If there is no conversation topic matching the current input content in the conversation topic set, obtaining a second behavior intention of the user according to the current input content; According to the second behavioral intention, a second reply content is output, and the second reply content includes: a reply statement corresponding to the second behavioral intention and satisfying the conversation cooperation principle, and / or a reply statement corresponding to the current input content and not satisfying the conversation cooperation principle.
7. A conversation interaction processing device, comprising: An input acquisition unit, used to obtain the current input content of the user in the current session; A topic search unit, configured to perform semantic analysis on the current input content and search in a conversation topic set whether there is a target conversation topic that matches the current input content; wherein the conversation topic set includes at least one conversation topic that is a conversation topic corresponding to a conversation before the current conversation; an intention acquisition unit, configured to obtain a first behavior intention of the user based at least on the target conversation topic if the topic search unit has a target conversation topic matching the current input content in the conversation topic set, wherein the first behavior intention is used to generate a reply content; The conversation topic set includes at least one first conversation topic and / or a second conversation topic; The first conversation topic is: the conversation topic corresponding to the historical reply sentence in the historical reply content of the customer service system in the previous conversation that does not meet the conversation cooperation principle; The second conversation topic is: when there is no historical reply statement satisfying the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation, the conversation topic corresponding to the historical input content of the user in the previous conversation; The conversation topic set is obtained in the following way: Obtaining historical input content of the user and historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence; Obtaining historical reply sentences satisfying the conversation cooperation principle and historical reply sentences not satisfying the conversation cooperation principle in the historical reply content; Adding historical reply sentences in the historical reply content that satisfy the conversation cooperation principle to the first sentence set, and adding historical reply sentences in the historical reply content that do not satisfy the conversation cooperation principle to the second sentence set; If the first statement set is empty, obtaining a second conversation topic corresponding to the historical input content; If the second statement set is not empty, obtain the first conversation topic corresponding to the historical reply statements in the second statement set.
8. An electronic device comprising: A memory, used to store applications and data generated by the operation of the applications; The processor is used to execute the application program to achieve: obtaining the current input content of the user in the current session; Perform semantic analysis on the current input content, and search in a conversation topic set whether there is a target conversation topic that matches the current input content; wherein the conversation topic set includes at least one conversation topic, and the conversation topic is a conversation topic corresponding to a conversation before the current conversation; if there is a target conversation topic that matches the current input content in the conversation topic set, obtain the first behavior intention of the user based on at least the target conversation topic, and the first behavior intention is used to generate reply content; The conversation topic set includes at least one first conversation topic and / or a second conversation topic; The first conversation topic is: the conversation topic corresponding to the historical reply statement in the historical reply content of the customer service system in the previous conversation that does not meet the conversation cooperation principle; The second conversation topic is: when there is no historical reply statement satisfying the conversation cooperation principle in the historical reply content of the customer service system in the previous conversation, the conversation topic corresponding to the historical input content of the user in the previous conversation; The conversation topic set is obtained in the following way: Obtaining historical input content of the user and historical reply content of the customer service system in a previous session of the current session, wherein the historical reply content includes at least one historical reply sentence; Obtaining historical reply sentences satisfying the conversation cooperation principle and historical reply sentences not satisfying the conversation cooperation principle in the historical reply content; Adding historical reply sentences in the historical reply content that satisfy the conversation cooperation principle to the first sentence set, and adding historical reply sentences in the historical reply content that do not satisfy the conversation cooperation principle to the second sentence set; If the first statement set is empty, obtaining a second conversation topic corresponding to the historical input content; If the second statement set is not empty, obtain the first conversation topic corresponding to the historical reply statements in the second statement set.
