Summary of the invention
Inventor's discovery of the disclosure is above-mentioned, and there are the following problems in the related technology: being concerned only with the solution of problem, ignores use
Family impression, to influence human-computer dialogue effect, leads to poor user experience.
In consideration of it, human-computer dialogue effect can be improved the present disclosure proposes a kind of interactive scheme, user is promoted
Experience.
According to some embodiments of the present disclosure, a kind of interactive method is provided, comprising: to pair of user and robot
It talks about content and carries out natural language processing, the dialogue for obtaining the user is intended to and the type of current emotional;In the current emotional
Type be negative type of emotion in the case where, the number that the current emotional type occurs in this dialogue is carried out tired
Add;In the case where the dialogue is intended to business consultation, generates corresponding business and answer;Judge whether the business answer belongs to
Set is answered in the negative emotions of configuration;In the case where being not belonging to the negative emotions answer set, provided to the user
The business is answered;In the case where belonging to the negative emotions answer set, according to the accumulation result definite response mode.
In some embodiments, the negative emotions are answered set and are divided according to the severity for answering the event being related to
For high-grade set and inferior grade set;It is described according to the accumulation result definite response mode include: the business answer
In the case where belonging to the inferior grade set, institute is determined according to the default answer-mode that the accumulation result and the business are answered
State answer-mode.
In some embodiments, judge whether the accumulation result is less than first threshold;It is being less than the first threshold
In the case of, answer is provided a user using the default answer-mode;In the case where being more than or equal to the first threshold, judgement
Whether the accumulation result is less than second threshold, and the second threshold is greater than the first threshold;It is being more than or equal to described second
In the case where threshold value, switch to manual answering automatically;In the case where being less than the second threshold, and the default answer-mode is
In the case where providing the business answer to the user, prompting the user hand turn is manual answering;It is being less than described the
In the case where two threshold values, and the default answer-mode is in the case where prompting the user hand turn to be manual answering, automatically
Switch to manual answering.
In some embodiments, in the case where business answer belongs to the high-grade set, judge described cumulative
As a result whether it is less than first threshold;In the case where being less than the first threshold, the business is provided to the user and is answered;?
In the case where more than or equal to the first threshold, switch to manual answering automatically.
In some embodiments, the current emotional for obtaining the user belongs to the degree of membership of each type of emotion;By the person in servitude
Type of the highest type of emotion of category degree as the current emotional.
In some embodiments, this method further include:, will be described in the case where the dialogue is intended to non-traffic consulting
Dialogue is intended to successively be matched with each non-traffic dialogue types of configuration;It is generated according to non-traffic dialogue types matched at first
Corresponding non-traffic answer.
It in some embodiments, is negative type of emotion, and the class of the current emotional in the type of the current emotional
In the case that the degree of membership of type is higher than degree of membership threshold value, generates and provided to the user and pacify answer.
In some embodiments, according to the type of the business consultation, corresponding rule tree is selected;Traverse the rule
Tree generates corresponding business and answers.
According to other embodiments of the disclosure, provide a kind of human-computer dialogue device, comprising: processing unit, for
The conversation content of family and robot carries out natural language processing, and the dialogue for obtaining the user is intended to and the type of current emotional;
Generation unit, for generating corresponding business and answering in the case where the dialogue is intended to business consultation;Summing elements are used
In in the case where the type of the current emotional is negative type of emotion, the current emotional type is gone out in this dialogue
Existing number adds up;Judging unit, the negative emotions for judging whether the business answer belongs to configuration answer set;
Unit is answered, for providing the business to the user and answering in the case where being not belonging to the negative emotions answer set,
With when the negative emotions that belong to answer set, according to the accumulation result definite response mode.
In some embodiments, the negative emotions are answered set and are divided according to the severity for answering the event being related to
For high-grade set and inferior grade set;The answer unit is the case where business answer belongs to the inferior grade set
Under, the answer-mode is determined according to the default answer-mode that the accumulation result and the business are answered.
In some embodiments, the judging unit the business answer belong to the high-grade set in the case where,
Judge whether the accumulation result is less than first threshold;The answer unit is in the case where being less than the first threshold, to institute
It states user and the business answer is provided, in the case where being more than or equal to the first threshold, the answer unit switchs to people automatically
Work is answered.
In some embodiments, the judging unit judges whether the accumulation result is less than the first threshold;It is described
Unit is answered in the case where being less than the first threshold, answer is provided a user using the default answer-mode;It is described to sentence
Disconnected unit judges whether the accumulation result is less than second threshold in the case where being more than or equal to the first threshold, described the
Two threshold values are greater than the first threshold;The answer unit switchs to people in the case where being more than or equal to the second threshold automatically
Work is answered, and in the case where being less than the second threshold, and the default answer-mode is provides the business to the user
In the case where answer, prompting the user hand turn is manual answering, in the case where being less than the second threshold, and it is described silent
Recognizing answer-mode is in the case where prompting the user hand turn to be manual answering, to switch to manual answering automatically.
In some embodiments, the current emotional that the processing unit obtains the user belongs to being subordinate to for each type of emotion
Degree, using the highest type of emotion of the degree of membership as the type of the current emotional.
In some embodiments, the generation unit, will be described in the case where the dialogue is intended to non-traffic consulting
Dialogue is intended to successively be matched with each non-traffic dialogue types of configuration, is generated according to non-traffic dialogue types matched at first
Corresponding non-traffic answer.
In some embodiments, the generation unit is negative type of emotion in the type of the current emotional, and described
In the case that the degree of membership of the type of current emotional is higher than degree of membership threshold value, answer is pacified in generation;The answer unit is to described
User pacifies answer described in providing.
In some embodiments, the generation unit selects corresponding rule tree according to the type of the business consultation, time
The rule tree is gone through, corresponding business is generated and answers.
According to the other embodiment of the disclosure, a kind of human-computer dialogue device is provided, comprising: memory;Be coupled to institute
The processor of memory is stated, the processor is configured to executing above-mentioned based on the instruction being stored in the memory device
One or more steps in interactive method in any one embodiment.
According to the still other embodiments of the disclosure, a kind of computer readable storage medium is provided, computer is stored thereon with
Program, the program realize one or more steps in the interactive method in any of the above-described a embodiment when being executed by processor
Suddenly.
In the above-described embodiments, corresponding answer side is selected according to the type of emotion of user during human-computer dialogue
Formula.In this way, not only ensure that the accuracy answered a question, the impression of user has also been taken into account, so as to improve human-computer dialogue effect, has been mentioned
Rise user experience.
Specific embodiment
The various exemplary embodiments of the disclosure are described in detail now with reference to attached drawing.It should also be noted that unless in addition having
Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
Scope of disclosure.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality
Proportionate relationship draw.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, never as to the disclosure
And its application or any restrictions used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
Fig. 1 shows the flow chart of some embodiments of the interactive method of the disclosure.
As shown in Figure 1, this method comprises: step 110, obtains dialogue intention and type of emotion;Step 120, it adds up negative
Type of emotion frequency of occurrence;Step 130, business is generated to answer;Step 140, judge whether business answer belongs to negative emotions and return
Answer set;Step 150, business answer is provided;With step 160, according to accumulation result definite response mode.
In step 110, natural language processing is carried out to the conversation content of user and robot, obtains the dialogue meaning of user
The type of figure and current emotional.For example, dialogue is intended to include business consultation and non-traffic consulting (such as chatting).
It in some embodiments, can be by machine learning algorithm model to user's when user carries out human-computer dialogue
Current input and historical session content carry out natural language processing.It can determine that user is to carry out industry by natural language processing
Business consulting or non-traffic consulting.
In some embodiments, can also be by natural language processing method, such as multiple logistic regression (Logistic
Regression) model, the current emotional for calculating user belongs to the degree of membership of each type of emotion, so that it is determined that user's is current
Mood.For example, can determine the current emotional of user by the mode in Fig. 2.
Fig. 2 shows the flow charts of some embodiments of the step 110 of Fig. 1.
As shown in Fig. 2, step 110 includes: step 1110, degree of membership is obtained;Step 1120, the class of current emotional is determined
Type.
In step 1110, the current emotional for obtaining user belongs to the degree of membership of each type of emotion.For example, type of emotion can
It can also include the positive type of emotion such as happiness, calmness to include the negative emotions type such as anger, anxiety.Degree of membership can be referred to as
For mood concentration, degree of membership can be the probability that current emotional belongs to each type of emotion, be also possible to current emotional for each feelings
The grade of thread type.
In step 1120, using the highest type of emotion of degree of membership as the type of current emotional.For example, can be according to obtaining
The degree of membership taken is ranked up each type of emotion, using the highest type of emotion of degree of membership as candidate type.
In the case where user carries out business consultation, the business can also be further determined that by machine learning algorithm model
Type belonging to consulting.It is answered it is then possible to generate business by the step 120 in Fig. 1.
In the step 120, in the case where the type of current emotional is negative type of emotion, to current emotional type at this
The number occurred in secondary dialogue adds up.For example, can from caching obtain current session in user emotion accumulation result,
And update the history mood record of user.
In step 130, it in the case where dialogue is intended to business consultation, generates corresponding business and answers.Step 130 and
The sequencing that step 120 is not carried out can also execute parallel.For example, industry can be generated using the rule tree mode in Fig. 3
Business answer.
Fig. 3 shows the flow chart of some embodiments of the step 130 of Fig. 1.
As shown in figure 3, step 130 includes: step 1310, rule tree is selected;With step 1320, generates business and answer.
In step 1310, according to the type of business consultation, corresponding rule tree is selected.For example, can be consulted according to business
The type of inquiry is routed to the rule tree of specified type.
In some embodiments, each non-leaf nodes of rule tree is that regular node is used for carry judgment rule, each
Leaf node is to answer node to answer for carry one or more business.
In step 1320, the rule tree is traversed, corresponding business is generated and answers.
In some embodiments, using from left to right, from top to bottom sequence traverses the node of rule tree.When tree road
When the condition of all non-leaf nodes is all satisfied on diameter, the business in corresponding leaf node that obtains is answered and node ID.
In the case where user carries out non-traffic consulting, non-traffic answer can be generated by the mode in Fig. 4.
Fig. 4 shows the flow chart of some embodiments of the non-traffic answer method of generation of the disclosure.
As shown in figure 4, this method comprises: step 410, matches non-traffic dialogue types;With step 420, generate non-traffic
It answers.
In step 410, in the case where dialogue is intended to non-traffic consulting, dialogue is intended to successively each non-with configuration
Service conversation type is matched.
In some embodiments, judge to match non-traffic consulting using chain type.For example, non-traffic dialogue types can
With include user show loving care for type, pre-sales type, after sale type, messy code type, can not answer type etc..It can be according to non-traffic right
Call type setting judges node accordingly, judges to include corresponding non-traffic answer in node.Then successively by non-traffic consulting
It is matched by each judgement node.It can need to be arranged with business according to the actual situation and judge putting in order for node.
At step 420, corresponding non-traffic answer is generated according to non-traffic dialogue types matched at first.
In some embodiments, it can be set and judge putting in order for node are as follows: user shows loving care for node, pre-sales node, sells
Dialogue is now intended to show loving care for node matching with user, if it is possible to match, then the matching without node below, directly by posterior nodal point
It connects and determines that the dialogue of the non-traffic consulting is intended to user and shows loving care for type, and extract the corresponding answer in user's care node.
Dialogue for user is intended to after generating corresponding answer, and can be determined back by the step 140-160 in Fig. 1
The mode answered.
In step 140, judge business answers the negative emotions answer set for whether belonging to configuration.The case where being not belonging to
Under, execute step 150;In the case where belonging to, step 160 is executed.
In some embodiments, can be filtered out according to historical data not can solve customer problem, and user is generated
The business of negative emotions is answered, and answers set to generate negative emotions.Negative emotions, which are answered, may include each business time in set
The node ID answered.Negative emotions answer set in may include businessman do not honour an agreement answer (such as dispatching exceed the time limit, article breakage quotient
Family's self reason the problem of causing), the answer that causes user's anger, be configured as needing the answer of user hand turn manual service,
The low answer etc. of problem fix rate.
In some embodiments, the serious journey for the event that the answer for including in set is related to can be answered according to negative emotions
Degree answers negative emotions to set and is divided into high-grade set and inferior grade set.For example, can be set out with business side, according to reality
Border situation and business need to assess business answer and are related to the severity of event, according to the severity setting event etc. of event
Grade.
For example, can be set dispatching exceed the time limit event event class it is low, the answer of the business that is related to can be divided into inferior grade
Set;Can be set reimbursement unsuccessfully save event event class it is high (because being related to bankroll problem), the business answer being related to can be with
It is divided into inferior grade set.
In step 150, business answer is provided a user.
In a step 160, in the case where belonging to, according to accumulation result definite response mode.For example, can be according to cumulative
As a result it determines the need for turning manual answering.Answer-mode may include that offer business is answered, prompt user turns manual answering, certainly
Turn manual answering etc..
In some embodiments, step 160 can be executed by the mode in Fig. 5.
Fig. 5 shows the flow chart of some embodiments of the step 160 of Fig. 1.
As shown in figure 5, step 160 includes: step 1610, business is answered and answers sets match with negative emotions;Step
1620, judge whether business answer belongs to sophisticated aggregation;Step 1630, according to accumulation result definite response mode;And step
1640, according to accumulation result and default behavior definite response mode.
In step 1610, business is answered and answers sets match with negative emotions.For example, the section that business can be answered
Point ID answers the node ID that business is answered in set with negative emotions and matches.
In step 1620, judge business answers the sophisticated aggregation whether belonged in negative emotions answer set.Belonging to
In the case where, execute step 1630;In the case where being not belonging to, step 1640 is executed.
In step 1630, according to accumulation result definite response mode.
In step 1640, according to the default answer-mode definite response mode of accumulation result and business answer.For example, can
To preset the default answer-mode of business answer, default answer-mode may include that offer business is answered, prompts user hand
Turn manual answering etc..
In some embodiments, step 1630 can be executed by the mode in Fig. 6.
Fig. 6 shows the flow chart of some embodiments of the step 1630 of Fig. 5.
As shown in fig. 6, step 1630 includes: step 16301, accumulation result is obtained;Step 16302, judge accumulation result
Whether first threshold is less than;Step 16303, business answer is provided;With step 16304, from turn manual answering.
In step 16301, obtains user and occur the accumulation result of the type of current emotional in this dialogue.
In step 16302, judge whether accumulation result is less than first threshold.In the case where being less than, step is executed
16303;In the case where being more than or equal to, step 16304 is executed.For example, can be needed to set according to the actual situation with business
One threshold value, first threshold are positive integer, such as can be 3.
In step 16303, business answer is provided a user.
In step 16304, switch to manual answering automatically.
In some embodiments, step 1640 can be executed by the mode in Fig. 7.
Fig. 7 shows the flow chart of some embodiments of the step 1640 of Fig. 5.
As shown in fig. 7, step 1640 includes: step 16401, accumulation result is obtained;Step 16402, judge accumulation result
Whether first threshold is less than;Step 16403, using default answer-mode;Step 16404, judge accumulation result whether less than
Two threshold values;Step 16405, from turn manual answering;With step 16406, according to default behavior definite response mode.
In step 16401, obtains user and occur the accumulation result of the type of current emotional in this dialogue.
In step 16402, judge whether accumulation result is less than first threshold.In the case where being less than, step is executed
16403;In the case where being more than or equal to, step 16404 is executed.
In step 16403, answer is provided a user using default answer-mode.
In step 16404, judge whether accumulation result is less than second threshold.In the case where being more than or equal to, step is executed
Rapid 16405;In the case where being less than, step 1606 is executed;
Second threshold is greater than the positive integer of first threshold, first threshold can be arranged with business demand according to the actual situation
And second threshold, for example, first threshold is 3, second threshold 5.It falls in and shows that user occurs less than the case where first threshold
Slight negative emotions are not necessarily to manual service;It is negative that the case where falling between first threshold and second threshold shows that user occurs
Face mood, but it is still not serious, need to be promoted the service impression of user;It falls in and shows that user goes out more than or equal to the case where second threshold
Serious negative emotions are showed, have needed to carry out manual service.
In step 16405, switch to manual answering automatically.
In step 16406, needs to provide for user and experience better answer-mode than the service of default behavior.For example,
In the case where defaulting answer-mode is that the business that provides a user is answered, prompt user hand turn is manual answering;Defaulting back
The mode of answering is in the case that prompt user hand turn is manual answering, to switch to manual answering automatically.That is, using servicing
Answer-mode more higher leveled than default answer-mode in impression.
It in some embodiments, is negative in the type of current emotional either to business consultation or non-traffic consulting
Type of emotion, and the degree of membership of the type of current emotional is generated and is provided a user and pacify higher than in the case where degree of membership threshold value
It answers.
In above-described embodiment, corresponding answer-mode is selected according to the type of emotion of user during human-computer dialogue.
In this way, not only ensure that the accuracy answered a question, the impression of user has also been taken into account, so as to improve human-computer dialogue effect, has been promoted
User experience.
Fig. 8 shows the block diagram of some embodiments of the human-computer dialogue device of the disclosure.
As shown in figure 8, human-computer dialogue device 8 includes processing unit 81, generation unit 82, summing elements 83, judging unit
84, judging unit 85 and answer unit 86.
Processing unit 81 carries out natural language processing to the conversation content of user and robot, and the dialogue for obtaining user is intended to
With the type of current emotional.For example, the current emotional that processing unit 81 obtains user belongs to the degree of membership of each type of emotion, will be subordinate to
Type of the highest type of emotion of category degree as current emotional.
In the case where dialogue is intended to business consultation, generation unit 82 generates corresponding business and answers.For example, generating single
Member 83 selects corresponding rule tree according to the type of business consultation, and traversal rule tree generates corresponding business and answers.
In some embodiments, in the case where dialogue is intended to non-traffic consulting, generation unit 82 will dialogue be intended to according to
Secondary each non-traffic dialogue types with configuration are matched, and generate corresponding non-industry according to non-traffic dialogue types matched at first
Business is answered.
In some embodiments, generation unit 82 is negative type of emotion in the type of current emotional, and current emotional
In the case that the degree of membership of type is higher than degree of membership threshold value, answer is pacified in generation.Answer unit 85, which provides a user, pacifies answer.
Summing elements 83 are in the case where the type of current emotional is negative type of emotion, to current emotional type at this
The number occurred in dialogue adds up.For example, negative emotions answer set according to the event etc. wherein included answered and be related to
Grade is divided into high-grade set and inferior grade set.
Judging unit 84 judges business answers the negative emotions answer set for whether belonging to configuration.The case where being not belonging to
Under, it answers unit 85 and provides a user the business answer;In the case where belonging to, answers unit 85 and determined according to accumulation result
Answer-mode.
In some embodiments, negative emotions answer set and are divided into height according to the severity for answering the event being related to
Class set and inferior grade set.In the case where business answer belongs to high-grade set, unit 85 is answered according to accumulation result
Definite response mode;In the case where business answer belongs to inferior grade set, answers unit 85 and returned according to accumulation result and business
The default answer-mode definite response mode answered.
In some embodiments, judging unit 84 judges whether accumulation result is less than first threshold.It is being less than first threshold
In the case where, it answers unit 85 and provides a user business answer;In the case where being more than or equal to first threshold, unit 85 is answered certainly
Turn is manual answering.
In some embodiments, judging unit 84 judges whether accumulation result is less than first threshold.It is being less than first threshold
In the case where, unit 85, which is answered, using default answer-mode provides a user answer.In the case where being more than or equal to first threshold,
Judging unit 84 judges whether accumulation result is less than second threshold.
In the case where being more than or equal to second threshold, answers unit 85 and switch to manual answering automatically;It is being less than second threshold
In the case where, and defaulting answer-mode is to answer unit 85 in the case that the business that provides a user is answered and prompt user hand turn
For manual answering;In the case where being less than second threshold, and it is manual answering's that default answer-mode, which is prompt user hand turn,
In the case of, it answers unit 85 and switchs to manual answering automatically.
In above-described embodiment, corresponding answer-mode is selected according to the type of emotion of user during human-computer dialogue.
In this way, not only ensure that the accuracy answered a question, the impression of user has also been taken into account, so as to improve human-computer dialogue effect, has been promoted
User experience.
Fig. 9 shows the block diagram of other embodiments of the human-computer dialogue device of the disclosure.
As shown in figure 9, the human-computer dialogue device 9 of the embodiment includes: memory 91 and is coupled to the memory 91
Processor 92, processor 92 are configured as executing any one implementation in the disclosure based on the instruction being stored in memory 91
One or more steps in interactive method in example.
Wherein, memory 91 is such as may include system storage, fixed non-volatile memory medium.System storage
Such as be stored with operating system, application program, Boot loader (Boot Loader), database and other programs etc..
Figure 10 shows the block diagram of the other embodiment of the human-computer dialogue device of the disclosure.
As shown in Figure 10, the human-computer dialogue device 10 of the embodiment includes: memory 101 and is coupled to the memory
101 processor 102, processor 102 are configured as based on the instruction being stored in memory 101, execute it is aforementioned any one
Interactive method in embodiment.
Memory 101 is such as may include system storage, fixed non-volatile memory medium.System storage is for example
It is stored with operating system, application program, Boot loader (Boot Loader) and other programs etc..
Human-computer dialogue device 10 can also include input/output interface 103, network interface 104, memory interface 105 etc..This
It can for example be connected by bus 106 between a little interfaces 103,104,105 and memory 101 and processor 102.Wherein, defeated
Enter output interface 103 and provides connecting interface for input-output equipment such as display, mouse, keyboard, touch screens.Network interface 104
Connecting interface is provided for various networked devices.The external storages such as memory interface 104 is SD card, USB flash disk provide connecting interface.
Those skilled in the art should be understood that embodiment of the disclosure can provide as method, system or computer journey
Sequence product.Therefore, complete hardware embodiment, complete software embodiment or combining software and hardware aspects can be used in the disclosure
The form of embodiment.Moreover, it wherein includes the calculating of computer usable program code that the disclosure, which can be used in one or more,
Machine can use the meter implemented in non-transient storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of calculation machine program product.
So far, the interactive method according to the disclosure, human-computer dialogue device and computer-readable is described in detail
Storage medium.In order to avoid covering the design of the disclosure, some details known in the field are not described.Those skilled in the art
Member as described above, completely it can be appreciated how implementing technical solution disclosed herein.
Disclosed method and system may be achieved in many ways.For example, can by software, hardware, firmware or
Software, hardware, firmware any combination realize disclosed method and system.The said sequence of the step of for the method
Merely to be illustrated, the step of disclosed method, is not limited to sequence described in detail above, special unless otherwise
It does not mentionlet alone bright.In addition, in some embodiments, also the disclosure can be embodied as to record program in the recording medium, these programs
Including for realizing according to the machine readable instructions of disclosed method.Thus, the disclosure also covers storage for executing basis
The recording medium of the program of disclosed method.
Although being described in detail by some specific embodiments of the example to the disclosure, the skill of this field
Art personnel it should be understood that above example merely to be illustrated, rather than in order to limit the scope of the present disclosure.The skill of this field
Art personnel are it should be understood that can modify to above embodiments in the case where not departing from the scope of the present disclosure and spirit.This public affairs
The range opened is defined by the following claims.