Summary of the invention
The purpose of the embodiment of the present application is to provide device, the In of a kind of method of on-line training model, on-line training model
The equipment and computer readable storage medium of line training pattern, be difficult to accurately to be labeled session content to solve and
The problem of Real-time Feedback and optimization can not be carried out to model.
In order to solve the above technical problems, the embodiment of the present application is achieved in that
According to the embodiment of the present application in a first aspect, providing a kind of method of on-line training model, comprising: receive current
The conversation message that the initiator of session sends;Contextual information based on the current sessions marks the conversation message
Note, the mark for obtaining the conversation message are intended to;Intention assessment is carried out to the conversation message by intention assessment model, is obtained
The identification of the conversation message is intended to;It is intended to the difference between the identification intention to the intention assessment based on the mark
The parameter of model is adjusted, so that the difference is less than the first predetermined threshold.
In some embodiments of the present application, it is based on above scheme, the method also includes: it is intended to based on the identification logical
Cross response generate model generate it is corresponding with the conversation message it is original receive the response, the identification is intended to encompass intention attribute;
Contextual information based on the current sessions scores to original receive the response, and obtains described original receive the response
Appraisal result;If the appraisal result is less than the second predetermined threshold, the contextual information based on the current sessions is to described
Original receive the response is adjusted, and is effectively receiveed the response with generating.
In some embodiments of the present application, it is based on above scheme, the contextual information based on the current sessions
Original receive the response is adjusted, is effectively receiveed the response with generating, comprising: the context letter based on the current sessions
Breath is adjusted original receive the response, and generates intermediate receive the response;Contextual information pair based on the current sessions
The centre, which is receiveed the response, scores, and obtains the appraisal result that the centre is receiveed the response;If what the centre was receiveed the response
Appraisal result is greater than second predetermined threshold, then the centre is receiveed the response and effectively receiveed the response as described.
In some embodiments of the present application, it is based on above scheme, the method also includes: determine that the original response disappears
Breath and it is described effectively receive the response between difference;Based on it is described it is original receive the response with it is described effectively receive the response between difference
It is different that the parameter for responding generation model is adjusted.
In some embodiments of the present application, it is based on above scheme, determination original receive the response has with described
Effect receive the response between difference, comprising: original receive the response to described and described effectively receive the response and carry out word segmentation processing;
Result based on word segmentation processing generates the original term vector receiveed the response and the term vector effectively receiveed the response;Really
The fixed original term vector receiveed the response and the distance between the term vector effectively receiveed the response, by described apart from conduct
It is described it is original receive the response with it is described effectively receive the response between difference.
In some embodiments of the present application, it is based on above scheme, the contextual information based on the current sessions
The conversation message is labeled, comprising: word segmentation processing is carried out to the conversation message of the current sessions, is obtained multiple
Word;Contextual information based on the current sessions carries out morphology, syntax and syntactic analysis to the multiple word;It is based on
The result of analysis is labeled the conversation message.
In some embodiments of the present application, it is based on above scheme, it is described to be disappeared by intention assessment model to the session
Breath carries out intention assessment, and the identification for obtaining the conversation message is intended to, comprising: the context based on the conversation message is to described
Conversation message carries out subject analysis, determines theme locating for the conversation message;Based on the theme and intention assessment model
Intention analysis is carried out to the conversation message, determines that the identification of the conversation message is intended to.
In some embodiments of the present application, it is based on above scheme, it is described to be intended to anticipate with the identification based on the mark
Difference between figure is adjusted the parameter of the intention assessment model, comprising: to mark intention and the identification
It is intended to carry out word segmentation processing;Determine that the mark is intended to corresponding term vector and identification meaning based on the result of word segmentation processing
Scheme corresponding term vector;Determine the mark be intended between corresponding term vector term vector corresponding with the identification intention away from
From;It is adjusted based on parameter of the distance to the intention assessment model.
In some embodiments of the present application, it is based on above scheme, it is described to be intended to generate by responding based on the identification
Model generates original receive the response corresponding with the conversation message, comprising: is disappeared based on the identification intention determination session
The conversation type of breath, the conversation type include: that question and answer type, Task or language chat type;It is determined and is corresponded to based on the conversation type
Response generate model;Model, which is generated, based on identified response generates original receive the response corresponding with the conversation message.
According to the exemplary second aspect of the application, a kind of device of on-line training model is provided, comprising: receiving module,
The conversation message that initiator for receiving current sessions sends;Labeling module, for the context based on the current sessions
Information is labeled the conversation message, and the mark for obtaining the conversation message is intended to;Intention assessment module, for passing through meaning
Figure identification model carries out intention assessment to the conversation message, and the identification for obtaining the conversation message is intended to;The first adjustment module,
The parameter of the intention assessment model is adjusted for being intended to the difference between the identification intention based on the mark,
So that the difference is less than the first predetermined threshold.
In some embodiments of the present application, it is based on above scheme, described device further include: respond generation module, be used for
Based on the identification be intended to by respond generate model generate it is corresponding with the conversation message it is original receive the response, the identification
It is intended to encompass intention attribute;Grading module original is receiveed the response for the contextual information based on the current sessions to described
It scores, obtains the original appraisal result receiveed the response;Adjustment module is responded, if for the appraisal result less than the
Two predetermined thresholds, the then contextual information based on the current sessions are adjusted original receive the response, and have to generate
Effect is receiveed the response.
In some embodiments of the present application, it is based on above scheme, the response adjustment module includes: that intermediate respond generates
Unit is adjusted original receive the response for the contextual information based on the current sessions, generates intermediate respond
Message;Intermediate result generation unit receives the response progress to the centre for the contextual information based on the current sessions
Scoring, obtains the appraisal result that the centre is receiveed the response;Generation unit is effectively responded, if receive the response for the centre
Appraisal result is greater than second predetermined threshold, then the centre is receiveed the response and effectively receiveed the response as described.
In some embodiments of the present application, it is based on above scheme, described device further include: the first difference determining module,
For determine it is described it is original receive the response with it is described effectively receive the response between difference;Second adjustment module, for being based on institute
State it is original receive the response with it is described effectively receive the response between difference to it is described respond generate model parameter be adjusted.
In some embodiments of the present application, it is based on above scheme, the first difference determining module includes: the first participle
Processing unit, for original receiveing the response to described and described effectively receiveing the response and carry out word segmentation processing;First term vector is raw
At unit, the original term vector receiveed the response is generated for the result based on word segmentation processing and described is effectively receiveed the response
Term vector;Distance determining unit, for determining the original term vector receiveed the response and the word effectively receiveed the response
The distance between vector, by the distance as it is described it is original receive the response with it is described it is effective receive the response between difference.
In some embodiments of the present application, it is based on above scheme, the labeling module includes: the second word segmentation processing list
Member carries out word segmentation processing for the conversation message to the current sessions, obtains multiple words;Parsing unit is used for base
Morphology, syntax and syntactic analysis are carried out to the multiple word in the contextual information of the current sessions;Unit is marked, is used
The conversation message is labeled in the result based on analysis.
In some embodiments of the present application, it is based on above scheme, the intention assessment module includes: that theme determines list
Member carries out subject analysis to the conversation message for the context based on the conversation message, determines the conversation message institute
The theme at place;It is intended to analytical unit, for being intended to based on the theme and intention assessment model to the conversation message
Analysis determines that the identification of the conversation message is intended to.
In some embodiments of the present application, it is based on above scheme, the first adjustment module includes: third word segmentation processing
Unit, for being intended to carry out word segmentation processing to mark intention and the identification;Second term vector generation unit is used for base
Determine that the mark is intended to corresponding term vector and the identification is intended to corresponding term vector in the result of word segmentation processing;Second
Distance determining unit, for determining between the corresponding term vector of mark intention term vector corresponding with the identification intention
Distance;Adjustment unit, for being adjusted based on parameter of the distance to the intention assessment model.
In some embodiments of the present application, it is based on above scheme, the response generation module includes: that conversation type determines
Unit, for being intended to determine the conversation type of the conversation message based on the identification, the conversation type include: question and answer type,
Task or language chat type;Module determination unit, for determining that corresponding response generates model based on the conversation type;Original time
Generation unit is answered, generates original receive the response corresponding with the conversation message for generating model based on identified response.
According to the third aspect of the embodiment of the present application, a kind of equipment of on-line training model is provided, comprising: processor;
And it is configured to store the memory of computer executable instructions, the computer executable instructions make described when executed
Processor realizes the step of method of on-line training model described in any one of above-mentioned first aspect.
According to the fourth aspect of the embodiment of the present application, a kind of storage medium is provided, computer is executable to be referred to for storing
It enables, the computer executable instructions realize on-line training model described in any one of above-mentioned first aspect when executed
The step of method.
Pass through the technical solution in the embodiment of the present application, on the one hand, on the one hand, the contextual information pair based on current sessions
Conversation message is labeled, and can be labeled in conjunction with context to session content, be improved the accuracy of mark;Another party
Face carries out intention assessment by conversation message of the intention assessment model to current sessions, and the mark based on mark is intended to and knows
Difference between other identification intention is adjusted the parameter of intention assessment model, can be online in real time to the prediction of model
As a result it is fed back, so as to Optimized model in real time.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The application protection all should belong in technical staff's every other embodiment obtained without creative efforts
Range.
Fig. 1 shows the flow diagram of the method for the on-line training model provided according to some embodiments of the present application.
This method can be applied to terminal device, terminal device include but is not limited to mobile phone, tablet computer, intelligent sound box, smartwatch,
Desktop computer etc. can also apply other equipment appropriate, and the application is to this without particular determination.The method comprising the steps of
S110 to step S140 is described in detail below with reference to method of the Fig. 1 to the on-line training model in example embodiment.
Shown in referring to Fig.1, in step s 110, the conversation message that the initiator of current sessions sends is received.
In the exemplary embodiment, in a double conversation procedure, defining both sides, everyone says pair that one is a round
Words, in current n-th wheel dialogue, the initiator of current sessions sends the n-th wheel conversation message.For example, under the scene of shopping, when
The initiator of preceding session inputs conversation message " buying Nike shoes ".
In the step s 120, the conversation message is labeled based on the contextual information of current sessions, obtains the session
The mark of message is intended to.
In the exemplary embodiment, word segmentation processing is carried out to the conversation message of current sessions, obtains multiple words, based on current
The contextual information of session carries out morphology, syntax and syntactic analysis to multiple words, is disappeared based on the result of analysis to the session
Breath is labeled, and the mark for obtaining the conversation message is intended to.For example, the conversation message " buying Nike shoes " of current sessions is divided
Word processing, obtains " buying ", " Nike ", " shoes " three words, and the contextual information for obtaining current sessions is for example done shopping scene,
In, " buying " is verb, " Nike ", " shoes " are noun, is intended to do shopping so as to obtain the conversation message, it is intended that attribute
Comprising " shoes ", " Nike ", therefore, the intention attribute that the mark of conversation message " buying Nike shoes " is intended to " do shopping ", mark is
" shoes ", " Nike ".
Further, in the exemplary embodiment, intention template can be preset, it is intended that in template comprising predetermined vocabulary with
The corresponding mapping relations being intended to, are labeled the intention in conversation message based on the mapping relations, such as " buying " is mapped to " purchase
Object ", " broadcasting " are mapped to " listening to music ", " train ticket " is mapped to " trip ", " hotel " is mapped to " lodging " etc..
In the exemplary embodiment, word segmentation processing and part of speech can be carried out to conversation message by Word2Vector mode
Mark such as Glove or ELMo can also carry out word segmentation processing and part-of-speech tagging, the application to conversation message by other means
To this without particular determination.In addition, in further embodiments, word can also be carried out to conversation message by artificial mode
Method, syntax, grammer and intention mark, the mark for obtaining the conversation message are intended to and are intended to attribute.Further, it will mark
The conversation message being intended to comprising mark afterwards is stored into corpus.
In step s 130, intention assessment is carried out by conversation message of the intention assessment model to current sessions, obtains institute
The identification for stating conversation message is intended to.
In the exemplary embodiment, it is intended that identification model is the disaggregated model in machine learning model, such as SVM (Support
Vector Machine, support vector machines) model, CNN (Convolutional Neural Networks, convolutional Neural net
Network) model, LSTM (Long Short-Term Memory, shot and long term memory) model etc., or other classification appropriate
Model, the application is to this without particular determination.
Further, in the exemplary embodiment, the word annotation results of the conversation message based on current sessions generate corresponding
The feature vector of generation is input to intention assessment model by feature vector, based on the meeting of the intention assessment model to current sessions
It talks about message and carries out intention assessment, the identification for obtaining the conversation message is intended to.For example, the word mark of dialogue-based message " buying Nike shoes "
Result " buying ", " shoes ", " Nike " are infused, corresponding term vector is generated as feature vector, the feature vector of generation is input to meaning
Figure identification model, the identification intention for obtaining the conversation message based on the intention assessment model " are done shopping ", identify the parameter of intention
For " shoes ", " Nike ".
In step S140, the difference between the identification intention is intended to the intention assessment mould based on the mark
The parameter of type is adjusted, so that the difference is less than predetermined threshold.
In the exemplary embodiment, the conversation message of current sessions is training sample, and mark is intended to the mark to training sample
Note as a result, identification is intended to intention assessment model to the recognition result of the training sample, the recognition result based on training sample with
Difference between annotation results is adjusted the parameter of intention assessment model, the recognition result of training sample and annotation results it
Between difference indicate difference, that is, loss function between predicted value and true value, the value of loss function is smaller, indicate predicted value with
Difference between true value is smaller, and the prediction result of model is more accurate, when the value of loss function is less than predetermined threshold, is instructed
The intention assessment model perfected, predetermined threshold can be determined according to the size of the size of sample data volume and computing resource.
Specifically, being intended to and identifying be intended to carry out word segmentation processing to the mark of the conversation message of current sessions;It is based on
The result of word segmentation processing determines that mark is intended to corresponding term vector and identification is intended to corresponding term vector;Determine mark intention pair
The distance between the term vector answered term vector corresponding with identification intention;Based on distance to the parameter of the intention assessment model into
Row adjustment illustrates that the recognition result of intention assessment model is more accurate, model training reaches when the distance is less than predetermined threshold
Target.
It should be noted that the distance between each term vector can be Hamming distances, Euclidean distance, COS distance, but
It is that distance in the exemplary embodiment of the application is without being limited thereto, such as distance can also be mahalanobis distance, manhatton distance etc..
According to the method for the on-line training model in the example embodiment of Fig. 1, on the one hand, the context based on current sessions
Information is labeled conversation message, can be labeled in conjunction with context to session content, improve the accuracy of mark;Separately
On the one hand, intention assessment is carried out to the conversation messages of current sessions by intention assessment model, the mark based on mark be intended to
And the difference between the identification intention of identification is adjusted the parameter of intention assessment model, it can be online in real time to model
Prediction result is fed back, so as to Optimized model in real time.
In addition, in order to accurately carry out intention assessment to conversation message, in the exemplary embodiment, based on the conversation message
Context carries out subject analysis to conversation message, determines theme locating for conversation message;Based on theme and intention assessment model
Intention analysis is carried out to the conversation message, determines that the identification of the conversation message is intended to.For example, the content of conversation message " is bought
Train ticket ", if including tourist attractions information in context dialogue, the theme of conversation message is to go on a tour, based on the theme and
Intention assessment model carries out intention analysis to conversation message, determines that the identification of the conversation message is intended to.
Fig. 2 shows the flow diagrams effectively receiveed the response according to the generation that some embodiments of the present application provide.
Referring to shown in Fig. 2, in step S210, the identification of the conversation message based on current sessions is intended to generate by responding
Model generates original receive the response corresponding with the conversation message.
In the exemplary embodiment, the identification for obtaining the conversation message of current sessions is intended to and is intended to attribute, dialogue-based
The identification of message is intended to and is intended to attribute and generates original receive the response corresponding with the conversation message.For example, setting current sessions
Message is " buying Nike shoes ", and the identification of the conversation message is intended to " do shopping ", it is intended that attribute is " shoes ", " Nike ", is based on the meeting
It talks about the identification intention of message and is intended to attribute and receive the response by the way that response generation model generation is corresponding with the conversation message, return
Model, which should be generated, can generate that the conversation message is corresponding to receive the response based on decision-tree model for decision-tree model, referring to Fig. 3
It is shown, it is first determined user's is intended to do shopping, then the type of merchandise, that is, shoes under shopping intention determine brand, the ruler of commodity
Whether very little equal parameter informations are complete, if parameter information is complete, exports corresponding merchandise news and select for user;If information
It is imperfect, then export receive the response corresponding with the information of missing.For example, after user inputs " buying Nike shoes ", commodity shoes
Parameter information at least 2, i.e. brand, size lack the dimension information of shoes, then generate corresponding receive the response as " you think
Will mostly large-sized shoes ".
In step S220, is scored based on the contextual information of current sessions original receive the response, obtained original
The appraisal result receiveed the response.
In the exemplary embodiment, it is obtained from conversation database based on the contextual information of current sessions and is disappeared with original response
Cease it is corresponding really receive the response, based on contextual information and really receive the response and score original receive the response, meeting
The conversation message of high-volume conversation is previously stored in words database.For example, can judge that original response disappears based on contextual information
Difference between ceasing and really receiveing the response, determines the original appraisal result receiveed the response based on the difference.
In other example embodiments, by manually based on the contextual information of current sessions to it is original receive the response into
Row scoring, obtains the original appraisal result receiveed the response, for example, judging original receive the response to above based on contextual information
Whether understand accurate, respond whether can be connected above, dialogue direction can be guided, if the language etc. with personification.
In step S230, if the original appraisal result receiveed the response is less than predetermined threshold, based on the upper of current sessions
Context information is adjusted original receive the response, and is effectively receiveed the response with generating.
In the exemplary embodiment, if the original appraisal result receiveed the response is less than predetermined threshold, based on current sessions
Contextual information is adjusted original receive the response, and generates intermediate receive the response;Contextual information pair based on current sessions
It receives the response and scores among this, obtain the appraisal result receiveed the response among this;If the scoring knot receiveed the response among this
Fruit is greater than the second predetermined threshold, then will receive the response among this as effectively receiveing the response.For example, upper and lower based on current sessions
Literary information inquires corresponding multiple intermediate echo messages from conversation database, successively comments multiple intermediate echo messages
Point, if the appraisal result receiveed the response among some is greater than the second predetermined threshold, it will receive the response among this and returned as effective
Answer message.
It in further embodiments, can also be manually based on the contextual information of current sessions to original progress of receiveing the response
Adjustment generates intermediate receive the response;It is scored based on the contextual information of current sessions receiveing the response among this, is somebody's turn to do
The appraisal result that centre is receiveed the response;If the appraisal result receiveed the response among this is greater than the second predetermined threshold, among this
It receives the response as effectively receiveing the response.
In addition, in the exemplary embodiment, can be intended to determine the conversation type of conversation message, session according to the identification of user
Type includes: that question and answer type, Task or language chat type, determines that corresponding response generates model, base based on identified conversation type
Model, which is generated, in identified response generates receive the response corresponding with the conversation message.For example, if the current sessions of user
Conversation message is " buying train ticket ", and the identification of the conversation message is intended to " booking ", it is determined that the conversation type of the conversation message
For Task, it is decision-tree model that response corresponding with the session of Task, which generates model,;If the session of the current sessions of user
Message is " how is weather tomorrow ", then the identification of the conversation message is intended to " put question to ", it is determined that the session of the conversation message
Type is question and answer type, and it is retrieval model that response corresponding with the session of question and answer type, which generates model,;If the meeting of the current sessions of user
Talking about message is " I feels blue ", and the identification of the conversation message is intended to " chat ", it is determined that the conversation type of the conversation message
Type is chatted for language, it is deep learning model that response corresponding with the session that language chats type, which generates model,.
Further, in the exemplary embodiment, after effectively being receiveed the response, determine it is original receive the response with effectively
Difference between receiveing the response, based on it is original receive the response and effectively receive the response between difference to respond generate model ginseng
Number is adjusted.For example, to it is original receive the response and effectively receive the response carry out word segmentation processing;Result based on word segmentation processing
Generate the original term vector receiveed the response and the term vector effectively receiveed the response;It determines the original term vector receiveed the response and has
Imitate the distance between the term vector receiveed the response, using the distance as it is original receive the response and effectively receive the response between difference
It is different, it is adjusted based on the difference to the parameter for generating model is responded, so that the difference is less than predetermined threshold.
Fig. 4 shows the process signal of the method for the on-line training model provided according to other embodiments of the application
Figure.
Referring to shown in Fig. 4, in step S410, the initiator of session sends conversation message.In a double conversation procedure
In, defining both sides, everyone says the dialogue that one is a round, and in current n-th wheel dialogue, the initiator of current sessions is sent
N-th wheel conversation message.
In the step s 420, word segmentation processing is carried out to the conversation message of current sessions, obtains multiple words, based on current meeting
The contextual information of words carries out morphology, syntax and syntactic analysis to multiple words, based on the result of analysis to the conversation message
It is labeled, the mark for obtaining the conversation message is intended to and is intended to attribute, and the result of mark is passed to corpus.
In step S430, intention assessment is carried out based on conversation message of the intention assessment model to current sessions, is somebody's turn to do
The identification of conversation message is intended to.For example, the word annotation results of the conversation message based on current sessions generate corresponding feature vector,
The feature vector of generation is input to intention assessment model, is carried out based on conversation message of the intention assessment model to current sessions
Intention assessment, the identification for obtaining the conversation message are intended to.
In step S440, the identification for obtaining the conversation message of current sessions is intended to and is intended to attribute, dialogue-based to disappear
The identification of breath is intended to and is intended to attribute and generates original receive the response corresponding with the conversation message.
In step S450, is scored based on the contextual information of current sessions original receive the response, obtained original
The appraisal result receiveed the response, for example, based on contextual information judge it is original receive the response to whether understanding above accurate, return
Should whether can be connected above, dialogue direction can be guided, if the language etc. with personification.
In step S460, manually based on the contextual information of current sessions to it is original receive the response to be adjusted for example repair
Change or rewrite, generates intermediate receive the response;It is scored based on the contextual information of current sessions receiveing the response among this, is obtained
The appraisal result receiveed the response among to this;If the appraisal result receiveed the response among this is greater than the second predetermined threshold, should
It receives the response as effectively receiveing the response centre.
In step S470, returns to other side and effectively receive the response.
Fig. 5 shows the schematic block diagram of the device of the on-line training model provided according to some embodiments of the present application.
Referring to Figure 5, the device of the on-line training model include online labeling module 510, on-line training module 520,
Feedback module 530 and tagged corpus 540, online labeling module 510 are used for conversation message and progress of receiveing the response
Mark;On-line training module 520 is used to identify the intention of conversation message, and is generated corresponding time based on recognition result
It answers, and the conversation message based on mark and receiveing the response is trained model;Feedback module 530 is used to be intended to based on mark
Identification be intended between difference feedback adjustment is carried out to intention assessment module, and receive the response and really respond based on original
Difference between message carries out feedback adjustment to generation module is responded.
Wherein, online labeling module 510 includes: semantic tagger unit 512 is intended to mark unit 514 and responds mark
Unit 516.Wherein, semantic tagger unit 512 is used to carry out grammer, morphology and syntax to conversation message to mark, for example, will work as
The conversation message " buying Nike shoes " of preceding session carries out word segmentation processing, obtains " buying ", " Nike ", " shoes " three words, wherein " buying "
It is noun for verb, " Nike ", " shoes ".It is intended to mark unit 514 to disappear to session for the contextual information based on current sessions
The intention of breath is labeled, for example, the contextual information of the conversation message " buying Nike shoes " of current sessions is shopping scene, is based on
Verb " buying " and shopping scene determine that user is intended to do shopping.Mark unit 514 is responded for marking to receiveing the response
Note, whether for example, being receiveed the response based on contextual information judgement to whether understanding above is accurate, responding can be with rank above
It connects, dialogue direction can be guided, if there is anthropomorphic language etc., be labeled to receiveing the response.
On-line training module 520 includes: intention assessment unit 522 and response generation unit 524, it is intended that recognition unit
522, for being identified by intention of the intention assessment model to the conversation message of current sessions, generate corresponding identification and are intended to.
Intention assessment model be machine learning model in disaggregated model, such as SVM (Support Vector Machine, support to
Amount machine) model, CNN (Convolutional Neural Networks, convolutional neural networks) model, LSTM (Long
Short-Term Memory, shot and long term memory) model etc., or other disaggregated models appropriate, the application to this not into
Row particular determination.Respond the identification intention and contextual information that generation unit 524 is used to generate based on intention assessment unit 522
Generate corresponding receive the response.
Feedback module 530 includes: that model discrimination efficiency determination unit 532 and model respond efficiency determination unit 534,
In, model discrimination efficiency determination unit 532 is used to determine that the identification that intention assessment unit 522 generates to be intended to and is intended to mark unit
Difference between the 514 mark intentions generated, feeds back to intention assessment unit 522 for the difference, carries out to intention assessment model
Adjustment.Mark is receiveed the response and responded to model response efficiency determination unit 534 for what determining response generation unit 524 generated
The difference between annotated message that unit 516 generates, which is fed back to and responds generation unit 524, to generate mould to response
Type is adjusted.
In the example embodiment of the application, a kind of device of on-line training model is additionally provided.It, should referring to shown in Fig. 6
Device 600 includes: receiving module 610, labeling module 620, intention assessment module 630 and the first adjustment module 640.Wherein,
Receiving module 610 is used to receive the conversation message that the initiator of current sessions sends;Labeling module 620 is used for based on described current
The contextual information of session is labeled the conversation message, and the mark for obtaining the conversation message is intended to;Intention assessment mould
Block 630 is used to carry out intention assessment to the conversation message by intention assessment model, obtains the identification meaning of the conversation message
Figure;The difference that the first adjustment module 640 is used to be intended to based on the mark between the identification intention is to the intention assessment
The parameter of model is adjusted, so that the difference is less than the first predetermined threshold.
In some embodiments of the present application, it is based on above scheme, described device 600 further include: respond generation module, use
In based on the identification be intended to by respond generate model generation it is corresponding with the conversation message it is original receive the response, the knowledge
It is not intended to encompass intention attribute;Grading module disappears to the original response for the contextual information based on the current sessions
Breath scores, and obtains the original appraisal result receiveed the response;Adjustment module is responded, if being less than for the appraisal result
Second predetermined threshold, the then contextual information based on the current sessions are adjusted original receive the response, to generate
Effectively receive the response.
In some embodiments of the present application, it is based on above scheme, the response adjustment module includes: that intermediate respond generates
Unit is adjusted original receive the response for the contextual information based on the current sessions, generates intermediate respond
Message;Intermediate result generation unit receives the response progress to the centre for the contextual information based on the current sessions
Scoring, obtains the appraisal result that the centre is receiveed the response;Generation unit is effectively responded, if receive the response for the centre
Appraisal result is greater than second predetermined threshold, then the centre is receiveed the response and effectively receiveed the response as described.
In some embodiments of the present application, it is based on above scheme, described device further include: the first difference determining module,
For determine it is described it is original receive the response with it is described effectively receive the response between difference;Second adjustment module, for being based on institute
State it is original receive the response with it is described effectively receive the response between difference to it is described respond generate model parameter be adjusted.
In some embodiments of the present application, it is based on above scheme, the first difference determining module includes: the first participle
Processing unit, for original receiveing the response to described and described effectively receiveing the response and carry out word segmentation processing;First term vector is raw
At unit, the original term vector receiveed the response is generated for the result based on word segmentation processing and described is effectively receiveed the response
Term vector;Distance determining unit, for determining the original term vector receiveed the response and the word effectively receiveed the response
The distance between vector, by the distance as it is described it is original receive the response with it is described it is effective receive the response between difference.
In some embodiments of the present application, it is based on above scheme, the labeling module includes: the second word segmentation processing list
Member carries out word segmentation processing for the conversation message to the current sessions, obtains multiple words;Parsing unit is used for base
Morphology, syntax and syntactic analysis are carried out to the multiple word in the contextual information of the current sessions;Unit is marked, is used
The conversation message is labeled in the result based on analysis.
In some embodiments of the present application, it is based on above scheme, the intention assessment module 630 includes: that theme determines
Unit 710 carries out subject analysis to the conversation message for the context based on the conversation message, determines that the session disappears
The locating theme of breath;Be intended to analytical unit 720, for based on the theme and intention assessment model to the conversation message into
Row is intended to analysis, determines that the identification of the conversation message is intended to.
In some embodiments of the present application, it is based on above scheme, the first adjustment module includes: third word segmentation processing
Unit, for being intended to carry out word segmentation processing to mark intention and the identification;Second term vector generation unit is used for base
Determine that the mark is intended to corresponding term vector and the identification is intended to corresponding term vector in the result of word segmentation processing;Second
Distance determining unit, for determining between the corresponding term vector of mark intention term vector corresponding with the identification intention
Distance;Adjustment unit, for being adjusted based on parameter of the distance to the intention assessment model.
In some embodiments of the present application, it is based on above scheme, the response generation module includes: that conversation type determines
Unit, for being intended to determine the conversation type of the conversation message based on the identification, the conversation type include: question and answer type,
Task or language chat type;Module determination unit, for determining that corresponding response generates model based on the conversation type;Original time
Generation unit is answered, generates original receive the response corresponding with the conversation message for generating model based on identified response.
According to the device of the on-line training model in the example embodiment of Fig. 6, on the one hand, on the one hand, be based on current sessions
Contextual information conversation message is labeled, session content can be labeled in conjunction with context, improve mark
Accuracy;On the other hand, intention assessment, the mark based on mark are carried out by conversation message of the intention assessment model to current sessions
Notice that the difference between figure and the identification intention of identification is adjusted the parameter of intention assessment model, it can online in real time
The prediction result of model is fed back, so as to Optimized model in real time.
The device of on-line training model provided by the embodiments of the present application can be realized each mistake in preceding method embodiment
Journey, and reach identical function and effect, it is not repeated herein.
Further, the embodiment of the present application also provides a kind of equipment of on-line training model, as shown in Figure 8.
The equipment of on-line training model can generate bigger difference because configuration or performance are different, may include one or
More than one processor 801 and memory 802 can store one or more storages in memory 802 using journey
Sequence or data.Wherein, memory 802 can be of short duration storage or persistent storage.The application program for being stored in memory 802 can be with
Including one or more modules (diagram is not shown), each module may include one in the equipment to on-line training model
Family computer executable instruction.Further, processor 801 can be set to communicate with memory 802, in on-line training
The series of computation machine executable instruction in memory 802 is executed in the equipment of model.The equipment of on-line training model can be with
Including one or more power supplys 803, one or more wired or wireless network interfaces 804, one or more
Input/output interface 805, one or more keyboards 806 etc..
In a specific embodiment, the equipment of on-line training model include memory and one or one with
On program, perhaps more than one program is stored in memory and one or more than one program can wrap for one of them
Include one or more modules, and each module may include that series of computation machine in equipment to on-line training model can
It executes instruction, and is configured to execute this or more than one program by one or more than one processor to include to be used for
It carries out following computer executable instructions: receiving the conversation message that the initiator of current sessions sends;Based on the current sessions
Contextual information the conversation message is labeled, obtain the conversation message mark be intended to;Pass through intention assessment mould
Type carries out intention assessment to the conversation message, and the identification for obtaining the conversation message is intended to;Based on mark intention and institute
The difference stated between identification intention is adjusted the parameter of the intention assessment model, so that the difference is predetermined less than first
Threshold value.
Optionally, computer executable instructions when executed, the method also includes: based on the identification intention pass through
Respond generate model generate it is corresponding with the conversation message it is original receive the response, the identification is intended to encompass intention attribute;Base
Score in the contextual information of the current sessions original receive the response, obtain it is described it is original receive the response comment
Divide result;If the appraisal result is less than the second predetermined threshold, the contextual information based on the current sessions is to the original
Beginning, which receives the response, to be adjusted, and is effectively receiveed the response with generating.
Optionally, computer executable instructions when executed, the contextual information pair based on the current sessions
Original receive the response is adjusted, and is effectively receiveed the response with generating, comprising: the contextual information based on the current sessions
Original receive the response is adjusted, intermediate receive the response is generated;Contextual information based on the current sessions is to institute
It states centre and receives the response and score, obtain the appraisal result that the centre is receiveed the response;If what the centre was receiveed the response comments
Divide result to be greater than second predetermined threshold, then the centre is receiveed the response and effectively receiveed the response as described.
Optionally, computer executable instructions when executed, the method also includes: determine described original receive the response
With it is described effectively receive the response between difference;Based on it is described it is original receive the response with it is described effectively receive the response between difference
The parameter for responding generation model is adjusted.
Optionally, computer executable instructions when executed, the determination it is described it is original receive the response with it is described effectively
Difference between receiveing the response, comprising: original receive the response to described and described effectively receive the response and carry out word segmentation processing;Base
The original term vector receiveed the response and the term vector effectively receiveed the response are generated in the result of word segmentation processing;It determines
The original term vector receiveed the response and the distance between the term vector effectively receiveed the response, using the distance as institute
State it is original receive the response with it is described effectively receive the response between difference.
Optionally, computer executable instructions when executed, the contextual information pair based on the current sessions
The conversation message is labeled, comprising: is carried out word segmentation processing to the conversation message of the current sessions, is obtained multiple words
Language;Contextual information based on the current sessions carries out morphology, syntax and syntactic analysis to the multiple word;Based on point
The result of analysis is labeled the conversation message.
Optionally, computer executable instructions when executed, it is described by intention assessment model to the conversation message
Intention assessment is carried out, the identification for obtaining the conversation message is intended to, comprising: the context based on the conversation message is to the meeting
It talks about message and carries out subject analysis, determine theme locating for the conversation message;Based on the theme and intention assessment model pair
The conversation message carries out intention analysis, determines that the identification of the conversation message is intended to.
Optionally, computer executable instructions are when executed, described to be intended to be intended to the identification based on the mark
Between difference the parameter of the intention assessment model is adjusted, comprising: to the mark be intended to and the identification meaning
Figure carries out word segmentation processing;Determine that the mark is intended to corresponding term vector and the identification is intended to based on the result of word segmentation processing
Corresponding term vector;Determine the mark be intended between corresponding term vector term vector corresponding with the identification intention away from
From;It is adjusted based on parameter of the distance to the intention assessment model.
Optionally, computer executable instructions are when executed, described to be intended to generate mould by responding based on the identification
Type generates original receive the response corresponding with the conversation message, comprising: based on the identification intention determination conversation message
Conversation type, the conversation type includes: that question and answer type, Task or language chat type;It is determined based on the conversation type corresponding
It responds and generates model;Model, which is generated, based on identified response generates original receive the response corresponding with the conversation message.
The equipment of on-line training model provided by the embodiments of the present application can be realized each mistake in preceding method embodiment
Journey, and reach identical function and effect, it is not repeated herein.
In addition, the embodiment of the present application also provides a kind of storage medium, for storing computer executable instructions, a kind of tool
In the embodiment of body, which can be USB flash disk, CD, hard disk etc., the computer executable instructions of storage medium storage
When being executed by processor, it is able to achieve following below scheme: receiving the conversation message that the initiator of current sessions sends;Worked as based on described
The contextual information of preceding session is labeled the conversation message, and the mark for obtaining the conversation message is intended to;Pass through intention
Identification model carries out intention assessment to the conversation message, and the identification for obtaining the conversation message is intended to;It is anticipated based on the mark
The difference schemed between being intended to the identification is adjusted the parameter of the intention assessment model, so that the difference is less than the
One predetermined threshold.
Optionally, the computer executable instructions of storage medium storage when being executed by processor, also wrap by the method
Include: based on the identification be intended to by respond generate model generate it is corresponding with the conversation message it is original receive the response, it is described
Identification is intended to encompass intention attribute;Contextual information based on the current sessions scores to original receive the response,
Obtain the original appraisal result receiveed the response;If the appraisal result is less than the second predetermined threshold, based on described current
The contextual information of session is adjusted original receive the response, and is effectively receiveed the response with generating.
Optionally, the computer executable instructions of storage medium storage are described based on described when being executed by processor
The contextual information of current sessions is adjusted original receive the response, and is effectively receiveed the response with generating, comprising: is based on institute
The contextual information for stating current sessions is adjusted original receive the response, and generates intermediate receive the response;Worked as based on described
The contextual information of preceding session, which receives the response to the centre, to score, and obtains the appraisal result that the centre is receiveed the response;
If the appraisal result that the centre is receiveed the response is greater than second predetermined threshold, the centre is receiveed the response as described
Effectively receive the response.
Optionally, the computer executable instructions of storage medium storage when being executed by processor, also wrap by the method
Include: determine it is described it is original receive the response with it is described effectively receive the response between difference;It original is receiveed the response and institute based on described
The difference stated between effectively receiveing the response is adjusted the parameter for responding generation model.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, described in the determination
It is original receive the response with it is described effectively receive the response between difference, comprising: to it is described it is original receive the response and it is described effectively
It receives the response and carries out word segmentation processing;Result based on word segmentation processing generates the original term vector receiveed the response and described has
Imitate the term vector receiveed the response;It determines between the original term vector receiveed the response and the term vector effectively receiveed the response
Distance, by the distance as it is described it is original receive the response with it is described it is effective receive the response between difference.
Optionally, the computer executable instructions of storage medium storage are described based on described when being executed by processor
The contextual information of current sessions is labeled the conversation message, comprising: to the conversation message of the current sessions
Word segmentation processing is carried out, multiple words are obtained;Contextual information based on the current sessions to the multiple word carry out morphology,
Syntax and syntactic analysis;The conversation message is labeled based on the result of analysis.
Optionally, the computer executable instructions of storage medium storage are described to pass through intention when being executed by processor
Identification model carries out intention assessment to the conversation message, and the identification for obtaining the conversation message is intended to, comprising: is based on the meeting
The context for talking about message carries out subject analysis to the conversation message, determines theme locating for the conversation message;Based on described
Theme and intention assessment model carry out intention analysis to the conversation message, determine that the identification of the conversation message is intended to.
Optionally, the computer executable instructions of storage medium storage are described based on described when being executed by processor
The difference that mark is intended between the identification intention is adjusted the parameter of the intention assessment model, comprising: to described
Mark is intended to and the identification is intended to carry out word segmentation processing;Determine that the mark intention is corresponding based on the result of word segmentation processing
Term vector and the identification are intended to corresponding term vector;Determine that the mark is intended to corresponding term vector and the identification is intended to
The distance between corresponding term vector;It is adjusted based on parameter of the distance to the intention assessment model.
Optionally, the computer executable instructions of storage medium storage are described based on described when being executed by processor
Identification is intended to generate model by responding and generate original receive the response corresponding with the conversation message, comprising: based on the knowledge
It Yi Tu not determine that the conversation type of the conversation message, the conversation type include: that question and answer type, Task or language chat type;It is based on
The conversation type determines that corresponding response generates model;Model is generated based on identified response to generate and the conversation message
It is corresponding original to receive the response.
Computer readable storage medium provided by the embodiments of the present application can be realized each mistake in preceding method embodiment
Journey, and reach identical function and effect, it is not repeated herein.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller
Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited
Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc.
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
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.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.