Summary of the invention
Inventors noted that being asked in man-machine conversation mode in the related technology since chat robots can only be answered passively
Topic, user may need to propose many problems, can just obtain desired answer, waste the time of user, user experience is poor.
To solve the above-mentioned problems, the embodiment of the present disclosure proposes following solution.
According to the one side of the embodiment of the present disclosure, a kind of interactive method is provided, comprising: obtain user in current sessions
In the problem of having proposed;Described the problem of having proposed, is input to neural network model, to predict the user in current sessions
In classification belonging to the next problem that will propose;The corresponding answer of classification belonging to next problem is pushed to institute
State user.
In some embodiments, the neural network model is trained according to such as under type: being obtained from conversation recording
The problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;Classify to each problem,
To obtain classification belonging to each problem;According to the corresponding classification of i-th of problem in each historical session, pending training is determined
Classification, 2≤i≤N, N are the problems in each historical session quantity;With i-th of problem in each historical session it is corresponding to
The classification being trained, as output, is trained the neural network model as input, preceding i-1 problem.
In some embodiments, according to the corresponding classification of i-th of problem in each historical session, pending training is determined
Classification includes: to determine the corresponding problematic amount of each classification according to the corresponding classification of i-th of problem in each historical session;It will
The classification that corresponding problematic amount is greater than preset quantity is determined as the classification of pending training.
In some embodiments, the method also includes: obtain the evaluation information of the user;Believed according to the evaluation
Breath, analyzes the accuracy of classification belonging to next problem of prediction;In the case where the accuracy is more than threshold value, with
Described the problem of having proposed, is used as output as classification belonging to input, next problem, to the neural network model
It is trained.
In some embodiments, described the problem of having proposed, is input to neural network model, to predict that the user exists
Classification belonging to the next problem that will be proposed in current sessions includes: that described the problem of having proposed is input to first nerves
Network model, to predict next problem;Next problem is input to nervus opticus network model, to predict
State classification belonging to next problem.
In some embodiments, the first nerves network model is trained according to such as under type: from conversation recording
Obtain the problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;In each historical session
Preceding i-1 problem as input, i-th problem as output, the first nerves network model is trained, 2≤i≤
N, N are the problems in each historical session quantity.
In some embodiments, i=N.
In some embodiments, the nervus opticus network model is trained according to such as under type: from conversation recording
Obtain the problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;It obtains belonging to each problem
Classification;Using each problem as input, the corresponding classification of each problem as export, to the nervus opticus network model into
Row training.
According to the another aspect of the embodiment of the present disclosure, a kind of human-computer dialogue device is provided, comprising: module is obtained, for obtaining
Take the problem of family has proposed in current sessions;Prediction module, for described the problem of having proposed to be input to neural network
Model, classification belonging to the next problem that will be proposed with to predict the user in current sessions;Pushing module, being used for will
The corresponding answer of classification belonging to next problem is pushed to the user.
In some embodiments, the neural network model is trained according to such as under type: being obtained from conversation recording
The problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;Classify to each problem,
To obtain classification belonging to each problem;According to the corresponding classification of i-th of problem in each historical session, pending training is determined
Classification, 2≤i≤N, N are the problems in each historical session quantity;With i-th of problem in each historical session it is corresponding to
The classification being trained, as output, is trained the neural network model as input, preceding i-1 problem.
In some embodiments, according to the corresponding classification of i-th of problem in each historical session, determine that each classification is corresponding
The problem of quantity;The classification that corresponding problematic amount is greater than preset quantity is determined as to the classification of pending training.
In some embodiments, collection module is evaluated, for collecting the evaluation information of the user;Analysis of the accuracy mould
Block, for analyzing the accuracy of classification belonging to next problem of prediction according to the evaluation information;The prediction mould
Block is also used in the case where the accuracy is more than threshold value, will be belonging to described the problem of having proposed and next problem
Classification is input to training module, so that the training module is using described the problem of having proposed as input, next problem
Affiliated classification is trained the neural network model as output.
In some embodiments, the prediction module is used to described the problem of having proposed being input to first nerves network mould
Type, to predict next problem;Next problem is input to nervus opticus network model, it is described next to obtain
Classification belonging to a problem.
In some embodiments, the first nerves network model is trained according to such as under type: from conversation recording
Obtain the problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;In each historical session
Preceding i-1 problem as input, i-th problem as output, the first nerves network model is trained, 2≤i≤
N, N are the problems in each historical session quantity.
In some embodiments, i=N.
In some embodiments, the nervus opticus network model is trained according to such as under type: from conversation recording
Obtain the problem of being suggested in multiple historical session, wherein each historical session includes multiple problems;It obtains belonging to each problem
Classification;Using each problem as input, the corresponding classification of each problem as export, to the nervus opticus network model into
Row training.
According to the embodiment of the present disclosure in another aspect, providing a kind of human-computer dialogue device, comprising: memory;And coupling
To the processor of the memory, the processor is configured to above-mentioned any based on the instruction execution for being stored in the memory
Method described in one embodiment.
According to the also one side of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, calculating is stored thereon with
Method described in any one above-mentioned embodiment is realized in machine program instruction, the instruction when being executed by processor.
In the embodiment of the present disclosure, the problem of neural network model can have proposed according to user, prediction user will be proposed
Next problem belonging to classification, the corresponding answer of classification belonging to next problem is then pushed to user.It is such
In man-machine conversation mode, in the case that user does not also propose next problem, the answer ready to receive to next problem is saved
Enquirement time of user, the user experience is improved.
Below by drawings and examples, the technical solution of the disclosure is described in further detail.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete
Site preparation description, it is clear that described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.It is based on
Embodiment in the disclosure, those of ordinary skill in the art without creative labor it is obtained it is all its
His embodiment belongs to the range of disclosure protection.
Unless specifically stated otherwise, positioned opposite, the digital table of the component and step that otherwise illustrate in these embodiments
Up to the unlimited the scope of the present disclosure processed of formula and numerical value.
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.
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 is the flow diagram according to the interactive method of some embodiments of the disclosure.
In step 102, the problem of user has proposed in current sessions is obtained.
Such as, it has been suggested that the problem of may include one or more.In some embodiments, it has been suggested that the problem of at least wrap
Two problems are included, to improve the accuracy of prediction.In some embodiments, it has been suggested that the problem of legal to be asked after screening
Topic, for example, may include some system notification messages in current sessions, it has been suggested that the problem of do not include these systems notify disappear
Breath.
In step 104, neural network model will be input to the problem of having proposed, to predict that user will in current sessions
Classification belonging to the next problem proposed.
Here, classification belonging to problem for example may include Delivery Cycle, when outbound, commodity price consulting, close
Phase activity consulting, can it is preferential, service single inquiry, packing list, household electrical appliances installation, logistics all-the-way tracking, certified products guarantee etc..
Such as, it has been suggested that the problem of include " this commodity is available in stock ", next problem is " this commodity has preferential ".
In this case, can classification belonging to the next problem that predicted is preferential.In another example, it has been suggested that the problem of include " this
A commodity are available in stock " and " this commodity has preferential ", next problem be " placing an order now, when can be sent to ".It is this
In the case of, classification belonging to next problem for predicting is Delivery Cycle.
In some implementations, the problem of neural network model can be according to having proposed directly predicts next ask
Classification belonging to topic.The training method of neural network model will be discussed in detail in conjunction with Fig. 2 hereinafter.
In step 106, the corresponding answer of classification belonging to next problem is pushed to user.
For each classification, there is corresponding answer to be corresponding to it.It, can after predicting classification belonging to next problem
The corresponding answer of the category is directly pushed to user.
In above-described embodiment, the problem of neural network model can have proposed according to user, what prediction user will propose
Then the corresponding answer of classification belonging to next problem is pushed to user by classification belonging to next problem.Such people
In machine conversational mode, in the case that user does not also propose next problem, the answer ready to receive to next problem is saved
The enquirement time of user, the user experience is improved.
Fig. 2 is the flow diagram according to the training method of the neural network model of some embodiments of the disclosure.
In step 202, from obtaining the problem of being suggested in multiple historical session in conversation recording, wherein each history meeting
Words include multiple problems.
Here, conversation recording for example can be the conversation recording of whole users and customer service, be also possible in whole users
Conversation recording of the certain customers (such as one or more users) with customer service.It should be noted that customer service here can be people
Work customer service, is also possible to chat robots.
In step 204, classify to each problem, to obtain classification belonging to each problem.
For example, each classification can be preset, by carrying out natural language processing to each problem, to obtain each ask
Classification belonging to topic.In another example can be classified by trained neural network model to each problem.
In some cases, the corresponding classification of different problems can be identical.For example, if problem is " my commodity
It is also available in stock " or " also available in stock ", then classification belonging to both of these problems may each be " whether available in stock ".In addition, each class
It can not marked with corresponding mark, such as whether " available in stock " can mark as classification 1 ".
The classification of pending training is determined according to the corresponding classification of i-th of problem in each historical session in step 206,
2≤i≤N, N are the problems in each historical session quantity.
In some implementations, the corresponding classification of i-th of problem in each historical session can be determined as into
The classification of row training.
For example, the problem of being suggested in a historical session successively may include problem A, problem according to chronological order
B, problem F and problem E.The corresponding classification of i-th of problem can be the corresponding classification of problem B, the corresponding classification of problem F or problem
The corresponding classification of E.It, can be by the corresponding classification of problem B, the corresponding classification of problem F and the corresponding classification of problem E under this mode
It is determined as the classification of pending training.
In other implementations, it can be determined each according to the corresponding classification of i-th of problem in each historical session
The corresponding problematic amount of classification;The classification that corresponding problematic amount is greater than preset quantity is determined as to the classification of pending training.
For example, the corresponding classification of problem B is classification 1, classification 1 corresponds to altogether 10 problems;The corresponding classification of problem F is class
Other 2, classification 2 corresponds to altogether 5 problems;The corresponding classification of problem E is classification 3, and classification 3 corresponds to altogether 8 problems.Assuming that default
Quantity is 6, then the corresponding classification of problem B and the corresponding classification of problem E are determined as to the classification of pending training.Such mode
Under, the classification of pending training is essentially the problem of user often asks, trained accuracy can be improved, and recommends so as to improve
Answer accuracy.
In step 208, using the classification of the corresponding pending training of i-th of problem in each historical session as input, preceding
I-1 problem is trained neural network model as output.
Preferably, i=N, that is, the corresponding classification of the last one problem is as input using in each historical session, except last
Other problems outside one problem are trained neural network model as output.Such training method can be further
Improve the accuracy of training.
In above-described embodiment, after obtaining the problem of being suggested in historical session record, classify to each problem, later
Using the classification of the corresponding pending training of i-th of problem in each historical session as input, preceding i-1 problem as export,
Neural network model is trained, so that neural network model can predict i.e. according to the problem of having proposed in session
By next problem of proposition.
In some embodiments, available after pushing the corresponding answer of classification belonging to next problem to user
The evaluation information of user;According to evaluation information, the accuracy of classification belonging to next problem of prediction is determined;It is super in accuracy
In the case where crossing threshold value, the problem of to have proposed as input, prediction next problem belonging to classification as exporting, to mind
It is trained through network model.
For example, accuracy can be measured with star, it is assumed that threshold value is 4 stars, if user's evaluation is 5 stars or 4.5 stars,
Think that the answer of prediction is reliable.In this case, can be to have proposed the problem of, is as belonging to input, the next problem predicted
Classification as output, neural network model is trained.The standard of train samples can be improved in such mode
True property further promotes user experience to improve the accuracy of Neural Network model predictive result.
Fig. 3 is the flow diagram according to the interactive method of the disclosure other embodiments.
In step 302, the problem of user has proposed in current sessions is obtained.
In step 304, first nerves network model will be input to the problem of having proposed, to predict next problem.
In step 306, next problem is input to nervus opticus network model, to predict class belonging to next problem
Not.
In step 308, the corresponding answer of classification belonging to next problem is pushed to user.
In above-described embodiment, first nerves network model can according to predicting next problem the problem of having proposed, second
Neural network model can predict next problem according to next problem belonging to classification, and then can be by next problem institute
The corresponding answer of the classification of category is pushed to user.In such man-machine conversation mode, user does not propose the feelings of next problem also
Under condition, the answer ready to receive to next problem has saved the enquirement time of user, the user experience is improved.
The training side of first nerves network model and nervus opticus network model will be discussed in detail in conjunction with Fig. 4 and Fig. 5 hereinafter
Formula.
Fig. 4 is the flow diagram according to the training method of the first nerves network model of some embodiments of the disclosure.
In step 402, from obtaining the problem of being suggested in multiple historical session in conversation recording, each historical session includes
Multiple problems.The specific implementation of step 402 is referred to above step 302.
It is right using the preceding i-1 problem in each historical session as input, i-th of problem as output in step 404
First nerves network model is trained, and 2≤i≤N, N are the problems in each historical session quantity.In some embodiments, i
=N.
In above-described embodiment, using the preceding i-1 problem in each historical session as input, i-th of problem as export,
First nerves network model is trained, so that under first nerves network model can be according to predicting the problem of having proposed
One problem.
Fig. 5 is the flow diagram according to the training method of the nervus opticus network model of some embodiments of the disclosure.
In step 502, from obtaining the problem of being suggested in multiple historical session in conversation recording, each historical session includes
Multiple problems.The specific implementation of step 402 is referred to above step 302.
In step 504, classification belonging to each problem is obtained.
For example, it is available classified by way of manual examination and verification to each problem after class belonging to each problem
Not.
In step 506, using each problem as input, the corresponding classification of each problem as output, to nervus opticus net
Network model is trained.
In above-described embodiment, make using each problem in each historical session as input, the corresponding classification of each problem
For output, nervus opticus network model is trained, so that nervus opticus network model can be according to next problem
Predict the corresponding classification of next problem.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with its
The difference of its embodiment, the same or similar part cross-reference between each embodiment.For Installation practice
For, since it is substantially corresponding with embodiment of the method, so being described relatively simple, referring to the portion of embodiment of the method in place of correlation
It defends oneself bright.
Fig. 6 is the structural schematic diagram according to the human-computer dialogue device of some embodiments of the disclosure.As shown in fig. 6, the implementation
The device of example includes obtaining module 601, prediction module 602 and pushing module 603.
Module 601 is obtained for obtaining the problem of user has proposed in current sessions.
Prediction module 602 is input to neural network model for the problem of having proposed, to predict user in current sessions
In classification belonging to the next problem that will propose.
For example, neural network model can be trained according to such as under type: obtaining multiple history meeting from conversation recording
The problem of being suggested in words, wherein each historical session includes multiple problems;Classify to each problem, it is each to obtain
Classification belonging to problem;According to the corresponding classification of i-th of problem in each historical session, the classification of pending training is determined, 2≤
I≤N, N are the problems in each historical session quantity;With the corresponding pending training of i-th of problem in each historical session
Classification, as output, is trained neural network model as input, preceding i-1 problem.It preferably, can be according to going through every time
The corresponding classification of i-th of problem in history session determines the corresponding problematic amount of each classification;Corresponding problematic amount is greater than pre-
If the classification of quantity is determined as the classification of pending training.Preferably, i=N.
In some implementations, prediction module 602 is input to first nerves network model for the problem of having proposed,
To predict next problem;Next problem is input to nervus opticus network model, to obtain class belonging to next problem
Not.
For example, first nerves network model can be trained according to such as under type: obtaining from conversation recording and repeatedly go through
The problem of being suggested in history session, wherein each historical session includes multiple problems;With preceding i-1 in each historical session
Problem, as output, is trained first nerves network model as input, i-th of problem, and 2≤i≤N, N are each history
The problems in session quantity.Preferably, i=N.
For example, nervus opticus network model can be trained according to such as under type: obtaining from conversation recording and repeatedly go through
The problem of being suggested in history session, wherein each historical session includes multiple problems;Obtain classification belonging to each problem;With
Each problem, as output, is trained nervus opticus network model as input, the corresponding classification of each problem.
Pushing module 603 is used to the corresponding answer of classification belonging to next problem being pushed to user.
In above-described embodiment, the problem of being had proposed according to user using neural network model, prediction user will be mentioned
Then the corresponding answer of classification belonging to next problem is pushed to user by classification belonging to next problem out.In this way
Man-machine conversation mode in, in the case that user does not also propose next problem, the answer ready to receive to next problem, section
About enquirement time of user, the user experience is improved.
Fig. 7 is the structural schematic diagram according to the human-computer dialogue device of the disclosure other embodiments.As shown in fig. 6, the reality
The device for applying example further includes evaluation collection module 701 and analysis of the accuracy module 702 compared with Fig. 6.
Evaluation collection module 701 is also used to obtain the evaluation information of user.Analysis of the accuracy module 702 is used for according to evaluation
Information analyzes the accuracy of classification belonging to next problem of prediction.Prediction module 602 is also used in accuracy be more than threshold value
In the case where, by the problem of having proposed and classification belonging to next problem is input to training module (not shown), so as to
The problem of training module is to have proposed as input, classification belonging to next problem as exporting, to neural network model into
Row training.
The accuracy of train samples can be improved in above-described embodiment, to improve Neural Network model predictive knot
The accuracy of fruit, further promotes user experience
Fig. 8 is the structural schematic diagram according to the human-computer dialogue device of the other embodiment of the disclosure.As shown in figure 8, the reality
Apply example device further include compared with Fig. 6 front-end interface module 801, preprocessing module 802, intention assessment module 803, at answer
Manage module 804 and evaluation collection module 805.
Front-end interface module 801 is used for the problem of proposition according to user, is answered in the form of natural language sentence,
To obtain the session information of user.Preprocessing module 802 is used to obtain the characteristic information of user and the session information of user.It is intended to
Identification module 803 is used for according to the characteristic information of user and the session information of user, in conjunction with term dictionary, grammer, semantic aspect
Resource, the problem of analysis user proposes, is to identify the intention of user.Answer processing module 804 for according to the user's intention and
Business processing logic judges the process flow of the answer for the problem of user proposes, e.g. chat or business, if need
Want user's login etc..Evaluation collection module 805 be used for collect user feedback satisfaction or unsatisfied evaluation information.According to receipts
The evaluation information of the user of collection can analyze the session information of dissatisfied user, to improve one in human-computer dialogue device
Or multiple modules.
Fig. 9 is the structural schematic diagram according to the human-computer dialogue device of disclosure still other embodiments.As shown in figure 9, the reality
The device 900 for applying example includes memory 901 and the processor 902 for being coupled to the memory 901, and processor 902 is configured as
Based on the instruction being stored in memory 901, the method for executing any one aforementioned embodiment.
Memory 901 is such as may include system storage, fixed non-volatile memory medium.System storage is for example
Operating system, application program, Boot loader (Boot Loader) and other programs etc. are can store.
Device 900 can also include input/output interface 903, network interface 904, memory interface 905 etc..These interfaces
903, it can for example be connected by bus 906 between 904,905 and between memory 901 and processor 902.Input and output
The input-output equipment such as interface 903 is display, mouse, keyboard, touch screen provide connecting interface.Network interface 904 is various
Networked devices provide connecting interface.The external storages such as memory interface 905 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.
The disclosure is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present disclosure
Figure and/or block diagram describe.It is interpreted as to be realized by computer program instructions each in flowchart and/or the block diagram
The combination of process and/or box in process and/or box and flowchart and/or the block diagram.It can provide these computer journeys
Sequence instruct to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor with
A machine is generated, so that the instruction generation executed by computer or the processor of other programmable data processing devices is used for
Realize the dress for the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram
It sets.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all spirit in the disclosure and
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the protection scope of the disclosure.