CN110188177A - Talk with generation method and device - Google Patents

Talk with generation method and device Download PDF

Info

Publication number
CN110188177A
CN110188177A CN201910450518.8A CN201910450518A CN110188177A CN 110188177 A CN110188177 A CN 110188177A CN 201910450518 A CN201910450518 A CN 201910450518A CN 110188177 A CN110188177 A CN 110188177A
Authority
CN
China
Prior art keywords
user
information
identity
revert statement
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910450518.8A
Other languages
Chinese (zh)
Inventor
叶祺
刘志敏
李婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sogou Hangzhou Intelligent Technology Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201910450518.8A priority Critical patent/CN110188177A/en
Publication of CN110188177A publication Critical patent/CN110188177A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • G06F16/337Profile generation, learning or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a kind of dialogue generation method and devices, which comprises receives user's current input information;Generate the original revert statement based on the input information;The affective state of user is determined according to the input information;According to the identity personality portrait information of the input information, the affective state of the user and the preparatory user excavated offline, determines and reply type;According to the reply type and the original revert statement, the revert statement for having identity emotion is generated;The output revert statement for having identity emotion.Using the present invention, the flexibility and vividness with user session can be improved, promote user experience.

Description

Talk with generation method and device
Technical field
The present invention relates to field of information processing, and in particular to a kind of dialogue generation method and device.
Background technique
With the development of internet technology, conversational system electric business, in terms of have a wide range of applications, it is more next More cause the concern of people.Conversational system common at present has Siri, Echo, Bixby, the small ice of Microsoft, Ali young mistress, intelligent sound Ring etc..
Existing conversational system is roughly divided into two classes: one kind is the conversational system of task orientation type, it is intended to help user It goes to complete particular task, for example, Ali young mistress, user can be helped to look for commodity, order lodging, the Room of making a reservation etc., the dialogue generated Just for the sake of meeting certain specific requirements of user, the tone and in terms of without any identity characteristic and Emotional color;Another kind of is non-task orientation type conversational system (also referred to as chat robots), is and user is in Opening field It chats, for example, the small ice of Microsoft, although which is capable of providing the dialogue with emotion when talking with and chatting, but it is replied The tone and emotion it is relatively simple, pervasive, do not have diversity, in other words, the chat of the conversational system and user are only one The chat person of a " general applicability lattice ", it chats in face of all users, and what is used is all same character, lacks personality identity Diversity.
Existing conversational system only takes into account the conversation content of chat user output when generating dialogue, therefore for not With the dialogue of the same content of user's output, generation is all identical and dull reply, cannot be varied with each individual, and flexibility is lacked And vividness, so that user experience is bad.
Summary of the invention
The embodiment of the present invention provides a kind of dialogue generation method and device, to improve flexibility with user session and lively Property, promote user experience.
For this purpose, the invention provides the following technical scheme:
A kind of dialogue generation method, which comprises
Receive user's current input information;
Generate the original revert statement based on the input information;
The affective state of user is determined according to the input information;
According to the identity personality of the input information, the affective state of the user and the preparatory user excavated offline Portrait information, determines and replys type;
According to the reply type and the original revert statement, the revert statement for having identity emotion is generated;
The output revert statement for having identity emotion.
Optionally, described generate includes: based on the original revert statement for inputting information
Identify that the attribute of entity word and the entity word in the input information is believed using the entity library pre-established Breath;
Determine user's current dialogue states;
System dialog state is updated according to user's current dialogue states;
Obtain revert statement template corresponding with updated system dialog state;
The attribute information of the entity word and the entity word is filled into the revert statement template, is obtained based on institute State the original revert statement of input information.
Optionally, the affective state that user is determined according to the input information includes:
The emotion classifiers that the input information input is trained in advance, determine according to the output of the emotion classifiers and use The affective state at family.
Optionally, the method also includes training the emotion classifiers in the following manner:
Set affective style;
The data of different emotions type are collected from the dialog history corpus of user as training data;
The emotion classifiers are obtained using training data training.
Optionally, the affective style includes: neutrality, and it is following any one or more: it is glad, sad, angry, low It falls.
Optionally, the identity personality portrait information includes the tag set for describing user characteristics, the label packet It includes: character attribute class label, and/or interest class label.
Optionally, the method also includes excavating the identity personality of user portrait information offline in the following way:
The dialog history corpus and historical behavior data of the user are obtained respectively;
According to the dialog history corpus and historical behavior data, the use is determined using attributive classification device trained in advance The character attribute class label at family;
Historical behavior information is extracted from the historical behavior data;
According to the entity library that the historical behavior information matches pre-establish, the entity word that matching is obtained is as the use The interest class label at family.
Optionally, the method also includes training attributive classification device in the following way:
Setting is directed to the classification of particular persons attribute;
Collect the dialogue corpus and behavioral data of different user;
Corresponding different classes of data are extracted from the dialogue corpus and the behavioral data respectively as training data; Obtain corresponding to the attributive classification device of the particular persons attribute using training data training.
Optionally, the historical behavior data of the user include: the inquiry log of the user.
Optionally, described according to the input information, the affective state of the user and the preparatory use excavated offline The identity personality portrait information at family determines that replying type includes:
The identity personality of the input information, the affective state of the user and the preparatory user excavated offline is drawn As the reply type sorter that information input is trained in advance, is determined according to the output for replying type sorter and reply type.
Optionally, the method also includes training the reply type sorter in the following manner:
Type is replied in setting;
The different data for replying type are collected from the dialog history corpus of user as training data;
The reply type sorter is obtained using training data training.
Optionally, the reply type includes: neutral type and any one or more following type: lovely type, adult form, Actively optimism type.
Optionally, described according to the reply type and the original revert statement, generate the reply for having identity emotion Sentence includes:
Slot position decomposition is carried out to the original revert statement, obtains each slot position and the corresponding content of the slot position;
For the corresponding content of the affiliated slot position of non-physical word after decomposition, preset style corpus is inquired, is obtained and institute It states and replys corpus content that type is consistent, corresponding with the slot position, and be institute's predicate by the corresponding content modification of the slot position Expect content;
The revert statement for having identity emotion is generated according to the corresponding content of slot position each after modification.
Optionally, described according to the reply type and the original revert statement, generate the reply for having identity emotion Sentence further include:
Obtain corresponding with replys type decoration information, and by the decoration information be added to described in have identity feelings In the revert statement of sense.
Optionally, the decoration information includes any of the following or a variety of: modal particle, emoticon decoration information.
Optionally, according to the reply type and the original revert statement, the revert statement for having identity emotion is generated Include:
Style statement model corresponding with the reply type trained using the original revert statement and in advance, obtains Revert statement with identity emotion.
A kind of dialogue generating means, described device include:
Receiving module, for receiving user's current input information;
Sentence generation module, for generating the original revert statement based on the input information;
Affective state determining module, for determining the affective state of user according to the input information;
Determination type module is replied, for inputting information, the affective state of the user and offline digging in advance according to described The identity personality portrait information of the user of pick, determines and replys type;
Sentence modified module, for generating and having identity emotion according to the reply type and the original revert statement Revert statement;
Output module, for exporting the revert statement for having identity emotion.
Optionally, the sentence generation module includes:
Information identificating unit, for identifying entity word and institute in the input information using the entity library pre-established State the attribute information of entity word;
Dialogue state determination unit, for determining user's current dialogue states;
State updating unit, for updating system dialog state according to user's current dialogue states;
Template acquiring unit, for obtaining revert statement template corresponding with updated system dialog state;
Fills unit, for the attribute information of the entity word and the entity word to be filled into the revert statement template In, obtain the original revert statement based on the input information.
Optionally, the affective state determining module, specifically for the emotion for training the input information input in advance Classifier determines the affective state of user according to the output of the emotion classifiers.
Optionally, described device further include:
Emotion classifiers training module, for training the emotion classifiers;The emotion classifiers training module includes:
Affective style setup unit, for setting affective style;
First training data collector unit, for collecting the data of different emotions type from the dialog history corpus of user As training data;
First training unit, for obtaining the emotion classifiers using training data training.
Optionally, the affective style includes: neutrality, and it is following any one or more: it is glad, sad, angry, low It falls.
Optionally, the identity personality portrait information includes the tag set for describing user characteristics, the label packet It includes: character attribute class label, and/or interest class label.
Optionally, described device further include:
Information excavating module, for excavating the identity personality portrait information of the user offline;The information excavating module Include:
Information acquisition unit, for obtaining the dialog history corpus and historical behavior data of the user respectively;
Character attribute class tag determination unit, for according to the dialog history corpus and historical behavior data, using pre- First trained attributive classification device determines the character attribute class label of the user;
Behavioural information extraction unit, for extracting historical behavior information from the historical behavior data;
Interest class tag determination unit, the entity library for being pre-established according to the historical behavior information matches, general Interest class label with obtained entity word as the user.
Optionally, described device further include:
Attributive classification device training module, for training attributive classification device;The attributive classification device training module includes:
Attribute classification setup unit, for setting the classification for being directed to particular persons attribute;
Second data collection module, for collecting the dialogue corpus and behavioral data of different user;
Data extracting unit, it is different classes of for extracting correspondence from the dialogue corpus and the behavioral data respectively Data are as training data;
Second training unit, for obtaining corresponding to the attribute point of the particular persons attribute using training data training Class device.
Optionally, the historical behavior data of the user include: the inquiry log of the user.
Optionally, the reply determination type module, specifically for by it is described input information, the user affective state And the reply type sorter that the identity personality portrait information input of the user excavated offline in advance is trained in advance, according to institute State the determining reply type of output for replying type sorter.
Optionally, described device further include:
Type sorter training module is replied, for training the reply type sorter;The reply type sorter Training module includes:
Type set unit is replied, replys type for setting;
Third data collection module, for collecting the different data conducts for replying type from the dialog history corpus of user Training data;
Third training unit, for obtaining the reply type sorter using training data training.
Optionally, the reply type include: neutral type and it is following any one or more: lovely type, adult form, actively Optimistic type.
Optionally, the sentence modified module includes:
Slot position decomposition unit obtains each slot position and the slot position for carrying out slot position decomposition to the original revert statement Corresponding content;
Content modifying unit, for inquiring preset wind for the corresponding content of the affiliated slot position of non-physical word after decomposing Lattice corpus, obtain and it is described reply type is consistent, corresponding with slot position corpus content, and it is the slot position is corresponding Content modification is the corpus content;
Content assembled unit, for generating the reply language for having identity emotion according to the corresponding content of slot position each after modification Sentence.
Optionally, the sentence modified module further include:
Unit is modified, for obtaining decoration information corresponding with the reply type, and the decoration information is added to In the revert statement with identity emotion.31. device according to claim 30, which is characterized in that the modification Information include it is following any one or more: modal particle, emoticon.
Optionally, the sentence modified module, specifically for using the original revert statement and in advance training with institute It states and replys the corresponding style statement model of type, obtain the revert statement with identity emotion.
A kind of electronic equipment, comprising: one or more processors, memory;
For the memory for storing computer executable instructions, the processor is executable for executing the computer Instruction, to realize mentioned-above method.
A kind of readable storage medium storing program for executing, is stored thereon with instruction, and described instruction is performed to realize mentioned-above method.
Dialogue generation method provided in an embodiment of the present invention and device consider not only user's input when talking with generation Conversation content, and in view of user real-time affective state and user identity character trait, currently inputted according to user The identity personality portrait information of information, the real-time affective state of user and the user excavated offline in advance, determines and replys class Original revert statement based on input information is revised as the revert statement with identity emotion according to the reply type by type, So as to the identical information for different user input, different revert statements is generated, that is to say, that make the reply language generated Sentence can vary with each individual, and keep revert statement more humanized, improve flexibility and vividness with user session, mention significantly User experience is risen.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only one recorded in the present invention A little embodiments are also possible to obtain other drawings based on these drawings for those of ordinary skill in the art.
Fig. 1 is the flow chart of dialogue generation method of the embodiment of the present invention;
Fig. 2 is the flow chart that original revert statement is generated in the embodiment of the present invention;
Fig. 3 is the flow chart for excavating the identity personality portrait information of user in the embodiment of the present invention offline;
Fig. 4 is a kind of structural block diagram of dialogue generating means of the embodiment of the present invention;
Fig. 5 is a kind of structural block diagram of sentence generation module in the embodiment of the present invention;
Fig. 6 is a kind of structural block diagram of information excavating module in the embodiment of the present invention;
Fig. 7 is shown according to an exemplary embodiment a kind of for talking with the block diagram of the device of generation method;
Fig. 8 is the structural schematic diagram of server in the embodiment of the present invention.
Specific embodiment
The scheme of embodiment in order to enable those skilled in the art to better understand the present invention with reference to the accompanying drawing and is implemented Mode is described in further detail the embodiment of the present invention.
For the dialogue for the same content that existing conversational system exports different user, the revert statement of generation lacks spirit Activity and the problem of vividness, the embodiment of the present invention provides a kind of dialogue generation method and device is not only examined in dialogue generation Consider the conversation content of user's input, and in view of the identity character trait of the real-time affective state of user and user.Specifically Ground determines the affective state of user according to user's current input information, according to the input information, the affective state of the user And the identity personality portrait information of the user excavated offline in advance, it determines and replys type, according to the reply type by base It is revised as the revert statement with identity emotion in the original revert statement of the input information, then output is described has identity The revert statement of emotion.
As shown in Figure 1, being the flow chart of dialogue generation method of the embodiment of the present invention, comprising the following steps:
Step 101, user's current input information is received.
The input information can be voice messaging by voice input, can be through the input methods such as phonetic, hand-written The text information of input, without limitation to this embodiment of the present invention.Certainly, it if it is voice messaging, in subsequent processing, also needs Corresponding text information is obtained, is then carried out again based on the text information first by the voice messaging by speech recognition Subsequent processing.
Step 102, the original revert statement based on the input information is generated.
The original revert statement can be generated using the prior art.In addition, the embodiment of the present invention also provides a kind of generation The method of the original revert statement, as shown in Figure 2, comprising the following steps:
Step 201, the entity word and the entity word in the input information are identified using the entity library pre-established Attribute information.
For example, searching the entity library using dictionary tree finding algorithm, identify real included in the input information The attribute information of pronouns, general term for nouns, numerals and measure words and the entity word.
The entity library can be constructed based on documents such as corpus, such as inquiry log, advertisement base message.Specifically, It does not carry out the excavation of entity word and its attribute information based on the document classification, verification sieve is then carried out by manually mark Choosing, it is final establish include multiple classifications entity library, for example entity class can include but is not limited to: makeups, electronics, clothes, Star, video display etc..Based on the corpus, it can use the modes such as template matching and/or disaggregated model and excavated offline, it is raw At the attribute information of each entity word of correspondence.In embodiments of the present invention, the attribute information can be divided into: general-purpose attribute and spy Different attribute.Wherein, the general-purpose attribute corresponds to the attributes such as the entity, such as gender, crowd, season of all categories;The spy Different attribute corresponds to the entity of particular category, and by taking makeups class as an example, specific properties have makeups brand, effect, ingredient, type, production The attributes such as ground.Moreover, the corresponding specific properties of different classes of entity are different.
These above-mentioned general-purpose attributes and specific properties are manually to be arranged based on experience, such as crowd's attribute is divided into baby a bit Child, pregnant woman, student etc.;Some attributes be based on inquiry log using template matching method offline excavates generation, such as Query word in inquiry log is " replenishing water and preserving moisture facial mask ranking list ", " whitening mask ranking list ", manually sets template with passing through " XXX facial mask ranking list " is matched, so that it may excavate " replenishing water and preserving moisture ", " whitening " the two functional attributes.
It may include the entity word of multiple classifications in the entity library, each entity word has generic and the entity The corresponding attribute information of word.For some ambiguity entity words, multiple and different classifications can be corresponded to.
Furthermore, it is contemplated that the presence of synonym and alias (for convenience, subsequent to be referred to as synonym), in institute Stating in entity library can also go back comprising corresponding to the synonym of some entity words or some attribute informations when searching the entity library It needs simultaneously match to determine the entity word and described inputted in information these synonyms with the input information The attribute information of entity word.
Step 202, user's current dialogue states are determined.
The dialogue state can be divided into the states such as greeting, inquiry, notice, confirmation, negative, such as can be according to corresponding Dialogue state classifier determines user's current dialogue states, and the dialogue state classifier can pass through the history for collecting user Dialogue corpus training obtains, and training process is similar with the conventional training process of classifier, and details are not described herein.
Step 203, system dialog state is updated according to user's current dialogue states.
That is, system dialog state needs are adjusted in real time according to user's current dialogue states, it is current with user Dialogue state is consistent.
Step 204, revert statement template corresponding with updated system dialog state is obtained.
In practical applications, the revert statement template of corresponding different system dialog states can be set, such as:
Correspondence system dialogue state is that the revert statement template of greeting state can have: " you are good ", " OK recently " etc.;
Correspondence system dialogue state is that the revert statement template of acknowledgement state can have: " good, your XXX has placed an order " Deng.
Step 205, the attribute information of the entity word and the entity word is filled into the revert statement template, is obtained To the original revert statement based on the input information.
It should be noted that in need can be filled out in corresponding revert statement template according to the difference of system dialog state The slot position filled, the slot position that can also be filled without needs, when carrying out information filling, according to the reality of the revert statement template of selection Depending on border needs.
For example the input information of user is " I wants to buy a cup of Java ", it is determined that the dialogue state of current system is confirmation shape State, and then it is based on revert statement template " good, your XXX has placed an order ", the entity word " coffee " in the input information is filled out It is charged to corresponding slot position, generating original revert statement is " good, your coffee has placed an order ".
User input information is " you have seen science fiction sheet multiple-series? " for another example, reality can be matched to according to entity library Body alias " multiple-series " finds the corresponding entity word of the alias " avenger alliance " and is matched to the attribute " science fiction " of the entity word, The dialogue state for determining current system is inquiry state, and then " what you said is nearest hot broadcast { film based on revert statement template Type } film { movie property word }? ", by the entity word " avenger alliance " inputted in information and its attribute information " section It is unreal " be filled into corresponding slot position respectively, generate original revert statement be " you say be nearest hot broadcast science fiction movies avenger connection Alliance? ".
In embodiments of the present invention, it needs to incorporate the identity character trait of the affective state of user and user generated above Original revert statement in, and then obtain the revert statement with identity emotion.It continues with and the process is said referring to Fig.1 It is bright.
Step 103, the affective state of user is determined according to the input information.
Specifically, emotion classifiers trained in advance be can use to determine the affective state of user, i.e., by the input The emotion classifiers that information input is trained in advance determine the affective state of user according to the output of the emotion classifiers.
It in training emotion classifiers, needs to preset affective style, for example, during the affective style may include: It is vertical, and it is following any one or more: it is glad, sad, angry, low.
Training data can be collected from the dialog history corpus of user, for example, according to the affective style of setting, from described The data for different emotions type are collected in the dialog history corpus of user as training data, then utilize the trained number The emotion classifiers are obtained according to training.The training process class of the training process of the emotion classifiers and conventional classifier Classifier is trained, details are not described herein.
The emotion classifiers can based on the user's input information respectively give a mark to each affective style, select highest scoring Affective style as the real-time affective state of user.
Step 104, according to the input information, the affective state of the user and the preparatory user excavated offline Identity personality portrait information, determines and replys type.
In embodiments of the present invention, the identity personality portrait information of the user is the information for portraying user characteristics, It can specifically include the tag set for describing user characteristics, further may also include the related information between different labels.
The label can specifically include: character attribute class label, and/or interest class label.Wherein, the character attribute Class label such as may include: age, gender etc.;The interest class label can be characterized with a series of entity words, such as certain The interest class label of user includes: " Zhao Liying ", " poplar power ", " Gao Yuanyuan ", " knowing no ", " costume piece ", " palace bucket is acute ", " basket Ball ", " NBA league matches ", " in library ".
The identity personality portrait information of the user needs offline excavation in advance, for example, can be from the dialog history of user It is excavated in the information such as corpus and historical behavior data, this will be described in detail later.
In embodiments of the present invention, the input information based on the user, the affective state of the user and the user Identity personality draw a portrait information, can use in advance trained reply type sorter to determine for user's current input information Reply type.Specifically, by the identity personality of the input information of the user, the affective state of the user and the user Type sorter is replied described in portrait information input, the reply type sorter can give a mark respectively to all types of, select score value The highest reply type for replying type as corresponding user's current input information.
The building process for replying type sorter is similar with the building process of general classification device, and detailed process is as follows: Type is replied in setting, and the different data for replying type are collected from the dialog history corpus of user as training data;Using institute It states training data training and obtains the reply type sorter.
In embodiments of the present invention, two or more can be set by the reply type, for example includes: neutrality Type and any one or more following type: lovely type, adult form, actively optimistic type.
Respective decoration information, such as common modal particle, emoticon etc. can be equipped under each reply type, these can be with It is determined by artificially collecting screening.For example, preposition modal particle or postposition modal particle have " rattling away ", " stick is rattled away " etc..
Step 105, according to the reply type and the original revert statement, the reply language for having identity emotion is generated Sentence.
In a kind of implementation, slot position decomposition can be carried out to original revert statement, and for each slot position after decomposing Corresponding content inquires preset style corpus, finds from style corpus and currently replys type is consistent and each slot The corresponding corpus content in position, and be the corpus content by the corresponding content modification of the slot position, according to slot position pair each after modification The content answered generates the revert statement for having identity emotion.The style corpus can store each style class in the form of a label The corpus of type, such as: movement class-basketball-{ NBA, NBA league matches, court star.}.
Further, decoration information corresponding with the reply type can also be obtained, and the decoration information is added Into the revert statement with identity emotion.
Such as: the identity portrait information of user includes: " 10~25 years old male ", has many Japanese youth dynamic in interest tags It is unrestrained, similar " SA is special eugenic ", " guarding sweetie ", " angel in love " etc..Reply input information, use of the type sorter according to user The reply type " lovely type " that the affective state at family and the identity portrait information of user determine;Original revert statement be " you are good, you Latte placed an order ", slot position decomposition is carried out to it, obtains the first slot position [address] " you are good ";Based on currently determining reply class Type is " lovely type ", searches style corpus, and the available address for meeting lovely type can be " small elder brother " etc.;Obtain the wind Lattice call " small elder brother ", are backfilling into [address] slot position of original revert statement, replace " you are good ";The rest may be inferred for other slot positions. Finally obtaining based on the modified revert statement with identity emotion of original revert statement may be " small elder brother, your latte It has placed an order." etc..
It should be noted that when carrying out the replacement of slot position content, since the entity word in original revert statement directly reflects Topic intention, therefore the content of slot position is not replaced where entity word, such as " latte " in above-mentioned example to guarantee modification after Revert statement correctness.
In another implementation, it can obtain meeting the current revert statement for replying type based on style statement model, Have the revert statement of identity emotion.
Wherein, the style statement model can use corpus and the corresponding original reply of each corpus of each stylistic category Sentence training obtains.
When generating the revert statement for having identity emotion using the style statement model, by the original revert statement In the corresponding current style statement model for replying type of input, the reply with identity emotion can be obtained according to the output of model Sentence.
It should be noted that for it is same reply type revert statement template can have it is multiple, it is correspondingly, available Multiple revert statements with identity emotion.In such a case, it is possible to be beaten based on language model these revert statements Point, select the revert statement of highest scoring as final revert statement.
Step 106, the output revert statement for having identity emotion.
In practical applications, the revert statement of textual form can be directly exported, can also be led to according to application environment needs Corresponding speech synthesis system is crossed, the revert statement is converted into voice output, without limitation to this embodiment of the present invention.
As shown in figure 3, be excavated offline in the embodiment of the present invention user identity personality portrait information flow chart, including Following steps:
Step 301, the dialog history corpus and historical behavior data of user are obtained respectively.
The historical behavior data of user mainly include the inquiry log of user, naturally it is also possible to including be able to reflect user its Some historical datas of its behavior, such as browsing webpage information, comment information etc., without limitation to this embodiment of the present invention.
It should be noted that the identity of user can be uniquely determined by User ID, User ID is usually tied up with application terminal It is fixed.Therefore, in practical applications, the dialog history corpus of the user and historical behavior data refer to the corresponding user and remember Record corpus and data in same terminal.
Step 302, true using attributive classification device trained in advance according to the dialog history corpus and historical behavior data The character attribute class label of the fixed user.
It should be noted that character attribute can there are many, such as: age, gender etc., to this need in advance training being directed to The attributive classification device of each particular persons attribute, for example, being directed to the attributive classification device at age, the other attributive classification device of specific aim etc..
When training is directed to the attributive classification device of some character attribute, need to set the classification for being directed to particular persons attribute; Collect the dialogue corpus and behavioral data of different user;It extracts and corresponds to not from the dialogue corpus and the behavioral data respectively Generic data are as training data;Obtain corresponding to the attribute point of the particular persons attribute using training data training Class device.
By taking the attributive classification device for the age as an example, for example the section of age characteristics can be set are as follows: 0~10 years old, 10~ 25 years old, 25~40 years old, 40~60 years old, 60 years old or more.When carrying out age of user judgement using the attributive classification device for the age, Inquiry log based on user then utilizes it is found that relevant content of buying house often occurs buying car or in the query information of the user For the attributive classification device at age, the age is obtained in the score in 25~40 years old section higher than other sections, therefore may determine that this The age of user is between 25~40.
Similarly, when carrying out user's Sexual discriminating using the other attributive classification device of specific aim, the inquiry log based on user It is found that the content relevant to women such as one-piece dress, lipstick often occurs in the query information of the user, then the other category of specific aim is utilized Property classifier, judges the gender of the user for women.
Step 303, historical behavior information is extracted from the historical behavior data.
The historical behavior information such as can be query word, query statement, comment sentence etc., to this embodiment of the present invention Without limitation.
Step 304, the entity library pre-established according to the historical behavior information matches, the entity word that matching is obtained are made For the interest class label of the user.
Historical behavior information based on user carries out Entities Matching by dictionary tree method, the entity word matched is made For the interest class label of the user, these interest class labels can be used to characterize the hobby feature of user.For example, user It queried " Zhao Liying knows no online viewing ", " marriage of the peak Zhao Liying Feng Shao ", " Zhao Liying produce surviving of son " etc., known by entity storehouse matching Not Chu entity word " Zhao Liying ", " Feng Shaofeng ", " knowing no ", use these entity words as the hobby feature of the user, i.e. institute State interest class label.
It should be noted that in practical applications, can be drawn a portrait according to the difference of application scenarios to the identity personality of user It is characterized with varigrained label, correspondingly, replying type has different granularities, such as is all lovely type, can also continue to It is divided into the lovely, maiden's type lovely etc. of child form.In addition, can not only be examined in the identity personality portrait for determining user Consider the personality of user, and it is also possible to consider the mood of user, viewpoint, the event of concern, age etc., uses such information for more complete The identity character trait of each user is portrayed to face, the characteristics of so as to preferably characterize each user.
Dialogue generation method provided in an embodiment of the present invention considers not only the dialogue of user's input when talking with generation Content, and in view of the identity character trait of the real-time affective state of user and user, according to user's current input information, use The identity personality of the real-time affective state at family and the user excavated offline in advance portrait information, determine and reply type, according to Original revert statement based on input information is revised as having the revert statement of identity emotion by the type of replying, so as to For different user input identical information, generate different revert statements, that is to say, that allow generate revert statement because People and it is different, and keep revert statement more humanized, improve flexibility and vividness with user session, greatly improve user Experience.
For example, when user input " I wants to buy one glass of hot latte " after, the original revert statement of generation be " you are good, you Latte has placed an order ".Using the present invention program, determine that replying type is " lovely type ", then is revised as " small brother for original revert statement Brother is good, your latte has placed an order, bear with~";
For another example the original revert statement of generation is " to adjust when user's input " today is said that mood is bad saturating by leader " Whole mood once ", since the current affective state of user is low state, determines that replying type is using the present invention program Original revert statement is then revised as " adjusting mood, refuel parent~" by " actively optimism type ".
As it can be seen that the identical input to different identity user may be implemented, provide different situations type using the present invention program Reply, the experience of user can be promoted in this way, make its experience dialogue side be more than an ice-cold robot.
It should be noted that the scheme of the embodiment of the present invention can be applied to session operational scenarios, user session experience is promoted.
Further, can also scheme slightly modification to the embodiment of the present invention, be applied to other scenes.For example, In information recommendation application, it can use the identity personality portrait information of determining user, recommendation information rewritten, makes to change Recommendation information after writing is more attractive and cordial feeling, to be easier to be easily accepted by a user.For example, user's input content includes " facial mask ", provide associated recommendation advertisement title be " buy facial mask, with regard to upper Jingdone district, it is preferential the more ".Utilize the present invention program, output Meet the title of active user's style and features are as follows: " parent recommends a few money popularity facial masks, remolds skin beauty."
Correspondingly, the embodiment of the present invention also provides a kind of dialogue generating means, as shown in figure 4, being a kind of knot of the device Structure block diagram.
In this embodiment, the dialogue generating means include following module:
Receiving module 401, for receiving user's current input information;The input information can be by voice input Voice messaging can be the text information inputted by the input methods such as phonetic, hand-written, without limitation to this embodiment of the present invention.
Sentence generation module 402, for generating the original revert statement based on the input information;
Affective state determining module 403, for determining the affective state of user according to the input information;
Determination type module 404 is replied, for according to the affective state of the input information, the user and offline in advance The identity personality portrait information of the user excavated, determines and replys type;
Sentence modified module 405, for generating and having identity feelings according to the reply type and the original revert statement The revert statement of sense;
Output module 406 specifically can be according to application environment need for exporting the revert statement for having identity emotion It wants, directly exports the revert statement of textual form, can also be converted the revert statement by corresponding speech synthesis system At voice output, without limitation to this embodiment of the present invention.
In embodiments of the present invention, the original revert statement can be generated using the prior art.In addition, the present invention is implemented Example also provides a kind of specific structure of sentence generation module, as shown in figure 5, including following each unit:
Information identificating unit 421, for identifying the entity word in the input information using the entity library pre-established With the attribute information of the entity word;
Dialogue state determination unit 422, for determining user's current dialogue states;
State updating unit 423, for updating system dialog state according to user's current dialogue states;Namely It says, needs to keep system dialog state consistent with user's current dialogue states in real time;
Template acquiring unit 424, for obtaining revert statement template corresponding with updated system dialog state;
Fills unit 425, for the attribute information of the entity word and the entity word to be filled into the revert statement In template, the original revert statement based on the input information is obtained.
The building process in the entity library has been described in detail in embodiment of the present invention method in front, no longer superfluous herein It states.It may include the entity word of multiple classifications in the entity library, each entity word has generic and the entity word pair The attribute information answered.For some ambiguity entity words, multiple and different classifications can be corresponded to.Correspondingly, above- mentioned information recognition unit 421, which can use dictionary tree finding algorithm, searches the entity library, identifies entity word included in the input information.
In embodiments of the present invention, the dialogue state can be divided into the states such as greeting, inquiry, notice, confirmation, negative, For example user's current dialogue states can be determined according to corresponding dialogue state classifier, the dialogue state classifier can be with Dialog history corpus training by collecting user obtains, and training process is similar with the conventional training process of classifier, herein It repeats no more.
In practical applications, the revert statement template that corresponding different system dialog states can be set, moreover, according to system The difference of dialogue state, in corresponding revert statement template can filling in need slot position and also without needing to fill Slot position.Correspondingly, above-mentioned fills unit 425, can be according to the reality of the revert statement template of selection when carrying out information filling Depending on needing.
With continued reference to Fig. 4, above-mentioned affective state determining module 403 can use emotion classifiers trained in advance to determine The affective state of user, i.e., the emotion classifiers trained the input information input in advance, according to the emotion classifiers Export the affective state for determining user.
In one implementation, the emotion classifiers can be advanced with by corresponding emotion classifiers training module Training data training obtains.The emotion classifiers training module can be used as a part of apparatus of the present invention, can also be independent In the device, without limitation to this present invention.
A kind of specific structure of the emotion classifiers training module may include following each unit:
Affective style setup unit, for setting affective style;The affective style may include: neutrality, and following Any one or more: it is glad, sad, angry, low etc.;
First training data collector unit is directed to above-mentioned different emotions class for collecting from the dialog history corpus of user The data of type are as training data;
First training unit, for obtaining the emotion classifiers, specific training process using training data training It is similar with the conventional training process of classifier, for example trained point using multilayer perceptron MLP classification method commonly used in the trade Class device, details are not described herein.
The emotion classifiers can based on the user's input information respectively give a mark to each affective style, correspondingly, described Affective state determining module 403 selects the affective style of highest scoring as the real-time affective state of user.
In embodiments of the present invention, the identity personality portrait information of the user is the information for portraying user characteristics, It can specifically include the tag set for describing user characteristics, further may also include the related information between different labels.
The label can specifically include: character attribute class label, and/or interest class label.Wherein, the character attribute Class label such as may include: age, gender etc.;The interest class label can be characterized with a series of entity words.
The identity personality portrait information of the user needs offline excavation in advance, for example, can be by corresponding information excavating Module is excavated from the information such as the dialog history corpus of user and historical behavior data.Equally, the information excavating module It can be used as a part of apparatus of the present invention, it can also be independently of the device, without limitation to this present invention.
As shown in fig. 6, being a kind of structural block diagram of information excavating module in the embodiment of the present invention, in this embodiment, institute Stating information excavating module 600 includes following each unit:
Information acquisition unit 601, for obtaining the dialog history corpus and historical behavior data of the user respectively;
Character attribute class tag determination unit 602, for utilizing according to the dialog history corpus and historical behavior data Trained attributive classification device determines the character attribute class label of the user in advance;
Behavioural information extraction unit 603, for extracting historical behavior information from the historical behavior data;
Interest class tag determination unit 604, the entity library for being pre-established according to the historical behavior information matches will Interest class label of the obtained entity word as the user is matched, these interest class labels can be used to characterize the interest of user Like feature.
Wherein, the historical behavior data of user mainly include the inquiry log of user, naturally it is also possible to including being able to reflect Some historical datas of the other behaviors of user, such as browsing webpage information, comment information etc..Correspondingly, the historical behavior letter Breath such as can be query word, query statement, comment sentence etc., without limitation to this embodiment of the present invention.
It is previously noted that the identity personality portrait information of the user may include the tally set for describing user characteristics It closes, the label can specifically include: character attribute class label, and/or interest class label.Wherein, the character attribute category Label such as may include: age, gender etc., that is to say, that character attribute can there are many, accordingly, it is desirable in advance train needle To the attributive classification device of each particular persons attribute, for example, being directed to attributive classification device, the other attributive classification device of specific aim at age Deng.
The attributive classification device can by corresponding attributive classification device training module by collect different user to language Material and behavioral data training obtain.Similarly, the attributive classification device training module can be used as a part of apparatus of the present invention, It can also be independently of the device, without limitation to this present invention.
A kind of specific structure of the attributive classification device training module may include following each unit:
Attribute classification setup unit, for setting the classification for being directed to particular persons attribute;
Second data collection module, for collecting the dialogue corpus and behavioral data of different user;The history of the user Behavioral data mainly includes the inquiry log of user, naturally it is also possible to some history numbers including being able to reflect the other behaviors of user According to, such as browsing webpage information, comment information etc., without limitation to this embodiment of the present invention;
Data extracting unit, it is different classes of for extracting correspondence from the dialogue corpus and the behavioral data respectively Data are as training data;
Second training unit, for obtaining corresponding to the attribute point of the particular persons attribute using training data training Class device, specific training process is similar with the conventional training process of classifier, for example utilizes multilayer perceptron MLP commonly used in the trade Classification method trains classifier, and details are not described herein.
It should be noted that in practical applications, can be drawn a portrait according to the difference of application scenarios to the identity personality of user It is characterized with varigrained label, correspondingly, replying type has different granularities, such as is all lovely type, can also continue to It is divided into the lovely, maiden's type lovely etc. of child form.In addition, can not only be examined in the identity personality portrait for determining user Consider the personality of user, and it is also possible to consider the mood of user, viewpoint, the event of concern, age etc., uses such information for more complete The identity character trait of each user is portrayed to face, the characteristics of so as to preferably characterize each user.
With continued reference to Fig. 4, above-mentioned reply determination type module 404 specifically can be by the input information, the user The reply classification of type that the identity personality of affective state and the user excavated offline in advance portrait information input are trained in advance Device determines according to the output for replying type sorter and replys type.
The type sorter of replying can collect the history pair of user by replying type sorter training module accordingly The training of language material obtains.Similarly, the type sorter training module of replying can be used as a part of apparatus of the present invention, It can be independently of the device, without limitation to this present invention.
A kind of specific structure for replying type sorter training module may include following each unit:
Type set unit is replied, replys type for setting;It in embodiments of the present invention, can be by the reply type It is set as two or more, for example includes: neutral type and any one or more following type: lovely type, adult form, product Blissful sight type etc.;
Third data collection module, for collecting the different data conducts for replying type from the dialog history corpus of user Training data;
Third training unit, for obtaining the reply type sorter using training data training, specific training Process is similar with the conventional training process of classifier, for example utilizes multilayer perceptron MLP classification method training commonly used in the trade Classifier out, details are not described herein.
It should be noted that being designed with respective decoration information under each reply type, such as common modal particle, emoticon Number etc..
In one implementation, the sentence modified module 405 can be by carrying out slot to the original revert statement The mode that position is decomposed obtains the revert statement with identity emotion.Correspondingly, one kind of the sentence modified module 405 is specific Structure may include following each unit:
Slot position decomposition unit obtains each slot position and the slot position for carrying out slot position decomposition to the original revert statement Corresponding content;
Content modifying unit, for inquiring preset wind for the corresponding content of the affiliated slot position of non-physical word after decomposing Lattice corpus, obtain and it is described reply type is consistent, corresponding with slot position corpus content, and it is the slot position is corresponding Content modification is the corpus content;
Content assembled unit, for generating the reply language for having identity emotion according to the corresponding content of slot position each after modification Sentence.
It is previously noted that respective decoration information can be equipped under each reply type, such as common modal particle, emoticon Deng, these can by artificially collect screening determine.For example, preposition modal particle or postposition modal particle have " rattling away ", " stick Rattle away " etc..It correspondingly, not only may include above-mentioned each unit in another specific structure of the sentence modified module 405, also Can further comprise: modification unit for obtaining decoration information corresponding with the reply type, and the decoration information be added It is added in the revert statement with identity emotion.
In another implementation, the sentence modified module 405 can use the original revert statement and in advance Trained style statement model corresponding with the reply type obtains the revert statement with identity emotion.
Wherein, the style statement model can use corpus and the corresponding original reply of each corpus of each stylistic category Sentence training obtains.
When generating the revert statement for having identity emotion using the style statement model, the sentence modified module 405 correspond to the original revert statement input in the current style statement model for replying type, according to the output of model Obtain the revert statement with identity emotion.
It should be noted that for it is same reply type revert statement template can have it is multiple, it is correspondingly, available Multiple revert statements with identity emotion.In such a case, it is possible to be based on by corresponding sentence screening module (not shown) Language model gives a mark to these revert statements, selects the revert statement of highest scoring as final revert statement.
It should be noted that for above-mentioned each embodiment of dialogue generating means, since each module, the function of unit are real It is now similar with corresponding method, therefore describe fairly simple to each embodiment of the dialogue generating means, related place can Referring to the corresponding portion explanation of embodiment of the method.
Dialogue generating means provided in an embodiment of the present invention consider not only the dialogue of user's input when talking with generation Content, and in view of the identity character trait of the real-time affective state of user and user, according to user's current input information, use The identity personality of the real-time affective state at family and the user excavated offline in advance portrait information, determine and reply type, according to Original revert statement based on input information is revised as having the revert statement of identity emotion by the type of replying, so as to For different user input identical information, generate different revert statements, that is to say, that allow generate revert statement because People and it is different, and keep revert statement more humanized, improve flexibility and vividness with user session, greatly improve user Experience.
Fig. 7 is shown according to an exemplary embodiment a kind of for talking with the block diagram of the device 800 of generation method.Example Such as, device 800 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, and plate is set It is standby, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig. 7, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing element 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of other data to support the operation in equipment 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by the volatibility or non-volatile memory device or their group of any classification It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 806 provides electric power for the various assemblies of device 800.Electric power assembly 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When equipment 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of equipment 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be completed above-mentioned key by the execution of the processor 820 of device 800, and accidentally touching is entangled Wrong method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD- ROM, tape, floppy disk and optical data storage devices etc..
The present invention also provides a kind of non-transitorycomputer readable storage mediums, when the instruction in the storage medium is by moving When the processor of dynamic terminal executes, so that mobile terminal is able to carry out all or part of step in aforementioned present invention embodiment of the method Suddenly.
Fig. 8 is the structural schematic diagram of server in the embodiment of the present invention.The server 1900 can be different because of configuration or performance And generate bigger difference, may include one or more central processing units (Central Processing Units, CPU) 1922 (for example, one or more processors) and memory 1932, one or more storage application programs 1942 or data 1944 storage medium 1930 (such as one or more mass memory units).Wherein, memory 1932 It can be of short duration storage or persistent storage with storage medium 1930.Be stored in storage medium 1930 program may include one or More than one module (diagram does not mark), each module may include to the series of instructions operation in server.Further Ground, central processing unit 1922 can be set to communicate with storage medium 1930, and storage medium 1930 is executed on server 1900 In series of instructions operation.
Server 1900 can also include one or more power supplys 1926, one or more wired or wireless nets Network interface 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or, one or More than one operating system 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM Etc..
Obviously, embodiment described above only a part of the embodiments of the present invention, instead of all the embodiments. Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts all Other embodiments should fall within the scope of the present invention.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of dialogue generation method, which is characterized in that the described method includes:
Receive user's current input information;
Generate the original revert statement based on the input information;
The affective state of user is determined according to the input information;
According to the identity personality portrait of the input information, the affective state of the user and the preparatory user excavated offline Information determines and replys type;
According to the reply type and the original revert statement, the revert statement for having identity emotion is generated;
The output revert statement for having identity emotion.
2. the method according to claim 1, wherein described generate the original reply language based on the input information Sentence include:
The attribute information of the entity word and the entity word in the input information is identified using the entity library pre-established;
Determine user's current dialogue states;
System dialog state is updated according to user's current dialogue states;
Obtain revert statement template corresponding with updated system dialog state;
The attribute information of the entity word and the entity word is filled into the revert statement template, is obtained based on described defeated Enter the original revert statement of information.
3. the method according to claim 1, wherein identity personality portrait information includes for describing user The tag set of feature, the label include: character attribute class label, and/or interest class label.
4. according to the method described in claim 3, it is characterized in that, the method also includes excavating institute offline in the following way State the identity personality portrait information of user:
The dialog history corpus and historical behavior data of the user are obtained respectively;
According to the dialog history corpus and historical behavior data, determine the user's using attributive classification device trained in advance Character attribute class label;
Historical behavior information is extracted from the historical behavior data;
According to the entity library that the historical behavior information matches pre-establish, the entity word that matching is obtained is as the user's Interest class label.
5. according to the method described in claim 4, it is characterized in that, the method also includes training attribute point in the following way Class device:
Setting is directed to the classification of particular persons attribute;
Collect the dialogue corpus and behavioral data of different user;
Corresponding different classes of data are extracted from the dialogue corpus and the behavioral data respectively as training data;It utilizes The training data training obtains corresponding to the attributive classification device of the particular persons attribute.
6. the method according to claim 1, wherein described according to the input information, the emotion of the user State and the identity personality of the user excavated offline in advance portrait information determine that replying type includes:
By the identity personality portrait letter of the input information, the affective state of the user and the preparatory user excavated offline Breath input reply type sorter trained in advance, determines according to the output for replying type sorter and replys type.
7. method according to any one of claims 1 to 6, which is characterized in that described according to the reply type and described Original revert statement, generating the revert statement with identity emotion includes:
Slot position decomposition is carried out to the original revert statement, obtains each slot position and the corresponding content of the slot position;
For the corresponding content of the affiliated slot position of non-physical word after decomposition, preset style corpus is inquired, is obtained and described time Corpus content that multiple type is consistent, corresponding with the slot position, and be in the corpus by the corresponding content modification of the slot position Hold;
The revert statement for having identity emotion is generated according to the corresponding content of slot position each after modification.
8. a kind of dialogue generating means, which is characterized in that described device includes:
Receiving module, for receiving user's current input information;
Sentence generation module, for generating the original revert statement based on the input information;
Affective state determining module, for determining the affective state of user according to the input information;
Determination type module is replied, for excavating offline according to the affective state of the input information, the user and in advance The identity personality portrait information of the user, determines and replys type;
Sentence modified module, for generating returning with identity emotion according to the reply type and the original revert statement Multiple sentence;
Output module, for exporting the revert statement for having identity emotion.
9. a kind of electronic equipment characterized by comprising one or more processors, memory;
The memory is for storing computer executable instructions, and for executing, the computer is executable to be referred to the processor It enables, to realize method as described in any one of claim 1 to 7.
10. a kind of readable storage medium storing program for executing, is stored thereon with instruction, described instruction is performed to realize as claim 1 to 7 is any Method described in.
CN201910450518.8A 2019-05-28 2019-05-28 Talk with generation method and device Pending CN110188177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910450518.8A CN110188177A (en) 2019-05-28 2019-05-28 Talk with generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910450518.8A CN110188177A (en) 2019-05-28 2019-05-28 Talk with generation method and device

Publications (1)

Publication Number Publication Date
CN110188177A true CN110188177A (en) 2019-08-30

Family

ID=67718201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910450518.8A Pending CN110188177A (en) 2019-05-28 2019-05-28 Talk with generation method and device

Country Status (1)

Country Link
CN (1) CN110188177A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704586A (en) * 2019-09-30 2020-01-17 支付宝(杭州)信息技术有限公司 Information processing method and system
CN110809095A (en) * 2019-10-25 2020-02-18 大唐网络有限公司 Method and device for voice call-out
CN111159374A (en) * 2019-12-26 2020-05-15 北京明略软件系统有限公司 Intelligent question and answer display method and device and computer readable storage medium
CN111414733A (en) * 2020-03-18 2020-07-14 联想(北京)有限公司 Data processing method and device and electronic equipment
CN111897933A (en) * 2020-07-27 2020-11-06 腾讯科技(深圳)有限公司 Emotional dialogue generation method and device and emotional dialogue model training method and device
CN112163081A (en) * 2020-10-14 2021-01-01 网易(杭州)网络有限公司 Label determination method, device, medium and electronic equipment
CN112395399A (en) * 2020-11-13 2021-02-23 四川大学 Specific personality dialogue robot training method based on artificial intelligence
CN112417117A (en) * 2020-11-18 2021-02-26 腾讯科技(深圳)有限公司 Session message generation method, device and equipment
WO2021068490A1 (en) * 2019-10-12 2021-04-15 深圳壹账通智能科技有限公司 Reply message generation method and apparatus, computer device and storage medium
CN112988956A (en) * 2019-12-17 2021-06-18 北京搜狗科技发展有限公司 Method and device for automatically generating conversation and method and device for detecting information recommendation effect
CN113032661A (en) * 2019-12-09 2021-06-25 北京搜狗科技发展有限公司 Information interaction method and device
CN113192505A (en) * 2021-04-30 2021-07-30 中国工商银行股份有限公司 Session information generation method and device and service robot
CN113326367A (en) * 2021-06-30 2021-08-31 四川启睿克科技有限公司 Task type dialogue method and system based on end-to-end text generation
CN113360614A (en) * 2021-05-31 2021-09-07 多益网络有限公司 Method, device, terminal and medium for controlling reply emotion of generating type chat robot
CN113377938A (en) * 2021-06-24 2021-09-10 北京小米移动软件有限公司 Conversation processing method and device
CN114020898A (en) * 2022-01-07 2022-02-08 和美(深圳)信息技术股份有限公司 Man-machine automatic dialogue method, device, electronic equipment and storage medium
WO2022222841A1 (en) * 2021-04-20 2022-10-27 北京沃东天骏信息技术有限公司 Information display method and apparatus, electronic device, and computer-readable medium
CN116628153A (en) * 2023-05-10 2023-08-22 上海任意门科技有限公司 Method, device, equipment and medium for controlling dialogue of artificial intelligent equipment
CN116861860A (en) * 2023-07-06 2023-10-10 百度(中国)有限公司 Text processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470700A (en) * 2007-12-28 2009-07-01 日电(中国)有限公司 Text template generator, text generation equipment, text checking equipment and method thereof
WO2012000043A1 (en) * 2010-06-29 2012-01-05 Morf Dynamics Pty Ltd System and method of providing a computer-generated response
CN106448670A (en) * 2016-10-21 2017-02-22 竹间智能科技(上海)有限公司 Dialogue automatic reply system based on deep learning and reinforcement learning
CN106683672A (en) * 2016-12-21 2017-05-17 竹间智能科技(上海)有限公司 Intelligent dialogue method and system based on emotion and semantics
CN107169113A (en) * 2017-05-19 2017-09-15 网易(杭州)网络有限公司 Method and apparatus for realizing artificial intelligence dialogue based on user's personality
CN108959627A (en) * 2018-07-23 2018-12-07 北京光年无限科技有限公司 Question and answer exchange method and system based on intelligent robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470700A (en) * 2007-12-28 2009-07-01 日电(中国)有限公司 Text template generator, text generation equipment, text checking equipment and method thereof
WO2012000043A1 (en) * 2010-06-29 2012-01-05 Morf Dynamics Pty Ltd System and method of providing a computer-generated response
CN106448670A (en) * 2016-10-21 2017-02-22 竹间智能科技(上海)有限公司 Dialogue automatic reply system based on deep learning and reinforcement learning
CN106683672A (en) * 2016-12-21 2017-05-17 竹间智能科技(上海)有限公司 Intelligent dialogue method and system based on emotion and semantics
CN107169113A (en) * 2017-05-19 2017-09-15 网易(杭州)网络有限公司 Method and apparatus for realizing artificial intelligence dialogue based on user's personality
CN108959627A (en) * 2018-07-23 2018-12-07 北京光年无限科技有限公司 Question and answer exchange method and system based on intelligent robot

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704586A (en) * 2019-09-30 2020-01-17 支付宝(杭州)信息技术有限公司 Information processing method and system
WO2021068490A1 (en) * 2019-10-12 2021-04-15 深圳壹账通智能科技有限公司 Reply message generation method and apparatus, computer device and storage medium
CN110809095A (en) * 2019-10-25 2020-02-18 大唐网络有限公司 Method and device for voice call-out
CN113032661A (en) * 2019-12-09 2021-06-25 北京搜狗科技发展有限公司 Information interaction method and device
CN112988956A (en) * 2019-12-17 2021-06-18 北京搜狗科技发展有限公司 Method and device for automatically generating conversation and method and device for detecting information recommendation effect
CN111159374A (en) * 2019-12-26 2020-05-15 北京明略软件系统有限公司 Intelligent question and answer display method and device and computer readable storage medium
CN111414733A (en) * 2020-03-18 2020-07-14 联想(北京)有限公司 Data processing method and device and electronic equipment
CN111897933A (en) * 2020-07-27 2020-11-06 腾讯科技(深圳)有限公司 Emotional dialogue generation method and device and emotional dialogue model training method and device
CN111897933B (en) * 2020-07-27 2024-02-06 腾讯科技(深圳)有限公司 Emotion dialogue generation method and device and emotion dialogue model training method and device
CN112163081A (en) * 2020-10-14 2021-01-01 网易(杭州)网络有限公司 Label determination method, device, medium and electronic equipment
CN112395399A (en) * 2020-11-13 2021-02-23 四川大学 Specific personality dialogue robot training method based on artificial intelligence
CN112417117A (en) * 2020-11-18 2021-02-26 腾讯科技(深圳)有限公司 Session message generation method, device and equipment
WO2022222841A1 (en) * 2021-04-20 2022-10-27 北京沃东天骏信息技术有限公司 Information display method and apparatus, electronic device, and computer-readable medium
CN113192505A (en) * 2021-04-30 2021-07-30 中国工商银行股份有限公司 Session information generation method and device and service robot
CN113360614A (en) * 2021-05-31 2021-09-07 多益网络有限公司 Method, device, terminal and medium for controlling reply emotion of generating type chat robot
CN113377938A (en) * 2021-06-24 2021-09-10 北京小米移动软件有限公司 Conversation processing method and device
CN113326367A (en) * 2021-06-30 2021-08-31 四川启睿克科技有限公司 Task type dialogue method and system based on end-to-end text generation
CN113326367B (en) * 2021-06-30 2023-06-16 四川启睿克科技有限公司 Task type dialogue method and system based on end-to-end text generation
CN114020898A (en) * 2022-01-07 2022-02-08 和美(深圳)信息技术股份有限公司 Man-machine automatic dialogue method, device, electronic equipment and storage medium
CN116628153A (en) * 2023-05-10 2023-08-22 上海任意门科技有限公司 Method, device, equipment and medium for controlling dialogue of artificial intelligent equipment
CN116628153B (en) * 2023-05-10 2024-03-15 上海任意门科技有限公司 Method, device, equipment and medium for controlling dialogue of artificial intelligent equipment
CN116861860A (en) * 2023-07-06 2023-10-10 百度(中国)有限公司 Text processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110188177A (en) Talk with generation method and device
CN110288077B (en) Method and related device for synthesizing speaking expression based on artificial intelligence
CN110634483B (en) Man-machine interaction method and device, electronic equipment and storage medium
CN108363706B (en) Method and device for man-machine dialogue interaction
CN109635130A (en) The intelligent automation assistant explored for media
CN110503942A (en) A kind of voice driven animation method and device based on artificial intelligence
US11074916B2 (en) Information processing system, and information processing method
WO2015178078A1 (en) Information processing device, information processing method, and program
CN107480161A (en) The intelligent automation assistant probed into for media
CN108874967A (en) Dialogue state determines method and device, conversational system, terminal, storage medium
CN108735204A (en) Equipment for executing task corresponding with user spoken utterances
CN107992485A (en) A kind of simultaneous interpretation method and device
CN107480766B (en) Method and system for content generation for multi-modal virtual robots
CN111538456A (en) Human-computer interaction method, device, terminal and storage medium based on virtual image
CN110222256A (en) A kind of information recommendation method, device and the device for information recommendation
CN107977928A (en) Expression generation method, apparatus, terminal and storage medium
CN108345667A (en) A kind of searching method and relevant apparatus
CN109308178A (en) A kind of voice drafting method and its terminal device
CN110209778A (en) A kind of method and relevant apparatus of dialogue generation
CN107291772A (en) One kind search access method, device and electronic equipment
CN110110204A (en) A kind of information recommendation method, device and the device for information recommendation
CN106649712A (en) Method and device for inputting expression information
CN108717403A (en) A kind of processing method, device and the device for processing
KR101567154B1 (en) Method for processing dialogue based on multiple user and apparatus for performing the same
US11443738B2 (en) Electronic device processing user utterance and control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20190828

Address after: 310018 Room 1501, Building 57, Baiyang Street Science Park Road, Hangzhou Economic and Technological Development Zone, Zhejiang Province

Applicant after: Sogou (Hangzhou) Intelligent Technology Co., Ltd.

Applicant after: Sogo Science-Technology Development Co., Ltd., Beijing

Address before: 100084 Beijing, Zhongguancun East Road, building 1, No. 9, Sohu cyber building, room 9, room, room 01

Applicant before: Sogo Science-Technology Development Co., Ltd., Beijing

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190830

WD01 Invention patent application deemed withdrawn after publication