Disclosure of Invention
The inventors of the present disclosure found that the following problems exist in the above-described related art: only the solution of the problem is concerned, and the user experience is poor due to the influence on the man-machine conversation effect caused by neglecting the user experience.
In view of this, the present disclosure provides a human-computer conversation technical scheme, which can improve a human-computer conversation effect and enhance user experience.
According to some embodiments of the present disclosure, there is provided a human-machine conversation method including: carrying out natural language processing on conversation contents of a user and a robot to acquire a conversation intention and a type of a current emotion of the user; accumulating the times of the current emotion type appearing in the conversation under the condition that the current emotion type is a negative emotion type; generating a corresponding business answer under the condition that the conversation intention is business consultation; determining whether the business answer belongs to a configured set of negative emotional answers; providing the business answer to the user without belonging to the set of negative emotional answers; and determining an answer mode according to the accumulation result under the condition of belonging to the negative emotional answer set.
In some embodiments, the set of negative emotional responses is divided into a high-level set and a low-level set according to the severity of the event to which the response relates; the determining an answer mode according to the accumulation result comprises: and determining the answer mode according to the accumulated result and the default answer mode of the service answer under the condition that the service answer belongs to the low-level set.
In some embodiments, determining whether the accumulated result is less than a first threshold; in the case of being smaller than the first threshold, providing an answer to the user in the default answer mode; under the condition that the sum is greater than or equal to the first threshold, judging whether the accumulation result is smaller than a second threshold, wherein the second threshold is greater than the first threshold; automatically converting to a manual answer under the condition that the answer is greater than or equal to the second threshold value; prompting the user to manually convert the business answer into a manual answer under the condition that the business answer is provided for the user in the default answer mode and is smaller than the second threshold; and automatically converting the answer into the manual answer under the condition that the answer is smaller than the second threshold and the default answer mode is the condition that the user is prompted to manually convert the answer into the manual answer.
In some embodiments, in the event that the business answer belongs to the high-level set, determining whether the accumulated result is less than a first threshold; in the case of being less than the first threshold, providing the service answer to the user; and automatically switching to a manual answer when the first threshold value is larger than or equal to the first threshold value.
In some embodiments, a membership of the current emotion of the user belonging to each emotion type is obtained; and taking the emotion type with the highest membership degree as the type of the current emotion.
In some embodiments, the method further comprises: under the condition that the conversation intention is non-business consultation, sequentially matching the conversation intention with each configured non-business conversation type; and generating a corresponding non-service answer according to the first matched non-service conversation type.
In some embodiments, a soothing response is generated and provided to the user if the type of the current emotion is a negative emotion type and the degree of membership of the type of the current emotion is above a degree of membership threshold.
In some embodiments, a corresponding rule tree is selected according to the type of the business consultation; and traversing the rule tree to generate the corresponding business answer.
According to further embodiments of the present disclosure, there is provided a human-machine interaction device including: the processing unit is used for carrying out natural language processing on conversation contents of a user and the robot and acquiring the conversation intention and the type of the current emotion of the user; the generating unit is used for generating a corresponding business answer under the condition that the conversation intention is business consultation; the accumulation unit is used for accumulating the times of the current emotion type appearing in the conversation under the condition that the current emotion type is a negative emotion type; a judging unit, configured to judge whether the service answer belongs to a configured negative emotion answer set; and the answering unit is used for providing the business answer for the user under the condition that the answer does not belong to the negative emotion answer set, and determining an answering mode according to the accumulated result under the condition that the answer belongs to the negative emotion answer set.
In some embodiments, the set of negative emotional responses is divided into a high-level set and a low-level set according to the severity of the event to which the response relates; and the answering unit determines the answering mode according to the accumulated result and the default answering mode of the service answer under the condition that the service answer belongs to the low-level set.
In some embodiments, the determining unit determines whether the accumulated result is less than a first threshold value in case the service answer belongs to the high-level set; the answering unit provides the service answer to the user when the answer is smaller than the first threshold, and automatically changes to a manual answer when the answer is larger than or equal to the first threshold.
In some embodiments, the determining unit determines whether the accumulated result is smaller than the first threshold; the answer unit provides an answer to the user in the default answer mode under the condition that the answer is smaller than the first threshold; the judging unit judges whether the accumulated result is smaller than a second threshold value when the accumulated result is larger than or equal to the first threshold value, wherein the second threshold value is larger than the first threshold value; the answer unit automatically changes to a manual answer when the answer is larger than or equal to the second threshold, prompts the user to manually change to the manual answer when the answer is smaller than the second threshold and the default answer mode is to provide the business answer for the user, and automatically changes to the manual answer when the answer is smaller than the second threshold and the default answer mode is to prompt the user to manually change to the manual answer.
In some embodiments, the processing unit obtains a membership degree of the current emotion of the user belonging to each emotion type, and takes the emotion type with the highest membership degree as the type of the current emotion.
In some embodiments, the generating unit matches the dialog intention with each configured non-business dialog type in sequence when the dialog intention is a non-business consultation, and generates a corresponding non-business answer according to a first matched non-business dialog type.
In some embodiments, the generation unit generates a soothing answer if the type of the current emotion is a negative emotion type and the degree of membership of the type of the current emotion is higher than a degree of membership threshold; the answer unit provides the calming answer to the user.
In some embodiments, the generating unit selects a corresponding rule tree according to the type of the business consultation, and traverses the rule tree to generate the corresponding business answer.
According to still further embodiments of the present disclosure, there is provided a human-machine interaction device including: a memory; and a processor coupled to the memory, the processor configured to perform one or more steps of the human-machine dialog method in any of the above embodiments based on instructions stored in the memory device.
According to still further embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements one or more steps of a human-machine conversation method in any of the above embodiments.
In the above embodiment, the corresponding answer mode is selected according to the emotion type of the user during the man-machine conversation. Therefore, the accuracy of answering the questions is guaranteed, the user experience is considered, the man-machine conversation effect is improved, and the user experience is improved.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 illustrates a flow diagram of some embodiments of a human-machine dialog method of the present disclosure.
As shown in fig. 1, the method includes: step 110, obtaining a conversation intention and an emotion type; step 120, accumulating the occurrence times of the negative emotion types; step 130, generating a service answer; step 140, judging whether the service answer belongs to a negative emotion answer set; step 150, providing a service answer; and step 160, determining the answer mode according to the accumulation result.
In step 110, natural language processing is performed on the conversation content of the user and the robot, and the conversation intention and the type of the current emotion of the user are acquired. For example, the dialog intents include business consultations and non-business consultations (e.g., chatting, etc.).
In some embodiments, when a user has a human-computer conversation, the current input and the historical conversation content of the user can be subjected to natural language processing through a machine learning algorithm model. Whether the user is conducting business consultation or non-business consultation can be determined through natural language processing.
In some embodiments, the degree of membership that the current emotion of the user belongs to each emotion type may also be calculated through a natural language processing method, such as a multiple Logistic Regression (Logistic Regression) model, so as to determine the current emotion of the user. For example, the current mood of the user may be determined in the manner in fig. 2.
FIG. 2 illustrates a flow diagram of some embodiments of step 110 of FIG. 1.
As shown in fig. 2, step 110 includes: step 1110, acquiring membership degrees; at step 1120, the type of current emotion is determined.
In step 1110, membership of the current emotion of the user belonging to each emotion type is obtained. For example, the mood types may include negative mood types such as anger, anxiety, and the like, and may also include positive mood types such as happy, calm, and the like. The membership degree can be called emotion concentration, and can be the probability that the current emotion belongs to each emotion type or the grade of the current emotion to each emotion type.
In step 1120, the emotion type with the highest degree of membership is taken as the type of the current emotion. For example, the emotion types may be ranked according to the obtained membership degree, and the emotion type with the highest membership degree may be used as the candidate type.
Under the condition that the user carries out business consultation, the category of the business consultation can be further determined through a machine learning algorithm model. The business answer may then be generated by step 120 in fig. 1.
In step 120, in the case that the type of the current emotion is a negative emotion type, the number of times the current emotion type appears in the current conversation is accumulated. For example, the accumulated result of the user emotion in the current conversation may be obtained from the cache, and the historical emotion record of the user may be updated.
In step 130, in case the dialog is intended for business consultation, a corresponding business answer is generated. Step 130 and step 120 are not executed in a sequential order, and may be executed in parallel. For example, the business answer may be generated in a rule tree manner as shown in fig. 3.
Fig. 3 illustrates a flow diagram of some embodiments of step 130 of fig. 1.
As shown in fig. 3, step 130 includes: step 1310, selecting a rule tree; and step 1320, generating a business answer.
In step 1310, according to the type of business consultation, a corresponding rule tree is selected. For example, routing to a rule tree of a specified type may be based on the type of business consultation.
In some embodiments, each non-leaf node of the rule tree is a rule node for mounting a decision rule and each leaf node is a reply node for mounting one or more traffic replies.
In step 1320, the rule tree is traversed to generate a corresponding business answer.
In some embodiments, nodes of the rule tree are traversed in a left-to-right, top-to-bottom order. And when the conditions of all the non-leaf nodes on the tree path are met, acquiring the service answer and the node ID in the corresponding leaf node.
In the case of a non-business consultation by the user, a non-business answer can be generated in the manner of fig. 4.
Fig. 4 illustrates a flow diagram of some embodiments of a method of generating a non-business answer of the present disclosure.
As shown in fig. 4, the method includes: step 410, matching non-service conversation types; and step 420, generating a non-business answer.
In step 410, in the case that the dialog intention is a non-business consultation, the dialog intention is matched with each non-business dialog type configured in turn.
In some embodiments, a chain of decisions is used to match non-business consultations. For example, non-business conversation types may include user care types, pre-sale types, post-sale types, scrambling code types, non-answer types, and the like. Corresponding judgment nodes can be set according to the non-service conversation type, and the judgment nodes comprise corresponding non-service answers. And then, the non-service consultation is sequentially matched through all the judgment nodes. The arrangement sequence of the judgment nodes can be set according to the actual situation and the service requirement.
In step 420, a corresponding non-business answer is generated based on the first matched non-business conversation type.
In some embodiments, the order of the judgment nodes may be: and matching the conversation intention with the user care node, if the conversation intention can be matched with the user care node, not matching the following nodes, directly determining the conversation intention of the non-business consultation as the user care type, and extracting a corresponding answer from the user care node.
Having generated the corresponding answer for the user's dialog intent, the manner in which the answer is determined may be determined by step 140 and 160 in FIG. 1.
In step 140, it is determined whether the business answer belongs to a configured set of negative emotional answers. In the case of not, step 150 is executed; in case of this, step 160 is performed.
In some embodiments, business responses that fail to address the user's question and cause the user to generate a negative emotion may be filtered out from historical data to generate a set of negative emotion responses. The negative emotional response set may include the node ID of each business response. The negative emotional response set may include responses that the merchant has not performed (e.g., the merchant's own cause of delivery over-time, item breakage, etc.), responses that cause the user to be angry, responses configured to require the user to manually transfer to manual service, responses with low resolution of the question, and so on.
In some embodiments, the set of negative emotional responses may be divided into a high-ranked set and a low-ranked set according to the severity of the event to which the responses included in the set of negative emotional responses relate. For example, the service side can be used for evaluating the severity degree of the event related to the service answer according to the actual situation and the service requirement, and setting the event grade according to the severity degree of the event.
For example, the event level of the delivery overdue event may be set low, and the involved business answers may be divided into a low-level set; the event level of the refund failure section event may be set high (due to the involvement of funding questions) and the involved business answers may be divided into a low level set.
In step 150, the service answer is provided to the user.
In step 160, in case of belonging, the answer mode is determined based on the accumulated result. For example, it may be determined whether a manual answer needs to be forwarded based on the accumulated results. The answering method can include providing a business answer, prompting a user to change to a manual answer, automatically changing to a manual answer, and the like.
In some embodiments, step 160 may be performed in the manner of FIG. 5.
Fig. 5 illustrates a flow diagram of some embodiments of step 160 of fig. 1.
As shown in fig. 5, step 160 includes: step 1610, matching the business answer with the negative emotional answer set; step 1620, determining whether the service answer belongs to the advanced set; step 1630, determining an answer mode according to the accumulation result; and step 1640, determining a reply mode based on the accumulated result and the default mode.
In step 1610, the business answer is matched to the set of negative emotional answers. For example, the node IDs of the business answers may be matched with the node IDs of the business answers in the negative emotive answer set.
In step 1620, it is determined whether the business answer belongs to a higher level set of the set of negative emotional answers. In the case of yes, perform step 1630; in the case of no, step 1640 is performed.
In step 1630, an answer mode is determined based on the accumulated result.
In step 1640, the answer mode is determined based on the accumulated result and the default answer mode for the business answer. For example, a default answer mode of the business answer may be preset, and the default answer mode may include providing the business answer, prompting the user to manually change to a manual answer, and the like.
In some embodiments, step 1630 may be performed in the manner of fig. 6.
FIG. 6 illustrates a flow diagram for some embodiments of step 1630 of FIG. 5.
As shown in fig. 6, step 1630 includes: step 16301, obtaining an accumulation result; step 16302, determining whether the accumulated result is smaller than a first threshold; step 16303, providing a service answer; and step 16304, automatically switching to manual answering.
In step 16301, the accumulated result of the type of the current emotion appearing in the current conversation of the user is obtained.
In step 16302, it is determined whether the accumulated result is less than a first threshold. In the case of less than, execute step 16303; if the value is equal to or greater than this, step 16304 is executed. For example, the first threshold may be set according to actual situations and traffic needs, and the first threshold is a positive integer, such as 3.
In step 16303, the service answer is provided to the user.
In step 16304, the automatic transfer is to a manual answer.
In some embodiments, step 1640 may be performed in the manner of fig. 7.
Fig. 7 shows a flowchart of some embodiments of step 1640 of fig. 5.
As shown in fig. 7, step 1640 includes: step 16401, obtain the accumulated result; step 16402, judge whether the accumulated result is less than the first threshold; step 16403, adopt the default answer mode; step 16404, determine whether the accumulated result is less than a second threshold; step 16405, automatically switching to manual answering; and a step 16406 of determining the answer mode according to the default mode.
In step 16401, the accumulated result of the type of the current emotion appearing in the current conversation by the user is obtained.
In step 16402, it is determined whether the accumulated result is less than a first threshold. In the case of less than, execute step 16403; if the value is equal to or greater than this, step 16404 is executed.
In step 16403, the user is provided with an answer in a default answer mode.
In step 16404, it is determined whether the accumulated result is less than the second threshold. If not, go to step 16405; in the case of less than, execute step 1606;
the second threshold is a positive integer greater than the first threshold, and the first threshold and the second threshold may be set according to actual conditions and traffic demands, for example, the first threshold is 3, and the second threshold is 5. A condition falling below the first threshold indicates that the user has a slight negative emotion and does not require manual service; a case falling between the first threshold and the second threshold indicates that the user has a negative emotion, but the case is not yet serious, and the service experience of the user needs to be improved; a situation falling above or equal to the second threshold value indicates that the user has a severe negative emotion and needs to be manually serviced.
In step 16405, automatically transition to a manual answer.
In step 16406, the user needs to be provided with a better answer way than the service experience of the default way. For example, in the case that the default answering mode is to provide a service answer for the user, prompting the user to manually convert to a manual answer; and automatically converting to the manual answer under the condition that the default answer mode is to prompt the user to manually convert to the manual answer. That is, the answer mode is adopted which is one level higher in service feeling than the default answer mode.
In some embodiments, whether consulting business or non-business, a soothing answer is generated and provided to the user if the type of the current emotion is a negative emotion type and the degree of membership of the type of the current emotion is above a degree of membership threshold.
In the above embodiment, the corresponding answer mode is selected according to the emotion type of the user in the process of the man-machine conversation. Therefore, the accuracy of answering the questions is guaranteed, the user experience is considered, the man-machine conversation effect is improved, and the user experience is improved.
Fig. 8 illustrates a block diagram of some embodiments of a human-machine dialog device of the present disclosure.
As shown in fig. 8, the human-machine interaction device 8 includes a processing unit 81, a generating unit 82, an accumulating unit 83, a judging unit 84, a judging unit 85, and a responding unit 86.
The processing unit 81 performs natural language processing on the content of the conversation between the user and the robot, and acquires the type of the conversation intention and the current emotion of the user. For example, the processing unit 81 obtains the membership degree of the current emotion of the user belonging to each emotion type, and takes the emotion type with the highest membership degree as the type of the current emotion.
In case the dialog is intended for a business consultation, the generating unit 82 generates a corresponding business answer. For example, the generating unit 83 selects a corresponding rule tree according to the type of the business consultation, traverses the rule tree, and generates a corresponding business answer.
In some embodiments, in the case that the dialog intention is a non-business consultation, the generating unit 82 matches the dialog intention with each configured non-business dialog type in turn, and generates a corresponding non-business answer according to the first matched non-business dialog type.
In some embodiments, the generation unit 82 generates the soothing response if the type of the current emotion is a negative emotion type and the degree of membership of the type of the current emotion is higher than a degree of membership threshold. The response unit 85 provides a soothing response to the user.
The accumulation unit 83 accumulates the number of times that the current emotion type appears in the present session, in a case where the current emotion type is a negative emotion type. For example, the set of negative emotional answers is divided into a high-level set and a low-level set according to the event level to which the answers contained therein relate.
The decision unit 84 decides whether the business answer belongs to a configured set of negative emotional answers. In the case of not belonging, the answering unit 85 provides the service answer to the user; in the case of this, the answer unit 85 determines the answer mode from the accumulated result.
In some embodiments, the set of negative emotional answers is divided into a high-level set and a low-level set according to the severity of the event to which the answer relates. In the case where the service answer belongs to the high-level set, the answering unit 85 determines an answer mode from the accumulated result; in the case where the service answer belongs to the low-level set, the answering unit 85 determines the answer mode based on the accumulated result and the default answer mode of the service answer.
In some embodiments, the determining unit 84 determines whether the accumulated result is less than a first threshold. In the case of being less than the first threshold, the answering unit 85 provides the user with a service answer; when the answer is equal to or greater than the first threshold, the answer unit 85 automatically changes to a manual answer.
In some embodiments, the determining unit 84 determines whether the accumulated result is less than a first threshold. In the case of being smaller than the first threshold, the answering unit 85 provides the answer to the user in a default answering mode. When the value is equal to or larger than the first threshold value, the determination unit 84 determines whether the accumulation result is smaller than the second threshold value.
When the answer is equal to or greater than the second threshold, the answer unit 85 automatically changes to a manual answer; if the answer mode is smaller than the second threshold value and the default answer mode is to provide a business answer to the user, the answer unit 85 prompts the user to manually convert the answer mode into a manual answer mode; in the case where the answer is smaller than the second threshold value and the default answer mode is to prompt the user to manually turn to a manual answer, the answer unit 85 automatically turns to a manual answer.
In the above embodiment, the corresponding answer mode is selected according to the emotion type of the user in the process of the man-machine conversation. Therefore, the accuracy of answering the questions is guaranteed, the user experience is considered, the man-machine conversation effect is improved, and the user experience is improved.
FIG. 9 shows a block diagram of further embodiments of the human-machine dialog device of the present disclosure.
As shown in fig. 9, the man-machine interaction device 9 of this embodiment includes: a memory 91 and a processor 92 coupled to the memory 91, the processor 92 being configured to perform one or more steps of a human-machine interaction method in any one of the embodiments of the present disclosure based on instructions stored in the memory 91.
The memory 91 may include, for example, a system memory, a fixed nonvolatile storage medium, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), a database, and other programs.
FIG. 10 illustrates a block diagram of still further embodiments of the human-machine dialog device of the present disclosure.
As shown in fig. 10, the man-machine conversation device 10 of this embodiment includes: a memory 101 and a processor 102 coupled to the memory 101, wherein the processor 102 is configured to execute the man-machine interaction method in any of the foregoing embodiments based on instructions stored in the memory 101.
Memory 101 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.
The human machine conversation device 10 may further include an input-output interface 103, a network interface 104, a storage interface 105, and the like. These interfaces 103, 104, 105 and the connection between the memory 101 and the processor 102 may be, for example, via a bus 106. The input/output interface 103 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 104 provides a connection interface for various networking devices. The storage interface 104 provides a connection interface for external storage devices such as an SD card and a usb disk.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
So far, the man-machine conversation method, the man-machine conversation apparatus, and the computer-readable storage medium according to the present disclosure have been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.
The method and system of the present disclosure may be implemented in a number of ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the foregoing examples are for purposes of illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.